(Optional) Configuring a Load Balancing Mode (CE12800)
Context
An Eth-Trunk uses flow-based load balancing. Flow-based load balancing ensures that frames of the same data flow are forwarded on the same physical link. Frames of different data flows are forwarded on different physical links to implement load balancing.
Load balancing is valid only for outgoing traffic; therefore, interfaces at both ends of the link can use different load balancing modes.
Table 3-8 describes load balancing modes for different types of packets.
Packet (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, flow-label, 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. |
MPLS packets |
Ingress/Egress/Transit: top-label, fields in the inner IP header (IPv4: src-ip, dst-ip, l4-src-port, and l4-dst-port; IPv6: src-ip, dst-ip, l4-src-port, and l4-dst-port), and 2nd-label |
Ingress/Egress/Transit: top-label, 2nd-label, 3rd-label, src-ip, dst-ip, l4-src-port, and l4-dst-port NOTE:
The load balancing mode based on fields in the inner IP header (IPv4: src-ip, dst-ip, l4-src-port, and l4-dst-port; IPv6: src-ip, dst-ip, l4-src-port, and l4-dst-port) does not need to be configured, but the fields that participate in load balancing are affected by the load balancing mode configuration of IPv4 and IPv6 packets. If the l4-src-port and l4-dst-port fields are specified in the configured load balancing mode, packets may be unable to be load balanced in the configured load balancing mode. To prevent this problem, cancel the configuration of the l4-src-port and l4-dst-port fields in the load balancing mode of IPv4 and MPLS packets. |
VPLS packets |
Ingress/Egress/Transit: top-label, fields in the inner Ethernet header (src-mac and dst-mac), and 2nd-label |
P node: inner-sip and inner-dip PE node: inner-ip and inner-ipv6 NOTE:
For VPLS packets, the load balancing mode based on fields in the inner Ethernet header (src-mac, dst-mac and eth-type) does not need to be configured on the P node, but the fields that participate in load balancing are affected by the load balancing mode configuration of the l2 [ src-mac | dst-mac | vlan | eth-type ] * command. If the inner IP address is specified for load balancing of VPLS packets, the switch uses only the low 20 bits of the source and destination IP addresses as the hash fields. |
Layer 2 packets except IPv4, IPv6, and MPLS packets |
src-mac, dst-mac and vlan |
src-mac, dst-mac, vlan, and eth-type |
TRILL packets |
Ingress node: src-mac, dst-mac, and vlan for Layer 2 packets; src-ip, dst-ip, l4-src-port, and l4-dst-port for Layer 3 packets |
src-mac, dst-mac, src-ip, dst-ip, l4-src-port, l4-dst-port, and protocol |
Transit node: src-mac, dst-mac, vlan, src-ip, and dst-ip in the inner tag |
src-mac, dst-mac, vlan, src-ip, and dst-ip |
|
Egress node: src-mac, dst-mac, vlan, src-ip, and dst-ip in the inner tag |
src-mac, dst-mac, vlan, src-ip, and dst-ip |
|
FCoE packets |
dst-fcid and src-fcid |
dst-fcid and src-fcid |
VXLAN packets |
Ingress/Egress/Transit: l4-src-port |
Ingress/Egress/Transit: 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 |
Procedure
- Run system-view
The system view is displayed.
- Run load-balance profileprofile-name
A load balancing profile is configured and its view is displayed. profile-name specifies the name of the load balancing profile.
By default, there is a load balancing profile named default.
- Run the following commands as required. You can configure load balancing modes for Layer 2, IPv4, IPv6, MPLS, VPLS, TRILL, and FCoE packets, respectively.
- Run l2 [ src-mac | dst-mac | vlan | eth-type ] *
A load balancing mode of Layer 2 packets (non-IP packets) is set.
By default, load balancing of Layer 2 packets (non-IP packets) is based on the source MAC address (src-mac), destination MAC address (dst-mac), and VLAN ID (vlan).
During Layer 2 forwarding, the device can load balance only IPv4, IPv6, 802.1ah, ARP, and CFM packets based on eth-type.
During Layer 2 forwarding, load balancing based on the VLAN ID on an Eth-Trunk configured with Dot1q tunnel, VLAN stacking, VLL, or VPLS does not take effect.
Run ip [ src-ip | dst-ip | l4-src-port | l4-dst-port | protocol ] *
A load balancing mode is configured for IPv4 packets in the specified load balancing profile.
By default, load balancing of IPv4 packets is based on the source IP address (src-ip), destination IP address (dst-ip), transport-layer source port numbers (l4-src-port), and transport-layer destination port numbers (l4-dst-port).
Run ipv6 [ src-ip | dst-ip | protocol | flow-label ] *
A load balancing mode is configured for IPv6 packets in the specified load balancing profile.
By default, load balancing of IPv6 packets is based on the source IP address (src-ip), destination IP address (dst-ip), transport-layer source port numbers (l4-src-port), and transport-layer destination port numbers (l4-dst-port).
To load balance IPv6 packets based on the transport-layer source and destination port numbers, run the ip [ l4-src-port | l4-dst-port ] * command.
- Run mpls [ 2nd-label | 3rd-label | top-label ] * or mpls [ src-ip | dst-ip | l4-src-port | l4-dst-port ] *
A load balancing mode is configured for MPLS packets in the specified load balancing profile.
By default, MPLS packets are load balanced based on top-label, 2nd-label, and fields in the inner IP header (IPv4/IPv6: src-ip, dst-ip, l4-src-port, and l4-dst-port).
On an IPv6 underlay network, if the IPv6 VXLAN function is enabled and the switch functions as a transit or egress node on the MPLS network, configurations related to the hash field in inner information in MPLS packets do not take effect in the load balancing profile. In this scenario, the mpls inner-type { ipv4 | ipv6 | l2 | any } command cannot be used to change the load balancing mode for MPLS packets in the load balancing profile. Instead, you can use the source and destination IP addresses in inner information in MPLS packets to configure a load balancing mode in the load balancing profile.
- The mpls [ inner-ip | inner-ipv6 ] * command can be configured only when the IPv6 VXLAN function is enabled. In addition, this command cannot be used to configure a load balancing mode for VPLS packets. If the IPv6 VXLAN function is disabled, the switch automatically deletes the configurations related to the mpls [ inner-ip | inner-ipv6 ] * command.
- For CE12800 series switches, if MPLS packets with four or more labels are received, Eth-Trunk or ECMP load balancing cannot be implemented based on the inner IP header. In V200R019C00 and later versions, after the assign forward segment-routing hash enhanced command is run, Eth-Trunk or ECMP load balancing can be implemented on MPLS packets with up to five labels.
- For CE12800 series switches, if the implicit null label is disabled and the outer label is popped out (for example, ASBR in inter-AS VPN Option B and inter-AS VPN Option C networking), packets may be unable to be load balanced in the load balancing mode using ECMP or Eth-Trunk based on the inner field in MPLS packets.
- The mpls [ inner-ip | inner-ipv6 ] * command takes effect only on SD, FD (only the CE-L16CQ-FD), FD1, FG, and FG1 series cards.
- Run user-defined ethernet-over-mpls [ dot1q-tagtag-number ] { inner-sipsip-offsetsip-nybble-number | inner-dipdip-offsetdip-nybble-number } *
Load balancing based on the inner IP address of VPLS packets is configured on the outbound Eth-Trunk on the transit node.
- Run user-defined ethernet-over-mpls { inner-ip | inner-ipv6 }
Load balancing based on the inner IP address of VPLS packets is configured on the outbound Eth-Trunk on the PE node.
If inner-ip is specified, you need to run ip [ src-ip | dst-ip ] *. If inner-ipv6 is specified, you need to run ipv6 [ src-ip | dst-ip ] *. Otherwise, the user-defined ethernet-over-mpls { inner-ip | inner-ipv6 } command does not take effect.
- Run fcoe { dst-fcid | src-fcid } *
A load balancing mode is configured for FCoE packets in the specified load balancing profile.
By default, load balancing of FCoE packets is based on the source FC_ID (src-fcid) and destination FC_ID (dst-fcid).
Run trill egress mode { l2 | ipv4 | ipv6 }
An Eth-Trunk load balancing mode is configured on egress and transit nodes of the TRILL network.
By default, the Eth-Trunk load balancing mode on egress and transit nodes of the TRILL network is ipv4.- l2: indicates load balancing based on the source MAC address, destination MAC address, and VLAN ID. The items used in load balancing depend on the l2 command.
- ipv4: indicates load balancing based on the source MAC address, destination MAC address, source IPv4 address, destination IPv4 address, and VLAN ID. The items used in load balancing depend on the l2 and ip commands.
- ipv6: indicates load balancing based on the source MAC address, destination MAC address, source IPv6 address, destination IPv6 address, and VLAN ID. The items used in load balancing depend on the l2 and ipv6 commands.
Run vxlan { inner-src-mac | inner-dst-mac | inner-src-ip | inner-dst-ip | inner-l4-src-port | inner-l4-dst-port | inner-protocol | l4-src-port | shift shift-data } *
A load balancing mode is configured for VXLAN packets in the specified load balancing profile.
By default, VXLAN packets are load balanced based on l4-src-port.
If inner packets of VXLAN packets are IPv6 packets or carry VLAN tags, this command does not take effect.
The command is not supported by the following cards: CE-L48GT-EA, CE-L48GT-EC, CE-L48GS-EA, CE-L48GS-EC, CE-L24XS-BA, CE-L24XS-EA, CE-L48XS-BA, CE-L48XS-EA and CE-L24LQ-EA. Do not use these cards with cards supporting this command; otherwise, load balancing is uneven.
This command takes effect only for egress nodes, namely, devices that perform VXLAN decapsulation. If the cards are CE-L48GT-ED, CE-L48GS-ED, CE-L12XS-ED, CE-L24XS-EC, CE-L24XS-ED, CE-L48XT-EC, CE-L48XS-EC, CE-L48XS-ED, CE-L48XS-EF, CE-L02LQ-EC, CE-L06LQ-EC, CE-L12LQ-EF, CE-L24LQ-EC, CE-L24LQ-EC1, CE-L36LQ-EG, CE-L04CF-EC, CE-L04CF-EF, CE-L08CC-EC and CE-L12CF-EG, this command takes effect only when the enhanced mode of the VXLAN NVO3 gateway is the Layer 3 non-loopback mode.
If the assign forward nvo3 ecmp hash enable, assign forward nvo3 eth-trunk hash disable, or assign forward nvo3 eth-trunk hash enable command has been configured on the switch, the command configuration becomes ineffective after the vxlan command is run to configure a load balancing mode for VXLAN packets in a load balancing profile.
- Run eth-trunk { src-interface | seed seed-data | universal-id universal-id | hash-mode hash-mode-id } *
An Eth-Trunk load balancing mode is configured in the specified load balancing profile.
Packets forwarded at Layer 3 cannot be load balanced based on destination MAC addresses, source MAC addresses, VLAN IDs, and Ethernet types.
Eth-Trunk and ECMP on the device share the same load balancing profile. The load balancing mode configured using the l2, ip, ipv6, or mpls command takes effect for both link aggregation and ECMP. The load balancing modes configured using the eth-trunk (load-balance-profile view) and ecmp (load-balance-profile view) commands take effect only for link aggregation and ECMP respectively.
When load balancing using both Eth-Trunk and ECMP is uneven, change the value of universal-id or the hash mode.
- Run mode symmetry
Eth-Trunk-based distribution of packets with the same source and destination addresses is enabled.
By default, Eth-Trunk-based distribution of packets with the same source and destination addresses is disabled.
- Run l2 [ src-mac | dst-mac | vlan | eth-type ] *
- Run commit
The configuration is committed.
Follow-up Procedure
Configure simulated calculation of an Eth-Trunk outbound interface.
Run display load-balance forwarding-path unicast interface eth-trunktrunk-idsrc-interfaceinterface-type interface-number { ethtypeethtype-number | vlanvlan-id | [ [ src-ipsrc-ip-data | dst-ipdst-ip-data ] * | [ src-ipv6src-ipv6-data | dst-ipv6dst-ipv6-data | flow-label label-data ] * ] | src-macsrc-mac-data | dst-macdst-mac-data | protocol { protocol-number | icmp | igmp | ip | ospf | tcp [ l4-src-portsrc-port-data | l4-dst-portdst-port-data ] * | udp [ l4-src-portsrc-port-data | l4-dst-portdst-port-data ] * } } *slotslot-id
Simulated calculation of an Eth-Trunk outbound interface is configured after the 5-tuple information, source MAC address, and destination address are specified.
Verify the configuration.
Run the display port forwarding-path { src-ip src-ip-data | dst-ip dst-ip-data | src-mac src-mac-data | dst-mac dst-mac-data | protocol { protocol-number | gre | icmp | igmp | ip | ipinip | 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 ] * } } * [ enhanced ] command to check the outbound interface of packets that contain specified 5-tuple information, source MAC address, and destination MAC address.
Run the display port forwarding-path mpls { { src-ip src-ip-data [ ip-mask-len | source-ip-mask ] | dst-ip dst-ip-data [ ip-mask-len | dst-ip-mask ] } * | { src-ipv6 src-ipv6-data [ ipv6-mask-len ] | dst-ipv6 dst-ipv6-data [ ipv6-mask-len ] } * }{ transit label-number labelnum | ingress | egress label-number labelnum } command to check the outbound interface of MPLS packets that contain the specified inner source IP address, destination IP address, role, and number of labels.
For MPLS packets, the query result can be displayed only for FD1, FG, FG1, SD, FD and FDA series cards.