Saturday, June 28, 2014

BGP Multipath maximum-paths

Background Information

  1. BGP normally only installs one route (the best route) into the RIB.
  2. 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.
  3. For iBGP, we would let the IGP take care of the load balancing.
  4. BGP currently also has a built-in method of performing load balancing using the maximum-paths command.

Summary

  1. maximum-paths ibgp to set the maximum number of paths to install in the RIB.
  2. maximum-paths to set the maximum number of eBGP paths to install in the RIB.
  3. maximum-paths eibgp to tell the router to load-balance iBGP and eBGP paths.
  4. The following must match for a set of load balanced routes:
    1. Weight
    2. Local-preference
    3. AS-Path length
    4. MED
    5. Neighbor AS (for eBGP multipath)
    6. AS-Path
    7. IGP metric to next-hop
  5. The next-hop must be different for the set of load balanced routes
  6. bgp bestpath as-path multipath-relax to be able to load balance across non matching AS-Path.
  7. show ip protocols to see the configured maximum paths.
  8. 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