Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

BGP Advertise when Default Route available

I have 2 routers which are Peering using EBGP.

Router B learns a default route from Router A.

Router B advertises 2 prefixes to router A.

I wish to only allow Router B to Advertise these prefixes as lond as Router B is learning a Default Route from Router A (i.e. Router A is the next hop/Neighbor for teh default route).

Is it possible to do this with Prefix Lists and a route-map?

Thanks

Tom

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: BGP Advertise when Default Route available

You can do that using conditional advertisement.

The following example shows how to advertise 192.168.1.0/24 only when 0/0 is being learnt from the peer:

router bgp 1

no synchronization

bgp log-neighbor-changes

network 192.168.1.0

neighbor 192.168.12.2 remote-as 2

neighbor 192.168.12.2 advertise-map ADV exist-map EXIST

no auto-summary

!

access-list 1 permit 192.168.1.0

access-list 2 permit 0.0.0.0

!

route-map ADV permit 10

match ip address 1

!

route-map EXIST permit 10

match ip address 2

!

You are able to see the status of that conditional advertisement by using the show ip bgp neighbor command:

When the condition is met:

R1#sh ip bgp neighbors

BGP neighbor is 192.168.12.2, remote AS 2, external link

..

Condition-map EXIST, Advertise-map ADV, status: Advertise

When the condition is not met:

R1#sh ip bgp neighbors

BGP neighbor is 192.168.12.2, remote AS 2, external link

..

Condition-map EXIST, Advertise-map ADV, status: Withdraw

Hope this helps,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
3 REPLIES
Gold

Re: BGP Advertise when Default Route available

You should be able to do this with conditional advertisement:

http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080094309.shtml

Just set up the if-exit map so that as long as the default is learned from router A, the local routes are allowed, rather than denied (which I think is possible). If that doesn't work, then conditional route injection should work, instead:

http://www.cisco.com/en/US/products/sw/iosswrel/ps1839/products_feature_guide09186a00800b5d54.html

Because it's "backwards" from conditional advertisement.

HTH.

:-)

Russ.W

Cisco Employee

Re: BGP Advertise when Default Route available

You can do that using conditional advertisement.

The following example shows how to advertise 192.168.1.0/24 only when 0/0 is being learnt from the peer:

router bgp 1

no synchronization

bgp log-neighbor-changes

network 192.168.1.0

neighbor 192.168.12.2 remote-as 2

neighbor 192.168.12.2 advertise-map ADV exist-map EXIST

no auto-summary

!

access-list 1 permit 192.168.1.0

access-list 2 permit 0.0.0.0

!

route-map ADV permit 10

match ip address 1

!

route-map EXIST permit 10

match ip address 2

!

You are able to see the status of that conditional advertisement by using the show ip bgp neighbor command:

When the condition is met:

R1#sh ip bgp neighbors

BGP neighbor is 192.168.12.2, remote AS 2, external link

..

Condition-map EXIST, Advertise-map ADV, status: Advertise

When the condition is not met:

R1#sh ip bgp neighbors

BGP neighbor is 192.168.12.2, remote AS 2, external link

..

Condition-map EXIST, Advertise-map ADV, status: Withdraw

Hope this helps,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
New Member

Re: BGP Advertise when Default Route available

Many Thanks for this help. Will test when next week.

336
Views
5
Helpful
3
Replies
CreatePlease login to create content