load-balance hash-key ip

Function

The load-balance hash-key ip command configures a device to use source or destination IP addresses as hash elements to balance all incoming IP packets on a specific or all interface boards.

The undo load-balance hash-key ip command disables a device from using source or destination IP addresses as hash elements to balance all incoming IP packets on a specific or all interface boards.

This function is disabled by default.

Format

load-balance hash-key ip { destination-ip | source-ip }

undo load-balance hash-key ip [ destination-ip | source-ip ]

Parameters

Parameter Description Value
destination-ip

Uses destination IP addresses to balance data packets. Select destination IP addresses if the change scope of source IP addresses exceeds that of destination IP addresses.

-

source-ip

Uses source IP addresses to balance data packets. Select source IP addresses if the change scope of destination IP addresses exceeds that of source IP addresses.

-

ip

Enable the load balancing function for traffic with IP packet header received by an interface board.

-

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
forwarding write

Usage Guidelines

Usage Scenario

A device by default uses 5-tuple information to balance traffic through outbound interfaces. The default load balancing mode may result in load imbalance. To prevent load imbalance, run the load-balance hash-key ip command to configure a device to use source or destination IP addresses as hash elements to balance all incoming IP packets on a specific or all interface boards. This command ensures that traffic is hashed to the same outbound interface.

Precautions

  • The load balancing function configured using the load-balance hash-key ip command takes precedence over the other IP packet load balancing functions.
  • Delivering of the load-balance hash-key ip command may result in load imbalance.
  • When the load-balance hash-key ip command and the trunk load balancing function are configured, the same hash mode must be configured on both ends.
  • The load-balance hash-key ip command enables a device to balance incoming traffic only of a single interface board based only on source IP addresses and hash the traffic to the same outbound interface.

    In VS mode, this command is supported only by the admin VS.

Example

# Enable a device to use source IP addresses as a hash element to balance incoming IP traffic.
<HUAWEI> system-view
[~HUAWEI] load-balance hash-key ip source-ip
Warning: The priority of the current configuration is higher than that of other hash mode configurations.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >