10-10-2018 11:09 PM - edited 10-10-2018 11:10 PM
This is my setup. When I run 'sh ip bgp' command on R1 then I see 2 entries of prefix in the BGP routing table.
=======================================
-->sh ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.0/24 0.0.0.0 0 32768 i
* 20.1.1.0/24 192.168.14.2 0 4 2 i
*> 192.168.12.2 0 1000 2 i
*> 30.1.1.0/24 192.168.12.2 1000 2 i
* 192.168.14.2 0 4 2 i
*> 40.1.1.0/24 192.168.12.2 1000 2 4 i
* 192.168.14.2 0 0 4 i
==========================================
My question is when I run the same command I see that prefix entry of other network originated from different routers shows up only once. R2 and R3 are in same AS(AS2) so there is iBGP neighborship and I have also added next-hop-self command between the iBGP neighborship between R2 & R3. Please, find below the BGP table for R2:
==========================================
--> sh ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.0/24 192.168.12.1 0 0 1 i
*> 20.1.1.0/24 0.0.0.0 0 32768 i
*>i30.1.1.0/24 192.168.23.1 0 100 0 i
*>i40.1.1.0/24 192.168.23.1 0 100 0 4 i
==========================================
Why is that R2's BGP table shows only one entry for 10.1.1.0/24,30.1.1.0/24 & 40.1.1.0/24 and R1's BGP table shows 2 entry for the prefixes?
Thanks & Regards,
Ravi
Solved! Go to Solution.
10-11-2018 04:59 AM - edited 10-11-2018 05:16 AM
Hi
eBGP routes are preferred over the iBGP routes, so R2 is learning a destination via 2 paths (external and internal via R3) then R2 will install just 1 route, the best. Learnt via its eBGP peering. If this peering fails then iBGP path will be instalelled into the RIB and used. The selection is based on Administrative Distance (20 over 200) also it could be by BGP attributes as well.
Hope it answered the question.
:-)
10-11-2018 04:59 AM - edited 10-11-2018 05:16 AM
Hi
eBGP routes are preferred over the iBGP routes, so R2 is learning a destination via 2 paths (external and internal via R3) then R2 will install just 1 route, the best. Learnt via its eBGP peering. If this peering fails then iBGP path will be instalelled into the RIB and used. The selection is based on Administrative Distance (20 over 200) also it could be by BGP attributes as well.
Hope it answered the question.
:-)
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