I am still preparing for my BGP exam, and found myself going through Narbiks old Soup-to-Nuts BGP labs. They are very interesting. One thing that caught me off guard was conditional route advertisements in bgp. They were not discussed in either of the BGP books I read unfortunately. So, I decided to post a bit here. Take the following topo:
Then we configure our neighbor statement under our BGP process:
So lets go through what this means...To neighbor 220.127.116.11 we want to advertise NotThere (18.104.22.168) only if advertise (22.214.171.124) *exists*. So if 126.96.36.199 is present, 188.8.131.52 is advertised to R3 as well. If its not present, and 184.108.40.206 is, 220.127.116.11 is pulled from the advertisements. Its worth mentioning that there is also a non-exist-map you can use to say advertise this when this (non-advertise-map) is absent from the bgp table. Handy little tools. You can verify with the "show ip bgp neighbor [ip address] advertised-routes" command, or this:
You should see the condition-map line third up from the bottom. It tells you the route-map mappings by name, and also the status of the condition-map. Here it is advertise because the 18.104.22.168 route is up. If I were to shut down that interface the status would move to withdrawn. On a side note, today when I initially set this up I got a status uninitialized message. After quite a bit of digging, thanks Brian McGahan, I found a groupstudy post that mentioned that there was a bug in the 12.0(T) release that made this happen. I upgraded the IOS and got some joy from my router. Thanks for listening.