06-04-2021 11:43 AM
Hello Experts,
I have a query wherein i have 3 equal cost paths from 3 different ebgp neighbors for a specific subnet. In the BGP configuration hierarchy i have configured the following 'maximum-paths 2'
I can see the router installing 2 best paths in the rib as per the configuration above, leaving the 3rd path to not be used for ecmp.
As per my knowledge, the multipath command makes the router to ignore the 'router-id' during the path selection process and basically put all the paths with the same attributes (weight, LP, AS-path, MED etc) as possible candidates for ecmp.
However i am in a dilemma wherein how does the router know which paths to select out of 3 equal cost paths, to be installed in the RIB because of the 'maximum-paths 2' statement. Does it still use a lower router-id as a tie-breaker and end up installing the 2 best paths (out of 3) received from the 2 neighbors with a lower router-id ?
Configuration snippet as below:
neighbor X.X.X.22 remote-as 100
neighbor X.X.X.22 update-source Vlan1
neighbor X.X.X.22 soft-reconfiguration inbound
neighbor X.X.X.23 remote-as 100
neighbor X.X.X.23 update-source Vlan1
neighbor X.X.X.23 soft-reconfiguration inbound
neighbor X.X.X.24 remote-as 100
neighbor X.X.X.24 update-source Vlan1
neighbor X.X.X.24 soft-reconfiguration inbound
maximum-paths 2
ABCD#show ip bgp 10.X.X.25
BGP routing table entry for 10.X.X.0, version 430
Paths: (3 available, best #2, table default)
Multipath: eBGP
Advertised to update-groups:
2
Refresh Epoch 1
100 101 102 103, (received & used)
X.X.X.24 from X.X.X.24 (Y.Y.Y.131)
Origin IGP, localpref 100, valid, external
rx pathid: 0, tx pathid: 0
Refresh Epoch 2
100 101 102 103, (received & used)
X.X.X.23 from X.X.X.23 (Y.Y.Y.130)
Origin IGP, localpref 100, valid, external, multipath, best
rx pathid: 0, tx pathid: 0x0
Refresh Epoch 2
100 101 102 103, (received & used)
X.X.X.22 from X.X.X.22 (Y.Y.Y.132)
Origin IGP, localpref 100, valid, external, multipath(oldest)
rx pathid: 0, tx pathid: 0
Any insights will be appreciated. Thanks in advance.
Regards,
PD
Solved! Go to Solution.
06-07-2021 02:45 AM
Hello @PD92 ,
let us consider the following link
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html
Step 10
>> When both paths are external, prefer the path that was received first (the oldest one).
>> 1. So as per your explanation, am i safe to assume that router-id will not be even taken into consideration for choosing the 2 paths out the 3 ecmp paths above ?
Almost true there is an exception that happens when :
>> You have enabled the bgp best path compare-routerid command.
See the same link above Step 10.
We could say this is rare and you can find it in the router bgp configuration.
2) Yes if it arrives at step 10
3)
>> On which criteria does the local router decide, after choosing the 2 best paths to be installed in its RIB, which path to advertise further to its own neighbor ?
The path that is selected as best path#2 in your case should be the one that is propagated to other neighbors unless other features come to play to allow to advertise additional paths.
The reason is that a BGP router can only advertise the best path it is using itself. In some cases it can advertise more then one paths with the feature BGP add-paths.
Hope to help
Giuseppe
06-04-2021 12:20 PM
answer from your post "oldest" which is tie-break here
06-04-2021 04:21 PM
Hello @PD92 ,
as noted by @MHM Cisco World your router is comparing three different eBGP paths.
In this case the oldest is preferred so in your case you have an external best path (chosen for other reasons path # 2) and the second path is selected because it is the oldest path #3.
This comes from the origins of eBGP stability is considered a value so an older path is preferrred regardless of BGP RID or BGP next-hop values.
Hope to help
Giuseppe
06-07-2021 12:17 AM
Thanks for the wonderful insight. If you dont mind i have a couple of queries as following:
1. So as per your explanation, am i safe to assume that router-id will not be even taken into consideration for choosing the 2 paths out the 3 ecmp paths above ?
2. Will the router purely decide on the tie-breaker by comparing the route ages ?
3. On which criteria does the local router decide, after choosing the 2 best paths to be installed in its RIB, which path to advertise further to its own neighbor ?
While googling online i came across a similar query posted on cisco forum which suggests something to do with the router-id for path selection. Hence i am getting a little confused now. Any insights will be really appreciated.
Link : https://community.cisco.com/t5/routing/bgp-multipath-load-balancing/td-p/3036295
Thanks in advance to all the experts who took time and effort in replying to this post. Really appreciated.
Regards,
PD
06-07-2021 02:45 AM
Hello @PD92 ,
let us consider the following link
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html
Step 10
>> When both paths are external, prefer the path that was received first (the oldest one).
>> 1. So as per your explanation, am i safe to assume that router-id will not be even taken into consideration for choosing the 2 paths out the 3 ecmp paths above ?
Almost true there is an exception that happens when :
>> You have enabled the bgp best path compare-routerid command.
See the same link above Step 10.
We could say this is rare and you can find it in the router bgp configuration.
2) Yes if it arrives at step 10
3)
>> On which criteria does the local router decide, after choosing the 2 best paths to be installed in its RIB, which path to advertise further to its own neighbor ?
The path that is selected as best path#2 in your case should be the one that is propagated to other neighbors unless other features come to play to allow to advertise additional paths.
The reason is that a BGP router can only advertise the best path it is using itself. In some cases it can advertise more then one paths with the feature BGP add-paths.
Hope to help
Giuseppe
06-08-2021 01:32 AM
Thank you so much for taking out the time to explain the details.
Regards,
PD
06-06-2021 07:31 AM
see BGP Multipath section in 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 **
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