BGP Multipath Load Sharing

BGP Multipath Load Sharing Overview

BGP can install multiple equal-cost eBGP or iBGP paths into the routing table to reach the same destination prefix. Traffic to the destination prefix is then shared across all the installed paths.

The BGP best-path algorithm considers the paths as equal-cost paths if the following attributes are identical:

Weight

Local preference

AS_path

Origin code

Multi-exit discriminator (MED)

IGP cost to the BGP next hop

BGP selects only one of these multiple paths as the best path and advertises the path to the BGP peers.


Configuration:

To configure the maximum number of paths, use the following command in router address-family configuration mode:

switch(config-router-af)# maximum-paths 2Code language: PHP (php)


Dual Homed Scenario (Different ASN)

The above command isn’t enough in case of dual-homed scenario to two different ASN (two different service providers):

By default, BGP does not allow you to load balance between multiple paths received from different AS numbers.

meaning that by default, The AS-PATH length has to be the same for considered paths and the ASN needs to be the same as well.

There is a command to relax this requirement for the AS-PATH:

bgp bestpath as-path multipath-relaxCode language: JavaScript (javascript)

This command configure BGP to treat two BGP routes as equal cost and allow load sharing even if their AS-paths differ, as long as their AS-path lengths and other relevant attributes are the same.


In both cases:

Bilel Ameur

Enthusiastic Network Engineer specializing in Cisco ACI, passionate about solving challenges. A lifelong learner who loves gaining and sharing knowledge. Profile: https://www.linkedin.com/in/bilel-ameur-71116b2b5
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x