04-04-2014 04:21 AM - last edited on 09-29-2022 12:01 PM by Translator
Hi,
Can someone explain me how does the command
distance 200 10.0.0.1 0.0.0.0 DEFAULT
under a BGP process executes.
On this router default route is learnt through ospf .
10.0.0.1 is BGP neighbor ip address
DEFAULT is standard access-list with permit 0.0.0.0 statement.
==========================================================
The ospf default route is preferred over the default route of BGP neighbor in this scnario.
However i want to know how this command executes.
Thanks
Solved! Go to Solution.
04-04-2014 06:42 AM
Basically that command tells you this:
"set distance 200 from neighbor 10.0.0.1 for receiving routes matching ACL DEFAULT".
HTH,
Dragan
04-04-2014 11:28 AM
If you receive that route via eBGP (AD 20) the router will change to 200 if it learned via neighbour 10.0.0.1 giving preference to OSPF AD 120. Resuming the RIB will have the OSPF route
04-04-2014 06:42 AM
Basically that command tells you this:
"set distance 200 from neighbor 10.0.0.1 for receiving routes matching ACL DEFAULT".
HTH,
Dragan
05-22-2014 05:52 AM
Thanks .......
04-04-2014 11:28 AM
If you receive that route via eBGP (AD 20) the router will change to 200 if it learned via neighbour 10.0.0.1 giving preference to OSPF AD 120. Resuming the RIB will have the OSPF route
07-09-2018 11:24 PM
05-22-2014 05:52 AM
Thanks .....
11-06-2022 08:17 PM
I have two routers
R1 ------ R2
and configure eBGP between them and use OSPF as an underlay routing protocol, the BGP peer will be on the loopback IP address, and we redistribute the OSPF route into BGP so the router will receive the route via the BGP and the OSPF since the peer is eBGP with the AD of 20 the route will be installed as BGP route and the session will be reset, to solve this issue we can change the AD of the peer IP only and keep the reminder route as it is the configuration will be as below:
On R1
------
router bgp 100
neighbor 2.2.2.2 remote-as 200
neighbor 2.2.2.2 ebgp-multihop 255
distance 200 2.2.2.2 0.0.0.0 10
The syntax here is as follows:
* AD to set on prefixes matching
* Neighbor IP of BGP peer(s)
* Wild card to match one or more peers
* Access-list for the prefixes to be modified
!
access-list 10 permit 2.2.2.0 0.0.0.255
On R2
------
router bgp 200
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 ebgp-multihop 255
neighbor 1.1.1.1 update-source Loopback0
distance 200 1.1.1.1 0.0.0.0 10
!
access-list 10 permit 1.1.1.0 0.0.0.255
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