05-09-2008 08:07 AM - edited 03-05-2019 10:52 PM
Hi all, kindly refer to this document
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080094309.shtml
now if i want this
If 192.168.50.0/24 exists in R102's BGP table, then do not advertise the 128.16.16.0/24 network to R101.
how can i accomplish this ? if i want to block advertisement of certain prefix when a particular prefix is in the BGP table then how can i do that ?
Thanks
05-09-2008 10:11 AM
Ovais,
This is exactly what the example does, as per comments in the configuration example:
!--- Advertises the routes matched in the route-map ADVERTISE (128.16.16.0/24)
!--- only if the routes matched in route-map NON-EXIST (192.168.50.0/24)
!--- do not exist in the BGP table.
So if 192.168.50.0/24 is present, 128.16.16.0/24 will not be advertised.
If you wanted the opposite (i.e. advertise 128.16.16.0/24 only when 192.168.50.0/24 is present) then you would use an exist-map instead of a non-exist-map.
Regards,
05-09-2008 10:16 AM
Try this. I'm not at a router to test but see if it works for you.
access-list 60 permit 128.16.16.0 0.0.0.255
access-list 65 permit 192.168.50.0 0.0.0.255
route-map EXIST deny 10
match ip address 65
route-map ADVERTISE permit 10
match ip address 60
neighbor 10.10.10.1 advertise-map ADVERTISE exist-map EXIST
Again, try this in a test environment as I didn't have a chance to test this myself.
05-09-2008 10:32 AM
Sparky,
This configuration would advertise 128.16.16.0/24 if 192.168.50.0/24 exists.
From the original poster:
"if i want to block advertisement of certain prefix when a particular prefix is in the BGP table:
Sounds like the opposite, right?
Regards,
05-09-2008 10:45 AM
I guess, I was just giving ideas.
05-09-2008 11:23 AM
hi guys, i got it done :) i was a bit confused but still did it, one thing for sure is that we cant use deny statements in any route-map ( advertise, exist and non-exist ) right ??
05-09-2008 02:08 PM
Ovais,
That is correct. You need to work either with the exist-map or non-exist-map but the trigger has to be done on a permit.
Regards,
05-09-2008 05:57 PM
Sparky,
Understood. Thanks for your contribution to NetPro.
Regards,
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