06-05-2021
10:42 PM
- last edited on
10-25-2022
01:34 PM
by
Translator
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.
Solved! Go to Solution.
06-06-2021 07:04 AM
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
06-06-2021 07:04 AM
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
06-06-2021 02:22 PM
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.
06-06-2021 07:25 AM
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 **
06-06-2021 12:12 PM
https://www.facebook.com/483561365749975/videos/290987062049846
answer for Local Preference not show, please review video
07-15-2021 05:52 AM
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 ..
07-15-2021 06:01 AM
Hi @networkinblood ,
It will follow the BGP path selection algorithm.
Regards,
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