BGP Conditional advertisement

Unanswered Question
May 9th, 2008

Hi all, kindly refer to this document

now if i want this

If exists in R102's BGP table, then do not advertise the 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 ?


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Harold Ritter Fri, 05/09/2008 - 10:11


This is exactly what the example does, as per comments in the configuration example:

!--- Advertises the routes matched in the route-map ADVERTISE (

!--- only if the routes matched in route-map NON-EXIST (

!--- do not exist in the BGP table.

So if is present, will not be advertised.

If you wanted the opposite (i.e. advertise only when is present) then you would use an exist-map instead of a non-exist-map.


cisconoobie Fri, 05/09/2008 - 10:16

Try this. I'm not at a router to test but see if it works for you.

access-list 60 permit

access-list 65 permit

route-map EXIST deny 10

match ip address 65

route-map ADVERTISE permit 10

match ip address 60

neighbor advertise-map ADVERTISE exist-map EXIST

Again, try this in a test environment as I didn't have a chance to test this myself.

Harold Ritter Fri, 05/09/2008 - 10:32


This configuration would advertise if 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?


illusion_rox Fri, 05/09/2008 - 11:23

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 ??

Harold Ritter Fri, 05/09/2008 - 14:08


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.



This Discussion