Configuring BGP Multipath


On a large network, there may be multiple valid BGP routes to the same destination. A switch will select and add the optimal BGP route to its routing table for traffic forwarding and advertises this route to its peers. This, however, will result in uneven load balancing of many traffic. Configuring BGP load balancing can enable the switch to add these multiple equal-cost BGP routes to its routing table, implementing traffic load balancing and reducing network congestion. After BGP load balancing is configured, the switch will still select the optimal route among the multiple routes and advertise only this route to its peers.

In PICOS system, the BGP multipath option is enabled so that the switch can install multiple equal-cost BGP paths to the forwarding table and load balance traffic across multiple links. You can change the number of paths allowed, according to your needs.

The example commands change the maximum number of paths to 12. You can set a value between 1 and 32. 1 disables the BGP multipath option.

admin@XorPlus# set protocols bgp ipv4-unicast multipath ibgp maximum-paths 12
admin@XorPlus# commit

For paths to be consider equal, they must have the same routes attributes, such as weight, local preference, origin and AS_Path attributes are the same. If any of these attribues are different, BGP multipath will NOT take effect. 

But in a special case, we can use the set protocols bgp[vrf<vrf-name>]bestpath as-path multipath-relax [as-set|no-as-set] command to configure Border Gateway Protocol (BGP) to treat two BGP routes as equal cost even if their AS-paths differ, as long as their AS-path lengths and other relevant attributes are the same. This allows routes with different AS-paths to be programmed into the forwarding table as equal cost multipath routes. Any changes in BGP configuration are applied by restarting the current BGP sessions on the VRFs.

admin@XorPlus# set protocols bgp bestpath as-path multipath-relax
admin@XorPlus# commit

Copyright © 2024 Pica8 Inc. All Rights Reserved.