Today I’m sharing a “duh” moment that I think needs to be recorded partly for comedy value and, perhaps, partly to save somebody else the same fate. It’s one of those “it’s right in front of you, idiot” moments.
The story begins with our intrepid engineers trying to redistribute OSPF into BGP using a route-map, and finding an error.
Real simple stuff (this is a lab configuration, hence crazy over-simplifications). You can assume that the prefix-list exists, but isn’t shown here:
route-map OSPF-TO-BGP permit 10 match ip address prefix-list PL-OSPF-TO-BGP set community 65000:1 65000:90 additive ! router ospf 1 network 0.0.0.0 0.0.0.0 area 0 ! router bgp 1 redistribute ospf 1 route-map OSPF-TO-BGP !
Straightforward, right? Match specific OSPF routes and set a couple of communities on them as you put them in BGP. But when you try to enter the configuration above, you get an error:
sad-panda(config)#router bgp 1 sad-panda(config-router)#redistribute ospf 1 route-map OSPF-TO-BGP % "OSPF-TO-BGP" used as redistribute ospf into bgp route-map, set community add not supported
Kind of weird that it wouldn’t support adding a community on redistribution from OSPF to BGP, especially as I’m positive I’ve done that before. I spent a while staring at the error message trying to figure out exactly what the problem really was, and figure out if this was an IOS version thing, a syntax thing, or what.
That Duh Moment
You probably already spotted it, but the answer – perhaps for once – is right in front of me in the error message. Specifically, the word that needs to be highlighted is “add”, or more properly, “additive”.
In other words, you can’t add communities to an OSPF route when you redistribute it into BGP, because, well, it doesn’t have any communities to start with. You can, however, set the communities. So the syntax below would be perfectly valid:
route-map OSPF-TO-BGP permit 10 match ip address prefix-list PL-OSPF-TO-BGP set community 65000:1 65000:90 !
I could argue that IOS should be smart enough to realize that I want to add communities where none existed previously and just deal with the syntax, but for whatever reason it doesn’t, and instead you get the error message.
And What Did We Learn?
Not a lot really. Well ok, I learned that sometimes the word additive gets shoved on the end of a set community configuration line out of habit rather than need. And that sometimes the trick with error messages is figuring out which word is the important one. This was definitely one of those times.
You may now laugh 🙂
Hello, please is there any possibility to hide that social media bar that’s floating above webpage? It kind of makes actual text hard to read as it floats dirctly over text. It’s specially annoying on iOS as I cannot resize page or anything and two thirds of lines are covered by that thingy.
Thank you for good reading on yoyr blog BTW 🙂
It should be better now – I’ve stopped it floating to the side, and when I test on my iPhone with mobile theme turned off, it seems to be gone (sadly, completely gone, but you can’t win ’em all).
Normally when using iOS, the site should detect that you’re on a mobile device and use the optimized mobile theme, but clearly it fails at times. Thanks for letting me know!