The load-balance hash-fields mpls command configures a hash factor an interface board uses to perform hash calculation to load-balance MPLS traffic per flow.
The undo load-balance hash-fields mpls command restores the default configuration.
By default, ip is used as the hash factor an interface board uses to perform hash calculation to load-balance MPLS traffic per flow.
Parameter | Description | Value |
---|---|---|
label |
Indicates that the hash factor is the label. Hash factors vary with the number of MPLS label layers.
|
- |
ip |
Indicates that the hash factor is the IP address. Hash factors vary with the number of MPLS label layers.
|
- |
payload-header |
Indicates that the hash factor is payload-header. If the number of MPLS label layers is less than or equal to five:
If the number of MPLS label layers is greater than five, the hash factors are the outer most five MPLS labels. |
- |
ip-tos |
Load-balances MPLS packets per flow based on the IP and IP ToS value.
|
- |
mac |
Indicates that the hash factor is mac first. If after inner label is not mac: Hash factors vary with the number of MPLS label layers. If the number of MPLS label layers is less than 5 or equal to 5:
If the number of MPLS label layers is larger than 5, the hash factor are the outermost 5 MPLS labels. |
- |
Usage Scenario
The load-balance hash-fields mpls command takes effect only on label switching traffic on a transit node of an MPLS tunnel.
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. The load-balance hash-fields mpls command is used to adjust the hash factor in MPLS forwarding:Configuration Impact
If the load-balance hash-fields mpls command is run more than once, only the latest configuration takes effect. After the command is configured, the hash calculation is performed based on the new hash factor.
Precautions
The preceding configurations apply to ECMP (load balancing based on NHP) and trunk logical interfaces (load balancing based on trunk tables). That is, ECMP and trunk load balancing behaviors are the same.
In VS mode, this command is supported only by the admin VS.