Unbalanced Traffic Distribution Among Eth-Trunk Member Interfaces

Publication Date:  2015-03-24 Views:  729 Downloads:  0
Issue Description
Applicable Products and Versions:All products and versions.

Unbalanced Traffic Distribution Among Eth-Trunk Member Interfaces.
Alarm Information
IP packets cannot be evenly distributed among Eth-Trunk member interfaces on a switch.

Handling Process
1.  In the Eth-Trunk interface view, check the default hash algorithm.

[Quidway-Eth-Trunk1] display this interface
Eth-Trunk1 current state : UP
Line protocol current state : UP
Description: Link to Eth-Trunk1
Switch Port, PVID :    1, Hash arithmetic : According to SIP-XOR-DIP,The Maximum Frame Length is 9216
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4cb1-6c3b-aaf5
Current system time: 2013-08-07 14:51:00+08:00
Last 300 seconds input rate 0 bits/sec, 0 packets/sec
Last 300 seconds output rate 0 bits/sec, 0 packets/sec
Input:  0 packets, 0 bytes    
  

The command output shows that the Eth-Trunk uses the hash algorithm based on the exclusive-OR result of the source and destination IP addresses to implement load balancing by default. On an IP network where devices' IP addresses randomly change, such a hash algorithm can ensure even traffic distribution. On a Layer 2 network, MAC addresses frequently change and IP addresses are fixed, so traffic may be not evenly distributed.

2.  If traffic is not evenly load balanced among Eth-Trunk member interfaces, run the load-balance command to change the hash algorithm.

[Quidway-Eth-Trunk1] load-balance ?
  dst-ip       According to destination IP hash arithmetic
  dst-mac      According to destination MAC hash arithmetic
  enhanced     Enhanced hash arithmetic
  src-dst-ip   According to source/destination IP hash arithmetic
  src-dst-mac  According to source/destination MAC hash arithmetic
  src-ip       According to source IP hash arithmetic
  src-mac      According to source MAC hash arithmetic


A switch supports the following load balancing modes for known unicast packets:
  • dst-ip (destination IP address) mode
The system obtains the specified three bits from each of the destination IP address and the outbound TCP or UDP port number to perform the exclusive-OR calculation, and then selects the outbound interface from the Eth-Trunk table according to the calculation result.
  • src-ip (source IP address) mode
The system obtains the specified three bits from each of the source IP address and the inbound TCP or UDP port number to perform the exclusive-OR calculation, and then selects the outbound interface from the Eth-Trunk table according to the calculation result.
  • src-dst-ip (exclusive-OR calculation of the source and destination IP addresses) mode
The system uses the calculation results of the dst-ip and src-ip modes to perform the exclusive-OR calculation, and then selects the outbound interface from the Eth-Trunk table according to the calculation result.
  • dst-mac (destination MAC address) mode
The system obtains the specified three bits from each of the destination MAC address, VLAN ID, Ethernet type, and inbound interface information to perform the exclusive-OR calculation, and then selects the outbound interface from the Eth-Trunk table according to the calculation result.
  • src-mac (source MAC address) mode
The system obtains the specified three bits from each of the source MAC address, VLAN ID, Ethernet type, and inbound interface information to perform the exclusive-OR calculation, and then selects the outbound interface from the Eth-Trunk table according to the calculation result.
  • src-dst-mac (exclusive-OR calculation of the source and destination MAC addresses) mode
The system obtains the specified three bits from each of the destination MAC address, source MAC address, VLAN ID, Ethernet type, and inbound interface information to perform the exclusive-OR calculation, and then selects the outbound interface from the Eth-Trunk table according to the calculation result.
  • enhanced mode
The system uses an enhanced load balancing profile to select outbound interfaces for different packets.

  NOTE:
Modular switches: All cards except the SA series cards support load balancing in enhanced mode.
Fixed switches:
    V200R001C01: Only the S5700HI supports load balancing using an enhanced load balancing profile.
    V200R002: Only the S5710EI and S5700HI support load balancing using an enhanced load balancing profile.
    V200R003: Only the S5710EI, S5700HI, and S5710HI support load balancing using an enhanced load balancing profile.

To configure a load balancing mode for broadcast and multicast packets, run the unknown-unicast load-balance { dmac | smac | smacxordmac | enhanced } command in the system view.

  NOTE:
Modular switches: V200R001, V200R002, and V200R003 all support this command.
Fixed switches:
    V100R006C03: Only the S2752EI and S3700 support this command, but they do not support the enhanced parameter.
    V100R006C05: Only the S2710SI, S2700-52P-EI, S2700-52P-PWR-EI, and S3700 support this command, but they do not support the enhanced parameter.
    V200R001: Only the S5700EI, S5710EI, and S5700HI support this command. Only the S5700HI supports the enhanced parameter.
    V200R002: Only the S5700EI, S5710EI, and S5700HI support this command. Only the S5700HI and S5710EI support the enhanced parameter.
    V200R003: Only the S5700EI, S5710EI, S5700HI, and S5710HI support this command. Only the S5700HI, S5710HI, and S5710EI support the enhanced parameter.
Root Cause
An Eth-Trunk between switches implements load balancing using the hash algorithm based on the source and destination IP/MAC addresses of packets. If packets have identical or similar IP or MAC addresses, the switch forwards packets through the same link, resulting in unbalanced traffic distribution.

Suggestions
You can configure a load balancing mode based on the traffic model. When a parameter of traffic changes frequently, you can set the load balancing mode based on this parameter to ensure that the traffic is evenly load balanced. For example, if IP addresses of packets change frequently, select the dst-ip, src-ip, or src-dst-ip load balancing mode. If MAC addresses of packets change frequently and IP addresses are fixed, select the dst-mac, src-mac, or src-dst-mac load balancing mode.

END