Load balancing principle of Eth-Trunk member interfaces on CE switches

4

An Eth-Trunk has 16 timeslots for sending packets at each interval. Eth-Trunk member interfaces use the 16 timeslots to send packets in sequence.

When the number of Eth-Trunk member interfaces is the nth power of 2, load balancing can be made more even. For example, if the number of Eth-Trunk member interfaces is 2, 4, or 8 (which is divisible by 16), the timeslot of the packets sent by each interface is an integer, making load balancing even. If it is not the nth power of 2 (for example, 3), a member interface gets 6 times for sending packets from 16 timeslots, while the other two only get 5 times. In this way, load balancing is not even.

Therefore, you are advised to set the number of Eth-Trunk member interfaces to the nth power of 2, ensuring even load balancing.

Other related questions:
How is uneven load balancing of an Eth-Trunk solved on CE switches
Load balancing modes in different service scenarios are different. If load balancing of an Eth-Trunk is uneven, it is generally caused by the inappropriate load balancing mode. Perform the following operations to solve the problem: 1. Check whether the number of Eth-Trunk member interfaces is the nth power of 2. If not, adjust the number of Eth-Trunk member interfaces to the nth power of 2. 2. Adjust the load balancing mode. If the IP address in packets changes frequently, use load balancing based on the source or destination IP address so that traffic can be evenly load balanced among physical links. If the MAC address in packets changes frequently and the IP address is fixed, use load balancing based on the source or destination MAC address so that traffic can be evenly load balanced among physical links. If packets are random, you are advised to add the hash factor. 3. Adjust the hash algorithm. CE7800&CE6800&CE5800 series switches: eth-trunk { hash-mode hash-mode-id | universal-id universal-id } * CE12800 series switches: eth-trunk { src-interface | seed seed-data | universal-id universal-id | hash-mode hash-mode-id } * Note: The load balancing mode is valid only for the outbound interface of traffic. If traffic of the inbound interface is uneven, change the load balancing mode of the outbound interface on the uplink device. In the scenario where Eth-Trunk and ECMP are deployed and traffic is unevenly load balanced, configure different hash algorithms for the Eth-Trunk and ECMP and change the value of universal-id as needed.

Load balancing cannot be implemented among member interfaces of an Eth-Trunk on S series switches
Cause 1: Traffic is unevenly balanced among active links of an Eth-Trunk due to the incorrect load balancing mode. 1. Run the display eth-trunk command to check whether the load balancing mode of the Eth-Trunk meets the actual networking requirements. For example, load balancing based on source and destination IP addresses is not recommended on an L2 network. 2. Run the load-balance command to set the load balancing mode that meets the traffic requirements. Cause 2: When an Eth-Trunk interface in static LACP mode goes Up and Down frequently due to unstable physical links, LACP flapping occurs accordingly. As a result, services transmitted on the Eth-Trunk link are affected. When the LACP preemption delay is configured, LACP negotiation is not performed during the delay period; therefore. As a result, LACP flapping will not occur and services will not be affected. You can run the lacp preempt enable command to enable the LACP preemption function and then run the lacp preempt delay delay-time command to specify the LACP preemption delay.

How load balancing is implemented on S series switches when link aggregation is configured
For S series switches (except the S1700), there are two load balancing modes: per-packet load balancing and per-flow load balancing. 1. Per-packet load balancing mode When there are multiple physical links between the two devices of the Eth-Trunk, the first data frame of a data flow is transmitted on one physical link, and the second data frame is transmitted on another physical link. In this case, the second data frame may arrive at the peer device earlier than the first data frame. As a result, packet mis-sequencing occurs. 2. Per-flow load balancing mode This mechanism uses the hash algorithm to calculate the address in a data frame and generates a hash key value. Then the system searches for the outbound interface in the Eth-Trunk forwarding table based on the generated hash key value. Each MAC or IP address corresponds to a hash key value, so the system uses different outbound interfaces to forward data. This mechanism ensures that frames of the same data flow are forwarded on the same physical link and implements flow-based load balancing. Per-flow load balancing ensures the correct sequence of data transmission, but cannot ensure the bandwidth usage. Notes: Currently, S series switches support only per-flow load balancing mode, including the following: 1. Load balancing based on the source MAC address of packets; 2. Load balancing based on the destination MAC address of packets; 3. Load balancing based on the source IP address of packets; 4. Load balancing based on the destination IP address of packets; 5. Load balancing based on the source and destination MAC addresses of packets; 6. Load balancing based on the source and destination IP addresses of packets; 7. Enhanced load balancing for L2, IPv4, IPv6, and MPLS packets based on the VLAN ID and source physical interface number. When you configure load balancing modes, follow these guidelines: The load balancing mode only takes effect on the outbound interface of traffic. If load is unevenly distributed on the inbound interfaces, change the load balancing mode on the uplink outbound interfaces. Configure load balancing to ensure data flow is transmitted on all active links instead of only one link, preventing traffic congestion and ensuring normal service operation. For example, if data packets have only one destination MAC address and IP address, you are advised to configure load balancing based on the source MAC address and IP address. If you implement load balancing based on the destination MAC address and IP address, the data flow may be transmitted on only one link, causing traffic congestion.

Setting the number of Eth-Trunk member interfaces on CE switches
Except that each Eth-Trunk on the CE5810EI supports a maximum of eight member interfaces, the maximum number of member interfaces on other switch models is configured using commands. For the CE12800 and CE6870EI: Run the assign forward eth-trunk mode { 256 | 512 | 1024 } command in the system view to set the number of Eth-Trunk member interfaces supported by the switch. By default, a maximum of 512 interfaces can be added to an Eth-Trunk on the switch. When 256 is specified, the switch allows a maximum of 256 LAGs and each LAG supports a maximum of 64 member interfaces. When 512 is specified, the switch allows a maximum of 512 LAGs and each LAG supports a maximum of 32 member interfaces. When 1024 is specified, the switch allows a maximum of 1024 LAGs and each LAG supports a maximum of 16 member interfaces. For CE8800&7800&6800&5800 series switches: Run the assign forward eth-trunk mode { 64 | 128 | 256 | 512 | 1024 } command in the system view to set the number of Eth-Trunk member interfaces supported by the switch. By default, a maximum of 128 interfaces can be added to an Eth-Trunk on the switch. When 64 is specified, the switch allows a maximum of 64 LAGs and each LAG supports a maximum of 32 member interfaces. When 128 is specified, the switch allows a maximum of 128 LAGs and each LAG supports a maximum of 16 member interfaces. When 256 is specified, the switch allows a maximum of 256 LAGs and each LAG supports a maximum of 8 member interfaces. When 512 is specified, the switch allows a maximum of 512 LAGs and each LAG supports a maximum of 4 member interfaces. When 1024 is specified, the switch allows a maximum of 1024 LAGs and each LAG supports a maximum of 2 member interfaces. Description: After the assign forward eth-trunk mode command is used to change the number of Eth-Trunk member interfaces supported by the switch, restart the switch to make the configuration take effect.

How to configure load balancing for the Eth-Trunk on S series switches
S series switches (except the S1700) use a per-flow load balancing mechanism, which ensures that frames of the same data flow are forwarded on the same physical link, and different data flows are forwarded on different physical links. You can configure common load balancing mode to implement load balancing based on IP addresses or MAC addresses of packets. For L2, IP, and MPLS packets, you can also configure enhanced load balancing mode. Load balancing takes effect only for the outbound traffic. Therefore, load balancing modes can be different on the two ends of a link. 1. Commands for configuring common load balancing mode: [HUAWEI] interface Eth-Trunk 1 [HUAWEI-Eth-Trunk1] load-balance dst-mac 2. Commands for configuring enhanced load balancing mode: [HUAWEI] load-balance-profile a [HUAWEI-load-balance-profile-a] l2 field smac [HUAWEI-load-balance-profile-a] quit [HUAWEI] interface Eth-Trunk 1 [HUAWEI-Eth-Trunk1] load-balance enhanced profile a For configuration cases about common load balancing mode, see "Typical Ethernet Switching Configuration -Link Aggregation Configuration- Example for Configuring Link Aggregation in Manual Mode When Switches Are Directly Connected" in S1720&S2700&S3700&S5700&S6700&S7700&S9700 Typical Configuration Examples. The configuration cases of common load balancing are applicable to all S series switch models. The Sx700 series switch is used here as an example.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top