BGP Equal Cost Multipath AS_Path Attribute
When applying equal cost multipath in a BGP topology, there are certain prerequisites that must be fulfilled in order for candidate routes to be considered for multipath. Certain BGP attributes must be the same in order for a second path to be considered for equal cost multipath.
One of those attributes is the AS_Path. By default, both the sequence of ASNs as well as the actual AS Path Length are examined and must be the same. However, this requirement can be relaxed using the following BGP router mode command:
R1(config-router)#bgp bestpath as-path multipath-relax
With this command, BGP will consider paths for ECMP even if they have different AS path attributes, as long as the length of the AS path (the number of AS hops) is the same.
This means that the actual AS numbers in the path can be different, but the number of ASes must still be the same.
Links
https://forum.networklessons.com/t/bgp-multipath-load-sharing-ibgp-and-ebgp/3275/54?u=lagapidis