You are on page 1of 74

S300, S500, S2700, S5700 and S6700 Series Ethernet

Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

3 Link Aggregation Configuration

3.1 Overview of Link Aggregation


3.2 Understanding Link Aggregation
3.3 Application Scenarios for Link Aggregation
3.4 Summary of Link Aggregation Configuration Tasks
3.5 Licensing Requirements and Limitations for Link Aggregation
3.6 Default Settings for Link Aggregation
3.7 Configuring Link Aggregation in Manual Mode
3.8 Configuring Link Aggregation in LACP Mode
3.9 Associating the Backup Member Interface of an Eth-Trunk in LACP Mode with
Its Primary Member Interface
3.10 Configuring an Eth-Trunk to Preferentially Forward Local Traffic in a Stack
3.11 Creating an Eth-Trunk Sub-interface
3.12 Configuring an E-Trunk
3.13 Deleting the Link Aggregation Configuration
3.14 Maintaining Link Aggregation
3.15 Configuration Examples for Link Aggregation
3.16 Troubleshooting Link Aggregation
3.17 FAQ About Link Aggregation

3.1 Overview of Link Aggregation


Ethernet link aggregation, also called Eth-Trunk, bundles multiple physical links
into a logical link to increase link bandwidth, without having to upgrade hardware.
Link aggregation provides link backup mechanisms, greatly improving link
reliability.
Link aggregation has the following advantages:

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 99


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

● Increased bandwidth
The maximum bandwidth of the link aggregation interface is the sum of the
bandwidth of member interfaces.
● Higher reliability
When an active link fails, traffic on this active link is switched to another
active link, improving reliability of the link aggregation interface.
● Load balancing
In a link aggregation group (LAG), traffic is load balanced among active links
of member interfaces.

Figure 3-1 Eth-Trunk networking

3.2 Understanding Link Aggregation

3.2.1 Basic Concepts


LAG and LAG Interface
A link aggregation group (LAG) is a logical link composed of multiple Ethernet
links.
Each LAG has one logical interface, known as a link aggregation interface or Eth-
Trunk, which can be treated as a physical Ethernet interface. The only difference
between the Eth-Trunk and physical Ethernet interface is that the Eth-Trunk needs
to select one or more member interfaces to forward traffic.

Member Interface and Member Link


The interfaces that constitute an Eth-Trunk are member interfaces. The link
corresponding to a member interface is a member link.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 100


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Figure 3-2 Relationship of the LAG, LAG interface, member interface, and member
link

Active and Inactive Interfaces and Links


There are two types of interfaces in a LAG: active interfaces that forward data and
inactive interfaces that do not forward data.
The link connected to an active interface is the active link, and the link connected
to an inactive interface is the inactive link.

Upper Threshold for the Number of Active Interfaces


The upper threshold is used to improve network reliability with assured
bandwidth. When the number of active interfaces reaches this threshold, you can
add new member interfaces to the Eth-Trunk, but excess member interfaces only
go Up to back up active interfaces that go Down.
For example, 8 fully-functioning member links bundle into an Eth-Trunk link, with
each link providing a bandwidth of 1 Gbit/s. If the Eth-Trunk link only needs to
provide a maximum bandwidth of 5 Gbit/s, you can set the maximum number of
Up member links to 5 or larger. Then any unselected Up links automatically enter
the backup state, improving reliability.

NOTE

The upper threshold for the number of active interfaces is inapplicable to the manual load
balancing mode.

Lower Threshold for the Number of Active Interfaces


When the number of active interfaces falls below the lower threshold, the Eth-
Trunk goes Down. This ensures that an active Eth-Trunk has the minimum required
bandwidth.
For example, if the Eth-Trunk is required to provide a minimum bandwidth of 2
Gbit/s and each member link's bandwidth is 1 Gbit/s, the minimum number of Up
member links must be set to 2 or larger.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 101


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Link Aggregation Mode


Link aggregation can work in manual or Link Aggregation Control Protocol (LACP)
mode. For details, see 3.2.2 Link Aggregation in Manual Mode and 3.2.3 Link
Aggregation in LACP Mode.

Link Aggregation Methods


● Intra-device: Member interfaces of an Eth-Trunk are located on the same
device.
● Inter-stack-device: Member interfaces of an Eth-Trunk are located on member
devices of a stack. For details, see 3.2.6 Link Aggregation in Stack Scenarios.
● Inter-device: The inter-device link aggregation refers to E-Trunk. E-Trunk
allows links between multiple devices to be aggregated using LACP. For
details, see 3.2.7 E-Trunk.

3.2.2 Link Aggregation in Manual Mode


In manual mode, you must manually create an Eth-Trunk and add member
interfaces to the Eth-Trunk. All active links forward data and traffic is evenly load
balanced between them. If one active link fails, traffic is load balanced between
the remaining active links.
This mode is recommended when the link between two directly-connected devices
requires a higher bandwidth and at least one of the devices does not support
LACP.

3.2.3 Link Aggregation in LACP Mode


Context
LACP, as specified in IEEE 802.3ad, implements dynamic link aggregation and de-
aggregation, allowing LACP-enabled switches at both ends to exchange Link
Aggregation Control Protocol Data Units (LACPDUs). LACP provides a standard
negotiation mechanism that a Huawei switch can use to create and enable the
aggregated link based on its configuration. After an aggregated link is formed,
LACP is responsible for maintaining the link. LACP adjusts the link if an
aggregated link's status changes.
For example, in Figure 3-3, four interfaces on DeviceA should be connected to the
corresponding interfaces on DeviceB, and these interfaces are all bundled into an
Eth-Trunk. However, one interface on DeviceA is connected to an interface on
DeviceC. As a result, DeviceA may send data destined for DeviceB to DeviceC. In
manual mode, this fault would go undetected.
In this case, if LACP is enabled on DeviceA and DeviceB, the Eth-Trunk only selects
active links (links connected to DeviceB) to forward data after negotiation. Data
sent by DeviceA destined for DeviceB only reaches DeviceB.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 102


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Figure 3-3 Incorrect Eth-Trunk connection

Basic Concepts
● LACP system priority
LACP system priorities determine the sequence in which devices at two ends
of an Eth-Trunk select active interfaces to join a LAG. In order for a LAG to be
established, both devices must select the same interfaces as active interfaces.
To achieve this, one device (with a higher priority) is responsible for selecting
the active interfaces. The other device (with a lower priority) then selects the
same interfaces as active interfaces. In priority comparisons, numerically
lower values have higher priority.
● LACP interface priority
LACP interface priorities affect which interfaces of an Eth-Trunk are selected
as active interfaces. A smaller numerical value represents a higher priority.
The interfaces with the highest LACP interface priority become active
interfaces.
● M:N backup of member interfaces
LACP mode is also called M:N mode, where M refers to the number of active
links and N refers to the number of backup links. This mode guarantees high
reliability and allows traffic to be load balanced among M active links.
In Figure 3-4, M+N links with the same attributes (in the same LAG) are set
up between two devices. When data is transmitted over the aggregated link,
traffic is load balanced among M active links, with no data transmitted over N
backup links. Therefore, the actual bandwidth of the aggregated link is the
sum of the M links' bandwidth, and the maximum bandwidth of the
aggregated link is the sum of the (M+N) links' bandwidth.
If one of the M links fails, LACP selects an available link with a higher priority
from the N backup links to replace the faulty link. The actual bandwidth of
the aggregated link is still the sum of M links' bandwidth, but the maximum
bandwidth of the aggregated link is the sum of the (M+N-1) links' bandwidth.

Figure 3-4 Networking of M:N backup

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 103


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

M:N backup is mainly applied in situations where the bandwidth of the M


links must be assured and a fault tolerance mechanism is required. If an
active link fails, the system selects the backup link with the highest priority as
the active link.
If no available backup link is found and the number of active links is smaller
than the lower threshold, the system shuts down the LAG.

Implementation of Link Aggregation in LACP Mode


LACP-enabled switches exchange LACPDUs. An LACPDU contains the LACP system
priority, MAC address, LACP interface priority, interface number, and operational
key.

NOTE

To learn more information about the format of the LACPDU, use Packet Format Query Tool.

An Eth-Trunk in LACP mode is set up as follows:


1. After member interfaces are added to an Eth-Trunk in LACP mode, both ends
send LACPDUs.
In Figure 3-5, create an Eth-Trunk in LACP mode on DeviceA and DeviceB and
add member interfaces to the Eth-Trunk. Then enable LACP on the member
interfaces. Both devices can then exchange LACPDUs.

Figure 3-5 Exchange of LACPDUs

2. Devices at both ends determine the Actor and active links.


In Figure 3-6, when DeviceB receives LACPDUs from DeviceA, DeviceB checks
and records information about DeviceA and compares LACP system priorities.
If the LACP system priority of DeviceA is higher than that of DeviceB, DeviceA
becomes the Actor. If DeviceA and DeviceB have the same LACP system
priority, the device with a smaller MAC address becomes the Actor.
After the Actor is selected, both devices select active interfaces based on the
interface priorities of the Actor. If priorities of interfaces on the Actor are the
same, interfaces with smaller interface numbers are selected as active
interfaces. An Eth-Trunk is established when both devices select the same
interfaces as active interfaces. Active links then load balance traffic.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 104


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Figure 3-6 Selecting the Actor and active links in LACP mode

Other Functions in LACP Mode


LACP preemption

In Figure 3-7, Port 1, Port 2, and Port 3 are member interfaces of an Eth-Trunk;
DeviceA acts as the Actor; the upper threshold for the number of active interfaces
is 2; LACP priorities of Port 1, Port 2, and Port 3 are 10, 20, and 30 respectively.
When LACP negotiation is complete, Port 1 and Port 2 are selected as active
interfaces because their LACP priorities are higher, and Port 3 is used as the
backup interface.

Figure 3-7 LACP preemption

When LACP preemption is enabled, interfaces with higher priorities in a LAG


always function as active interfaces. LACP preemption is used in the following
scenarios:

● Port 1 becomes faulty, causing Port3 to take its place and transmit traffic.
When Port 1 recovers, if LACP preemption is not enabled on the Eth-Trunk,
Port 1 remains in backup state. If LACP preemption is enabled on the Eth-

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 105


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Trunk, after Port1 recovers, it becomes active again due to having a higher
priority than Port3, which reverts to being the backup interface.
● With LACP preemption enabled, setting a higher LACP priority for Port 3 will
allow it to replace Port 1 or Port 2 as an active interface without either of
them first becoming faulty. If LACP preemption is not enabled, the system
does not re-select active interfaces even if the priority of a backup interface is
set higher than that of an active interface.
LACP preemption delay
The LACP preemption delay is the time a backup link waits before becoming the
active link after an active link becomes faulty. The LACP preemption delay is used
to prevent unstable data transmission over an Eth-Trunk link caused by frequent
status changes of member links.
In Figure 3-7, Port 1 becomes inactive due to a link fault, which then recovers. If
LACP preemption is enabled and the LACP preemption delay is set, Port 1
becomes active again only after the LACP preemption delay.
Switchover between active and inactive links
In LACP mode, a link switchover in a LAG is triggered if a device at one end
detects one of the following events:
● An active link goes Down.
● Ethernet OAM detects a link fault.
● LACP detects a link fault.
● An active interface becomes unavailable.
● When LACP preemption is enabled, a backup interface becomes the active
interface as soon as its priority is changed to be higher than that of the
current active interface.
When any of the preceding events occurs, LACP takes effect with the following
sequence of events:
1. Shuts down the faulty link.
2. Selects the backup link with the highest priority among N backup links to
replace the faulty active link.
3. The backup link with the highest priority becomes the active link and begins
forwarding data.

3.2.4 Comparison Between the Manual Mode and LACP Mode


Table 3-1 compares the manual mode and LACP mode.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 106


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Table 3-1 Comparison between the manual mode and LACP mode
Item Manual Mode LACP Mode

Eth-Trunk You must manually create An Eth-Trunk is created using


setup mode an Eth-Trunk and add LACP, which provides a standard
member interfaces to the negotiation mechanism that a
Eth-Trunk. switch can use to create and start
the aggregated link based on its
configuration. LACP maintains the
link after the aggregated link is
created, adjusting or removing the
link if an aggregated link's status
changes.

LACP Not required Required

Data When the aggregated link When the aggregated link is


forwarding is operating normally and operating normally but only some
all links are active links links are active links, all active
participating in data links participate in data
forwarding, if one active forwarding. If an active link fails,
link fails, traffic is load the system selects one of the
balanced among the inactive links to be the active link,
remaining active links. ensuring the number of links
participating in data forwarding
remains unchanged.

Inter-device Not supported Supported


link
aggregation

Fault This mode can only detect This mode can detect member link
detection member link disconnections, link layer faults,
disconnections. and incorrect link connections.

3.2.5 Load Balancing Modes of Link Aggregation


Context
Because an Eth-Trunk between two devices consists of multiple physical links
bundled together, an Eth-Trunk may transmit data frames of the same data flow
over different physical links. A potential problem arises in that the second data
frame may arrive at the remote device earlier than the first data frame, resulting
in out-of-order packets.
To prevent out-of-order packets, Eth-Trunk uses flow-based load balancing. This
mechanism uses the hash algorithm to calculate the address in a data frame and
generate a hash key based on which the system searches for the outbound
interface in the Eth-Trunk forwarding table. Each MAC or IP address corresponds
to a hash key, so the system uses different outbound interfaces to forward data.
This mechanism ensures that frames of the same data flow are forwarded on the
same physical link and implements load balancing of data flows. Flow-based load

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 107


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

balancing ensures that data is transmitted in the correct sequence, but cannot
ensure efficient bandwidth usage.

Traffic Forwarding
In Figure 3-8, an Eth-Trunk is located at the data link layer, between the MAC
address and LLC sub-layers.

Figure 3-8 Eth-Trunk in the Ethernet protocol stack

The Eth-Trunk module maintains a forwarding table that consists of the following
fields:
● Hash key
The hash key is calculated through the hash algorithm based on the MAC
address or IP address in a data frame.
● Interface number
Eth-Trunk forwarding entries are limited by the maximum number of member
interfaces in an Eth-Trunk. Different hash keys map to different outbound
interfaces.
For example, an Eth-Trunk supports a maximum of eight member interfaces.
If physical interfaces 1, 2, 3, and 4 are bundled into an Eth-Trunk, the Eth-
Trunk forwarding table contains eight entries, as shown in Figure 3-9. In the
Eth-Trunk forwarding table, hash keys are 0, 1, 2, 3, 4, 5, 6, and 7, and the
corresponding interface numbers are 1, 2, 3, 4, 1, 2, 3, and 4.

Figure 3-9 Example of an Eth-Trunk forwarding table

The Eth-Trunk module uses the Eth-Trunk forwarding table to forward data frames
according to the following process:
1. The Eth-Trunk module receives a packet from the MAC sub-layer, and then
extracts its source MAC address/IP address or destination MAC address/IP
address.
2. The Eth-Trunk module calculates the hash key using the hash algorithm.
3. Based on the hash key, the Eth-Trunk module searches for the interface
number in the Eth-Trunk forwarding table, and then sends the data frame
from the corresponding interface.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 108


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Load Balancing Modes


You can set the load balancing mode based on traffic models. When a parameter
of traffic changes frequently, you can set the load balancing mode based on this
parameter to ensure that the traffic is load balanced evenly. For example, if IP
addresses in packets change frequently, use the load balancing mode based on the
destination IP address, source IP address, or source and destination IP addresses. If
MAC addresses in packets change frequently and IP addresses are fixed, use the
load balancing mode based on the destination MAC address, source MAC address,
or source and destination MAC addresses.
According to your network requirements, you can carry out load balancing based
on the following information:
● Source MAC addresses of data frames
● Destination MAC address of data frames
● Exclusive-Or result of source and destination MAC addresses of data frames
● Source IP addresses of data frames
● Destination IP addresses of data frames
● Exclusive-Or result of source and destination IP addresses of data frames
● VLAN IDs and source physical interface numbers for Layer 2, IPv4, IPv6, and
MPLS packets in enhanced load balancing mode
For example, DeviceA has two TCP packet flows. For one TCP packet flow, the
source IP address is 192.168.1.1 (MAC address: a-a-a; source port number: 50),
and the destination IP address is 172.16.1.1 (MAC address: b-b-b; destination port
number: 2000). For the other TCP packet flow, the source IP address is 192.168.1.1
(MAC address: a-a-a; source port number: 60), and the destination IP address is
10.1.1.1 (MAC address: c-c-c; destination port number: 2000). If load balancing
based on the source MAC address is configured on DeviceA, only one outbound
interface is available for sending packets out. On the other hand, if load balancing
based on the destination IP address is configured on DeviceA, packets destined for
different destination IP addresses are sent out through different outbound
interfaces.
When configuring a load balancing mode, pay attention to the following points:
● The load balancing mode only takes effect on traffic leaving the outbound
interface. If traffic entering the inbound interface is uneven, change the load
balancing mode of the uplink outbound interface.
● When possible, ensure data flows are load balanced among all active links. If
data flows are transmitted over one link, traffic congestion may occur,
affecting services.
For example, when data frames have only one destination MAC address and
IP address, use load balancing based on the source MAC address and IP
address of data frames. If load balancing based on the destination MAC
address and IP address is used, traffic is transmitted over one link, causing
congestion.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 109


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

3.2.6 Link Aggregation in Stack Scenarios


Inter-chassis Eth-Trunk
In Figure 3-10, DeviceB and DeviceC constitute a stack to form a logical device.
An inter-chassis Eth-Trunk is composed of physical interfaces of devices in a stack.
When there is a failure of the device in the stack or a physical interface of the Eth-
Trunk, traffic can be transmitted between devices through stack cables. The inter-
chassis Eth-Trunk ensures reliable transmission and implements device backup.

Figure 3-10 Inter-chassis Eth-Trunk networking

Preferential Forwarding of Local Traffic by an Inter-Chassis Eth-Trunk


In a stack, reliable transmission can be ensured by configuring an Eth-Trunk as the
outbound interface. Member interfaces of the Eth-Trunk are located on different
devices. When the stack forwards traffic, the Eth-Trunk may select an inter-chassis
member interface based on the hash algorithm. This forwarding mode occupies
bandwidth resources between devices in the stack and reduces traffic forwarding
efficiency due to bandwidth limitations on the bandwidth of cables between
devices. Preferential forwarding of local traffic can be used to address the issue.
In Figure 3-11, DeviceB and DeviceC constitute a stack, which connects to DeviceA
through an Eth-Trunk.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 110


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Figure 3-11 Preferential forwarding of local traffic by an inter-chassis Eth-Trunk

After the Eth-Trunk in the stack is configured to preferentially forward local traffic,
the following functions are implemented:
● Local device forwards traffic it receives
When there are outbound interfaces of the Eth-Trunk on DeviceB and these
interfaces are functioning properly, the Eth-Trunk forwarding table of DeviceB
contains only local member interfaces as outbound interfaces. The hash
algorithm is used to select one of these local member interfaces, and traffic is
only forwarded through DeviceB.
● Another device forwards traffic received by local device
When there are no outbound interfaces of the Eth-Trunk on DeviceB or these
interfaces are faulty, the Eth-Trunk forwarding table of DeviceB contains all
available member interfaces (including those on other devices). The hash
algorithm is used to select a member interface on DeviceC as the outbound
interface, and traffic is forwarded through DeviceC.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 111


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

NOTE

● This function is only valid for known unicast packets, and is invalid for unknown unicast
packets, broadcast packets, and multicast packets.
● Before configuring an Eth-Trunk to preferentially forward local traffic, ensure that
member interfaces of the local Eth-Trunk have sufficient bandwidth to forward local
traffic; otherwise, traffic may be discarded.

3.2.7 E-Trunk
Enhanced Trunk (E-Trunk) is an extension of the Link Aggregation Control Protocol
(LACP). E-Trunk controls and implements link aggregation among multiple
devices, whereas LACP does so for just one device. While LACP can guarantee
reliability when a card fails, E-Trunk does so even when a device fails.
E-Trunk is suitable to scenarios where a CE is dual-homed to a network. In this
scenario, E-Trunk can be used to protect PEs and links between the CE and PEs. In
Figure 3-12, without E-Trunk, a CE can be connected through an Eth-Trunk link to
only one PE. If the Eth-Trunk or PE fails, the CE cannot communicate with the PE.
By using E-Trunk, the CE can be dual-homed to PEs, providing device-level
protection.

Figure 3-12 Comparison between Eth-Trunk and E-Trunk

NOTE

E-Trunk is supported by only the following models: S5720I-SI, S5735-S, S5735S-S, S5735-S-I,
S5735S-H, S5736-S, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S.

Basic Concepts
Table 3-2 describes the basic concepts of E-Trunk.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 112


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Table 3-2 Basic concepts of E-Trunk


Concept Description

LACP system priority The LACP system priority is used to


differentiate priorities of devices at
both ends of an Eth-Trunk link. A
smaller value indicates a higher LACP
system priority.

System ID The system ID is used to determine


priorities of the two devices at both
ends of an Eth-Trunk link if their LACP
priorities are the same. The smaller
the system ID, the higher the priority.
By default, the system ID is the MAC
address of an Eth-Trunk.

E-Trunk priority The E-Trunk priorities determine the


master/backup status of two devices in
a LAG. A smaller E-Trunk priority value
indicates a higher E-Trunk priority.

E-Trunk ID An E-Trunk ID is an integer that


uniquely identifies an E-Trunk.

Eth-Trunk working mode The Eth-Trunk can work in one of the


following modes:
● Automatic
● Forcible master
● Forcible backup

Timeout interval When working normally, the master


and backup devices in an E-Trunk
periodically send hello packets to each
other. If the backup device does not
receive any hello packets within the
timeout interval, it becomes the
master device.

E-Trunk Working Mechanism


In Figure 3-13, the CE is directly connected to PE1 and PE2, and the E-Trunk runs
between PE1 and PE2.
The same Eth-Trunk and E-Trunk are created on PE1 and PE2, and the Eth-Trunks
are added to the E-Trunk.
An Eth-Trunk in LACP mode is configured on the CE, and the CE is connected to
PE1 and PE2 through the Eth-Trunk. The E-Trunk is invisible to the CE.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 113


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Figure 3-13 E-Trunk networking

Figure 3-13 is used as an example to describe how E-Trunk is implemented.

1. Master/Backup status negotiation


a. Determine the E-Trunk master/backup status.
PE1 and PE2 negotiate the E-Trunk master/backup status by exchanging
E-Trunk packets. After the negotiation, one PE functions as the master
and the other as the backup.
The master/backup status of a PE depends on the E-Trunk priority and E-
Trunk ID carried in E-Trunk packets. The PE with a higher E-Trunk priority
functions as the master device. If PEs have the same E-Trunk priority, the
PE with a smaller E-Trunk system ID functions as the master device.
b. Determine the master/backup status of a member Eth-Trunk in the E-
Trunk.
The master/backup status of a member Eth-Trunk in the E-Trunk depends
on its E-Trunk status and the remote Eth-Trunk status.
In Figure 3-13, PE1 and PE2 are at opposite ends of the E-Trunk link. In
this example, PE1 is considered the local device and PE2 is the remote
device.
Table 3-3 describes the status of each member Eth-Trunk in the E-Trunk.

Table 3-3 Master/Backup status of an E-Trunk and its member Eth-Trunks

Local E-Trunk Working Mode Remote Eth- Local Eth-


Status of the Local Trunk Status Trunk Status
Eth-Trunk

- Forcible master - Master

- Forcible backup - Backup

Master Automatic Down Master

Backup Automatic Down Master

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 114


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Local E-Trunk Working Mode Remote Eth- Local Eth-


Status of the Local Trunk Status Trunk Status
Eth-Trunk

Backup Automatic Up Backup

In normal situations, when PE1 functions as the master device, Eth-Trunk


10 of PE1 enters the master state and its link status is Up. When PE2
functions as the backup device, Eth-Trunk 10 of PE2 enters the backup
state and its link status is Down.
If the link between the CE and PE1 fails, PE1 sends an E-Trunk packet
containing information about faulty Eth-Trunk 10 of PE1 to PE2. After
receiving the E-Trunk packet, PE2 learns that Eth-Trunk 10 on PE1 is
faulty. Eth-Trunk 10 on PE2 becomes the master. Through LACP
negotiation, Eth-Trunk 10 on PE2 becomes Up. The Eth-Trunk status on
PE2 becomes Up, and traffic from the CE is forwarded through PE2,
preventing traffic interruption.
2. Sending and receiving of E-Trunk packets
E-Trunk packets carrying the source IP address and port number configured
on the local device are carried over UDP. E-Trunk packets are sent in the
following situations:
– The packet sending timer expires.
– The configurations change. For example, the E-Trunk priority, packet
sending interval, timeout interval multiplier, or the source/destination IP
address of the E-Trunk changes, or member Eth-Trunks are added or
deleted.
– A member Eth-Trunk fails or recovers.
The timeout interval needs to be carried in E-Trunk packets sent from the
local end so that the remote device can use the same timeout interval.
3. Switchback mechanism
If the Eth-Trunk on the local device in master state goes Down or the local
device fails, the remote device becomes the master device and the member
Eth-Trunk becomes Up.
When the local device recovers, the local Eth-Trunk enters the LACP
negotiation state. After LACP informs the local E-Trunk module of the
negotiation capability Up event, the local device starts the switchback delay
timer. When the switchback delay timer expires, the local Eth-Trunk enters the
master state and goes Up after LACP negotiation.

E-Trunk Constraints
Using Figure 3-13 as an example, to improve reliability of links between the CE
and PEs and guarantee that traffic is properly switched between these links, pay
attention to the following points:
● The configurations at both ends of the E-Trunk link must be consistent. The
Eth-Trunks linked directly to the PEs and the CE must be configured with the
same working rate and duplex mode so that both Eth-Trunks have the same

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 115


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

hash key and join the same E-Trunk. After the Eth-Trunks are added to the E-
Trunk, both PEs must contain the same LACP system priorities and IDs. The
interfaces connecting the CE to PE1 and PE2 must be added to the same Eth-
Trunk. The Eth-Trunk on the CE can have a different ID from that of the PEs.
For example, the CE is configured with Eth-Trunk 1, and both PEs are
configured with Eth-Trunk 10.
● To ensure Layer 3 connectivity, the IP address of the local PE must be the
same as the local address of the remote PE and vice versa. Therefore, it is
recommended that the addresses of the PEs are configured as loopback
interface addresses.
● The two PEs must be configured with the same security key, if necessary.

3.3 Application Scenarios for Link Aggregation

3.3.1 Switches Are Directly Connected


As shown in Figure 3-14, traffic of services with different priorities is sent to the
core network through the UPE and PE-AGG. To ensure the bandwidth and
reliability of the link between the UPE and PE-AGG, a LAG, Eth-Trunk 1, is
established.

Figure 3-14 Link aggregation networking

You can determine the working mode for the Eth-Trunk according to the following
situations:
● If devices at both ends of the Eth-Trunk support LACP, the LACP mode is
recommended.
● If the device at either end of the Eth-Trunk does not support LACP, you must
use the manual mode.
QoS can be implemented on an Eth-Trunk as a common interface. At both ends
(UPE and PE-AGG) of Eth-Trunk 1, traffic shaping, congestion management, and

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 116


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

congestion avoidance can be performed for outgoing traffic, ensuring that packets
of high priorities are sent in a timely manner.

3.3.2 Switches Are Connected Across a Transmission Device


As shown in Figure 3-15, two switches are positioned far away from each other. In
order for the switches to communicate, a transmission device needs to be
deployed between them. In addition, to enhance link bandwidth and reliability,
link aggregation is configured between the two switches. To achieve this, the
following conditions must be met:
● The switches at both ends must use link aggregation in LACP mode.
● The transmission device between the switches must be configured to
transparently transmit LACPDUs.

Figure 3-15 Switches are connected across a transmission device using link
aggregation

3.3.3 Switches Connect to Transmission Devices


As shown in Figure 3-16, one core site and multiple access sites are deployed. The
sites are far away from each other, so transmission devices need to be deployed
between devices to ensure communication. At each site, link aggregation is
deployed between the switch and the transmission device to improve the link
reliability.
● The link aggregation mode on the transmission device must be the same as
that of the switch. Configure the transmission device according to its
operation guide.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 117


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Figure 3-16 Switches are connected to transmission devices using link aggregation

3.3.4 A Switch Connects to a Server


As shown in Figure 3-17, to improve the server bandwidth and reliability, two or
more network adapters of the server are aggregated to form a network adapter
group to implement load balancing or redundancy.

In addition to the configuration notes in 3.5 Licensing Requirements and


Limitations for Link Aggregation, be aware of the following points:

● Network adapters of the server must be of the same type.


● The link aggregation modes on the server and access device must be
consistent.
For example, if an Intel network adapter is used, a server often uses static or
IEEE 802.3ad dynamic link aggregation. When the server uses static link
aggregation, the access device must use the manual mode. When the server
uses IEEE 802.3ad dynamic link aggregation, the access device must use the
LACP mode.
● When a server needs to obtain the configuration file from the remote file
server through a switch and link aggregation needs to be used, run the lacp
force-forward command on the Eth—Trunk of the switch.
NOTE

Different types of network adapters use different link aggregation configurations. For details,
refer to the network adapter operation guide.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 118


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Figure 3-17 Switch connects to a server

3.3.5 A Switch Connects to a Stack


As shown in Figure 3-18, the switch connects to a stack using link aggregation,
and the Eth-Trunk is enabled to preferentially forward local traffic. Preferentially
forwarding local traffic ensures reliable transmission, reduces the bandwidth
burden between stack devices, and improves the forwarding efficiency.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 119


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Figure 3-18 Preferentially forwarding local traffic

3.3.6 Using E-Trunk Between Multiple PEs Connected to a CE


NOTE

E-Trunk is supported by only the following models: S5720I-SI, S5735-S, S5735S-S, S5735-S-I,
S5735S-H, S5736-S, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S.

As shown in Figure 3-19, the Enhanced Trunk (E-Trunk) protects the links between
CE1 and two PEs (PE1 and PE2) on the network. CE1 is connected to PE1 and PE2
using two Eth-Trunks in LACP mode. The two Eth-Trunks form an E-Trunk to
implement backup and enhance the network reliability.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 120


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Figure 3-19 E-Trunk networking

3.4 Summary of Link Aggregation Configuration Tasks


Table 3-4 describes the link aggregation configuration tasks.

Table 3-4 Link aggregation configuration tasks


Scenario Task

Switches Are Directly Connected Perform either of the two operations:


● 3.7 Configuring Link Aggregation
in Manual Mode
● 3.8 Configuring Link Aggregation
in LACP Mode

Switches Are Connected Across a 3.8 Configuring Link Aggregation in


Transmission Device LACP Mode

A Switch Connects to a Server Perform either of the two operations:


● 3.7 Configuring Link Aggregation
in Manual Mode
● 3.8 Configuring Link Aggregation
in LACP Mode

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 121


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Scenario Task

Using E-Trunk Between Multiple PEs 1. 3.8 Configuring Link Aggregation


Connected to a CE in LACP Mode
NOTE 2. 3.12 Configuring an E-Trunk
E-Trunk is supported by only the following
models: S5720I-SI, S5735-S, S5735S-S,
S5735-S-I, S5735S-H, S5736-S, S5731-H,
S5731-S, S5731S-H, S5731S-S, S5732-H,
S6735-S, S6720-EI, S6720S-EI, S6730-H,
S6730S-H, S6730-S, and S6730S-S.

3.5 Licensing Requirements and Limitations for Link


Aggregation

Involved Network Elements


Other network elements are not required.

Licensing Requirements
Ethernet link aggregation is a basic feature of a switch and is not under license
control.

Feature Support in V200R021C10


All models of S300, S500, S2700, S5700, and S6700 series switches support link
aggregation.

NOTE

To view detailed information about software mappings, visit Info-Finder, select a product
series or product model, and click Hardware Center.
The S5731-L and S5731S-L are remote units and do not support web-based management,
YANG, or commands. They can be configured only through configuration delivery by the
central device. For details, see "Simplified Architecture Configuration (the Solar System
Solution)" in the S300, S500, S2700, S5700, and S6700 V200R021C10 Configuration Guide -
Device Management.

Feature Dependencies and Limitations


Precautions for configuring an Eth-Trunk
● Precautions for adding interfaces to an Eth-Trunk
– An Eth-Trunk contains a maximum of 32 member interfaces on the
S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H,
S6720-HI, S6730-H, S6730S-H, S6730-S, and S6730S-S, 16 member
interfaces on the S5730-SI, S5735S-H, S5736-S, S5730S-EI, S6720-LI,
S6720S-LI, S6720-SI, and S6720S-SI, and 8 member interfaces on all other
models. On the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 122


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

H, S6730S-H, S6730-S, S6730S-S, S6735-S, S6720-EI, and S6720S-EI, the


number of member interfaces in an Eth-Trunk can be flexibly configured.
For details about the precautions, see Precautions for extending Eth-
Trunk specifications.
– If an interface of the local device is added to an Eth-Trunk, an interface of
the remote device directly connected to the interface of the local device
must also be added to the Eth-Trunk. Otherwise, communication between
the two devices will fail.
– Member interfaces of an Eth-Trunk cannot be an Eth-Trunk.
– In versions earlier than V200R011C10, only interfaces with the same rate
can join an Eth-Trunk. For example, GE electrical interfaces and GE optical
interfaces can be added to the same Eth-Trunk interface. In V200R011C10
and later versions, after the mixed-rate link enable command is run,
interfaces with different rates can be added to the same Eth-Trunk
interface.
When an Eth-Trunk performs load balancing calculation, the interface
rate cannot be used as the calculation weight. When interfaces with
different rates are added to the same Eth-Trunk, traffic is evenly load
balanced among all the links. Therefore, the bandwidth of member
interfaces is calculated by the minimum rate of the member interfaces in
the Eth-Trunk. For example, when a GE interface and a 10GE interface are
added to the same Eth-Trunk, the rate of the GE interface is used in
calculation and the bandwidth of the Eth-Trunk is 2G.
– Do not configure any member port of an Eth-Trunk as an observing port.
If you must do so, ensure that the bandwidth of service traffic on this
port and the bandwidth occupied by the mirrored traffic do not exceed
the bandwidth limit of the port.
– An Ethernet interface can be added to only one Eth-Trunk. To add an
Ethernet interface to another Eth-Trunk, delete it from the original one
first.
– After an interface is added to an Eth-Trunk, the Eth-Trunk learns MAC
address entries or ARP entries, but the member interface does not.
● Precautions for the networking on which an Eth-Trunk is configured
– Both devices of the Eth-Trunk must use the same number of physical
interfaces, duplex mode, and flow control mode.
– Both devices of an Eth-Trunk must use the same link aggregation mode.
– Before deleting an Eth-Trunk, delete member interfaces from the Eth-
Trunk.
– On member interfaces, some commands (for example, port link-type
access) and static MAC addresses cannot be configured. Otherwise, errors
will be reported.
– In fiber to the x (FTTx) scenarios of MANs, PPPoE is often used for
Internet access. If switches use link aggregation, when traffic is
aggregated, ensure that PPPoE packets are load balanced. In such
scenarios, the following models are recommended: S5700-EI, S5700-HI,
S5710-EI, S5710-HI, S5720-EI, S5720-HI, S5730-HI, S5730S-EI, S5730-SI,
S5735S-H, S5736-S, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H,
S6700-EI, S6735-S, S6720-EI, S6720-HI, S6720-LI, S6720S-EI, S6720S-LI,
S6720S-SI, S6720-SI, S6730-H, S6730S-H, S6730-S, and S6730S-S.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 123


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

– In a stack scenario where a member device is faulty, the traffic switchover


and switchback performance of an Eth-Trunk member interface depends
on the difference between the time when interfaces of the upstream and
downstream devices go Up and the time when the interface of the faulty
device goes Up. To ensure high switchover and switchback performance,
run the carrier { up-hold-time | down-hold-time } interval command
on the interconnection interfaces on the stack device, upstream device,
and downstream device to configure the same delay in reporting
interface Up events.

Configuration precautions in different scenarios

Scenario Precautions

Switches are connected ● The switches at both ends must use link
across a transmission aggregation in LACP mode.
device ● The transmission device between the switches
must be configured to transparently transmit
LACPDUs.

Switches connect to The link aggregation mode on the transmission


transmission devices device must be the same as that of the switch.
Configure the transmission device according to its
operation guide.

A switch connects to a ● Network adapters of the server must be of the


server same type.
● The link aggregation modes on the server and
access device must be consistent.
For example, if an Intel network adapter is used,
a server often uses static or IEEE 802.3ad
dynamic link aggregation. When the server uses
static link aggregation, the access device must
use the manual mode. When the server uses
IEEE 802.3ad dynamic link aggregation, the
access device must use the LACP mode.
● When a server needs to obtain the configuration
file from the remote file server through a switch
and link aggregation needs to be used, run the
lacp force-forward command on the Eth-Trunk
of the switch.

Eth-Trunk specifications For details about the precautions, see Precautions


are extended for extending Eth-Trunk specifications.

Precautions for extending Eth-Trunk specifications

● For the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H,


S6730-S, and S6730S-S along with the S6735-S, S6720-EI and S6720S-EI
running V200R009 and later versions, you can run the assign trunk { trunk-
group group-number | trunk-member member-number }* command to

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 124


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

configure the maximum number of Eth-Trunks and maximum number of


member interfaces in each Eth-Trunk.
● By default, if the value of member-number configured for an Eth-Trunk using
the assign trunk { trunk-group group-number | trunk-member member-
number }* command is larger than 16 on the S6735-S, S6720-EI and S6720S-
EI or larger than 32 on the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H,
S6730-H, S6730S-H, S6730-S, and S6730S-S, known unicast packets are load
balanced using the enhanced mode, and BUM packets are load balanced
based on their source and destination MAC addresses. Known unicast packets
must be load balanced using the enhanced mode (the load balancing mode
can be configured using the load-balance command). Otherwise, packet loss
or uneven load balancing may occur.
● After the Eth-Trunk specifications are modified, save the configuration and
restart the switch to make the modification take effect.
● If you use the assign trunk command to modify Eth-Trunk specifications, the
existing Eth-Trunk configuration will become invalid or be lost. Exercise
caution when you run the assign trunk command. When the configured Eth-
Trunk specifications are reduced and the Eth-Trunks that exceed the
specifications are configured, the configuration of excess Eth-Trunks is invalid.

3.6 Default Settings for Link Aggregation

Table 3-5 Default settings for link aggregation


Parameter Default Value

Link aggregation mode Manual mode

Upper threshold for the number of 32 on the S5731-H, S5731-S, S5731S-


active interfaces H, S5731S-S, S5732-H, S6730-H,
S6730S-H, S6730-S, and S6730S-S, 16
on the S5735S-H, and S5736-S, and 8
on other models.
On the S5731-H, S5731-S, S5731S-H,
S5731S-S, S5732-H, S6730-H, S6730S-
H, S6730-S, S6730S-S, S6735-S, S6720-
EI, and S6720S-EI, you can run the
assign trunk command to set the
value, and run the display trunk
configuration command to check the
configuration.

Lower threshold for the number of 1


active interfaces

LACP system priority 32768

LACP interface priority 32768

LACP preemption Disabled

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 125


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Parameter Default Value

LACP preemption delay 30s

Timeout interval at which LACPDUs 90s


are received

3.7 Configuring Link Aggregation in Manual Mode

3.7.1 (Optional) Extending Eth-Trunk Specifications

Context
Generally, a switch supports a fixed maximum number of LAGs and a fixed
maximum number of member interfaces in each LAG. On the S5731-H, S5731-S,
S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, S6730S-S, S6735-S,
S6720-EI, and S6720S-EI, you can run the assign trunk command to set the
maximum number of LAGs and the maximum number of member interfaces in
each LAG, implementing flexible networking and meeting various service
requirements.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run assign trunk { trunk-group group-number | trunk-member member-
number }*
The maximum number of LAGs and the maximum number of member interfaces
in each LAG are set.
By default, the device supports a maximum of 128 LAGs and 8 member interfaces
in each LAG. member-number can be 8, 16, 32, or 64, and member-number
multiplied by group-number cannot exceed 2048 on the S6735-S, S6720-EI and
S6720S-EI. member-number multiplied by group-number cannot exceed 8192 on
the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-
S, and S6730S-S.

----End

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 126


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Verifying the Configuration


NOTE

● By default, if the value of member-number configured for an Eth-Trunk using the assign
trunk { trunk-group group-number | trunk-member member-number }* command is
larger than 16 on the S6735-S, S6720-EI and S6720S-EI or larger than 32 on the S5731-
H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, and S6730S-S,
known unicast packets are load balanced using the enhanced mode, and broadcast,
unknown-unicast, and multicast (BUM) packets are load balanced based on their source
and destination MAC addresses. Known unicast packets must be load balanced using
the enhanced mode (the load balancing mode can be configured using the load-
balance command). Otherwise, packet loss or uneven load balancing may occur.
● After the Eth-Trunk specifications are modified, save the configuration and restart the
switch to make the modification take effect.
● If you use the assign trunk command to modify Eth-Trunk specifications, the existing
Eth-Trunk configuration will become invalid or be lost. Exercise caution when you run
the assign trunk command. When the configured Eth-Trunk specifications are reduced
and the Eth-Trunks that exceed the specifications are configured, the configuration of
excess Eth-Trunks is invalid.

Run the display trunk configuration command in any view to check the default
specifications of the maximum number of Eth-Trunks that are supported and
maximum number of member interfaces in each Eth-Trunk, current specifications,
and configured specifications.

3.7.2 Creating a LAG

Context
Each LAG has one logical interface, that is, an Eth-Trunk. Before configuring link
aggregation, create an Eth-Trunk.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
An Eth-Trunk is created and the Eth-Trunk interface view is displayed.
If the specified Eth-Trunk already exists, this command directly displays the Eth-
Trunk interface view.
trunk-id defines the Eth-Trunk ID. The following is the value range of trunk-id for
different models:
● S2720-EI, S5720I-SI, S5720-LI, and S5720S-LI: 0-119
● S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S2730S-S, S5735-L-I, S5735-
L1,S300, S5735-L, S5735S-L, S5735S-L1, S5735S-L-M, S5735-S, S500, S5735-S-
I, S5735S-S, S6735-S, S6720-EI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and
S6730S-S: 0-127
● S5735S-H and S5736-S: 0-249
On the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H,
S6730-S, S6730S-S, S6735-S, S6720-EI, and S6720S-EI, you can run the assign

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 127


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

trunk command to set the value, and run the display trunk configuration
command to check the configuration.

----End

3.7.3 Setting the Link Aggregation Mode to Manual


Context
The manual mode is recommended when the link between two directly-connected
devices requires a higher bandwidth and at least one of the devices does not
support LACP. In manual mode, you must manually create an Eth-Trunk and add
member interfaces to the Eth-Trunk. All active links forward data and traffic is
evenly load balanced between them.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Step 3 Run mode manual load-balance
The Eth-Trunk is configured to work in manual mode.
By default, an Eth-Trunk works in manual mode.
Before configuring an Eth-Trunk, ensure that both devices use the same working
mode.

NOTE

If an Eth-Trunk interface has member interfaces, you can switch the Eth-Trunk interface's
working mode between manual mode and LACP mode. However, if the Eth-Trunk interface
is added to an E-Trunk, you cannot change its working mode.

----End

3.7.4 Adding Member Interfaces to an Eth-Trunk


Context
Before adding member interfaces to an Eth-Trunk, see 3.5 Licensing
Requirements and Limitations for Link Aggregation.
You can add member interfaces to an Eth-Trunk in the Eth-Trunk interface view or
member interface view.

Procedure
● Add member interfaces to an Eth-Trunk in the Eth-Trunk interface view.
a. Run system-view

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 128


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

The system view is displayed.


b. Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
c. (Optional) Run mixed-rate link enable
Interfaces with different rates are allowed to join the same Eth-Trunk.
By default, interfaces with different rates are not allowed to join the
same Eth-Trunk.
d. Run trunkport interface-type { interface-number1 [ to interface-
number2 ] } &<1-8> [ mode { active | passive } ]
A member interface is added to the Eth-Trunk.

NOTE

When you add member interfaces to an Eth-Trunk in a batch, if one interface


fails to be added to the Eth-Trunk, subsequent interfaces in the batch cannot be
added to the Eth-Trunk.
● Add member interfaces to an Eth-Trunk in the member interface view.
a. Run system-view
The system view is displayed.
b. (Optional) Add interfaces with different rates to the same Eth-Trunk.
i. Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
ii. Run mixed-rate link enable
Interfaces with different rates are allowed to join the same Eth-
Trunk.
By default, interfaces with different rates are not allowed to join the
same Eth-Trunk.
iii. Run quit
Return to the system view.
c. Run interface interface-type interface-number
The member interface view is displayed.
d. Run eth-trunk trunk-id [ mode { active | passive } ]
The member interface is added to an Eth-Trunk.
When adding an interface to an Eth-Trunk, pay attention to the following
points:
– An Ethernet interface can be added to only one Eth-Trunk. To add an
Ethernet interface to another Eth-Trunk, delete it from the original one
first.
– After interfaces are added to an Eth-Trunk, the Eth-Trunk learns MAC
addresses and ARP entries but member interfaces do not.
– Before deleting an Eth-Trunk, delete member interfaces from the Eth-
Trunk.
----End

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 129


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

3.7.5 (Optional) Setting the Lower Threshold for the Number


of Active Interfaces
Context
To ensure that the Eth-Trunk functions properly and is resistant to member link
status changes, set the lower threshold for the number of active interfaces. When
the number of active interfaces falls below the lower threshold, the Eth-Trunk
goes Down.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Step 3 Run least active-linknumber link-number
The lower threshold for the number of active interfaces is set.
By default, the lower threshold for the number of active interfaces is 1.
The lower threshold for the number of active interfaces on the local switch can be
different from that on the remote switch.

----End

3.7.6 (Optional) Configuring a Load Balancing Mode

Context
An Eth-Trunk uses flow-based load balancing. Flow-based load balancing ensures
that frames of the same data flow are forwarded on the same physical link and
those of different data flows are forwarded on different physical links.
You can configure a common load balancing mode in which IP addresses or MAC
addresses of packets are used to load balance packets; you can also configure an
enhanced load balancing mode for Layer 2, IP, and MPLS packets.
Load balancing is valid only for outgoing traffic; therefore, the load balancing
modes for the interfaces at both ends of a link can be different and do not affect
each other.
If an incorrect load balancing mode is configured, traffic will be unevenly load
balanced among Eth-Trunk member interfaces. The following restrictions apply
when configuring a load balancing mode:
● In practical services, you need to configure a proper load balancing mode
based on traffic characteristics. When a parameter of traffic changes
frequently, you can set the load balancing mode based on this parameter to
ensure that the traffic load is balanced evenly. For example, if IP addresses in
packets change frequently, use the load balancing mode based on dst-ip, src-

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 130


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

ip, or src-dst-ip so that traffic can be properly load balanced among physical
links. If MAC addresses in packets change frequently and IP addresses are
fixed, use the load balancing mode based on dst-mac, src-mac, or src-dst-
mac so that traffic can be properly load balanced among physical links.
● If the majority of service traffic is MPLS packets, you need to set the
enhanced load balancing mode. You can run the mpls field command in the
load balancing profile view to configure the load balancing mode of MPLS
packets.
● On a network where an Eth-Trunk and a stack are configured, if the local-
preference enable command is run to configure an Eth-Trunk interface to
preferentially forward local traffic, traffic arriving at the local device is
preferentially forwarded through Eth-Trunk member interfaces of the local
device. This function is enabled by default. If there is no Eth-Trunk member
interface on the local device, traffic is forwarded through Eth-Trunk member
interfaces on another device. This forwarding mode effectively saves
bandwidth resources of member devices in the stack and improves traffic
forwarding efficiency.

Procedure
● Configure a common load balancing mode.
a. Run system-view

The system view is displayed.


b. Run interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed.


c. Run load-balance { dst-ip | dst-mac | src-ip | src-mac | src-dst-ip | src-
dst-mac }

A load balancing mode is configured for the Eth-Trunk interface.

By default, the switch load balances packets based on src-dst-ip.

NOTE

The S2720-EI, S5720I-SI, S5720-LI, S5720S-LI, S5735S-H, S5736-S use the src-dst-
ip, source TCP or UDP port number, and destination TCP or UDP port number in
the hash algorithm for load balancing regardless of whether you configure this
parameter.
The S2720-EI, S5720I-SI, S5720-LI, S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L,
S5735S-L, S5735S-L1, S5735S-L-M, S5720S-LI, S5735-S, S500, S5735S-S, S5735-S-
I, S5735S-H, S5736-S support only one load balancing mode globally. If the load
balancing mode of an Eth-Trunk is modified, the modification takes effect on all
Eth-Trunks. If an Eth-Trunk is created, the load balancing mode of the Eth-Trunk
is the same as that of the original Eth-Trunks on the switch.
● Configure an enhanced load balancing mode.
a. Run system-view

The system view is displayed.


b. Run load-balance-profile profile-name

A load balancing profile is created and its view is displayed. Only one
load balancing profile can be created.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 131


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

c. Run the following commands as required. You can configure a load


balancing mode for Layer 2 packets, IPv4 packets, IPv6 packets, and
MPLS packets respectively.

▪ Run l2 field [ dmac | l2-protocol | smac | sport | vlan ] *

A load balancing mode is configured for Layer 2 packets.


By default, the switch load balances Layer 2 packets based on the
source MAC address (smac) and destination MAC address (dmac).

▪ Run ipv4 field [ dip | l4-dport | l4-sport | protocol | sip | sport |


vlan ] *
A load balancing mode is configured for IPv4 packets.
By default, the switch load balances IPv4 packets based on the
source IP address (sip) and destination IP address (dip).

▪ Run ipv6 field [ dip | l4-dport | l4-sport | protocol | sip | sport |


vlan ] *
A load balancing mode is configured for IPv6 packets.
By default, the switch load balances IPv6 packets based on the
source IP address (sip) and destination IP address (dip).

▪ Run mpls field [ 2nd-label | 3rd-label | dip | dmac | l4-dport | l4-


sport | protocol | sip | smac | sport | top-label | vlan ] * A load
balancing mode is configured for MPLS packets.
By default, the switch load balances MPLS packets based on the two
outer labels (top-label and 2nd-label).
NOTE

On the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-


H, S6730-S, and S6730S-S, when the enhanced load balancing mode is used
for an Eth-Trunk, configure known unicast packets (such as GRE packets) to
be load balanced based on the inner IP address, outer IP address, or both by
using the unicast load-balance enhanced { inner-ip | outer-ip } *
command.
d. Run quit
Return to the system view.
e. Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
f. Run load-balance enhanced profile profile-name
The load balancing profile is applied.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 132


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

NOTE

● If the value of member-number configured for an Eth-Trunk using the assign trunk
{ trunk-group group-number | trunk-member member-number }* command is
larger than 16 on the S6735-S, S6720-EI and S6720S-EI or larger than 32 on the
S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S,
and S6730S-S, only the enhanced mode can be used for load balancing. If the
enhanced mode is not used, problems such as packet loss and uneven load
balancing may occur.
● Enhanced load balancing is only supported by the following models: S5735S-H,
S5736-S, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S.
● The preceding load balancing modes apply only to known unicast traffic. To
configure a load balancing mode for broadcast, unknown-unicast, and multicast
(BUM) traffic, run the unknown-unicast load-balance { dmac | smac |
smacxordmac | enhanced [ lbid ] } command in the system view. Load balancing
for BUM traffic is only supported by the following models: S5731-H, S5731-S,
S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI, S6720S-EI, S6730-H, S6730S-H,
S6730-S, and S6730S-S. Only the S6735-S, S6720-EI and S6720S-EI support the
lbid parameter.

----End

3.7.7 Verifying the Configuration of Link Aggregation in


Manual Mode

Procedure
● Run the display eth-trunk [ trunk-id [ interface interface-type interface-
number | verbose ] ] command to check the Eth-Trunk configuration.
● Run the display trunkmembership eth-trunk trunk-id command to check
information about Eth-Trunk member interfaces.
● Run the display eth-trunk [ trunk-id ] load-balance command to check the
load balancing mode of the Eth-Trunk.
● Run the display load-balance-profile [ profile-name ] command to check
the load balancing profile of the Eth-Trunk.

----End

3.8 Configuring Link Aggregation in LACP Mode

3.8.1 (Optional) Extending Eth-Trunk Specifications

Context
Generally, a switch supports a fixed maximum number of LAGs and a fixed
maximum number of member interfaces in each LAG. On the S5731-H, S5731-S,
S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, S6730S-S, S6735-S,
S6720-EI, and S6720S-EI, you can run the assign trunk command to set the
maximum number of LAGs and the maximum number of member interfaces in

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 133


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

each LAG, implementing flexible networking and meeting various service


requirements.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run assign trunk { trunk-group group-number | trunk-member member-
number }*
The maximum number of LAGs and the maximum number of member interfaces
in each LAG are set.
By default, the device supports a maximum of 128 LAGs and 8 member interfaces
in each LAG. member-number can be 8, 16, 32, or 64, and member-number
multiplied by group-number cannot exceed 2048 on the S6735-S, S6720-EI and
S6720S-EI. member-number multiplied by group-number cannot exceed 8192 on
the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-
S, and S6730S-S.

----End

Verifying the Configuration


NOTE

● By default, if the value of member-number configured for an Eth-Trunk using the assign
trunk { trunk-group group-number | trunk-member member-number }* command is
larger than 16 on the S6735-S, S6720-EI and S6720S-EI or larger than 32 on the S5731-
H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, and S6730S-S,
known unicast packets are load balanced using the enhanced mode, and broadcast,
unknown-unicast, and multicast (BUM) packets are load balanced based on their source
and destination MAC addresses. Known unicast packets must be load balanced using
the enhanced mode (the load balancing mode can be configured using the load-
balance command). Otherwise, packet loss or uneven load balancing may occur.
● After the Eth-Trunk specifications are modified, save the configuration and restart the
switch to make the modification take effect.
● If you use the assign trunk command to modify Eth-Trunk specifications, the existing
Eth-Trunk configuration will become invalid or be lost. Exercise caution when you run
the assign trunk command. When the configured Eth-Trunk specifications are reduced
and the Eth-Trunks that exceed the specifications are configured, the configuration of
excess Eth-Trunks is invalid.

Run the display trunk configuration command in any view to check the default
specifications of the maximum number of Eth-Trunks that are supported and
maximum number of member interfaces in each Eth-Trunk, current specifications,
and configured specifications.

3.8.2 Creating a LAG

Context
Each LAG has one logical interface, that is, an Eth-Trunk. Before configuring link
aggregation, create an Eth-Trunk.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 134


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface eth-trunk trunk-id

An Eth-Trunk is created and the Eth-Trunk interface view is displayed.

If the specified Eth-Trunk already exists, this command directly displays the Eth-
Trunk interface view.

trunk-id defines the Eth-Trunk ID. The following is the value range of trunk-id for
different models:
● S2720-EI, S5720I-SI, S5720-LI, and S5720S-LI: 0-119
● S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S2730S-S, S5735-L-I, S5735-
L1,S300, S5735-L, S5735S-L, S5735S-L1, S5735S-L-M, S5735-S, S500, S5735-S-
I, S5735S-S, S6735-S, S6720-EI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and
S6730S-S: 0-127
● S5735S-H and S5736-S: 0-249

On the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H,


S6730-S, S6730S-S, S6735-S, S6720-EI, and S6720S-EI, you can run the assign
trunk command to set the value, and run the display trunk configuration
command to check the configuration.

----End

3.8.3 Setting the Link Aggregation Mode to LACP

Context
In LACP mode, you must manually create an Eth-Trunk and add interfaces to the
Eth-Trunk. However, active interfaces are selected through LACP negotiation,
which is flexible.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed.

Step 3 Run mode lacp

The Eth-Trunk is configured to work in LACP mode.

By default, an Eth-Trunk works in manual mode.

Before configuring an Eth-Trunk, ensure that both devices use the same working
mode.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 135


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

If an Eth-Trunk interface has member interfaces, you can switch the Eth-Trunk
interface's working mode between manual mode and LACP mode. However, if the
Eth-Trunk interface is added to an E-Trunk, you cannot change its working mode.

----End

Configuration Tips
To delete existing member interfaces, run the undo eth-trunk command in the
interface view or the undo trunkport interface-type interface-number command
in the Eth-Trunk interface view.

3.8.4 Adding Member Interfaces to an Eth-Trunk


Context
Before adding member interfaces to an Eth-Trunk, see 3.5 Licensing
Requirements and Limitations for Link Aggregation.
You can add member interfaces to an Eth-Trunk in the Eth-Trunk interface view or
member interface view.

Procedure
● Add member interfaces to an Eth-Trunk in the Eth-Trunk interface view.
a. Run system-view
The system view is displayed.
b. Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
c. (Optional) Run mixed-rate link enable
Interfaces with different rates are allowed to join the same Eth-Trunk.
By default, interfaces with different rates are not allowed to join the
same Eth-Trunk.
d. Run trunkport interface-type { interface-number1 [ to interface-
number2 ] } &<1-8> [ mode { active | passive } ]
A member interface is added to the Eth-Trunk.

NOTE

When you add member interfaces to an Eth-Trunk in a batch, if one interface


fails to be added to the Eth-Trunk, subsequent interfaces in the batch cannot be
added to the Eth-Trunk.
● Add member interfaces to an Eth-Trunk in the member interface view.
a. Run system-view
The system view is displayed.
b. (Optional) Add interfaces with different rates to the same Eth-Trunk.
i. Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 136


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

ii. Run mixed-rate link enable


Interfaces with different rates are allowed to join the same Eth-
Trunk.
By default, interfaces with different rates are not allowed to join the
same Eth-Trunk.
iii. Run quit
Return to the system view.
c. Run interface interface-type interface-number
The member interface view is displayed.
d. Run eth-trunk trunk-id [ mode { active | passive } ]
The member interface is added to an Eth-Trunk.
When adding an interface to an Eth-Trunk, pay attention to the following
points:
– An Ethernet interface can be added to only one Eth-Trunk. To add an
Ethernet interface to another Eth-Trunk, delete it from the original one
first.
– After interfaces are added to an Eth-Trunk, the Eth-Trunk learns MAC
addresses and ARP entries but member interfaces do not.
– Before deleting an Eth-Trunk, delete member interfaces from the Eth-
Trunk.
----End

3.8.5 (Optional) Setting the Upper and Lower Thresholds for


the Number of Active Interfaces
Context
The number of Up member links affects the status and bandwidth of an Eth-
Trunk. To ensure that the Eth-Trunk functions properly and is less affected by
member link status changes, set the following thresholds:
● Lower threshold for the number of active interfaces: When the number of
active interfaces falls below this threshold, the Eth-Trunk goes Down. This
guarantees the Eth-Trunk a minimum available bandwidth.
● Upper threshold for the number of active interfaces: When the number of
active interfaces reaches this threshold, you can add new member interfaces
to the Eth-Trunk, but excess member interfaces enter the Down state. This
improves network reliability with assured bandwidth.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 137


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Step 3 Run least active-linknumber link-number


The lower threshold for the number of active interfaces is set.
By default, the lower threshold for the number of active interfaces is 1.
The lower threshold for the number of active interfaces on the local switch can be
different from that on the remote switch. If the two values are different, the larger
one is used.
Step 4 Run max active-linknumber link-number
The upper threshold for the number of active interfaces is set.
By default, the upper threshold for the number of active interfaces in an Eth-Trunk
is 32 on the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-
H, S6730-S, and S6730S-S, 16 on the S5735S-H, S5736-S and 8 on other models.
On the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H,
S6730-S, S6730S-S, S6735-S, S6720-EI, and S6720S-EI, you can run the assign
trunk command to set the value, and run the display trunk configuration
command to check the configuration.
The upper thresholds on both ends must be the same; otherwise, the Eth-Trunk
status flaps if an active interface fails.
The upper threshold for the number of active interfaces must be greater than or
equal to the lower threshold for the number of active interfaces.
Step 5 (Optional) Run load-distribution active-linknumber-change link-number1 to
link-number2
The number of interfaces in an Eth-Trunk where load balancing calculation is
performed is configured.
By default, the number of interfaces in an Eth-Trunk where load balancing
calculation is performed is the number of active interfaces of the device.
If the number of active interfaces is smaller than 8 and traffic on an Eth-Trunk is
unevenly load balanced, you can run this command to increase the number of
interfaces in the Eth-Trunk where load balancing calculation is performed so that
traffic can be better load balanced among active links. Only the S2720-EI, S5720I-
SI, S5720-LI, and S5720S-L support this command.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 138


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

NOTE

● You can also run the load-distribution active-linknumber-change link-number1 to


link-number2 global command in the system view to specify the number of Eth-Trunk
interfaces participating in load balancing calculation. If the number of Eth-Trunk
interfaces participating in load balancing calculation is configured in both the system
view and Eth-Trunk interface view, the configuration in the Eth-Trunk interface view
takes effect.
● The load-distribution active-linknumber-change link-number1 to link-number2 and
load-distribution active-linknumber-change link-number1 to link-number2 global
commands with different values of link-number1 can be configured repeatedly. When
the number of active interfaces is the same as the value of link-number1, the
configuration takes effect. If the commands with the same value of link-number1 is
configured, only the latest configuration takes effect.
● When an inter-device Eth-Trunk is configured in an iStack and the local-preference
enable command is used to configure an Eth-Trunk to preferentially forward local
traffic, the number of interfaces in the Eth-Trunk where load balancing calculation is
performed is the number of active interfaces.

----End

3.8.6 (Optional) Configuring a Load Balancing Mode

Context
An Eth-Trunk uses flow-based load balancing. Flow-based load balancing ensures
that frames of the same data flow are forwarded on the same physical link and
those of different data flows are forwarded on different physical links.
You can configure a common load balancing mode in which IP addresses or MAC
addresses of packets are used to load balance packets; you can also configure an
enhanced load balancing mode for Layer 2, IP, and MPLS packets.
Load balancing is valid only for outgoing traffic; therefore, the load balancing
modes for the interfaces at both ends of a link can be different and do not affect
each other.
If an incorrect load balancing mode is configured, traffic will be unevenly load
balanced among Eth-Trunk member interfaces. The following restrictions apply
when configuring a load balancing mode:
● In practical services, you need to configure a proper load balancing mode
based on traffic characteristics. When a parameter of traffic changes
frequently, you can set the load balancing mode based on this parameter to
ensure that the traffic load is balanced evenly. For example, if IP addresses in
packets change frequently, use the load balancing mode based on dst-ip, src-
ip, or src-dst-ip so that traffic can be properly load balanced among physical
links. If MAC addresses in packets change frequently and IP addresses are
fixed, use the load balancing mode based on dst-mac, src-mac, or src-dst-
mac so that traffic can be properly load balanced among physical links.
● If the majority of service traffic is MPLS packets, you need to set the
enhanced load balancing mode. You can run the mpls field command in the
load balancing profile view to configure the load balancing mode of MPLS
packets.
● On a network where an Eth-Trunk and a stack are configured, if the local-
preference enable command is run to configure an Eth-Trunk interface to

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 139


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

preferentially forward local traffic, traffic arriving at the local device is


preferentially forwarded through Eth-Trunk member interfaces of the local
device. This function is enabled by default. If there is no Eth-Trunk member
interface on the local device, traffic is forwarded through Eth-Trunk member
interfaces on another device. This forwarding mode effectively saves
bandwidth resources of member devices in the stack and improves traffic
forwarding efficiency.

Procedure
● Configure a common load balancing mode.
a. Run system-view
The system view is displayed.
b. Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
c. Run load-balance { dst-ip | dst-mac | src-ip | src-mac | src-dst-ip | src-
dst-mac }
A load balancing mode is configured for the Eth-Trunk interface.
By default, the switch load balances packets based on src-dst-ip.

NOTE

The S2720-EI, S5720I-SI, S5720-LI, S5720S-LI, S5735S-H, S5736-S use the src-dst-
ip, source TCP or UDP port number, and destination TCP or UDP port number in
the hash algorithm for load balancing regardless of whether you configure this
parameter.
The S2720-EI, S5720I-SI, S5720-LI, S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L,
S5735S-L, S5735S-L1, S5735S-L-M, S5720S-LI, S5735-S, S500, S5735S-S, S5735-S-
I, S5735S-H, S5736-S support only one load balancing mode globally. If the load
balancing mode of an Eth-Trunk is modified, the modification takes effect on all
Eth-Trunks. If an Eth-Trunk is created, the load balancing mode of the Eth-Trunk
is the same as that of the original Eth-Trunks on the switch.
● Configure an enhanced load balancing mode.
a. Run system-view
The system view is displayed.
b. Run load-balance-profile profile-name
A load balancing profile is created and its view is displayed. Only one
load balancing profile can be created.
c. Run the following commands as required. You can configure a load
balancing mode for Layer 2 packets, IPv4 packets, IPv6 packets, and
MPLS packets respectively.

▪ Run l2 field [ dmac | l2-protocol | smac | sport | vlan ] *

A load balancing mode is configured for Layer 2 packets.


By default, the switch load balances Layer 2 packets based on the
source MAC address (smac) and destination MAC address (dmac).

▪ Run ipv4 field [ dip | l4-dport | l4-sport | protocol | sip | sport |


vlan ] *

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 140


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

A load balancing mode is configured for IPv4 packets.


By default, the switch load balances IPv4 packets based on the
source IP address (sip) and destination IP address (dip).

▪ Run ipv6 field [ dip | l4-dport | l4-sport | protocol | sip | sport |


vlan ] *
A load balancing mode is configured for IPv6 packets.
By default, the switch load balances IPv6 packets based on the
source IP address (sip) and destination IP address (dip).

▪ Run mpls field [ 2nd-label | 3rd-label | dip | dmac | l4-dport | l4-


sport | protocol | sip | smac | sport | top-label | vlan ] * A load
balancing mode is configured for MPLS packets.
By default, the switch load balances MPLS packets based on the two
outer labels (top-label and 2nd-label).
NOTE

On the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-


H, S6730-S, and S6730S-S, when the enhanced load balancing mode is used
for an Eth-Trunk, configure known unicast packets (such as GRE packets) to
be load balanced based on the inner IP address, outer IP address, or both by
using the unicast load-balance enhanced { inner-ip | outer-ip } *
command.
d. Run quit

Return to the system view.


e. Run interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed.


f. Run load-balance enhanced profile profile-name

The load balancing profile is applied.


NOTE

● If the value of member-number configured for an Eth-Trunk using the assign trunk
{ trunk-group group-number | trunk-member member-number }* command is
larger than 16 on the S6735-S, S6720-EI and S6720S-EI or larger than 32 on the
S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S,
and S6730S-S, only the enhanced mode can be used for load balancing. If the
enhanced mode is not used, problems such as packet loss and uneven load
balancing may occur.
● Enhanced load balancing is only supported by the following models: S5735S-H,
S5736-S, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S.
● The preceding load balancing modes apply only to known unicast traffic. To
configure a load balancing mode for broadcast, unknown-unicast, and multicast
(BUM) traffic, run the unknown-unicast load-balance { dmac | smac |
smacxordmac | enhanced [ lbid ] } command in the system view. Load balancing
for BUM traffic is only supported by the following models: S5731-H, S5731-S,
S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI, S6720S-EI, S6730-H, S6730S-H,
S6730-S, and S6730S-S. Only the S6735-S, S6720-EI and S6720S-EI support the
lbid parameter.

----End

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 141


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

3.8.7 (Optional) Setting the LACP System Priority

Context
LACP system priorities determine the sequence in which devices at two ends of an
Eth-Trunk select active interfaces to join a LAG.
In order for a LAG to be established, both devices must select the same interfaces
as active interfaces. To achieve this, one device (with a higher priority) is
responsible for selecting the active interfaces. The other device (with a lower
priority) then selects the same interfaces as active interfaces.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run lacp priority priority
The LACP system priority is set.
In priority comparisons, numerically lower values have higher priority. By default,
the LACP system priority is 32768.
The end with a smaller priority value functions as the Actor. If the two ends have
the same LACP system priority, the end with a smaller MAC address functions as
the Actor.

----End

3.8.8 (Optional) Setting the LACP Interface Priority

Context
In LACP mode, LACP interface priorities are set to prioritize interfaces of the same
device. Interfaces with higher priorities are selected as active interfaces.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The member interface view is displayed.
Step 3 Run lacp priority priority
The LACP priority of the member interface is configured.
By default, the LACP interface priority is 32768. In priority comparisons,
numerically lower values have higher priority.
By default, the system selects active interfaces based on interface priorities. This
may lead to low-speed member interfaces with high priorities being selected as

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 142


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

active interfaces, providing less bandwidth for services. To select high-speed


member interfaces as active interfaces, run the lacp selected { priority | speed }
command to configure the system to select active interfaces based on the
interface rate.

NOTE
If the max active-linknumber link-number command is run in the Eth-Trunk interface view,
you need to run the lacp preempt enable command to enable LACP preemption on the
current Eth-Trunk interface. Otherwise, interfaces with high LACP interface priorities may
fail to be selected as active interfaces.

----End

3.8.9 (Optional) Configuring LACP Preemption

Context
The LACP preemption function ensures that the interface with the highest LACP
priority will return to functioning as an active interface after recovering from a
fault. If LACP preemption is disabled, the interface cannot become active interface
after it recovers.

The LACP preemption delay is the period that an inactive interface waits before
changing to the active interface. The LACP preemption delay reduces the chances
of instable data transmission on an Eth-Trunk due to frequent status changes of
some links.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed.

Step 3 Run lacp preempt enable

LACP preemption is enabled.

By default, LACP preemption is disabled. To ensure normal running of an Eth-


Trunk, enable or disable LACP preemption at both ends of the Eth-Trunk.

Step 4 Run lacp preempt delay delay-time

The LACP preemption delay is set.

By default, the LACP preemption delay is 30 seconds. If both devices of an Eth-


Trunk use different preemption delays, the longer preemption delay becomes
effective.

----End

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 143


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

3.8.10 (Optional) Setting the Timeout Interval for Receiving


LACPDUs
Context
If the Eth-Trunk on the local device cannot detect a self-loop or fault that occurred
on a member interface in the LAG on the remote device, data on the local device
is still load balanced among original active interfaces. As a result, data traffic on
the faulty link is discarded. To prevent this situation, set the timeout interval for
sending LACPDUs. If a local member interface does not receive any LACPDU
within the configured timeout interval, it considers that the remote end is
reachable. Then the local member interface becomes Down immediately and no
longer forwards data.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Step 3 Run lacp timeout { fast [ user-defined user-defined ] | slow }
The timeout interval at which LACPDUs are received is set.
By default, the timeout interval at which an Eth-Trunk receives LACPDUs is 90
seconds.
● After you run the lacp timeout command, the local end notifies the remote
end of the timeout interval by sending LACPDUs. When fast is specified, the
interval for sending LACPDUs is 1 second. When slow is specified, the interval
for sending LACPDUs is 30 seconds.
● The timeout interval for receiving LACPDUs is three times the interval for
sending LACPDUs. When fast is specified, the timeout interval for receiving
LACPDUs is 3 seconds. When slow is specified, the timeout interval for
receiving LACPDUs is 90 seconds.
● You can use different modes of the timeout interval at the two ends.
However, to facilitate maintenance, you are advised to use the same mode at
both ends.
● Each member interface in an Eth-Trunk processes a maximum of 20 LACPDUs
every second; a switch processes a maximum of 100 LACPDUs every second.
Extra LACPDUs are dropped.

----End

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 144


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

3.8.11 (Optional) Configuring an Eth-Trunk Member Interface


on a Switch Directly Connected to a Server to Forward
Packets

Context
A switch uses an Eth-Trunk in LACP mode to directly connect to a server. Before
the server obtains a configuration file, negotiation fails at the two ends because
the directly connected interface in LACP. To address this issue, configure an Eth-
Trunk member interface in Up state to forward data packets if the remote
interface does not join the Eth-Trunk.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed.

Step 3 Run lacp force-forward

The Eth-Trunk member interface in Up state is configured to forward data packets


if the remote interface does not join the Eth-Trunk.

By default, an Eth-Trunk member interface in Up state does not forward data


packets if the remote interface does not join the Eth-Trunk.

NOTE

● With this command configured, an Eth-Trunk interface does not support Layer 3 forwarding
and cannot be used to forward packets sent to the CPU. Only member interfaces in the
ForceFwd state can forward Layer 2 traffic through hardware forwarding. The ForceFwd state
is automatically set when LACP negotiation fails, and cannot be changed manually. You can
use the display eth-trunk command to check the value of the Status field.
● This command applies to only the scenario where an Eth-Trunk joins a VLAN as an access,
hybrid, trunk, and dot1q-tunnel interfaces.
● When a spanning tree protocol (for example, STP, RSTP, or MSTP) is used, the member
interface in ForceFwd state cannot be blocked. That is, the member interface in ForceFwd
state can continue to forward data packets. When other loop prevention protocols such as
ERPS and RRPP are used, the member interface in ForceFwd state can be blocked. The
blocked member interface in ForceFwd state cannot forward data packets.
● This command cannot be used with E-Trunk. That is, this command cannot be used on the
Eth-Trunk that joins an E-Trunk.
● This command cannot be used with max active-linknumber or least active-linknumber.

----End

3.8.12 Verifying the Configuration of Link Aggregation in


LACP Mode

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 145


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Procedure
● Run the display eth-trunk [ trunk-id [ interface interface-type interface-
number | verbose ] ] command to check the Eth-Trunk configuration.
● Run the display trunkmembership eth-trunk trunk-id command to check
information about Eth-Trunk member interfaces.
● Run the display eth-trunk [ trunk-id ] load-balance command to check the
load balancing mode of the Eth-Trunk.
● Run the display load-balance-profile [ profile-name ] command to check
the load balancing profile of the Eth-Trunk.

----End

3.9 Associating the Backup Member Interface of an


Eth-Trunk in LACP Mode with Its Primary Member
Interface
Context
In a port connectivity check (port CC) scenario (no service is bound), an Eth-Trunk
in LACP mode is configured on two devices. To ensure that services are not
interrupted, associate the backup member interface of the Eth-Trunk in LACP
mode with its primary member interface. If the primary link has poor quality,
traffic is promptly switched to the standby link.

NOTE

Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S,
and S6730S-S support this configuration.

Prerequisites
● Link aggregation in LACP mode has been configured, the maximum number
of active links at both ends is 1, and two member interfaces have been added
to the Eth-Trunk at both ends. For details, see 3.8 Configuring Link
Aggregation in LACP Mode.
● Basic Y.1731 configurations have been completed, including the Maintenance
Association (MA), Maintenance Domain (MD), Maintenance Association End
Point (MEP), and test instance. For details, see Y.1731 Configuration in S300,
S500, S2700, S5700, and S6700 V200R021C10 Configuration Guide -
Reliability. In this scenario, note the following points:
– The map vlan vlan-id command cannot be used to bind an MA to a
VLAN.
– Only the outward-facing MEP can be created.

Procedure
Step 1 Run system-view

The system view is displayed.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 146


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Step 2 Run interface interface-type interface-number

The primary member interface view of an Eth-Trunk's Actor is displayed.

Step 3 Run one of following commands to configure the interface according to your
network requirements:
1. Run delay-measure two-way { delay-threshold | variation-threshold } test-
id test-id trigger if-down

The interface is triggered to go ETHOAM down when the delay or delay


variation based on a test instance ID exceeds a specified threshold.
2. Run loss-measure single-ended-synthetic { local-ratio-threshold | remote-
ratio-threshold } test-id test-id trigger if-down

The interface is triggered to go ETHOAM down when the near- or far-end


frame loss ratio based on a test instance ID exceeds a specified threshold.

Step 4 Run quit

Return to the system view.

Step 5 Run interface interface-type interface-number

The backup member interface view of an Eth-Trunk's Actor is displayed.

Step 6 Run lacp track interface interface-type interface-number priority-reduced value

The backup member interface is associated with the primary member interface,
and the priority of the backup member interface is dynamically changed.

When the primary link's quality recovers, run the lacp force-switch command in
the Eth-Trunk interface view to enable forcible switching if no preemption is
configured or preemption is enabled but the delay is not reached.

----End

3.10 Configuring an Eth-Trunk to Preferentially


Forward Local Traffic in a Stack
Context
On a network where a stack and an Eth-Trunk are used, configuring an Eth-Trunk
to preferentially forward local traffic increases bandwidth use efficiency between
devices in the stack and improves traffic forwarding efficiency.

NOTE

The S5735-S-I, S5720I-10X-PWH-SI-AC, and S5720I-6X-PWH-SI-AC do not support this


configuration.

Pre-configuration Tasks
Before configuring an Eth-Trunk to preferentially forward local traffic, complete
the following tasks:

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 147


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

● Establish a stack.
● Ensure that member interfaces of the local Eth-Trunk have sufficient
bandwidth to forward local traffic.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface eth-trunk trunk-id

The view of the Eth-Trunk that needs to be configured to preferentially forward


local traffic is displayed.

NOTE

This operation is not required on the S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L, S5735S-
L, S5735S-L1, S5735S-L-M, S5735-S, S500, and S5735S-S.

Step 3 Run local-preference enable

The Eth-Trunk is configured to preferentially forward local traffic.

By default, an Eth-Trunk forwards traffic preferentially through local member


interfaces.

NOTE

This function is only valid for known unicast packets, and is invalid for unknown unicast,
broadcast, and multicast packets.

----End

3.11 Creating an Eth-Trunk Sub-interface


Context
If Layer 2 switching devices belong to different VLANs, and hosts in the VLANs
need to communicate with each other, you need to create sub-interfaces on the
Eth-Trunk connecting a Layer 3 device to a Layer 2 switching device, bind a VLAN
to each sub-interface, and configure an IP address for each sub-interface.

After the configuration is complete, hosts in the VLANs can use these sub-
interfaces to communicate with each other. Eth-Trunk sub-interfaces can be
configured to terminate Dot1q and QinQ VLAN tags.

After Layer 2 Eth-Trunk sub-interfaces are configured, the Eth-Trunk provides Layer
2 functions and the sub-interfaces provide Layer 3 functions.

NOTE

Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI, S6720S-EI,
S6730-H, S6730S-H, S6730-S, and S6730S-S support Eth-Trunk sub-interfaces.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 148


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Figure 3-20 Typical application scenario of Layer 2 Eth-Trunk sub-interfaces

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
An Eth-Trunk is created and the Eth-Trunk interface view is displayed.
Step 3 Run quit
The system view is displayed.
Step 4 Run interface eth-trunk trunk-id.subnumber
An Eth-Trunk sub-interface is created.
subnumber specifies the number of a sub-interface. The value is in the range 1 to
4096.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 149


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

NOTE

● Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI, S6720S-
EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support Ethernet sub-interfaces.
● Only hybrid and trunk interfaces on the preceding switches support Layer 2 Ethernet
sub-interface configuration.
● After you run the undo portswitch command to switch Layer 2 interfaces on the
preceding series of switches into Layer 3 interfaces, you can configure Layer 3 Ethernet
sub-interfaces on the interfaces.
● After an interface is added to an Eth-Trunk, sub-interfaces cannot be configured on the
interface.
● VLAN termination sub-interfaces cannot be created on a VCMP client.

Step 5 Run ip address ip-address { mask | mask-length } [ sub ]


An IP address is configured for the sub-interface.
When configuring multiple IP addresses for an Eth-Trunk sub-interface, specify the
sub keyword to indicate the IP addresses other than the first IP address.

----End

3.12 Configuring an E-Trunk


As an extension to the Link Aggregation Protocol (LACP), which implements link
aggregation on a single device, the Enhanced Trunk (E-Trunk) protocol
implements link aggregation between devices to improve link reliability.

NOTE

E-Trunk is supported by only the following models: S5720I-SI, S5735-S, S5735S-S, S5735-S-I,
S5735S-H, S5736-S, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S.

3.12.1 Setting the LACP System ID and LACP Priority of an E-


Trunk
Context
In an E-Trunk, the two PEs must be configured with the same LACP system ID and
priority so that the CE considers the two PEs as one device.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run lacp e-trunk system-id mac-address
The LACP system ID is set for the E-Trunk.
By default, the MAC address of an Ethernet interface is used as the LACP system
ID.
The master and backup devices in an E-Trunk must use the same LACP system ID.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 150


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Step 3 Run lacp e-trunk priority priority

The LACP priority of an E-Trunk member is set.

By default, the LACP priority of an E-Trunk member is 32768.

The master and backup devices in an E-Trunk must use the same LACP priority.

----End

3.12.2 Creating an E-Trunk and Setting the E-Trunk Priority

Context
The E-Trunk priority determines the master or backup role of an E-Trunk member
device.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run e-trunk e-trunk-id

An E-Trunk is created and the E-Trunk view is displayed, or the view of an existing
E-Trunk is directly displayed.

The member devices in an E-Trunk must be configured with the same E-Trunk ID.

A maximum of 16 E-Trunks can be created on a device.

Step 3 Run priority priority

The E-Trunk priority is set.

The E-Trunk priority is used for master/backup negotiation between two devices.
The device with a higher priority is the master. In priority comparisons, numerically
lower values have higher priority.

If the two devices have the same priority, the device with a smaller system ID is
the master.

By default, the E-Trunk priority of a member device is 100.

----End

3.12.3 Configuring Local and Remote IP Addresses of an E-


Trunk

Context
E-Trunk packets are sent with the source IP address and protocol port number
configured on the local device. When you change the local or remote IP address
on a device, you must change the corresponding address on the remote device.
Otherwise, E-Trunk packets are dropped.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 151


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run e-trunk e-trunk-id
The E-Trunk view is displayed.
Step 3 Run peer-address peer-ip-address source-address source-ip-address
The local and remote IP addresses of the E-Trunk are configured.
The remote IP address of the local device must be the same as the local IP address
of the remote device. For example, when an E-Trunk is created between device A
and device B and the local and remote IP addresses on device A are 10.1.1.1 and
10.2.2.2 respectively, the local and remote IP addresses on device B must be
10.2.2.2 and 10.1.1.1 respectively.

----End

3.12.4 Binding an E-Trunk to a BFD Session


Context
When the local device of an E-Trunk cannot rapidly detect whether the remote
device is faulty by sending E-Trunk packets, it can use the Bidirectional Fast
Detection (BFD) protocol to quickly detect faults on the remote device. You need
to specify the remote IP address on the local device and create a BFD session to
check the reachability of the route to the remote device. The E-Trunk then can
detect faults reported by the BFD session and the faults can be processed quickly.

NOTE

This function is supported by only the following models: S5720I-SI, S5735-S, S5735S-S,
S5735-S-I, S5735S-H, S5736-S, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S,
S6720-EI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run e-trunk e-trunk-id
The E-Trunk view is displayed.
Step 3 Run e-trunk track bfd-session session-name bfd-session-name
The E-Trunk is bound to a BFD session.
BFD sessions are used to quickly detect faults of the link between the two E-Trunk
member devices.
When a BFD session is bound with E-Trunk, by default, the system does not allow
the bound BFD session to be deleted. To delete the bound BFD session, run the

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 152


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

bfd session nonexistent-config-check disable command to disable the device


from checking whether the bound BFD session is deleted.

----End

3.12.5 Adding an Eth-Trunk to an E-Trunk


Context
After you configure an E-Trunk, add Eth-Trunks to the E-Trunk. Then the E-Trunk
implements backup of LAGs between the two member devices to enhance
network reliability.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Only Eth-Trunks in LACP mode can be added to an E-Trunk.
Step 3 Run e-trunk e-trunk-id [ remote-eth-trunk eth-trunk-id ]
The Eth-Trunk is added to an E-Trunk.
An Eth-Trunk can be added to only one E-Trunk.
The IDs of the Eth-Trunks added to an E-Trunk can be different on two E-Trunk
member devices. In this case, you must specify the remote-eth-trunk parameter
to enable the E-Trunk to work normally.

----End

3.12.6 (Optional) Configuring the Working Mode of an Eth-


Trunk in an E-Trunk
Context
You can only configure the working mode for Eth-Trunks that have been added to
an E-Trunk. The working mode of an Eth-Trunk can be automatic, forced master,
or forced backup.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Only Eth-Trunks in LACP mode can be added to an E-Trunk.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 153


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Step 3 Run e-trunk mode { auto | force-master | force-backup }


A working mode of the Eth-Trunk in the E-Trunk is configured.
By default, an Eth-Trunk in an E-Trunk works in automatic mode.
The e-trunk mode command is valid only for the Eth-Trunk in an E-Trunk. When
the Eth-Trunk is deleted from the E-Trunk, the configuration is deleted
automatically.
When an Eth-Trunk works in automatic mode, its master/backup status is
controlled by the E-Trunk status of the local device and fault information of the
remote Eth-Trunk.
● If the local E-Trunk is the master, the local Eth-Trunk works in master state.
● If the local E-Trunk is the backup and the remote member Eth-Trunk fails, the
local Eth-Trunk works in master state. When the local Eth-Trunk receives a
notification that the remote Eth-Trunk has recovered, the local Eth-Trunk
becomes the backup.

NOTE

When an E-Trunk is working normally, changing the hello packet sending interval or timeout
interval may cause flapping of the E-Trunk between master and backup devices. Before
changing the hello packet sending interval or timeout interval, you are advised to configure
member Eth-Trunks to work in forcible master/backup state. After the new configuration takes
effect, restore the working mode to automatic.

----End

3.12.7 (Optional) Configuring a Password


Context
You can set a password for encrypting E-Trunk packets transmitted over an E-Trunk
link to improve system security. The two member devices of an E-Trunk must use
the same password.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run e-trunk e-trunk-id
The E-Trunk view is displayed.
Step 3 Run security-key { simple simple-key | cipher cipher-key }
The password for encrypting packets is configured.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 154


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

NOTICE

If simple is specified, the password is saved in plain text in the configuration file.
In this case, lower-level users can obtain the password by querying the
configuration file, which poses a security risk. You are advised to specify cipher so
that the password is saved in cipher text.
To ensure device security, change the password periodically.

----End

3.12.8 (Optional) Setting the Timeout Interval of Hello


Packets

Context
If the backup device in an E-Trunk does not receive any hello packet from the
master device within the timeout interval (as specified in the hello packets sent by
the master device), the backup device becomes the master.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run e-trunk e-trunk-id

The E-Trunk view is displayed.

Step 3 Run timer hello hello-times

The interval for sending hello packets is set.

By default, the value of hello-times is 10. The unit is 100 ms, so the default
interval is 1s.

Step 4 Run timer hold-on-failure multiplier multiplier

The time multiplier for detecting hello packets is set.

The remote device checks the timeout interval in the received hello packet to
check whether the local device times out. If the remote device is the backup and
does not receive hello packets from the local device within the timeout interval,
the remote device becomes the master.

The timeout interval is calculated using the following formula:

Timeout interval = Interval for sending hello packets x Time multiplier

The default time multiplier is 20. It is recommended that you set the time
multiplier to 3 at least.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 155


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

NOTE

When an E-Trunk is working normally, changing the hello packet sending interval or
timeout interval may cause flapping of the E-Trunk between master and backup devices.
Before changing the hello packet sending interval or timeout interval, you are advised to
configure member Eth-Trunks to work in forcible master/backup state. After the new
configuration takes effect, restore the working mode to automatic.

----End

3.12.9 (Optional) Setting the Revertive Switching Delay


Context
In a scenario where an E-Trunk works with other services, a member Eth-Trunk
may be restored earlier than other services after the faulty master device recovers.
If traffic is immediately switched back to the master device, service traffic will be
interrupted.
Setting the revertive switching delay prevents this problem. After the revertive
switching delay is set, the local Eth-Trunk becomes Up only after the delay timer
expires, ensuring service continuity.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run e-trunk e-trunk-id
The E-Trunk view is displayed.
Step 3 Run timer revert delay delay-value
The revertive switching delay is set.
By default, the revertive switching delay is 120s.

----End

3.12.10 (Optional) Disabling Revertive Switching on an E-


Trunk
Context
On devices in an E-Trunk, disabling revertive switching on the E-Trunk when the
faulty master device recovers can prevent loss of traffic that is switched back.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run e-trunk e-trunk-id

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 156


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

The E-Trunk view is displayed.


Step 3 Run revert disable
Revertive switching is disabled on the E-Trunk.
By default, revertive switching is enabled on an E-Trunk.

----End

3.12.11 (Optional) Configuring the E-Trunk Sequence Number


Check Function
Context
If the master device in an E-Trunk fails, enabling the E-Trunk sequence number
check function can prevent an attacker from attacking the backup device using E-
Trunk packets obtained from the master device.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run e-trunk e-trunk-id
The E-Trunk view is displayed.
Step 3 Run sequence enable
The E-Trunk sequence number check function is enabled on the E-Trunk.
By default, the E-Trunk sequence number check function is disabled.
The sequence enable command must be run on both the master and backup
devices in an E-Trunk. Otherwise, packets are dropped due to failure of the E-Trunk
sequence number check, causing dual master devices in the E-Trunk.

----End

3.12.12 Verifying the E-Trunk Configuration


Procedure
● Run the display e-trunk e-trunk-id command to check the E-Trunk
information.
----End

3.13 Deleting the Link Aggregation Configuration


Deleting a Specified Member Interface from an Eth-Trunk
You can use either of the following methods to delete a specified member
interface from an Eth-Trunk:

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 157


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

● Run the undo trunkport interface-type { interface-number1 [ to interface-


number2 ] } &<1-8> command in the Eth-Trunk view to delete a specified
member interface from an Eth-Trunk.
<HUAWEI> system-view
[HUAWEI] interface eth-trunk 1
[HUAWEI-Eth-Trunk1] undo trunkport gigabitethernet 0/0/1

● Run the undo eth-trunk command in the Eth-Trunk member interface view
to delete a specified member interface from an Eth-Trunk.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo eth-trunk

Deleting an Eth-Trunk

Delete all member interfaces from an Eth-Trunk, and then run the undo interface
eth-trunk trunk-id command in the system view.
<HUAWEI> system-view
[HUAWEI] undo interface eth-trunk 10

3.14 Maintaining Link Aggregation


Maintaining link aggregation includes monitoring the link aggregation running
status and clearing LACPDU statistics.

Maintenance Item Operation

Displaying inbound 1. Run the collect forward-path { { sip source-ip-


and outbound address dip destination-ip-address [ sport source-
interfaces of specified port dport destination-port [ protocol { protocol-
flows number | gre | icmp | igmp | ip | ipinip | ospf | tcp |
udp } ] ] } | { smac source-mac-address | dmac
dest-mac-address | vlan vlan-id | l2-protocol
{ protocol-value | arp | ip | ipv6 | mpls | rarp } } * }
{ ingress | egress | both } [ interval interval-time ]
command in the user view or system view to
configure the device to collect inbound and
outbound interfaces and traffic information about
packets with 5-tuple information.
2. Run the display forward-path command to check
information about the collect forward-path
command and the report ID. That is, the value of
report-id in the display forward-path report
command.
3. Run the display forward-path report report-id
command to check the inbound and outbound
interfaces of packets with 5-tuple information and
statistics.

Displaying the Eth- Run the display eth-trunk [ trunk-id [ interface


Trunk configuration interface-type interface-number | verbose ] ]
command to check the Eth-Trunk configuration.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 158


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Maintenance Item Operation

Displaying the Eth- Run the display interface eth-trunk [ trunk-id ]


Trunk status command.

Displaying Run the display trunkmembership eth-trunk trunk-id


information about command.
Eth-Trunk member
interfaces

Displaying statistics Run the display lacp statistics eth-trunk [ trunk-id


on received and sent [ interface interface-type interface-number ] ]
LACPDUs in LACP command.
mode

Clearing LACPDU Run the reset lacp statistics eth-trunk [ trunk-id


statistics [ interface interface-type interface-number ] ]
NOTICE command in the user view.
The cleared LACPDU
statistics cannot be
restored.

3.15 Configuration Examples for Link Aggregation

3.15.1 Example for Configuring Link Aggregation in Manual


Mode

Networking Requirements
In Figure 3-21, SwitchA and SwitchB connect to devices in VLAN 10 and VLAN 20
through Ethernet links, and heavy traffic is transmitted between SwitchA and
SwitchB.
SwitchA and SwitchB can provide higher link bandwidth to implement inter-VLAN
communication. Data transmission and link reliability need to be ensured.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 159


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Figure 3-21 Link aggregation in manual mode

Configuration Roadmap
The configuration roadmap is as follows:
1. Create an Eth-Trunk and add member interfaces to the Eth-Trunk to increase
link bandwidth.
2. Create VLANs and add interfaces to the VLANs.
3. Configure a load balancing mode to ensure that traffic is load balanced
among Eth-Trunk member interfaces.

Procedure
Step 1 Create an Eth-Trunk on SwitchA and SwitchB, and add member interfaces to the
Eth-Trunk.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] trunkport gigabitethernet 0/0/1 to 0/0/3
[SwitchA-Eth-Trunk1] quit
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] interface eth-trunk 1
[SwitchB-Eth-Trunk1] trunkport gigabitethernet 0/0/1 to 0/0/3
[SwitchB-Eth-Trunk1] quit

Step 2 Create VLANs and add interfaces to the VLANs.


# Create VLAN 10 and VLAN 20 and add interfaces to them. The configuration of
SwitchB is similar to the configuration of SwitchA, and is not mentioned here.
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 0/0/4
[SwitchA-GigabitEthernet0/0/4] port link-type trunk
[SwitchA-GigabitEthernet0/0/4] port trunk allow-pass vlan 10
[SwitchA-GigabitEthernet0/0/4] quit
[SwitchA] interface gigabitethernet 0/0/5
[SwitchA-GigabitEthernet0/0/5] port link-type trunk
[SwitchA-GigabitEthernet0/0/5] port trunk allow-pass vlan 20
[SwitchA-GigabitEthernet0/0/5] quit

# Configure Eth-Trunk 1 to allow packets from VLAN 10 and VLAN 20 to pass


through. The configuration of SwitchB is similar to the configuration of SwitchA,
and is not mentioned here.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 160


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

[SwitchA] interface eth-trunk 1


[SwitchA-Eth-Trunk1] port link-type trunk
[SwitchA-Eth-Trunk1] port trunk allow-pass vlan 10 20
[SwitchA-Eth-Trunk1] quit

Step 3 Configure a load balancing mode for Eth-Trunk 1. The configuration of SwitchB is
similar to the configuration of SwitchA, and is not mentioned here.
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] load-balance src-dst-mac
[SwitchA-Eth-Trunk1] quit

Step 4 Verify the configuration.

Run the display eth-trunk 1 command in any view to check whether the Eth-
Trunk is created and whether member interfaces are added.
[SwitchA] display eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL Hash arithmetic: According to SA-XOR-DA
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 3
--------------------------------------------------------------------------------
PortName Status Weight
GigabitEthernet0/0/1 Up 1
GigabitEthernet0/0/2 Up 1
GigabitEthernet0/0/3 Up 1

The preceding command output shows that Eth-Trunk 1 has three member
interfaces: GigabitEthernet0/0/1, GigabitEthernet0/0/2, and GigabitEthernet0/0/3.
The member interfaces are all in Up state. The Operate status of Eth-Trunk 1 is
Up.

----End

Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 10 20
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20
load-balance src-dst-mac
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
eth-trunk 1
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 20
#
return

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 161


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

● SwitchB configuration file


#
sysname SwitchB
#
vlan batch 10 20
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20
load-balance src-dst-mac
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
eth-trunk 1
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 20
#
return

3.15.2 Example for Configuring Link Aggregation in LACP


Mode

Networking Requirements
In Figure 3-22, SwitchA and SwitchB connect to devices in VLAN 10 and VLAN 20
through Ethernet links, and heavy traffic is transmitted between SwitchA and
SwitchB. The link between SwitchA and SwitchB is required to provide high
bandwidth to implement inter-VLAN communication. Link aggregation in LACP
mode is configured on SwitchA and SwitchB to improve the bandwidth and
reliability. The following requirements must be met:
● Two active links implement load balancing.
● One link functions as the backup link. When a fault occurs on an active link,
the backup link replaces the faulty link to maintain reliable data transmission.
● Devices in the same VLAN can communicate.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 162


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Figure 3-22 Link aggregation in LACP mode

Configuration Roadmap
The configuration roadmap is as follows:
1. Create an Eth-Trunk and configure the Eth-Trunk to work in LACP mode to
implement link aggregation.
2. Add member interfaces to the Eth-Trunk.
3. Set the LACP system priority and determine the Actor so that the Partner
selects active interfaces based on the Actor interface priority.
4. Set the upper threshold for the number of active interfaces to improve
reliability.
5. Set LACP interface priorities and determine active interfaces so that interfaces
with higher priorities are selected as active interfaces.
6. Create VLANs and add interfaces to the VLANs.

Procedure
Step 1 Create Eth-Trunk 1 on SwitchA and configure Eth-Trunk 1 to work in LACP mode.
The configuration of SwitchB is similar to the configuration of SwitchA, and is not
mentioned here.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] mode lacp
[SwitchA-Eth-Trunk1] quit

Step 2 Add member interfaces to Eth-Trunk 1 on SwitchA. The configuration of SwitchB is


similar to the configuration of SwitchA, and is not mentioned here.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] eth-trunk 1
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] eth-trunk 1
[SwitchA-GigabitEthernet0/0/2] quit
[SwitchA] interface gigabitethernet 0/0/3

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 163


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

[SwitchA-GigabitEthernet0/0/3] eth-trunk 1
[SwitchA-GigabitEthernet0/0/3] quit

Step 3 Set the system priority on SwitchA to 100 so that SwitchA becomes the Actor.
[SwitchA] lacp priority 100

Step 4 On SwitchA, set the upper threshold for the number of active interfaces to 2.
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] max active-linknumber 2
[SwitchA-Eth-Trunk1] quit

Step 5 Set the LACP interface priority and determine active links on SwitchA.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] lacp priority 100
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] lacp priority 100
[SwitchA-GigabitEthernet0/0/2] quit

Step 6 Create VLANs and add interfaces to the VLANs.


# Create VLAN 10 and VLAN 20 and add interfaces to them. The configuration of
SwitchB is similar to the configuration of SwitchA, and is not mentioned here.
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 0/0/4
[SwitchA-GigabitEthernet0/0/4] port link-type trunk
[SwitchA-GigabitEthernet0/0/4] port trunk allow-pass vlan 10
[SwitchA-GigabitEthernet0/0/4] quit
[SwitchA] interface gigabitethernet 0/0/5
[SwitchA-GigabitEthernet0/0/5] port link-type trunk
[SwitchA-GigabitEthernet0/0/5] port trunk allow-pass vlan 20
[SwitchA-GigabitEthernet0/0/5] quit

# Configure Eth-Trunk 1 to allow packets from VLAN 10 and VLAN 20 to pass


through. The configuration of SwitchB is similar to the configuration of SwitchA,
and is not mentioned here.
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] port link-type trunk
[SwitchA-Eth-Trunk1] port trunk allow-pass vlan 10 20
[SwitchA-Eth-Trunk1] quit

Step 7 Verify the configuration.


# Check information about the Eth-Trunk of the switches and check whether
negotiation is successful on the link.
[SwitchA] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: LACP
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
System Priority: 100 System ID: 00e0-fca8-0417
Least Active-linknumber: 1 Max Active-linknumber: 2
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
GigabitEthernet0/0/1 Selected 1GE 100 6145 2865 11111100 1
GigabitEthernet0/0/2 Selected 1GE 100 6146 2865 11111100 1
GigabitEthernet0/0/3 Unselect 1GE 32768 6147 2865 11100000 1

Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 32768 00e0-fca6-7f85 32768 6145 2609 11111100
GigabitEthernet0/0/2 32768 00e0-fca6-7f85 32768 6146 2609 11111100
GigabitEthernet0/0/3 32768 00e0-fca6-7f85 32768 6147 2609 11110000

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 164


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

[SwitchB] display eth-trunk 1


Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: LACP
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP
System Priority: 32768 System ID: 00e0-fca6-7f85
Least Active-linknumber: 1 Max Active-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
GigabitEthernet0/0/1 Selected 1GE 32768 6145 2609 11111100 1
GigabitEthernet0/0/2 Selected 1GE 32768 6146 2609 11111100 1
GigabitEthernet0/0/3 Unselect 1GE 32768 6147 2609 11100000 1

Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 100 00e0-fca8-0417 100 6145 2865 11111100
GigabitEthernet0/0/2 100 00e0-fca8-0417 100 6146 2865 11111100
GigabitEthernet0/0/3 100 00e0-fca8-0417 32768 6147 2865 11110000

The preceding information shows that the LACP system priority of SwitchA is 100,
which is higher than the LACP system priority of SwitchB. Member interfaces
GigabitEthernet0/0/1 and GigabitEthernet0/0/2 become the active interfaces and
are in Selected state. Interface GigabitEthernet0/0/3 is in Unselect state. Two links
are active and work in load balancing mode, and one link is the backup link.

----End

Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 10 20
#
lacp priority 100
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20
mode lacp
max active-linknumber 2
#
interface GigabitEthernet0/0/1
eth-trunk 1
lacp priority 100
#
interface GigabitEthernet0/0/2
eth-trunk 1
lacp priority 100
#
interface GigabitEthernet0/0/3
eth-trunk 1
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 20
#
return

● SwitchB configuration file

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 165


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

#
sysname SwitchB
#
vlan batch 10 20
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20
mode lacp
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
eth-trunk 1
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 20
#
return

3.15.3 Example for Configuring an Inter-Chassis Eth-Trunk to


Forward Traffic Preferentially Through Local Member
Interfaces (Stack)
Networking Requirements
NOTE

The S5735-S-I, S5720I-10X-PWH-SI-AC, and S5720I-6X-PWH-SI-AC do not support this


configuration.

On the network shown in Figure 3-23, Switch3 and Switch4 are connected
through stack cables to increase the total switching capacity. The two switches are
considered as one logical switch. To improve reliability, physical interfaces on the
two switches are added to an Eth-Trunk. Traffic from two VLANs, VLAN 2 and
VLAN 3, is forwarded through both the two interfaces GE1/0/1 and GE1/0/2 on
the PE when the network runs properly. This provides high bandwidth use
efficiency between devices and low traffic forwarding efficiency.
To improve traffic forwarding efficiency, each interface should only forward traffic
from one VLAN (in this example, GE1/0/1 forwards traffic from VLAN 2 and
GE1/0/2 forwards traffic from VLAN3). To achieve this goal, configure the Eth-
Trunk to preferentially forward local traffic.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 166


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

Figure 3-23 Preferentially forwarding traffic through the local member interface

Configuration Roadmap
The configuration roadmap is as follows:
1. Create an Eth-Trunk.
2. Add member interfaces to the Eth-Trunk.
3. Configure the Eth-Trunk to preferentially forward local traffic.
4. Configure the Layer 2 forwarding function.

Procedure
Step 1 Create an Eth-Trunk and configure the Eth-Trunk to allow packets from all VLANs
to pass through.
# Configure the stack.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 167


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

<HUAWEI> system-view
[HUAWEI] sysname Stack
[Stack] interface eth-trunk 10
[Stack-Eth-Trunk10] port link-type trunk
[Stack-Eth-Trunk10] port trunk allow-pass vlan all
[Stack-Eth-Trunk10] quit

# Configure the PE.


<HUAWEI> system-view
[HUAWEI] sysname PE
[PE] interface eth-trunk 10
[PE-Eth-Trunk10] port link-type trunk
[PE-Eth-Trunk10] port trunk allow-pass vlan all
[PE-Eth-Trunk10] quit

Step 2 Add member interfaces to the Eth-Trunk.


# Configure the stack.
[Stack] interface gigabitethernet 1/0/4
[Stack-GigabitEthernet1/0/4] eth-trunk 10
[Stack-GigabitEthernet1/0/4] quit
[Stack] interface gigabitethernet 2/0/4
[Stack-GigabitEthernet2/0/4] eth-trunk 10
[Stack-GigabitEthernet2/0/4] quit

# Configure the PE.


[PE] interface gigabitethernet 1/0/1
[PE-GigabitEthernet1/0/1] eth-trunk 10
[PE-GigabitEthernet1/0/1] quit
[PE] interface gigabitethernet 1/0/2
[PE-GigabitEthernet1/0/2] eth-trunk 10
[PE-GigabitEthernet1/0/2] quit

Step 3 In the stack view, configure the Eth-Trunk to preferentially forward local traffic.
On the S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L, S5735S-L, S5735S-L1,
S5735S-L-M, S5735-S, S500, S5735-S-I, and S5735S-S, run the following command:
[Stack] local-preference enable

On the devices except the S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L, S5735S-L,


S5735S-L1, S5735S-L-M, S5735-S, S500, S5735-S-I, and S5735S-S, run the
following commands:
[Stack] interface eth-trunk 10
[Stack-Eth-Trunk10] local-preference enable
[Stack-Eth-Trunk10] quit

Step 4 Configure the Layer 2 forwarding function.


# Configure the stack.
[Stack] vlan batch 2 3
[Stack] interface gigabitethernet 1/0/3
[Stack-GigabitEthernet1/0/3] port link-type trunk
[Stack-GigabitEthernet1/0/3] port trunk allow-pass vlan 2
[Stack-GigabitEthernet1/0/3] quit
[Stack] interface gigabitethernet 2/0/3
[Stack-GigabitEthernet2/0/3] port link-type trunk
[Stack-GigabitEthernet2/0/3] port trunk allow-pass vlan 3
[Stack-GigabitEthernet2/0/3] quit

# Configure Switch1.
<HUAWEI> system-view
[HUAWEI] sysname Switch1

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 168


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

[Switch1] vlan 2
[Switch1-vlan2] quit
[Switch1] interface gigabitethernet 0/0/1
[Switch1-GigabitEthernet0/0/1] port link-type trunk
[Switch1-GigabitEthernet0/0/1] port trunk allow-pass vlan 2
[Switch1-GigabitEthernet0/0/1] quit
[Switch1] interface gigabitethernet 0/0/2
[Switch1-GigabitEthernet0/0/2] port link-type trunk
[Switch1-GigabitEthernet0/0/2] port trunk allow-pass vlan 2
[Switch1-GigabitEthernet0/0/2] quit

# Configure Switch2.
<HUAWEI> system-view
[HUAWEI] sysname Switch2
[Switch2] vlan 3
[Switch2-vlan3] quit
[Switch2] interface gigabitethernet 0/0/1
[Switch2-GigabitEthernet0/0/1] port link-type trunk
[Switch2-GigabitEthernet0/0/1] port trunk allow-pass vlan 3
[Switch2-GigabitEthernet0/0/1] quit
[Switch2] interface gigabitethernet 0/0/2
[Switch2-GigabitEthernet0/0/2] port link-type trunk
[Switch2-GigabitEthernet0/0/2] port trunk allow-pass vlan 3
[Switch2-GigabitEthernet0/0/2] quit

Step 5 Verify the configuration.


Run the display trunkmembership eth-trunk command in any view to check
information about Eth-Trunk member interfaces.
The display on the stack is used as an example.
<Stack> display trunkmembership eth-trunk 10
Trunk ID: 10
Used status: VALID
TYPE: ethernet
Working Mode : Normal
Number Of Ports in Trunk = 2
Number Of Up Ports in Trunk = 2
Operate status: up

Interface GigabitEthernet1/0/4, valid, operate up, weight=1


Interface GigabitEthernet2/0/4, valid, operate up, weight=1

----End

Configuration Files
● Stack configuration file
#
sysname Stack
#
vlan batch 2 3
#
interface Eth-Trunk10
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet1/0/3
port link-type trunk
port trunk allow-pass vlan 2
#
interface GigabitEthernet2/0/3
port link-type trunk
port trunk allow-pass vlan 3
#
interface GigabitEthernet1/0/4

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 169


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

eth-trunk 10
#
interface GigabitEthernet2/0/4
eth-trunk 10
#
return

● PE configuration file
#
sysname PE
#
interface Eth-Trunk10
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet1/0/1
eth-trunk 10
#
interface GigabitEthernet1/0/2
eth-trunk 10
#
return

● Switch1 configuration file


#
sysname Switch1
#
vlan batch 2
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2
#
return

● Switch2 configuration file


#
sysname Switch2
#
vlan batch 3
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 3
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 3
#
return

3.16 Troubleshooting Link Aggregation

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 170


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

3.16.1 Traffic Is Unevenly Load Balanced Among Eth-Trunk


Member Interfaces Because the Load Balancing Mode Is
Incorrect
Fault Description
Traffic is unevenly load balanced among Eth-Trunk member interfaces due to the
incorrect load balancing mode.

Procedure
1. Run the display eth-trunk command to check whether the load balancing
mode of the Eth-Trunk meets networking requirements. For example, source
or destination IP address-based load balancing is not recommended in Layer 2
networking.
2. Run the load-balance command to set an appropriate load balancing mode.

3.16.2 Eth-Trunk at Both Ends Cannot Be Up Because the


Lower Threshold for the Number of Active Interfaces Is
Incorrect
Fault Description
The Eth-Trunk is Down because the lower threshold for the number of active
interfaces is incorrect.

Procedure
1. Run the display eth-trunk trunk-id command to check whether the lower
threshold for the number of active interfaces of an Eth-Trunk is set.
If the number of Eth-Trunk member interfaces in Up state is lower than the
lower threshold, the Eth-Trunk becomes Down.
2. Run the least active-linknumber link-number command to configure the
lower threshold for the number of active interfaces of an Eth-Trunk to be
smaller than the number of Eth-Trunk member interfaces in Up state.
The local and remote devices can be configured with different lower
thresholds for the number of active interfaces. If the lower thresholds are
different, a larger value becomes effective.

3.17 FAQ About Link Aggregation

3.17.1 Can an Eth-Trunk Be Configured with an IP Address?


By default, an Eth-Trunk is a Layer 2 interface and cannot be configured with an IP
address. If an Eth-Trunk is switched to a Layer 3 interface, it can be configured
with an IP address.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 171


S300, S500, S2700, S5700 and S6700 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration

3.17.2 How Do I Add Member Interfaces to an Eth-Trunk?


Before adding a new member interface, ensure that the type of the new member
interface is the same as that of other member interfaces and there is no
configuration on the new member interface.
1. Run the shutdown command in the interface view to configure the new
member interface in Down state.
If the new member interface that joins the Eth-Trunk is not Down, a
temporary loop may originate. As a result, services are affected.
2. Run either of the following commands to add the new member interface to
the Eth-Trunk.
– Run the eth-trunk trunk-id command in the interface view.
– Run the trunkport interface-type { interface-number1 [ to interface-
number2 ] } &<1-8> command in the Eth-Trunk interface view.
3. After member interfaces on two devices join the Eth-Trunk, run the undo
shutdown command in the interface view to enable the new member
interfaces.

3.17.3 How Do I Delete Member Interfaces from an Eth-Trunk?


1. Run the shutdown command in the interface view to set the member
interface to delete to Down state.
2. Run either of the following commands to delete the member interface from
the Eth-Trunk.
– Run the undo eth-trunk command in the interface view.
– Run the undo trunkport interface-type { interface-number1 [ to
interface-number2 ] } &<1-8> command in the Eth-Trunk interface view.
3. Run the undo shutdown command in the interface view to change the
deleted member interface to Up state.

3.17.4 How Do I Determine the Number of Member Interfaces


in an Eth-Trunk?
To ensure normal forwarding of burst traffic on an Eth-Trunk, the total bandwidth
of the Eth-Trunk must be at least 30% higher than the bandwidth of an interface
that forwards traffic. To ensure that member interfaces of an Eth-Trunk evenly
load balance traffic, the number of member interfaces should be an even number.

Issue 02 (2022-08-10) Copyright © Huawei Technologies Co., Ltd. 172

You might also like