cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
840
Views
0
Helpful
7
Replies

BGP Conditional advertisement

illusion_rox
Level 1
Level 1

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

7 Replies 7

Harold Ritter
Spotlight
Spotlight

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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

cisconoobie
Level 2
Level 2

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.

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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

I guess, I was just giving ideas.

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

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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Sparky,

Understood. Thanks for your contribution to NetPro.

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)