cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1164
Views
50
Helpful
6
Replies

BGP Best Path Selection Question

Dear Community,

 

I am sure this particular scenario has been hashed and rehashed a million times, but I wanted to make my own post to make sure I am understanding it correctly. Please see the following BGP output:

 

Router1#show ip bgp
BGP table version is 17, local router ID is 12.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network                       Next Hop     Metric LocPrf Weight Path

*>i 50.1.1.0/24            10.23.250.1   0        100        0      i
*                                  209.1.162.1                           0     13500 363300 i

 

In this scenario, the network 50.1.1.0/24 is being learned by both EBGP and IBGP, my questions are as follows:

 

1) The best path selected has a local_pref value of 100, is this showing because its a default value and the route was learned by IBGP?

2) The other path is not showing a local_pref value, is this router still considering it a value of 100? Or is it considering it having no value at all? Put another way, are the local_pref values of both routes equal in this scenario?

3) If the local_pref values are equal in this scenario, is the IBGP route being chosen over the EBGP route because the AS_PATH is lower? If so, wouldnt IBGP routes always be preferred over EBGP routes in a default scenario?

 

Thanks so much for any feedback and helping me to learn BGP.

1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @ChristopherCraddock66504 ,

looking at the show ip bgp output we can say the following:

the iBGP path is chosen over the eBGP path for having a loca preference of 100 ( default value) compared to a missing local preference that should be treated as 0.

 

1) yes default value

2)  a missing Local pref should be considered like 0 the worst possible value

3) if both eBGP and iBGP paths would have Local preference 100 the eBGP path would be chosen ( eBGP over iBGP) regardless of AS path attribute length. Otherwise as you have noted iBGP routes would be preferred over eBGP routes but it is the opposite.

 

Hope to help

Giuseppe

 

View solution in original post

6 Replies 6

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @ChristopherCraddock66504 ,

looking at the show ip bgp output we can say the following:

the iBGP path is chosen over the eBGP path for having a loca preference of 100 ( default value) compared to a missing local preference that should be treated as 0.

 

1) yes default value

2)  a missing Local pref should be considered like 0 the worst possible value

3) if both eBGP and iBGP paths would have Local preference 100 the eBGP path would be chosen ( eBGP over iBGP) regardless of AS path attribute length. Otherwise as you have noted iBGP routes would be preferred over eBGP routes but it is the opposite.

 

Hope to help

Giuseppe

 

Thank you Giuseppe, I did have a couple of follow up questions if you are available.

 

1) If the Local_Pref values were equal, would the AS_PATH be the next decision criteria? If so, would iBGP still win?

2) Why is the Local_Pref value of 100 set for routes learned via iBGP? I am trying to understand the rationale behind this if eBGP is supposed to be preferred over iBGP. 

 

Thank you. 

Martin L
VIP
VIP

 

see BGP Best Path Selection Algorithm especially if you study for CCIE cert (must know and memorize them).

https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html#anc5

 

Regards, ML
**Please Rate All Helpful Responses **

https://www.facebook.com/483561365749975/videos/290987062049846

 

answer for Local Preference not show, please review video

 

networkinblood
Level 1
Level 1

hi i m  having same confusion , if same prefix learned via both ibgp and ebgp will it follow bgp path selection algorithm or directly on the basis of AD value path get selected  ..

 

Hi @networkinblood ,

 

It will follow the BGP path selection algorithm.

 

Regards, 

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