Octet

How does BGP load sharing work with maximum-paths, and what has to match?

Show the answer

Say this first

By default BGP installs one best path. maximum-paths n for eBGP or maximum-paths ibgp n for iBGP lets it install up to n paths. On Cisco the paths must tie down to the IGP metric step: same weight, local preference, AS path length, origin and MED, and by default the same AS path content; iBGP paths also need equal IGP cost to their next hops. One path is still marked best and only that one is advertised to peers. bgp bestpath as-path multipath-relax accepts different AS paths of equal length.

Go deeper

R1 has two links to ISP1 (192.0.2.1 and 192.0.2.5) and maximum-paths 2 under BGP:

Output
R1# show ip bgp | begin Network
     Network          Next Hop            Metric LocPrf Weight Path
 *m  198.51.100.0     192.0.2.5                0             0 64496 i
 *>                   192.0.2.1                0             0 64496 i

R1# show ip route bgp | begin Gateway
Gateway of last resort is not set

B     198.51.100.0/24 [20/0] via 192.0.2.5, 00:02:10
                      [20/0] via 192.0.2.1, 00:02:10

m marks the extra multipath entry; > is still the single best path used for advertising.

Across two different ISPs

The AS paths differ (64496 ... versus 64497 ...), so they are not multipath candidates by default. bgp bestpath as-path multipath-relax allows it when the lengths are equal. It is a hidden or less documented command on some IOS releases.

Unequal sharing

The link bandwidth extended community (bgp dmzlink-bw on IOS) can weight the split by link speed.

Traps

  • Expecting load sharing across two ISPs with plain maximum-paths.
  • Configuring maximum-paths without the ibgp keyword for iBGP paths.
How did you do?Book 4.1 Global Internet