11-04-2005 04:39 AM - edited 03-03-2019 10:53 AM
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
Solved! Go to Solution.
11-04-2005 06:13 AM
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,
11-04-2005 05:49 AM
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
11-04-2005 06:13 AM
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,
11-04-2005 06:36 AM
Many Thanks for this help. Will test when next week.
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