Reset Search



LAG is not distributing traffic equally across all paths

« Go Back


TitleLAG is not distributing traffic equally across all paths
Users may report that the LAG member ports are not load balancing traffic symmetrically. Some ports are utilized more then others.
Software Release: NI 05.6.00
Fixed in Version: N/A
This is by design since LAGs by default will load balance on a per flow basis.

Brocade devices can be configured for load sharing over a LAG by either of the following methods:
  • Hash Based Load Sharing
  • Per Packet Load Sharing
Hash based load sharing
The Brocade device shares the traffic load evenly across the ports in LAG group, while ensuringthat packets in the flow are not reordered. Individual flows are assigned a LAG index to identifythem. Beginning with version 03.8.00, an improved hash based load sharing algorithm wasintroduced with the following enhancements:
  • Better Distribution
  • Support for 32-port LAGs
  • An increased number of fields in the packet header that can be used for load balancing
  • Enhanced load sharing in configurations of ECMP with LAGs.
Traffic from each flow is then distributed across the ports in the LAG group using a hash index.

Options for hash based load sharing
The following options can be used to refine the hash calculations used for LAGs:
  • Speculate UDP or TCP Headers
  • Mask Layer-4 Source and Destination Port Information
  • Hash Diversification
Each of these options when configured apply to both IP Load Sharing and LAG Load sharing.

Per packet server LAG load sharing

Per packet LAG load balancing is a type of LAG that load balances traffic on a per-packet basis, as compared to traditional server LAG load-balancing which balances traffic based on packet content such as source or destination addresses. In per packet server LAG load balancing, the packet processor (PPCR) on each module selects a port in the per packet server LAG to forward traffic in a round-robin fashion. For example, if the first port of the per packet server LAG is currently selected, the second port of the per-packet server LAG will be used next, and so on. Consequently, traffic is evenly distributed among all of the ports that are configured in a per packet server LAG. Traffic that can be forwarded out of a per-packet LAG includes Layer 2 switching traffic, Layer 3 routing traffic, L3VPN (2547) traffic, VLL and VPLS traffic.
Working as expected and by design.
Additional notes
You can alter either switch to Per Packet load sharing, or tweak the hashing diversification settings (preferred)

Hash diversification for LAGs and IP load balancing:
In a multi-stage network a traffic flow will normally use the same LAG port or same path (for IP load balancing) at each stage. The Hash Diversification feature works within an earlier stage of the hash calculation than the hash rotate feature. Using the load-balance hash-diversify command, you can provide a unique hash diversify value to a device, or a sub-set of ports on a device. This unique value is used in calculation of the ECMP and LAG index hash. Consequently, instead of a traffic flow always following the same port group or path, it will be distributed over different LAG or ECMP members. To apply hash diversification, use the following command.

Brocade(config)# load-balance hash-diversify random all
Syntax: [no] load-balance hash-diversify [ number | random | slot ] [all | slot-number | slot-number np-id ]

You can set the unique hash diversify value using one of the following options:
  • The number option allows you to specify a value from 0 - 255.
  • The random option directs the CPU to generate a random number for each packet processor and program it as the hash diversification value.
  • The slot option specifies the slot ID as the has diversification number.
  • The default value for the diversification number is 0 and the no version of the command resets the value to 0 regardless of any value previously set. Also, the most recent command added overrides any previous instances of the command. For example, if the random option is entered first and is then followed by the slot option, the value of the slot ID for the specified slot will be used.
  • The all option applies the command to all ports within the device.

Hash rotate for LAGs and IP load balancing
The hash rotate function provides another option (in addition to hash diversification) for diversifying traffic flow in a multi-stage network. Using this feature, the ECMP hash index can be rotated by a specified number of bits after it has been calculated. This allows path selection within IP load balancing to be more diverse. To configure hash rotate to LAG index calculations, enter a command such as the following.

Brocade(config)# load-balance hash-rotate 3 all
Syntax: [no] load-balance hash-rotate rotate-number [all | slot-number | slot-number np-id ]
  • The rotate-number value specifies number of bits between 0 and 7 that you want to rotate the ECMP hash index value.
  • The all option applies the command to all ports within the device.
  • Specifying a slot number using the slot-number variable limits the command to an individual module.
  • Specifying a slot number and a network processor ID using the slot-number and np-id variables limits the command to the ports supported by the specified network processor on the specified interface module.
For more information, please see the Multiservice Ironware Switching Configuration Guide



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255