Configuring the ECMP Load Balancing Mode
Context
In ECMP load balancing on a CE12800 series switch, on SD, FD (only the CE-L16CQ-FD), FD1, FG, and FG1 cards, the hash value is calculated based on the three packet headers starting with the forwarding byte. On the cards except SD, FD (only the CE-L16CQ-FD), FD1, FG, and FG1 cards, the hash value is calculated based on the first 128 bytes of the packet or based on the two packet headers starting with the forwarding byte.
Per-packet load balancing takes precedence over per-flow load balancing. When both of them are configured, per-packet load balancing takes effect.
- random mode: A route is randomly selected among multiple equal-cost routes to forward packets. When the IP address and MAC address of known unicast packets remain unchanged, configure random per-packet load balancing.
- round-robin mode: Each equal-cost route, in turn, is used to forward packets. When known unicast packets have the similar length, configure round-robin per-packet load balancing.
The CE12800 and CE12800E that has ED-E, EG-E, and EGA-E series cards installed support only round-robin per-packet load balancing.
The CE12800E equipped with FD-X series cards supports random per-packet load balancing and round-robin per-packet load balancing.
In per-flow load balancing, devices support different load balancing modes for different packets, as listed in the following tables.
Packets (on the Inbound Interface) |
Default Load Balancing Mode |
Configurable Load Balancing Mode |
---|---|---|
IPv4 packets |
src-ip, dst-ip, l4-src-port, and l4-dst-port |
src-ip, dst-ip, l4-src-port, l4-dst-port, and protocol |
IPv6 packets |
src-ip, dst-ip, l4-src-port, and l4-dst-port |
src-ip, dst-ip, l4-src-port, l4-dst-port, and protocol NOTE:
IPv6 packet load balancing modes, l4-src-port and l4-dst-port, are affected by the l4-src-port and l4-dst-port fields of IPv4 packets. That is, when the load balancing modes of IPv4 packets include l4-src-port or l4-dst-port, the l4-src-port or l4-dst-port field also participates in load balancing of IPv6 packets. |
IPv4 over IPv4 packets |
src-ip, dst-ip, and inner IP packet-based src-ip and dst-ip |
src-ip, dst-ip, and inner IP packet-based src-ip and dst-ip NOTE:
The ip [ dst-ip | l4-dst-port | l4-src-port | protocol | src-ip ] * command controls the load balancing modes of the src-ip and dst-ip fields in the inner and outer IPv4 headers. That is, when the load balancing mode of IPv4 packets is set to src-ip and dst-ip, the corresponding fields in the inner and outer IP headers of IPv4 over IPv4 packets will participate in hash calculation. |
IPv4 over IPv6 packets |
src-ip, dst-ip, and inner IPv4 packet-based src-ip and dst-ip |
src-ip, dst-ip, and inner IPv4 packet-based src-ip and dst-ip NOTE:
|
IPv6 over IPv4 packets |
src-ip, dst-ip, and inner IPv6 packet-based src-ip and dst-ip |
src-ip, dst-ip, and inner IPv6 packet-based src-ip and dst-ip NOTE:
|
IPv6 over IPv6 packets |
src-ip, dst-ip, and inner IPv6 packet-based src-ip and dst-ip |
src-ip, dst-ip, and inner IPv6 packet-based src-ip and dst-ip NOTE:
The ipv6 [ dst-ip | protocol | src-ip ] * command controls the load balancing modes of the src-ip and dst-ip fields in the inner and outer IPv6 headers. That is, when the load balancing mode of IPv6 packets is set to src-ip and dst-ip, the corresponding fields in the inner and outer IPv6 headers of IPv6 over IPv6 packets will participate in hash calculation. |
TRILL packets |
Ingress: Non-IP packets are load balanced based on the inner src-mac, vlan, and dst-mac. IP packets are load balanced based on src-ip, dst-ip, l4-src-port, and l4-dst-port. |
src-ip, dst-ip, l4-src-port, l4-dst-port, protocol, vlan, and src-interface |
Transit/Egress: Packets are load balanced based on the inner src-mac and dst-mac. |
The load balancing mode cannot be configured. |
|
MPLS packets |
Transit: top-label, 2nd-label, and fields in the inner IP header (on SD, FD (only the CE-L16CQ-FD), FD1, FG, and FG1 cards, IPv4: src-ip, dst-ip, l4-src-port, and l4-dst-port or IPv6: src-ip, dst-ip, l4-src-port, and l4-dst-port; on cards except SD, FD (only the CE-L16CQ-FD), FD1, FG, and FG1 cards, IPv4: src-ip and dst-ip or IPv6: src-ip and dst-ip) Egress: top-label, 2nd-label, and fields in the inner IP header (IPv4: src-ip, dst-ip, l4-src-port, and l4-dst-port or IPv6: src-ip, dst-ip, l4-src-port, and l4-dst-port) |
top-label, 2nd-label, 3rd-label, src-ip, dst-ip, l4-src-port, and l4-dst-port |
VPLS packets |
Transit:
|
inner-sip and inner-dip NOTE:
|
VXLAN packets |
l4-src-port |
inner-src-mac, inner-dst-mac, inner-src-ip, inner-dst-ip, inner-l4-src-port, inner-l4-dst-port, inner-protocol, and l4-src-port |
Packets (on the Inbound Interface) |
Default Load Balancing Mode |
Configurable Load Balancing Mode |
---|---|---|
IP packets |
src-ip, dst-ip, l4-src-port, and l4-dst-port |
src-ip, dst-ip, l4-src-port, l4-dst-port, protocol, vlan, src-interface, dscp |
GRE packets |
Non-IP packets are load balanced based on the inner inner-src-ip, inner-dst-ip, inner-l4-dport, and inner-l4-sport. IP packets are load balanced based on src-ip, dst-ip, l4-src-port, and l4-dst-port. |
inner-src-ip, inner-dst-ip, inner-l4-dport, and inner-l4-sport |
Packets (on the Inbound Interface) |
Default Load Balancing Mode |
Configurable Load Balancing Mode |
---|---|---|
IPv4 packets |
src-ip, dst-ip, l4-src-port, and l4-dst-port |
src-ip, dst-ip, l4-src-port, l4-dst-port, protocol, vlan, and src-interface |
IPv6 packets |
src-ipv6, dst-ipv6, l4-src-port, and l4-dst-port |
src-ipv6, dst-ipv6, l4-src-port, l4-dst-port, protocol, vlan, and src-interface |
Procedure
- Configure ECMP load balancing on the CE12800.
- Configure the ECMP load balancing mode (on the CE12800E that has the ED-E, EG-E, or EGA-E series cards installed).
- Configure ECMP load balancing (on the CE12800E that has the FD-X series cards installed).
Per-flow load balancing:
Per-packet load balancing:
- Configure simulated calculation of an ECMP outbound interface.
Run 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
Simulated calculation of an ECMP outbound interface is configured after the 5-tuple information, source MAC address, and destination address are specified.
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.