BGP Conditional advertisement

Unanswered Question
May 9th, 2008

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

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

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,

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

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

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,

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

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,

Actions

This Discussion