load-balance

Function

The load-balance command sets the load balancing mode.

The undo load-balance command restores the default load balancing mode. The default load balancing mode is per-flow load balancing.

By default, flow-based load balancing is performed for received packets based on Layer 3 information (source and destination IP addresses).

Format

load-balance { flow [ l2 | l3 ] | packet }

undo load-balance [ flow [ l2 | l3 ] | packet ]

Parameters

Parameter Description Value
flow

Specifies performs per-flow load balancing.

-

l2

Specifies performing per-flow load balancing based on Layer 2 information (source and destination MACs) about IP packets.

-

l3

Specifies performing per-flow load balancing based on Layer 3 information (source and destination addresses and its ports) about IP packets.

-

packet

Specifies performs per-packet load-balancing.

-

Views

Traffic behavior view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
qos write

Usage Guidelines

Usage Scenario

In general, the configuration rule is to perform per-flow load balancing for TCP packets and per-packet load balancing for UDP packets.

Prerequisites

The traffic behavior has been configured.

Follow-up Procedure

Configure the traffic classifier and traffic policy and apply the policy to corresponding interfaces.

Precautions

The traffic behavior relevant to the traffic action takes effect only in the inbound direction of an interface and works only on IP packet forwarding. The device performs per-flow load balancing for the received IP packets based on the source and destination IP addresses.

Example

# Define a traffic behavior and perform per-packet load balancing in the traffic behavior.
<HUAWEI> system-view
[~HUAWEI] traffic behavior test
[*HUAWEI-behavior-test] load-balance packet
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >