Background Information
- BGP normally only installs one route (the best route) into the RIB.
- In the past, if we wanted to use ECMP with eBGP, we would just peer using loopbacks, and then use static routes so that the next hop would be load balanced.
- For iBGP, we would let the IGP take care of the load balancing.
- BGP currently also has a built-in method of performing load balancing using the maximum-paths command.
Summary
- maximum-paths ibgp to set the maximum number of paths to install in the RIB.
- maximum-paths to set the maximum number of eBGP paths to install in the RIB.
- maximum-paths eibgp to tell the router to load-balance iBGP and eBGP paths.
- The following must match for a set of load balanced routes:
- Weight
- Local-preference
- AS-Path length
- MED
- Neighbor AS (for eBGP multipath)
- AS-Path
- IGP metric to next-hop
- The next-hop must be different for the set of load balanced routes
- bgp bestpath as-path multipath-relax to be able to load balance across non matching AS-Path.
- show ip protocols to see the configured maximum paths.
- show ip cef detail to see the load-sharing method (by default: destination-based).
router bgp 1
bgp bestpath as-path multipath-relax
address-family ipv4
maximum-paths 2
maximum-paths ibgp 2