04-12-2012 04:36 PM - edited 03-04-2019 04:00 PM
Hello all,
I've got a situation where I want to conditionally advertise a prefix via BGP when any 32 bit route exists for the given prefix. E.g. I only want to advertise prefix 198.168.1.0/24 if a /32 exists for this network, so say 192.168.1.1/32 or 2/32 or 3/32. On top of this I was wondering if there is a way to make it intelligent using an if then type of condition:
if any 192.168.1.* with a /32 mask exists then advertise 192.168.1.0/24 else don't advertise 192.168.1.0/24.
I know about conditional BGP advertisement using the non-exist-map but this only works if a prefix is not present in the IP routing table.
I was wondering if IP SLA or PfR may work. I’ve been looking into IP SLA and I haven’t really been able to figure out a way to do it.
Has anyone done this or attempted it? Even if it doesn’t include a wild card like the * and is just based on a specific prefix I’d like to know.
Thanks,
Bill
04-13-2012 02:24 AM
I am not sure if we can do this using methods you mentioned, but exist-map can be used instead of using non-exist-map.
Depending on what (eg.component routes) and how you want to advertise, following are two options:
1] bgp inject-map RM exist-map RM
2] neighbor
advertise-map RM exist-map RMRM = Route Map
04-13-2012 06:24 AM
Hi,
I agree with Nandan. You can achieve this with one of the 2 aforementioned methods.
You can make the condition more "intelligent" as you requested, if you use to the condition of the Route Map a prefix list like the next:
ip prefix-list CONDITION permit 192.168.1.0/24 ge 32
Then, if any 192.168.1.* with a /32 mask exists then you can advertise 192.168.1.0/24 else don't advertise 192.168.1.0/24.
Hope that helps!
Vasilis
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide