cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
548
Views
1
Helpful
2
Replies

BGP Multi-path IOSXR

aghufran
Level 1
Level 1

Hi All,

I am trying out the BGP add-path selection mechanisms given on the following Cisco page: 

https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/217097-bgp-path-selection-in-ios-xr.html

I have deployed the given topology with simple BGP Add-Path and Multi-Path. The scope where I am testing for the multi-path is between the RR and edge node PE6 (above). I am advertising the same prefix from the all the other nodes - some are Intra-AS (iBGP) and a few other Inter-AS (eBGP). These prefixes are received by the RR and then sent to intra-AS node PE6. All the other nodes are peering directly with the RR (i/eBGP). RR and PE6 have Add-Path set on them, which is working as expected.

It all works out fine as expected until I start fiddling with BGP path attributes.

Without any path-attribute manipulation (local-preference, metric, origin etc.) on the incoming prefixes on the edge PE6 node (from RR in the figure above), it all behaves as expected and I get multiple paths in the BGP and routing table. However, if I manipulate any of the path-attributes, I get only one path, that has the path-attribute manipulation applied to it. So, for example, if I increase the local-preference on any one of the received path, I only get that one path, as the best path in the routing table. BGP table stops showing 'multipath' , only showing 'add-path'.

What is confusing me is why with the path-attribute manipulation, it seems to be overriding the multi-pathing totally, selecting only one best path? Why it does not proceed further selecting multiple paths, after it has selected the higher local-preference best path?

It seems to be related to the 'BGP Best Path Algorithm' mechanism but I cannot nail it down to the where exactly in that mechanism.

Following is a reference Cisco'BGP Best Path Algorithm' document:

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

I would greatly appreciate if someone could assist in understanding the process better.

 

Thanks and regards,

Abid Ghufran

1 Accepted Solution

Accepted Solutions

M02@rt37
VIP
VIP

Hello @aghufran 

BGP best path selection process follows a specific order of criteria that determines which route will be installed in the routing table when multiple routes to the same destination exist. This order includes factors such as weight, local preference, AS path length, and more. Local preference is particularly influential, as it dictates which path is preferred among those available, with the highest value being selected.

When you manipulate path attributes like local preference, the dynamics of path selection change significantly. For instance, if you increase the local preference of one path, BGP will evaluate the available paths based on the modified attributes and select the path with the highest local preference as the best path. This behavior results in the routing table showing only that preferred path, effectively overriding the multipath capability that BGP Add-Path offers. In essence, once a path is deemed the "best" due to a higher local preference, BGP no longer considers other paths for insertion into the routing table unless they are considered equal in terms of all selection criteria.

To maintain multiple paths in your routing table while still leveraging path attributes such as local preference, consider using lower local preference values. This approach will allow other paths to remain viable candidates for the best path selection. Additionally, you might explore adjusting other path attributes that do not significantly impact the best path selection process, allowing for more routes to coexist in the routing table. Ultimately, the key takeaway is that for multipath functionality to remain intact, all paths must be treated as equal under the best path selection criteria; any manipulation that disrupts this equality, particularly with local preference, will result in the selection of a single best path.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

View solution in original post

2 Replies 2

M02@rt37
VIP
VIP

Hello @aghufran 

BGP best path selection process follows a specific order of criteria that determines which route will be installed in the routing table when multiple routes to the same destination exist. This order includes factors such as weight, local preference, AS path length, and more. Local preference is particularly influential, as it dictates which path is preferred among those available, with the highest value being selected.

When you manipulate path attributes like local preference, the dynamics of path selection change significantly. For instance, if you increase the local preference of one path, BGP will evaluate the available paths based on the modified attributes and select the path with the highest local preference as the best path. This behavior results in the routing table showing only that preferred path, effectively overriding the multipath capability that BGP Add-Path offers. In essence, once a path is deemed the "best" due to a higher local preference, BGP no longer considers other paths for insertion into the routing table unless they are considered equal in terms of all selection criteria.

To maintain multiple paths in your routing table while still leveraging path attributes such as local preference, consider using lower local preference values. This approach will allow other paths to remain viable candidates for the best path selection. Additionally, you might explore adjusting other path attributes that do not significantly impact the best path selection process, allowing for more routes to coexist in the routing table. Ultimately, the key takeaway is that for multipath functionality to remain intact, all paths must be treated as equal under the best path selection criteria; any manipulation that disrupts this equality, particularly with local preference, will result in the selection of a single best path.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Hi M02@rt37,

Thanks a lot for your response. 

It makes a lot of sense. I tested it and as you have explained, if any of the BGP path-attributes are manipulated, the BGP Path Determination algorithm overrides the multi-path selection mechanism and selects only a single path.

However, the following operation, in your response is not clear and upon testing did not work as expected:

"To maintain multiple paths in your routing table while still leveraging path attributes such as local preference, consider using lower local preference values. This approach will allow other paths to remain viable candidates for the best path selection. Additionally, you might explore adjusting other path attributes that do not significantly impact the best path selection process, allowing for more routes to coexist in the routing table."

In my understanding, usual BGP Path Determination Algorithm, works in an atomic manner. Plus it does not have the 'variance' kind of feature that EIGRP has where it can consider, for example, paths within a range of local preference values. I tested with it as well just for the sake of argument and did not see multiple paths being selected, where a single path had a value set of 101 and the rest of 100 (default).

Plus what other path-attributes can be used which would not impact the best path selection process, allowing for multiple paths in the routing table?

Thanks and regards,

Abid Ghufran