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 and those of different data flows are forwarded on different physical links.
You can configure a common load balancing mode in which IP addresses or MAC addresses of packets are used to load balance packets; you can also configure an enhanced load balancing mode for Layer 2, IP, and MPLS packets.
Load balancing is valid only for outgoing traffic; therefore, the load balancing modes for the interfaces at both ends of a link can be different and do not affect each other.
In practical services, you need to configure a proper load balancing mode based on traffic characteristics. When a parameter of traffic changes frequently, you can set the load balancing mode based on this parameter to ensure that the traffic load is balanced evenly. For example, if IP addresses in packets change frequently, use the load balancing mode based on dst-ip, src-ip, or src-dst-ip so that traffic can be properly load balanced among physical links. If MAC addresses in packets change frequently and IP addresses are fixed, use the load balancing mode based on dst-mac, src-mac, or src-dst-mac so that traffic can be properly load balanced among physical links.
If the majority of service traffic is MPLS packets, you need to set the enhanced load balancing mode. You can run the mpls field command in the load balancing profile view to configure the load balancing mode of MPLS packets.
On a network where an Eth-Trunk and a stack are configured, if the local-preference enable command is run to configure an Eth-Trunk interface to preferentially forward local traffic, traffic arriving at the local device is preferentially forwarded through Eth-Trunk member interfaces of the local device. This function is enabled by default. If there is no Eth-Trunk member interface on the local device, traffic is forwarded through Eth-Trunk member interfaces on another device. This forwarding mode effectively saves bandwidth resources of member devices in the stack and improves traffic forwarding efficiency.
If the value of member-number configured for an Eth-Trunk using the assign trunk { trunk-group group-number | trunk-member member-number }* command is larger than 16 on the S6720-EI and S6720S-EI or larger than 32 on the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, and S6730S-S, only the enhanced mode can be used for load balancing. If the enhanced mode is not used, problems such as packet loss and uneven load balancing may occur.
Enhanced load balancing is only supported by the following models: S5720-EI, S5720-HI, S5730-HI, S5730S-EI, S5730-SI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720-LI, S6720S-EI, S6720S-LI, S6720S-SI, S6720-SI, S6730-H, S6730S-H, S6730-S, and S6730S-S.
The preceding load balancing modes apply only to known unicast traffic. To configure a load balancing mode for broadcast, unknown-unicast, and multicast (BUM) traffic, run the unknown-unicast load-balance { dmac | smac | smacxordmac | enhanced [ lbid ] } command in the system view. Load balancing for BUM traffic is only supported by the following models: S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S. Only the S5720-EI, S6720-EI, and S6720S-EI support the lbid parameter.