Enabling ECMP Load Balancing Consistency
Context
Equal-Cost Multi-Path routing (ECMP) implements load balancing and link backup. ECMP applies to the network where multiple links to the same destination are available. In the traditional routing technology, packets are forwarded to the destination through one link only; the other links are in backup or inactive state; switching between these links requires a certain period when dynamic routes are used. Different from the traditional routing technology, ECMP can use multiple links to increase transmission bandwidth and transmit data on a faulty link without any delay or packet loss.
When one link of equal-cost multiple paths fails, all traffic needs to be load balanced again based on hash calculation. ECMP load balancing consistency, however, ensures that hash calculation is performed only for traffic on this faulty link, without affecting traffic on other normal links. This function ensures normal operation of services, in which sessions need to be maintained, on normal links.
Procedure
- Run system-view
The system view is displayed.
- Run load-balance ecmp stateful enable
The ECMP load balancing consistency function is enabled.
When configuring this function, pay attention to the following points:
To use this function, ensure that different destination addresses are reachable through the same or completely different equal-cost multiple paths.
After enabling this function, do not change the configured load balancing hash algorithm, hash algorithm offset, and load balancing mode. Otherwise, this function may be unable to take effect.
- This function may be unable to take effect when outbound ports of equal-cost links are intermittently disconnected.
- The ECMP load balancing consistency function only takes effect only for common IPv4 traffic, but not for traffic transmitted over tunnels.
- The ECMP load balancing consistency function is unable to take effect for IPv6 traffic.
- After ECMP load balancing consistency is configured, if the number of next hops is not the power of 2, traffic is unevenly load balanced.
- After ECMP load balancing consistency is enabled, the number of ECMP groups decreases.
- Run commit
The configuration is committed.
Verifying the Configuration
- Run the display load-balance forwarding-path unicast interface ecmp { vlan vlan-id | src-interface interface-type interface-number | vpn-instance vpn-instance-name | [ [ src-ip src-ip-data | dst-ip dst-ip-data ] * | [ src-ipv6 src-ipv6-data | dst-ipv6 dst-ipv6-data ] * ] | protocol { protocol-number [ l4-src-port src-port-data | l4-dst-port dst-port-data ] | icmp | igmp | ip | ospf | tcp [ l4-src-port src-port-data | l4-dst-port dst-port-data ] * | udp [ l4-src-port src-port-data | l4-dst-port dst-port-data ] * } } * slot slot-id command to configure simulated calculation of an ECMP outbound interface for IPv4 and IPv6 packets after the 5-tuple information, source MAC address, and destination address are specified.