ECMP Load Balancing

Equal-cost multi-path routing (ECMP) is a routing strategy where next-hop packet forwarding to a single destination can occur over multiple "best paths" which tie for top place in routing metric calculations. Multipath routing can be used in conjunction with most routing protocols, since it is a per-hop decision that is limited to a single router. It potentially offers substantial increases in bandwidth by load-balancing traffic over multiple paths.

Various routing protocols, including Open Shortest Path First (OSPF), Intermediate System to Intermediate System (ISIS), Enhanced Interior Gateway Routing Protocol (EIGRP), and Border Gateway Protocol (BGP) allow ECMP routing.

Load balancing between ECMP paths is performed on IOS-XE based CEF object called loadbalance.

ECMP Per-Flow Load Balancing

Load balancing is a forwarding mechanism that distributes traffic over multiple links based on certain parameters. ECMP Per-Flow Load Balancing distributes packets across multiple links based on Layer 3 routing information. If the router discovers multiple paths to a destination, the routing table is updated with multiple entries for that destination. Per-flow load balancing allows the router to use multiple paths to achieve load sharing across multiple source-destination host pairs. Packets for a given source-destination host pair are guaranteed to take the same path, even if multiple paths are available. Traffic streams destined for different pairs tend to take different paths.

Benefits of Per-Flow Load Balancing

  • Incoming data traffic is evenly distributed over multiple equal-cost connections.

  • Incoming data traffic is evenly distributed over multiple equal-cost connections member links within a bundle interface.

Figure 1. ECMP Load Balancing with MPLS Enabled

Restrictions for ECMP Load Balancing

  • Both 4 ECMP and 8 ECMP paths are supported.

  • Load balancing is supported on global IPv4 and IPv6 traffic. For global IPv4 and IPv6 traffic, the traffic distribution can be equal among the available 8 links.

  • Per packet load balancing is not supported.

  • Label load balancing is supported.

  • BGP multi-path is not supported with ECMP.

  • BGP multi-path with PIC Edge is not supported

  • When BGP PIC is configured, the L3VPN prefixes scale reduces by 1/4th of the supported value (Supported scale value/4), for better convergence value at the PIC core. For example, for RSP1A the supported L3VPN scale is 2000, if 4 ECMP path with PIC is enabled, then the maximum supported scale value is reduced to 5000 (20000/4).

Configuration Examples for ECMP Load Balancing

This section shows sample configurations for ECMP load balancing.

Example: Configuring ECMP Load balancing

The following is a sample configuration for ECMP load balancing.