The load-balance hash-fields ip command specifies hash factors that are used for traffic load balancing on the interface board in IP forwarding.
The undo load-balance hash-fields ip command restores the default configuration.
By default, the hash factors are specified as l4 on the interface board in IP forwarding.
Parameter | Description | Value |
---|---|---|
l2 |
Indicates that hash factors are the source MAC address and destination MAC address. This means that the hash calculation is performed based on the source MAC address and destination MAC address for the traffic in the upstream direction of the interface. |
The parameter is specified if the source MAC address and destination MAC address are hashable. |
l3 |
Indicates that hash factors are the source IP address and destination IP address. This means that the hash calculation is performed based on the source IP address and destination IP address for the traffic in the upstream direction of the interface. |
The parameter is specified if the source IP address and destination IP address are hashable. |
l4 |
Indicates that hash factors are the source IP address, destination IP address, source port number, destination port number, and protocol number. This means that the hash calculation is performed based on these hash factors for the traffic in the upstream direction of the interface. |
The parameter is specified if the source/destination IP addresses are not hashable. |
Usage Scenario
This command is used to specify the hash factors that are used for traffic load balancing at the device in IP forwarding.
The load balancing function is implemented using the hash algorithm on the upstream interface board. Traffic is hashed based on traffic characteristics, which are called hash factors. If hash factors are more hashable, traffic will be more evenly load-balanced. The device has default values of the hash factors used for load balancing of different service types of packets. Traffic is load balanced based on the default hash factors depending on the service types of packets on the upstream interface board. To implement load balancing better, configure hash factors based on traffic types.Configuration Impact
The load-balance hash-fields ip command is cyclic in nature, and only the latest configuration takes effect. After the command is configured, the hash calculation is performed based on the new hash factors.
Follow-up Procedure
If this command is configured but traffic load balancing cannot be performed well in the device in IP forwarding, you can run the load-balance hash-arithmetic command to modify the hash algorithm itself.
In VS mode, this command is supported only by the admin VS.