0% found this document useful (0 votes)
21 views77 pages

01-04 Link Aggregation Configuration

This document provides a comprehensive configuration guide for link aggregation on S1720, S2700, S5700, and S6720 Series Ethernet switches. It covers the definition, purpose, and advantages of link aggregation, as well as detailed instructions for configuring it in both manual and LACP modes. Additionally, it discusses troubleshooting, licensing requirements, and application scenarios for effective link aggregation management.

Uploaded by

Bacof16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views77 pages

01-04 Link Aggregation Configuration

This document provides a comprehensive configuration guide for link aggregation on S1720, S2700, S5700, and S6720 Series Ethernet switches. It covers the definition, purpose, and advantages of link aggregation, as well as detailed instructions for configuring it in both manual and LACP modes. Additionally, it discusses troubleshooting, licensing requirements, and application scenarios for effective link aggregation management.

Uploaded by

Bacof16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 77

S1720, S2700, S5700, and S6720 Series Ethernet

Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

4 Link Aggregation Configuration

About This Chapter

This chapter describes how to configure link aggregation. Link aggregation


bundles multiple Ethernet links into a logical link to increase bandwidth, improve
reliability, and load balance traffic.

4.1 Overview of Link Aggregation


4.2 Understanding Link Aggregation
4.3 Application Scenarios for Link Aggregation
4.4 Summary of Link Aggregation Configuration Tasks
4.5 Licensing Requirements and Limitations for Link Aggregation
4.6 Default Settings for Link Aggregation
4.7 Configuring Link Aggregation in Manual Mode
4.8 Configuring Link Aggregation in LACP Mode
4.9 Associating the Secondary Member Interface of an Eth-Trunk Interface in LACP
Mode with Its Primary Member Interface
4.10 Configuring Preferential Forwarding of Local Traffic in a Stack
4.11 Creating an Eth-Trunk Sub-interface
4.12 Configuring an E-Trunk
4.13 Maintaining Link Aggregation
4.14 Configuration Examples for Link Aggregation
4.15 Troubleshooting Link Aggregation
4.16 FAQ About Link Aggregation

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 101


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

4.1 Overview of Link Aggregation

Definition
Ethernet link aggregation, also called Eth-Trunk, bundles multiple physical links to
form a logical link to increase link bandwidth. The bundled links back up each
other, increasing reliability.

Purpose
As the network scale expands increasingly, users propose increasingly high
requirements on Ethernet backbone network bandwidth and reliability. Originally,
to increase the bandwidth, users use high-speed devices to replace old devices.
This solution, however, is costly and inflexible.
Link aggregation helps increase bandwidth by bundling a group of physical
interfaces into a single logical interface, without having to upgrade hardware. In
addition, link aggregation provides link backup mechanisms, greatly improving
link reliability.
Link aggregation has the following advantages:
● Increased bandwidth
The bandwidth of the link aggregation interface is the sum of 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.

4.2 Understanding Link Aggregation

4.2.1 Basic Concepts of Link Aggregation


As shown in Figure 4-1, DeviceA and DeviceB are connected through three
Ethernet physical links. The three Ethernet physical links are bundled into an Eth-
Trunk link, and the bandwidth of the Eth-Trunk link is the sum of bandwidth of
the three Ethernet physical links. The three Ethernet physical links back up each
other, improving reliability.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 102


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Figure 4-1 Eth-Trunk networking

The link is Down,so packets are discarded.

Eth-Trunk not
configured

Bundle links to increase bandwidth. Link backup improves reliability.

Eth-Trunk
configured

Link aggregation concepts are described as follows:


● LAG and LAG interface
A link aggregation group (LAG) is a logical link bundled by multiple Ethernet
links.
Each LAG corresponds to a logical interface, that is, link aggregation interface
or Eth-Trunk. The Eth-Trunk can be used as a common Ethernet interface. The
only difference between the Eth-Trunk and common 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.
● Active and inactive interfaces and links
There are two types of interfaces in an LAG: active interface that forwards
data and inactive interface that does not forward data.
The link connected to an active interface is the active link, whereas the link
connected to an inactive interface is the inactive link.
● Upper threshold for the number of active interfaces
When the number of active interfaces reaches this threshold, the bandwidth
of an Eth-Trunk will not increase even if more member links go Up. This
guarantees higher network reliability. When the number of active member
interfaces reaches the upper threshold, additional active member interfaces
are set to Down.
For example, 8 trouble-free member links are bundled into an Eth-Trunk link
and each link provides a bandwidth of 1 Gbit/s. 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 this threshold, an Eth-Trunk
goes Down. This guarantees the Eth-Trunk a minimum available bandwidth.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 103


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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.
● Link aggregation mode
There are two link aggregation modes: manual and LACP. Table 4-1 compares
the two modes.

Table 4-1 Comparisons between link aggregation modes


Item Manual Mode LACP Mode

Definition You must manually An Eth-Trunk is created


create an Eth-Trunk based on LACP. LACP
and add member provides a standard
interfaces to the Eth- negotiation mechanism
Trunk. In this mode, for a switching device
LACP is not required. so that the switching
device can
automatically form and
start the aggregated
link according to its
configuration. After the
aggregated link is
formed, LACP is
responsible for
maintaining the link
status. When the link
aggregation condition
is changed, LACP
adjusts or removes the
aggregated link.

Whether LACP is No Yes


required

Data forwarding Generally, all links are Generally, some links


active links. All active are active links. All
links participate in data active links participate
forwarding. If one in data forwarding. If
active link fails, traffic an active link fails, the
is load balanced among system selects a link
the remaining active among inactive links as
links. the active link. That is,
the number of links
participating in data
forwarding remains
unchanged.

Whether inter-device No Yes


link aggregation is
supported

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 104


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Item Manual Mode LACP Mode

Fault detection This mode can only This mode can detect
detect member link member link
disconnections, but disconnections and
cannot detect other other faults such as link
faults such as link layer layer faults and
faults and incorrect link incorrect link
connections. connections.

NOTE

For more information, see 4.2.2 Link Aggregation in Manual Mode and 4.2.3 Link
Aggregation in LACP Mode.
● Link aggregation modes supported by the device
– 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 4.2.5 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 based on LACP.
For details, see 4.2.6 E-Trunk.

4.2.2 Link Aggregation in Manual Mode


Link aggregation can work in manual or static LACP mode depending on whether
LACP is used.
In manual mode, you must manually create an Eth-Trunk and add member
interfaces to the Eth-Trunk. In this mode, LACP is not required. The manual mode
applies to the scenario where a high link bandwidth between two directly
connected devices is required but the remote device does not support the LACP
protocol. This mode can increase bandwidth, enhance reliability, and implement
load balancing.
As shown in Figure 4-2, an Eth-Trunk is created between DeviceA and DeviceB. In
manual mode, three active links participate in data forwarding and load balance
traffic. When one link becomes faulty, the remaining two links load balance traffic.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 105


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Figure 4-2 Link aggregation in manual mode


DeviceA DeviceB
A%
B%
Eth-Trunk
C%
A%+B%+C%=100%
One link is faulty

DeviceA DeviceB
D%
E%
Eth-Trunk

D%+E%=100%

4.2.3 Link Aggregation in LACP Mode

Background
An Eth-Trunk in manual mode can increase the bandwidth. However, the manual
mode can only detect member link disconnections, but cannot detect other faults
such as link layer faults and incorrect link connections.

The Link Aggregation Control Protocol (LACP) can improve fault tolerance of the
Eth-Trunk, provide backup, and ensure high reliability of member links.

LACP uses a standard negotiation mechanism for a switching device so that the
switching device can create and start the aggregated link based on its
configuration. After the aggregated link is created, LACP maintains the link status.
If an aggregated link's status changes, LACP adjusts or removes the link.

For example, in Figure 4-3, four interfaces on DeviceA are bundled into an Eth-
Trunk and the Eth-Trunk is connected to the corresponding interfaces on DeviceB.
Because an interface on DeviceA is incorrectly connected to an interface on
DeviceC, DeviceA may incorrectly send data destined for DeviceB to DeviceC.
However, the Eth-Trunk in manual mode cannot detect this fault in a timely
manner.

If LACP is enabled on DeviceA and DeviceB, the Eth-Trunk correctly selects active
links to forward data after negotiation. Data sent by DeviceA can reach DeviceB.

Figure 4-3 Incorrect Eth-Trunk connection

DeviceA DeviceB

Eth-Trunk

DeviceC

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 106


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Concepts
● LACP system priority
LACP system priorities are set on devices at both ends of an Eth-Trunk. In
LACP mode, active member interfaces selected by both devices must be
consistent; otherwise, an LAG cannot be established. To keep active member
interfaces consistent at both ends, set a higher priority for one end so that the
other end selects active member interfaces based on the selection of the end
with a higher priority. The smaller the LACP system priority value, the higher
the LACP system priority.
● LACP interface priority
Interface LACP priorities are set to prioritize interfaces of an Eth-Trunk.
Interfaces with higher priorities are selected as active interfaces. The smaller
the LACP interface priority value, the higher the LACP interface priority.
● M:N backup of member interfaces
In LACP mode, LACP is used to negotiate parameters to determine active links
in an LAG. This mode is also called the 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.
As shown in Figure 4-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 and no data is
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 M links fails, LACP selects a link from 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 4-4 Networking of M:N backup

DeviceA DeviceB

Eth-Trunk

Eth-Trunk 1 Eth-Trunk 1

Active link
Backup link

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


must be assured and a fault tolerance mechanism is in place. 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 for the number of active interfaces, the system shuts
down the LAG.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 107


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Implementation of Link Aggregation in LACP Mode


LACP, as specified in IEEE 802.3ad, implements dynamic link aggregation and de-
aggregation, allowing both ends to exchange Link Aggregation Control Protocol
Data Units (LACPDUs).
After member interfaces are added to an Eth-Trunk in LACP mode, each end sends
LACPDUs to inform its remote end of its system priority, MAC address, member
interface priorities, interface numbers, and keys. The remote end then compares
this information with that saved on itself, and selects which interfaces to be
aggregated. The two ends perform LACP negotiation to select active interfaces
and links.
Figure 4-5 shows the format of an LACPDU.

Figure 4-5 Fields in an LACPDU


Destination Address
Source Address
Length/Type
Subtype=LACP
Version Number
TLV_type=Actor Information
Actor_Information_Length=20
Actor_System_Priority
Actor_System
Actor_Key
Actor_Port_Priority
Actor_Port
Actor_State
Reserved
TLV_type=Partner Information
Partner_Information_Length=20
Partner_System_Priority
Partner_System
Partner_Key
Partner_Port_Priority
Partner_Port
Partner_State
Reserved
TLV_type=Collector Information
Collector_Information_Length=16
CollectorMaxDelay
Reserved
TLV_type=Terminator
Terminator_Length=0
Reserved
FCS

The meaning of each field is explained as follows:

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 108


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Item Description

Actor_Port/Partner_Port Interface of the Actor or Partner.

Actor_State/Partner_State Status of the Actor or Partner.

Actor_System_Priority/ System priority of the Actor or Partner.


Partner_System_Priority

Actor_System/Partner_System System ID of the Actor or Partner.

Actor_Key/Partner_Key Operational key of the Actor or


Partner.

Actor_Port_Priority/ Interface priority of the Actor or


Partner_Port_Priority Partner.

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


a. Devices at both ends send LACPDUs to each other.
As shown in Figure 4-6, you need to create an Eth-Trunk in LACP mode
on DeviceA and DeviceB and add member interfaces to the Eth-Trunk.
Then the member interfaces are enabled with LACP, and devices at both
ends can send LACPDUs to each other.

Figure 4-6 LACPDUs sent in LACP mode

DeviceA LACPDU DeviceB

LACPDU

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


As shown in Figure 4-7, devices at both ends receive LACPDUs from each
other. For example, when DeviceB receives LACPDUs from DeviceA,
DeviceB checks and records information about DeviceA and compares
system priorities. If the system priority of DeviceA is higher than that of
DeviceB, DeviceA acts as the Actor. If DeviceA and DeviceB have the same
system priority, the device with a smaller MAC address functions as the
Actor.
After the Actor is selected, devices at both ends select active interfaces
based on the interface priority 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 devices at
both ends select consistent interfaces. Active links load balance data.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 109


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Figure 4-7 Selecting the Actor in LACP mode


LACP port priority LACP port priority
DeviceA
1 3 DeviceB
2 2
3 1
The device with higher The device with lower
system priority system priority
Compare system priority
and determine the Actor
LACP port priority LACP port priority
DeviceA 1 3 DeviceB
2 2
3 1
Actor
The Actor determines
active links
LACP port priority LACP port priority
DeviceA DeviceB
1 3
2 2
3 1
Actor
● LACP preemption
When LACP preemption is enabled, interfaces with higher priorities in an LAG
function as active interfaces.
As shown in Figure 4-8, 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 4-8 LACP preemption


DeviceA LACP port priority DeviceB
Port 1 10 Port 1
Port 2 20 Eth-Trunk Port 2
Port 3 30 Port 3
Actor

Active link
Backup link

LACP preemption is used in the following situations:


– Port 1 becomes faulty, and then recovers. When Port 1 fails, Port 3
replaces Port 1 to transmit services. After Port 1 recovers, if LACP
preemption is not enabled on the Eth-Trunk, Port 1 still retains in backup
state. If LACP preemption is enabled on the Eth-Trunk, Port 1 and Port 3
become the active interface and backup interface respectively.
– If LACP preemption is enabled and Port 3 needs to replace Port 1 or Port
2 to become the active interface, set the highest LACP priority value for

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 110


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Port 3. When LACP preemption is not enabled, the system does not re-
select the active interface even if the priority of a backup interface is
higher than that of the active interface.
● LACP preemption delay
After LACP preemption occurs, a backup link waits for a given period of time
and then switches to the active status. This period is called LACP preemption
delay. The LACP preemption delay is used to prevent unstable data
transmission over an Eth-Trunk link caused by frequent status changes of
member links.
As shown in Figure 4-8, Port 1 becomes inactive due to a link fault. Then the
link of Port 1 recovers. If LACP preemption is enabled and the LACP
preemption delay is set, Port 1 switches to be active after the LACP
preemption delay.
● Switchover between active and inactive links
In LACP mode, a link switchover in an 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's priority is
changed to be higher than that of the current active interface.
When any of the preceding events occurs, perform the following operations:
a. Shut down the faulty link.
b. Select the backup link with the highest priority among N backup links to
replace the faulty active link.
c. The highest priority backup link becomes the active link and begins
forwarding data.

4.2.4 Load Balancing Modes of Link Aggregation


Background
A data flow is a group of data packets with one or more identical attributes. The
attributes include the source MAC address, destination MAC address, source IP
address, destination IP address, source TCP/UDP port number, and destination
TCP/UDP port number.
Load balancing falls into packet- and flow-based load balancing.
● Packet-based load balancing
There are multiple physical links between both devices of the Eth-Trunk, so
the first and second data frames of the same data flow may be transmitted
over two physical links. In this case, the second data frame may arrive at the
remote device earlier than the first data frame. As a result, packet mis-
sequencing occurs.
● Flow-based load balancing
The system uses the hash algorithm to calculate the address in a data frame
and generates a HASH-KEY value. Then the system searches for the outbound

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 111


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

interface in the Eth-Trunk forwarding table based on the generated HASH-KEY


value. Each MAC or IP address corresponds to a HASH-KEY value, so the
system uses different outbound interfaces to forward data. This mode ensures
that frames of the same data flow are forwarded on the same physical link
and implements load balancing of flows. Flow-based load balancing ensures
the sequence of data transmission, but cannot ensure the bandwidth
utilization.
NOTE

The switch supports only flow-based load balancing.

Forwarding Principle
As shown in Figure 4-9, the Eth-Trunk is located between the MAC address layer
and the LLC sub-layer, that is, data link layer.

Figure 4-9 Eth-Trunk in the Ethernet protocol stack


LLC
Data link Eth-Trunk
layer
MAC

Physical layer PHY

The Eth-Trunk module maintains a forwarding table that consists of the following
entries:
● HASH-KEY value
The HASH-KEY value is calculated through the hash algorithm based on the
MAC address or IP address in a packet.
● Interface number
Eth-Trunk forwarding entries are relevant to the number of member interfaces
in an Eth-Trunk. Different HASH-KEY values map 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 four entries, as shown in Figure 4-10. In the
Eth-Trunk forwarding table, the HASH-KEY values 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 4-10 Example of an Eth-Trunk forwarding table

HASH-KEY 0 1 2 3 4 5 6 7
PORT 1 2 3 4 1 2 3 4

The Eth-Trunk module forwards a packet according to the Eth-Trunk forwarding


table:

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 112


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

1. The Eth-Trunk module receives a packet from the MAC sub-layer, and then
extracts its source/destination MAC address or IP address.
2. The Eth-Trunk module calculates the HASH-KEY value using the hash
algorithm.
3. Based on the HASH-KEY value, the Eth-Trunk module searches the Eth-Trunk
forwarding table for the interface number, and then sends the packet from
the corresponding interface.

Load Balancing Mode


To prevent data packet mis-sequencing, an Eth-Trunk uses flow-based load
balancing. Data forwarding varies depending on the load balancing mode.

You can use the following load balancing modes according to the actual
networking:

● Based on source MAC addresses of packets


● Based on destination MAC addresses of packets
● Based on source IP addresses of packets
● Based on destination IP addresses of packets
● Based on the Exclusive-Or result of source and destination MAC addresses of
packets
● Based on the Exclusive-Or result of source and destination IP addresses of
packets
● Enhanced load balancing: based on VLAN IDs and source physical interface
numbers for Layer 2, IPv4, IPv6, and MPLS packets

When configuring a load balancing mode, pay attention to the following points:

● The load balancing mode is only valid for the outbound interface of traffic. If
traffic of the inbound interface is uneven, change the load balancing mode of
the uplink outbound interface.
● Data flows should be load balanced among all active links as much as
possible. If data flows are transmitted over one link, traffic congestion may
occur and service running is affected.
For example, when data packets have only one destination MAC address and
IP address, use load balancing based on the source MAC address and IP
address of packets. If load balancing based on the destination MAC address
and IP address is used, traffic is transmitted over one link, causing congestion.

For details about how to determine whether Eth-Trunk load balancing is uneven
and how to adjust Eth-Trunk configurations in this scenario, visit Huawei technical
support website to search for How Do I Adjust Eth-Trunk Configurations When
Eth-Trunk Load Balancing Is Uneven.

4.2.5 Link Aggregation in Stack Scenarios

Concepts
● Stack device

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 113


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

A stack device is a logical device formed by connecting multiple devices


through stack cables. In Figure 4-11, DeviceB and DeviceC are connected to
form a logical device.
● Inter-chassis Eth-Trunk
Physical interfaces in a stack are added to an Eth-Trunk. When a device in the
stack fails or a device physical interface added to the Eth-Trunk fails, traffic
can be transmitted between devices through stack cables. The inter-chassis
Eth-Trunk ensures reliable transmission and implements device backup.
● Preferential forwarding of local traffic
In b of Figure 4-11, traffic from DeviceB or DeviceC is only forwarded through
local member interfaces when the network runs properly. In a of Figure 4-11,
traffic is forwarded across devices through stack cables.

Figure 4-11 Inter-chassis Eth-Trunk

DeviceA DeviceA

Eth-Trunk Eth-Trunk

Stack Stack

DeviceB DeviceC DeviceB DeviceC

a. The Eth-Trunk is not enabled to b. The Eth-Trunk is enabled to


preferentially forward local preferentially forward local
interface traffic. interface traffic.
Data flow 1
Data flow 2
Stack cable

Inter-Chassis Eth-Trunk Supporting Preferential Forwarding of Local Traffic


In a stack, an Eth-Trunk is configured to be the outbound interface of traffic to
ensure reliable transmission. Member interfaces of the Eth-Trunk are located on

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 114


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

different devices. When the stack device 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 and reduces traffic
forwarding efficiency.
As shown in Figure 4-11, DeviceB and DeviceC constitute a stack, and the stack
connects to DeviceA through an Eth-Trunk. After the Eth-Trunk in the stack is
configured to preferentially forward local traffic, the following functions are
implemented:
● Forwarding received traffic by the local device
When DeviceB has member interfaces of the Eth-Trunk and the member
interfaces function properly, the Eth-Trunk forwarding table of DeviceB
contains only local member interfaces. In this manner, the hash algorithm
selects a local member interface, and traffic is only forwarded through
DeviceB.
● Forwarding received traffic by another device
When DeviceB does not have any member interface of the Eth-Trunk or all
member interfaces are faulty, the Eth-Trunk forwarding table of DeviceB
contains all available member interfaces. In this manner, the hash algorithm
selects a member interface on DeviceC, and traffic is forwarded through
DeviceC.
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.

4.2.6 E-Trunk
Enhanced Trunk (E-Trunk), an extension based on the Link Aggregation Control
Protocol (LACP), controls and implements link aggregation among multiple
devices. E-Trunk implements device-level link reliability, instead of card-level link
reliability implemented by LACP.
E-Trunk is mainly applied to a scenario 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. Without E-Trunk, a CE can be connected to only one PE by using an Eth-Trunk
link. 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, establishing device-level protection.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 115


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Figure 4-12 E-Trunk networking


PE1
Eth-Trunk10

Eth-Trunk20

E-Trunk1

CE

Eth-Trunk10
PE2

NOTE

Only the S1720X, S1720X-E, S5720SI, S5720S-SI, S5720EI, S5720HI, S5730SI, S5730S-EI,
S6720LI, S6720S-LI, S6720SI, S6720S-SI, S6720EI, and S6720S-EI support the E-Trunk.

Basic Concepts
● LACP system priority
In LACP, 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
In LACP, the system ID is used to determine the 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.
To enable a CE to consider the PEs as a single device, you must configure the
same system LACP priority and system ID for the PEs at both ends of an E-
Trunk link.
● E-Trunk priority
The E-Trunk priority determines the master/backup status of two devices in an
LAG. As shown in Figure 4-12, PE1 has a higher E-Trunk priority than PE2,
and therefore PE1 is the master device and PE2 is the backup device. The
smaller the E-Trunk priority value, the higher the E-Trunk priority.
● E-Trunk ID
An E-Trunk ID is an integer that identifies an E-Trunk.
● Working mode
The working mode depends on the working mode of the Eth-Trunk added to
the E-Trunk. The Eth-Trunk works in one of the following modes:
– Automatic
– Forcible master
– Forcible backup

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 116


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

● Timeout interval
Normally, the master and backup devices in an E-Trunk periodically send Hello
messages to each other. If the backup device does not receive any Hello
message within the timeout interval, it becomes the master device.

E-Trunk Working Principle


The E-Trunk working process is described as follows:

● Master/Backup status negotiation


As shown in Figure 4-12, the CE is directly connected to PE1 and PE2, and E-
Trunk runs between PE1 and PE2.
– PE
The same Eth-Trunk and E-Trunk are created on PE1 and PE2. In addition,
the Eth-Trunks are added to the E-Trunk.
– CE
An Eth-Trunk in LACP mode is configured on the CE. The CE is connected
to PE1 and PE2 through the Eth-Trunk.
The E-Trunk is invisible to the CE.
a. Determine the E-Trunk master/backup status.
PE1 and PE2 negotiate the E-Trunk master/backup status by exchanging
E-Trunk packets. Normally, 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 smaller the E-Trunk priority
value, the higher the E-Trunk priority. The PE with the higher E-Trunk
priority functions as the master. If the E-Trunk priorities of the PEs are the
same, the PE with the 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 is
determined by its E-Trunk status and the remote Eth-Trunk status.
As shown in Figure 4-12, PE1 and PE2 are at both ends of the E-Trunk
link. PE1 is considered as the local end and PE2 as the remote end.
Figure 4-12 describes the status of each member Eth-Trunk in the E-
Trunk.

Table 4-2 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

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 117


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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


Status of the Local Trunk Status Trunk Status
Eth-Trunk

Backup Automatic Down Master

Backup Automatic Up Backup

In normal situations:

▪ If PE1 functions as the master, Eth-Trunk 10 on PE1 functions as the


master and its link status is Up.

▪ If PE2 functions as the backup, Eth-Trunk 10 on PE2 functions as the


backup and its link status is Down.
If the link between the CE and PE1 fails, the following situations occur:
i. PE1 sends an E-Trunk packet containing information about faulty
Eth-Trunk 10 of PE1 to PE2.
ii. After receiving the E-Trunk packet, PE2 finds that Eth-Trunk 10 on the
remote device 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 of the CE is
forwarded through PE2. In this way, traffic destined for the CE is
protected.
If PE1 is faulty, PE2 will not receive any E-Trunk packet from PE1 before
the timeout. PE2 will function as the master and Eth-Trunk 10 on PE2 will
function as the master. Through LACP negotiation, the status of Eth-Trunk
10 on PE2 becomes Up. The traffic of the CE is forwarded through PE2.
● Sending and receiving of E-Trunk packets
E-Trunk packets carrying the source IP address and port number configured
on the local end are sent through UDP. E-Trunk packets are sent in the
following situations:
– The sending timer times out.
– The configurations change. For example, the E-Trunk priority, packet
sending interval, timeout interval multiplier, and source/destination IP
address of the E-Trunk changes, and member Eth-Trunks are added or
deleted.
– A member Eth-Trunk fails or recovers.
E-Trunk packets at the local end needs to carry the timeout interval so that
the remote device can obtain the timeout interval in Eth-Trunk packets from
the local end as its timeout interval.
● Switchback mechanism
If the physical status of the Eth-Trunk on the local device in master state goes
Down or the local device fails, the remote device becomes the master and the
physical status of the member Eth-Trunk becomes Up.
When the local device recovers and needs to function as the master, the local
Eth-Trunk enters the LACP negotiation state. After LACP informs that the

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 118


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

negotiation capability is Up, the local device starts the switchback delay timer.
After the switchback delay timer expires, the local Eth-Trunk becomes the
master. After LACP negotiation, the Eth-Trunk becomes Up.

E-Trunk Constraints
As shown in Figure 4-12, to improve reliability of CE and PE links and ensure that
traffic is switched between these links, comply with the following rules:
● The configurations at both ends of the E-Trunk link must be consistent. The
Eth-Trunk links directly connecting PEs to the CE must be configured with the
same working rate and duplex mode so that both Eth-Trunks have the same
key and join the same E-Trunk. After the Eth-Trunks are added to the E-Trunk,
both PEs must contain the 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.
● The IP address of the local PE must be the same as the local address of the
remote PE and the IP address of the remote PE must be the same as the
remote address of the local PE to ensure Layer 3 connectivity. Here, 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.

4.3 Application Scenarios for Link Aggregation

4.3.1 Switches Are Directly Connected Using Link Aggregation


As shown in Figure 4-13, 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, an LAG, Eth-Trunk 1, is
established.

Figure 4-13 Link aggregation networking

Core
Network

PE-AGG
Eth-Trunk 1
UPE

…… ……
VoIP DATA
IPTV

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 119


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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
congestion avoidance can be performed for outgoing traffic, ensuring that packets
of high priorities are sent in a timely manner.

4.3.2 Switches Are Connected Across a Transmission Device


Using Link Aggregation
As shown in Figure 4-14, a transmission device needs to be deployed between
two switches that are far away from each other. In addition, link aggregation is
configured between the two switches to enhance link bandwidth and reliability.
● The switches at both ends must use link aggregation in LACP mode.
● The transmission device between switches must be configured to
transparently transmit LACPDUs.

Figure 4-14 Switches are connected across a transmission device using link
aggregation

Transmission
device

4.3.3 Switches Connect to Transmission Devices Using Link


Aggregation
As shown in Figure 4-15, 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
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 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 120


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Figure 4-15 Networking where switches are connected to transmission devices


using link aggregation

Core site

Transmission
device

Transmission Transmission
device device

Access site 1 Access site 3


Transmission
device

Access site 2

4.3.4 A Switch Connects to a Server Using Link Aggregation


As shown in Figure 4-16, 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 4.5 Licensing Requirements and
Limitations for Link Aggregation, pay attention to the following points:
● Network adapters of the server must use the same type.
● The link aggregation modes on the server and access device must be
consistent.
Intel network adapter is used as an example. 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 link aggregation interface of the switch.
NOTE

Different types of network adapters use different link aggregation configuration. See the
network adapter operation guide.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 121


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Figure 4-16 Networking where a switch connects to a server

Network

Eth-Trunk 1

4.3.5 A Switch Connects to a Stack Using Link Aggregation


As shown in Figure 4-17, 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 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 122


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Figure 4-17 Preferentially forwarding local traffic

Network

CSS

VLAN 2 VLAN 3

VLAN 2 data flow


VLAN 3 data flow

4.3.6 Using E-Trunk to Implement Link Aggregation Across


Devices
NOTE

Only the S1720X, S1720X-E, S5720SI, S5720S-SI, S5720EI, S5720HI, S5730SI, S5730S-EI,
S6720LI, S6720S-LI, S6720SI, S6720S-SI, S6720EI, and S6720S-EI support the E-Trunk.

As shown in Figure 4-18, 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 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 123


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Figure 4-18 E-Trunk networking


Loopback1

PE1
Eth-Trunk10

Eth-Trunk20

E-Trunk1 Internet
CE1

Eth-Trunk10
PE2

Loopback1

4.4 Summary of Link Aggregation Configuration Tasks


Table 4-3 describes the link aggregation configuration tasks.

Table 4-3 Link aggregation configuration tasks


Scenario Task

Switches Are Directly Connected Using Perform either of the two operations:
Link Aggregation ● 4.7 Configuring Link Aggregation
in Manual Mode
● 4.8 Configuring Link Aggregation
in LACP Mode

Switches Are Connected Across a 4.8 Configuring Link Aggregation in


Transmission Device Using Link LACP Mode
Aggregation

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


Link Aggregation ● 4.7 Configuring Link Aggregation
in Manual Mode
● 4.8 Configuring Link Aggregation
in LACP Mode

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 124


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Scenario Task

Using E-Trunk to Implement Link 1. 4.8 Configuring Link Aggregation


Aggregation Across Devices in LACP Mode
NOTE 2. 4.12 Configuring an E-Trunk
Only the S1720X, S1720X-E, S5720SI,
S5720S-SI, S5720EI, S5720HI, S5730SI,
S5730S-EI, S6720LI, S6720S-LI, S6720SI,
S6720S-SI, S6720EI, and S6720S-EI support
the E-Trunk.

4.5 Licensing Requirements and Limitations for Link


Aggregation

Involved Network Elements


Other network elements are not required.

Licensing Requirements
Configuration commands of Ethernet link aggregation are available only after the
S1720GW, S1720GWR, and S1720X have the license (WEB management to full
management Electronic RTU License) loaded and activated and the switches are
restarted.Configuration commands of Ethernet link aggregation on other models
are not under license control.

For details about how to apply for a license, see S Series Switch License Use
Guide.

Version Requirements

Table 4-4 Products and versions supporting link aggregation

Product Product Software Version


Model

S1700 S1720GFR V200R006C10, V200R009C00, V200R010C00,


V200R011C00, V200R011C10

S1720GW, V200R010C00, V200R011C00, V200R011C10


S1720GWR

S1720GW- V200R010C00, V200R011C00, V200R011C10


E,
S1720GWR
-E

S1720X, V200R011C00, V200R011C10


S1720X-E

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 125


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Product Product Software Version


Model

Other Models that cannot be configured using commands.


S1700 For details about features and versions, see S1700
models Documentation Bookshelf.

S2700 S2700SI V100R005C01, V100R006(C00&C01&C03&C05)

S2700EI V100R005C01, V100R006(C00&C01&C03&C05)

S2710SI V100R006(C03&C05)

S2720EI V200R006C10, V200R009C00, V200R010C00,


V200R011C10

S2750EI V200R003C00, V200R005C00SPC300, V200R006C00,


V200R007C00, V200R008C00, V200R009C00,
V200R010C00, V200R011C00, V200R011C10

S3700 S3700SI V100R005C01, V100R006(C00&C01&C03&C05)

S3700EI V100R005C01, V100R006(C00&C01&C03&C05)

S3700HI V100R006C01, V200R001C00

S5700 S5700LI V200R001C00, V200R002C00,


V200R003(C00&C02&C10), V200R005C00SPC300,
V200R006C00, V200R007C00, V200R008C00,
V200R009C00, V200R010C00, V200R011C00,
V200R011C10

S5700S-LI V200R001C00, V200R002C00, V200R003C00,


V200R005C00SPC300, V200R006C00, V200R007C00,
V200R008C00, V200R009C00, V200R010C00,
V200R011C00, V200R011C10

S5710-C-LI V200R001C00

S5710-X-LI V200R008C00, V200R009C00, V200R010C00,


V200R011C00, V200R011C10

S5700EI V100R005C01, V100R006(C00&C01),


V200R001(C00&C01), V200R002C00, V200R003C00,
V200R005(C00&C01&C02&C03)

S5700SI V100R005C01, V100R006C00, V200R001C00,


V200R002C00, V200R003C00, V200R005C00

S5710EI V200R001C00, V200R002C00, V200R003C00,


V200R005(C00&C02)

S5720EI V200R007C00, V200R008C00, V200R009C00,


V200R010C00, V200R011C00, V200R011C10

S5720LI, V200R010C00, V200R011C00, V200R011C10


S5720S-LI

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 126


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Product Product Software Version


Model

S5720SI, V200R008C00, V200R009C00, V200R010C00,


S5720S-SI V200R011C00, V200R011C10

S5700HI V100R006C01, V200R001(C00&C01), V200R002C00,


V200R003C00, V200R005(C00SPC500&C01&C02)

S5710HI V200R003C00, V200R005(C00&C02&C03)

S5720HI V200R006C00, V200R007(C00&C10), V200R008C00,


V200R009C00, V200R010C00, V200R011C00,
V200R011C10

S5730SI V200R011C10

S5730S-EI V200R011C10

S6700 S6700EI V100R006C00, V200R001(C00&C01), V200R002C00,


V200R003C00, V200R005(C00&C01&C02)

S6720EI V200R008C00, V200R009C00, V200R010C00,


V200R011C00, V200R011C10

S6720S-EI V200R009C00, V200R010C00, V200R011C00,


V200R011C10

S6720LI, V200R011C00, V200R011C10


S6720S-LI

S6720SI, V200R011C00, V200R011C10


S6720S-SI

NOTE
To know details about software mappings, see Hardware Query Tool.

Feature Limitations
Configuration Guidelines Before an Eth-Trunk Is Configured
● An Eth-Trunk contains a maximum of 32 member interfaces on the S5720HI,
16 member interfaces on the S1720X, S1720X-E, S5730SI, S5730S-EI, S6720LI,
S6720S-LI, S6720SI, and S6720S-SI, and 8 member interfaces on other models.
● Starting from V200R009, for the S6720EI and S6720S-EI, you can run the
assign trunk { trunk-group group-number | trunk-member member-
number }* command to configure the maximum number of Eth-Trunks and
maximum number of member interfaces in each Eth-Trunk. For details, see
the description of the assign trunk command in "Ethernet Switching
Configuration Commands" in the Command Reference of the corresponding
version. After the configuration, you can run the display trunk configuration
command 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.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 127


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

● Some commands (such as port link-type access) and static MAC address
entries cannot be configured on member interfaces of an Eth-Trunk.
Otherwise, errors will be reported.
● An Eth-Trunk cannot be added to another Eth-Trunk.
● Member interfaces of an Eth-Trunk must use the same Ethernet type. For
example, GE electrical and optical interfaces can join the same Eth-Trunk.
● In earlier versions of V200R011C10, interfaces with different rates cannot join
the same Eth-Trunk. In V200R011C10 and later versions, interfaces with
different rates can join the same Eth-Trunk by running mixed-rate link
enable.
● 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 on 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.
● Both devices of the Eth-Trunk must use the same number of physical
interfaces, interface rate, duplex mode, and flow control mode.
● 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 so that the two ends can communicate.
● Devices on both ends of an Eth-Trunk must use the same link aggregation
mode.
● When the number of active interfaces falls below the lower threshold, the
Eth-Trunk goes Down. This ensures that the Eth-Trunk has a minimum
available bandwidth.
● In 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 S5700EI, S5710EI, S5720EI, S5700HI,
S5710HI, S5720HI, S5730SI, S5730S-EI, S6700EI, S6720EI, S6720S-EI, S6720SI,
S6720S-SI, S6720LI, S6720S-LI are recommended.
In the following scenarios, there are other configuration guidelines in addition to
the preceding ones.

Table 4-5 Configuration guidelines in different scenarios


Usage Scenario Precaution

Switches Are Connected Across a ● The switches at both ends must use
Transmission Device Using Link link aggregation in LACP mode.
Aggregation ● The transmission device between
switches must be configured to
transparently transmit LACPDUs.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 128


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Usage Scenario Precaution

Switches Connect to Transmission The link aggregation mode on the


Devices Using Link Aggregation transmission device must be the same
as that of the switch. Configure the
transmission device according to its
operation guide.

A Switch Connects to a Server Using ● Network adapters of the server


Link Aggregation must use the same type.
● The link aggregation modes on the
server and access device must be
consistent.
Intel network adapter is used as an
example. 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.

Configuration Guidelines After an Eth-Trunk Is Configured


● 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, only the Eth-Trunk learns MAC
address entries or ARP entries, but the member interface does not.
● Before deleting an Eth-Trunk, delete member interfaces from the Eth-Trunk.
Specifications

Link aggregation modes:

● Manual
● LACP

Link aggregation modes supported by the device:

● 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.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 129


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

● Inter-device: Inter-device link aggregation refers to E-Trunk. E-Trunk allows


links between multiple devices to be aggregated based on LACP.

Load balancing modes supported by the device:

To prevent data packet mis-sequencing, an Eth-Trunk uses flow-based load


balancing.

You can use the following load balancing modes based on actual networking:

● Based on source MAC addresses of packets


● Based on destination MAC addresses of packets
● Based on source IP addresses of packets
● Based on destination IP addresses of packets
● Based on the Exclusive-Or result of source and destination MAC addresses of
packets
● Based on the Exclusive-Or result of source and destination IP addresses of
packets
● Enhanced load balancing: based on VLAN IDs and source physical interface
numbers for Layer 2, IPv4, IPv6, and MPLS packets

4.6 Default Settings for Link Aggregation

Table 4-6 Default setting for link aggregation

Parameter Value

Link aggregation mode Manual mode

Upper threshold for the number of 32 on the S5720HI and 8 on other


active member links models
On the S6720EI, 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 member links

LACP system priority 32768

LACP interface priority 32768

LACP preemption Disabled

LACP preemption delay 30s

Timeout interval at which LACPDUs 90s


are received

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 130


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

4.7 Configuring Link Aggregation in Manual Mode

4.7.1 (Optional) Setting the Maximum Number of LAGs and


the Maximum Number of Member Interfaces in Each LAG

Context
Generally, a switch supports a fixed maximum number of LAGs and a fixed
maximum number of member interfaces in each LAG. On the S6720EI 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.

● When more than 128 Eth-Trunks or 16 member interfaces are configured


using the assign trunk { trunk-group group-number | trunk-member
member-number } * command, the enhanced mode is used for load balance
known unicast packets by default. If the enhanced mode is not used,
problems such as packet loss and uneven load balancing may occur. The
switch load balances non-known unicast packets based on source and
destination MAC addresses by default.
● 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.
– When the configured value of group-number is larger than 128 or the
configured value of member-number is larger than 16, the switch can
only use the enhanced mode to load balance known unicast packets. The
common mode is invalid for the known unicast packets.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 131


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

● After the Eth-Trunk specifications are modified, save the configuration and
restart the switch to make the modification take effect.

----End

4.7.2 Creating an LAG

Context
Each LAG corresponds to a logical interface, that is, 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.
The value of trunk-id is as follows.
● S1720GFR, S2750EI, S5700LI, S5700S-LI, and S5710-X-LI: 0-63
● S1720GW, S1720GWR, S1720GW-E, S1720GWR-E, S2720EI, S5720SI, S5720LI,
S5720S-LI, and S5720S-SI: 0-119
● S5720EI, S5720HI, S6720EI, and S6720S-EI: 0-127
● S1720X, S1720X-E, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S6720LI, S6720S-
LI: 0-249
On the S6720EI, 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.
If the specified Eth-Trunk already exists, this command directly displays the Eth-
Trunk interface view.

----End

4.7.3 Setting the Manual Load Balancing Mode

Context
Link aggregation can work in manual load balancing mode and LACP mode.
In manual load balancing mode, you must manually create an Eth-Trunk and add
member interfaces to the Eth-Trunk. All active links forward data and evenly load
balance traffic. The manual load balancing mode is used when the peer device
does not support LACP.
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.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 132


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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.

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
A working mode of the Eth-Trunk is configured.
By default, an Eth-Trunk works in manual load balancing mode.
Before configuring an Eth-Trunk, ensure that both ends use the same working
mode. If the local end works in manual load balancing mode, the remote end
must use the manual load balancing mode.

----End

4.7.4 Adding Member Interfaces to an Eth-Trunk


Context
Before adding member interfaces to an Eth-Trunk, you need to learn about the
configuration notes. See 4.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 be added to the same Eth-
Trunk.
By default, interfaces with different rates are not allowed to be added to
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.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 133


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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) Interfaces with different rates are allowed to be added to the
same Eth-Trunk.
i. Run the interface eth-trunk trunk-id command to enter the Eth-
Trunk interface view.
ii. Run the mixed-rate link enable command to allow the device to
add interfaces with different rates to the same Eth-Trunk.
By default, interfaces with different rates are not allowed to be
added to the same Eth-Trunk.
iii. Run the quit command to 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

4.7.5 (Optional) Setting the Lower Threshold for the Number


of Active Interfaces

Context
The lower threshold for the number of active interfaces 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 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 the Eth-Trunk has a minimum available
bandwidth.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 134


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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

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

4.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.
Different data flows are forwarded on different physical links to implement load
balancing.
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 packets, IP packets, and MPLS packets.
Load balancing is valid only for outgoing traffic; therefore, the load balancing
modes for the interfaces at both ends of the link can be different and do not
affect each other.
Only the S1720X, S1720X-E, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S5730SI,
S5730S-EI, S5720HI, S5720EI, S6720EI, and S6720S-EI support the enhanced load
balancing mode.
On the S6720EI and S6720S-EI, when more than 16 member interfaces are
configured using the assign trunk { trunk-group group-number | trunk-member
member-number } * command, 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.
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

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 135


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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 are 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 is 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. 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 of the Eth-Trunk is set.

The default load balancing mode is src-dst-ip.

Other load balancing modes are as follows:

▪ dst-ip: based on destination IP addresses

▪ dst-mac: based on destination MAC addresses

▪ src-ip: based on source IP addresses

▪ src-mac: based on source MAC addresses

▪ src-dst-ip: based on the Exclusive-Or result of source and destination


IP addresses

▪ src-dst-mac: based on the Exclusive-Or result of source and


destination MAC addresses

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 136


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

NOTE

The S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E,


S1720X-E, S2750EI, S2720EI, S5700LI, S5700S-LI, S5720LI, S5720S-LI, S6720LI,
S6720S-LI, S5710-X-LI, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S5720SI, and
S5720S-SI use the src-dst-ip in the HASH algorithm for load balancing regardless
of whether you configure this parameter.
On S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E,
S1720X-E, S2750EI, S2720EI, S5700LI, S5700S-LI, S5720LI, S5720S-LI, S6720LI,
S6720S-LI, S5710-X-LI, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S5720SI, and
S5720S-SI, when the load balancing mode of an Eth-Trunk is modified, the
modification takes effect on all Eth-Trunks. The load balancing mode will be set
to the default mode when a new Eth-Trunk is created.
● 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 load
balancing modes 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 of Layer 2 packets is set.


By default, load balancing of Layer 2 packets is 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 of IPv4 packets is set.
By default, load balancing of IPv4 packets is 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 of IPv6 packets is set.
By default, load balancing of IPv6 packets is based on the source IP
address (sip) and destination IP address (dip).

▪ Run mpls field [ 2nd-label | dip | dmac | sip | smac | sport | top-
label | vlan ] *
A load balancing mode of MPLS packets is set.
By default, load balancing of MPLS packets is based on the two outer
labels (top-label and 2nd-label) of each packet.
d. Run quit
Return to the system view.
e. Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 137


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

f. Run load-balance enhanced profile profile-name


The load balancing profile is applied.
NOTE
The preceding load balancing modes apply only to known unicast traffic. To configure
a load balancing mode for unknown unicast traffic, run the unknown-unicast load-
balance { dmac | smac | smacxordmac | enhanced } command in the system view.
Only S5720EI, S5720HI, S6720EI, and S6720S-EI support load balancing for unknown
unicast traffic.

----End

4.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

4.8 Configuring Link Aggregation in LACP Mode

4.8.1 (Optional) Setting the Maximum Number of LAGs and


the Maximum Number of Member Interfaces in Each LAG

Context
Generally, a switch supports a fixed maximum number of LAGs and a fixed
maximum number of member interfaces in each LAG. On the S6720EI 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 }*

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 138


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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.
● When more than 128 Eth-Trunks or 16 member interfaces are configured
using the assign trunk { trunk-group group-number | trunk-member
member-number } * command, the enhanced mode is used for load balance
known unicast packets by default. If the enhanced mode is not used,
problems such as packet loss and uneven load balancing may occur. The
switch load balances non-known unicast packets based on source and
destination MAC addresses by default.
● 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.
– When the configured value of group-number is larger than 128 or the
configured value of member-number is larger than 16, the switch can
only use the enhanced mode to load balance known unicast packets. The
common mode is invalid for the known unicast packets.
● After the Eth-Trunk specifications are modified, save the configuration and
restart the switch to make the modification take effect.
----End

4.8.2 Creating an LAG

Context
Each LAG corresponds to a logical interface, that is, 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.
The value of trunk-id is as follows.
● S1720GFR, S2750EI, S5700LI, S5700S-LI, and S5710-X-LI: 0-63
● S1720GW, S1720GWR, S1720GW-E, S1720GWR-E, S2720EI, S5720SI, S5720LI,
S5720S-LI, and S5720S-SI: 0-119
● S5720EI, S5720HI, S6720EI, and S6720S-EI: 0-127
● S1720X, S1720X-E, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S6720LI, S6720S-
LI: 0-249

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 139


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

On the S6720EI, 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.
If the specified Eth-Trunk already exists, this command directly displays the Eth-
Trunk interface view.

----End

4.8.3 Setting the LACP Mode

Context
Link aggregation can work in manual mode or LACP mode depending on whether
LACP is used.
In LACP mode, you must manually create an Eth-Trunk and add interfaces to the
Eth-Trunk. However, LACP determines active interfaces through negotiation.
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.
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.

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
A working mode of the Eth-Trunk is configured.
By default, an Eth-Trunk works in manual mode.
Before configuring an Eth-Trunk, ensure that both ends use the same working
mode. If the local end works in LACP mode, the remote end must use the LACP
mode.

----End

4.8.4 Adding Member Interfaces to an Eth-Trunk


Context
Before adding member interfaces to an Eth-Trunk, you need to learn about the
configuration notes. See 4.5 Licensing Requirements and Limitations for Link
Aggregation.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 140


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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 be added to the same Eth-
Trunk.

By default, interfaces with different rates are not allowed to be added to


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) Interfaces with different rates are allowed to be added to the
same Eth-Trunk.
i. Run the interface eth-trunk trunk-id command to enter the Eth-
Trunk interface view.
ii. Run the mixed-rate link enable command to allow the device to
add interfaces with different rates to the same Eth-Trunk.
By default, interfaces with different rates are not allowed to be
added to the same Eth-Trunk.
iii. Run the quit command to 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:

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 141


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

– 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

4.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: It is used for improving
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 enter the Down state.

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 device can be
different from that on the remote device. 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 S5720HI, 16 on the S1720X, S1720X-E, S5730SI, S5730S-EI, S6720LI,
S6720S-LI, S6720SI, and S6720S-SI, and 8 on other models.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 142


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

On the S6720EI, 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 configured by the max active-linknumber command 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 the load-distribution active-linknumber-
change 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 S1720GFR, S1720GW, S1720GWR, S1720GW-E,
S1720GWR-E, S2720EI, S2750EI, S5700LI, S5700S-LI, S5710-X-LI, S5720LI, S5720S-
LI, S5720SI, and S5720S-SI support this command.

NOTE

● The load-distribution active-linknumber-change link-number1 to link-number2


command 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 load-distribution active-linknumber-change link-number1 to link-
number2 command with the same value of link-number1 is configured, only the latest
configuration takes effect.
● When an inter-device Eth-Trunk is configured in a 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

4.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.
Different data flows are forwarded on different physical links to implement load
balancing.

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 packets, IP packets, and MPLS packets.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 143


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Load balancing is valid only for outgoing traffic; therefore, the load balancing
modes for the interfaces at both ends of the link can be different and do not
affect each other.
Only the S1720X, S1720X-E, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S5730SI,
S5730S-EI, S5720HI, S5720EI, S6720EI, and S6720S-EI support the enhanced load
balancing mode.
On the S6720EI and S6720S-EI, when more than 16 member interfaces are
configured using the assign trunk { trunk-group group-number | trunk-member
member-number } * command, 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.
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 are 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 is 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. 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 of the Eth-Trunk is set.
The default load balancing mode is src-dst-ip.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 144


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Other load balancing modes are as follows:

▪ dst-ip: based on destination IP addresses

▪ dst-mac: based on destination MAC addresses

▪ src-ip: based on source IP addresses

▪ src-mac: based on source MAC addresses

▪ src-dst-ip: based on the Exclusive-Or result of source and destination


IP addresses

▪ src-dst-mac: based on the Exclusive-Or result of source and


destination MAC addresses
NOTE

The S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E,


S1720X-E, S2750EI, S2720EI, S5700LI, S5700S-LI, S5720LI, S5720S-LI, S6720LI,
S6720S-LI, S5710-X-LI, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S5720SI, and
S5720S-SI use the src-dst-ip in the HASH algorithm for load balancing regardless
of whether you configure this parameter.
On S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E,
S1720X-E, S2750EI, S2720EI, S5700LI, S5700S-LI, S5720LI, S5720S-LI, S6720LI,
S6720S-LI, S5710-X-LI, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S5720SI, and
S5720S-SI, when the load balancing mode of an Eth-Trunk is modified, the
modification takes effect on all Eth-Trunks. The load balancing mode will be set
to the default mode when a new Eth-Trunk is created.
● 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 load
balancing modes 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 of Layer 2 packets is set.


By default, load balancing of Layer 2 packets is 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 of IPv4 packets is set.
By default, load balancing of IPv4 packets is 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 of IPv6 packets is set.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 145


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

By default, load balancing of IPv6 packets is based on the source IP


address (sip) and destination IP address (dip).

▪ Run mpls field [ 2nd-label | dip | dmac | sip | smac | sport | top-
label | vlan ] *
A load balancing mode of MPLS packets is set.
By default, load balancing of MPLS packets is based on the two outer
labels (top-label and 2nd-label) of each packet.
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
The preceding load balancing modes apply only to known unicast traffic. To configure
a load balancing mode for unknown unicast traffic, run the unknown-unicast load-
balance { dmac | smac | smacxordmac | enhanced } command in the system view.
Only S5720EI, S5720HI, S6720EI, and S6720S-EI support load balancing for unknown
unicast traffic.

----End

4.8.7 (Optional) Setting the LACP System Priority

Context
LACP system priority differentiates priorities of devices at both ends. In LACP
mode, active interfaces selected by devices at both ends must be consistent;
otherwise, the LAG cannot be set up. To keep active interfaces consistent at both
ends, you can set the priority of one device to be higher than that of the other
device so that the other device can select active interfaces according to those
selected by the device with a higher priority.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run lacp priority priority
The LACP system priority is set.
A smaller LACP priority value indicates a 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 priority, the end with a smaller MAC address functions as the Actor.

----End

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 146


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

4.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. A smaller priority value indicates a
higher LACP priority.

By default, the system selects active interfaces based on interface priorities.


However, low-speed member interfaces with high priorities may be selected as
active interfaces. 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 priorities may fail to be
selected as active interfaces.

----End

4.8.9 (Optional) Configuring LACP Preemption

Context
The LACP preemption function ensures that the interface with the highest LACP
priority always functions as an active interface. For example, the interface with the
highest priority becomes inactive due to a failure. If LACP preemption is enabled,
the interface becomes active again after it recovers; if LACP preemption is
disabled, the interface cannot become active interface after it recovers.

The LACP preemption delay is the period during which an inactive interface
switches to active. The LACP preemption delay prevents unstable data
transmission on an Eth-Trunk link due to frequent status changes of some links.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 147


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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, a longer preemption delay is used.

----End

4.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.

After the timeout interval at which LACPDUs are received is set, if a local member
interface does not receive any LACPDUs within the configured timeout interval,
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.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 148


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

● 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 discarded.

----End

4.8.11 (Optional) Configuring an Eth-Trunk Member Interface


on a Switch Directly Connected to a Server to Forward
Packets

Context

Figure 4-19 A switch directly connects to a server

Server Switch Gateway File server


Interface1

Interface2

In Figure 4-19, two interfaces of two network adapters on a server are directly
connected to a switch. The switch is configured with an Eth-Trunk in LACP mode.
The process on the server is as follows:
1. The server configures an IP address for Interface1 based the default
configuration during startup, and sends a request to the remote file server
through Interface1 and downloads the configuration file from the remote file
server.
2. After the configuration file is downloaded successfully, the server aggregates
two interfaces according to the configuration file. The server uses the two
interfaces as Eth-Trunk member interfaces to perform LACP negotiation with
the switch.
Before the server obtains the configuration file, Interface1 is an independent
physical interface and is not configured with LACP. As a result, LACP negotiation
on the switch interface fails. The switch does not forward traffic on the Eth-Trunk,
and the server cannot download the configuration file through Interface1. In this
case, the server cannot communicate with the switch.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 149


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

To address this issue, run the lacp force-forward command on the Eth-Trunk of
the switch. The Eth-Trunk member interface in Up state can still forward data
packets even though the remote device is not enabled with LACP.

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


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

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


packets when 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

4.8.12 Verifying the Configuration of Link Aggregation in


LACP 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.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 150


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

● Run the display load-balance-profile [ profile-name ] command to check


the load balancing profile of the Eth-Trunk.

----End

4.9 Associating the Secondary Member Interface of an


Eth-Trunk Interface in LACP Mode with Its Primary
Member Interface

Prerequisites
NOTE

Only the S5720HI supports this configuration.


● Link aggregation in LACP mode has been configured, and 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 4.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 S1720,
S2700, S5700, and S6720 V200R011C10 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.

Context
As shown in Figure 4-20, when no service is bound to the MA, an Eth-Trunk
interface in LACP mode is configured on two devices. interface1 where the MEP
resides is the interface of the Eth-Trunk interface's primary link. Configure
thresholds for the delay and frame loss ratio on interface1. If Y.1731 detects that
the primary link has poor quality, interface1 is triggered to go ETHOAM down. To
ensure that services are not interrupted, associate the secondary member interface
of the Eth-Trunk interface in LACP mode with its primary member interface. The
secondary link then preempts the primary state, implementing an automatic
primary/secondary link switchover.

When the primary link's quality recovers, you can manually enable forcible
switching if no preemption is configured or preemption is enabled but the delay is
not reached.

Figure 4-20 Eth-Trunk interface in LACP mode


Interface1 Interface1
Public
network
Interface2 Interface2
Device1 Device2

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 151


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The primary member interface view of an Eth-Trunk interface's Actor is displayed.
Step 3 Run the following commands to configure an interface based on site
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 secondary member interface view of an Eth-Trunk interface's Actor is
displayed.
Step 6 Run lacp track interface interface-type interface-number priority-reduced value
The secondary member interface is associated with the primary member interface,
and the priority of the secondary 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

4.10 Configuring Preferential Forwarding of Local


Traffic in a Stack

Context
You can configure an Eth-Trunk to preferentially forward local traffic (or not) in
the following scenarios:
● If active interfaces in the local Eth-Trunk have sufficient bandwidth to forward
traffic on the local device, configure the Eth-Trunk to preferentially forward
local traffic, which improves traffic forwarding efficiency and increases
bandwidth use efficiency between stack devices.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 152


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

● If active interfaces in the local Eth-Trunk do not have sufficient bandwidth to


forward traffic on the local device, configure the Eth-Trunk not to
preferentially forward local interface traffic. Some traffic on the local device is
forwarded through member interfaces of an Eth-Trunk on another device. This
prevents packet loss.
NOTE

The S1720GFR, S5700S-28P-LI-AC, and S5700S-52P-LI-AC do not support this configuration.

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

● Create an Eth-Trunk and add physical interfaces to the Eth-Trunk.


● 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.

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
packets, broadcast packets, and multicast packets.

----End

4.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.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 153


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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 S5720EI, S5720HI, S6720EI, and S6720S-EI support the Eth-Trunk sub-interface.

Figure 4-21 Typical application scenario of Layer 2 Eth-Trunk sub-interfaces

VPLS/MPLS/IP
PE1 PE2

Eth-Trunk
Sub-interface
Eth-Trunk

CE1 CE2

S1 S2 S3 S4

VLAN VLAN

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 ranges from 1 to
4096.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 154


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

NOTE

● Only the S6720EI, S6720S-EI, S5720HI, and S5720EI support Ethernet sub-interfaces.
● Only hybrid and trunk interfaces on the preceding switches support 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 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, use the
sub keyword to indicate the IP addresses configured after the first one.

----End

4.12 Configuring an E-Trunk


NOTE

Only the S1720X, S1720X-E, S5720SI, S5720S-SI, S5720EI, S5720HI, S5730SI, S5730S-EI,
S6720LI, S6720S-LI, S6720SI, S6720S-SI, S6720EI, and S6720S-EI support the E-Trunk.

4.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.
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.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 155


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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

----End

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


Context
The E-Trunk priority determines whether an E-Trunk member device is the master
or backup 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 view 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. A smaller priority value indicates a
higher E-Trunk 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

4.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, protocol packets are discarded.

Procedure
Step 1 Run system-view
The system view is displayed.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 156


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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

4.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 device can handle the faults
quickly.

NOTE

Only the S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S5720EI, S5720HI,
S6720EI, and S6720S-EI support this function.

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 fast detect faults of link between the two E-Trunk
member devices.

When a BFD session is bound with E-Trunk, the system does not allow the bound
BFD session to be deleted by default. To delete the bound BFD session, run the
bfd session nonexistent-config-check disable command to disable the device
from checking whether the bound BFD session is deleted.

----End

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 157


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

4.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.
On two E-Trunk member devices, the IDs of the Eth-Trunks added to the E-Trunk
can be different. When adding Eth-Trunks with different IDs in LACP mode on PEs
to an E-Trunk, you must specify remote-eth-trunk so that the E-Trunk can work
normally.

----End

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


Trunk in an E-Trunk
Context
You can configure the working mode for only the 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.
Step 3 Run e-trunk mode { auto | force-master | force-backup }
A working mode of the Eth-Trunk in the E-Trunk is configured.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 158


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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 depends


on 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

During E-Trunk running, changing the hello packet sending interval or timeout interval will
cause the E-Trunk to alternate between the master and the backup. 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

4.12.7 (Optional) Setting the Password for Encrypting Packets

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

You can set a password in plain text or cipher text.


● The plain text password is displayed in plain text in the configuration file.
● The cipher text password is displayed as unidentifiable characters.

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 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 159


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 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

4.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, the back device becomes the master.
The timeout interval is specified in the hello packets sent by the remote device but
not the timeout interval configured on the local device.

NOTE

During E-Trunk running, changing the hello packet sending interval or timeout interval will
cause the E-Trunk to alternate between the master and the backup. 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.

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:

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 160


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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 or more.

----End

4.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. Then the local device becomes the master again.

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 120 seconds.

----End

4.12.10 (Optional) Disabling Revertive Switching on an E-


Trunk

Context
On devices of an E-Trunk, disable revertive switching on the E-Trunk when the
faulty master device recovers to 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

The E-Trunk view is displayed.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 161


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Step 3 Run revert disable


Revertive switching is disabled on the E-Trunk.
By default, revertive switching is enabled on an E-Trunk.

----End

4.12.11 (Optional) Configuring the E-Trunk Sequence Number


Check Function
Context
If the master device in an E-Trunk fails, to prevent an attacker from obtaining the
E-Trunk packet sent by the master device and attacking the backup device, enable
the E-Trunk sequence number check function.

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, the E-Trunk sequence number check function
fails, causing dual master devices in the E-Trunk.

----End

4.12.12 Verifying the E-Trunk Configuration


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

4.13 Maintaining Link Aggregation


Maintenance Item Operation(s)

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 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 162


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Maintenance Item Operation(s)

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.

4.14 Configuration Examples for Link Aggregation

4.14.1 Example for Configuring Link Aggregation in Manual


Mode

Networking Requirements
In Figure 4-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.
SwitchA and SwitchB can provide higher link bandwidth to implement inter-VLAN
communication. Data transmission and link reliability needs to be ensured.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 163


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Figure 4-22 Networking of link aggregation in manual mode

VLAN10 VLAN10

GE0/0/4 GE0/0/1 GE0/0/4


GE0/0/1
SwitchA GE0/0/2 Eth-Trunk GE0/0/2 SwitchB
GE0/0/3 GE0/0/3
GE0/0/5 Eth-Trunk 1 Eth-Trunk 1 GE0/0/5

VLAN20 VLAN20

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 VLAN 10 and VLAN 20. 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

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 164


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

# 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 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

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 165


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

port link-type trunk


port trunk allow-pass vlan 20
#
return

● 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

4.14.2 Example for Configuring Link Aggregation in LACP


Mode

Networking Requirements
In Figure 4-23, 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 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 166


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Figure 4-23 Networking diagram for configuring link aggregation in LACP mode

VLAN 10 VLAN 10

GE0/0/4 GE0/0/1 GE0/0/1 GE0/0/4


SwitchA GE0/0/2 Eth-Trunk GE0/0/2 SwitchB
GE0/0/3 GE0/0/3
GE0/0/5 Eth-Trunk 1 Eth-Trunk 1 GE0/0/5

VLAN 20 VLAN 20

Active link
Backup link

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 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 167


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 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 VLAN 10 and VLAN 20. 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

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 168


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

GigabitEthernet0/0/2 32768 00e0-fca6-7f85 32768 6146 2609 11111100


GigabitEthernet0/0/3 32768 00e0-fca6-7f85 32768 6147 2609 11110000
[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

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 169


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 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
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

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


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

The S1720GFR, S5700S-28P-LI-AC, and S5700S-52P-LI-AC do not support this configuration.

On the network shown in Figure 4-24, Switch3 and Switch4 are connected
through Stack cables to increase the total 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. When the network runs properly, traffic
from VLAN 2 is forwarded through GE1/0/1 and GE1/0/2, and traffic from VLAN 3
is forwarded through GE1/0/1 and GE1/0/2. This increases bandwidth use
efficiency between devices and reduces traffic forwarding efficiency.
To improve traffic forwarding efficiency, traffic from VLAN 2 should be forwarded
through GE1/0/1 and traffic from VLAN 3 should be forwarded through GE1/0/2.
To achieve this goal, configure the Eth-Trunk to preferentially forward local traffic.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 170


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Figure 4-24 Preferentially forwarding traffic through the local member interface

Network

PE
GE1/0/1 GE1/0/2

Eth-Trunk 10

GE1/0/4 GE2/0/4 Stack

Switch3 GE1/0/3 GE2/0/3 Switch4

GE0/0/2 GE0/0/2
Switch1
Switch2
GE0/0/1 GE0/0/1

Stack cable
VLAN 2 data flow
VLAN 3 data flow

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 all VLANs to
pass through.
# Configure the stack.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 171


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 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.
[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
[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

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 172


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

# 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
eth-trunk 10
#
interface GigabitEthernet2/0/4
eth-trunk 10
#
return
● PE configuration file
#
sysname PE
#

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 173


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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

4.15 Troubleshooting Link Aggregation

4.15.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

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 174


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

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.

4.15.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 use different lower thresholds for the
number of active interfaces. If the lower thresholds are different, a larger
value is used.

4.16 FAQ About Link Aggregation

4.16.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.

4.16.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 configured to be
Down, a temporary loop may occur. As a result, services are affected.
2. Run either of the following commands to add the new member interface to
the Eth-Trunk.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 175


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

– 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 at both ends join the Eth-Trunk, run the undo
shutdown command in the interface view to enable the new member
interfaces.

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


1. Run the shutdown command in the interface view to configure the member
interface to be deleted in 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 configure the
member interface to be deleted in Up state.

4.16.4 What Is the Function of the Delay for LACP


Preemption?
When an Eth-Trunk interface in LACP mode goes Up and Down frequently due to
unstable physical links, LACP goes Up and Down accordingly. As a result, services
transmitted on the Eth-Trunk link are affected. After the LACP preemption delay is
set, LACP negotiation is not performed during the delay period. The possibility of
LACP flapping is reduced, and services will not be affected.
You can run the lacp preempt enable command to enable the LACP preemption
function on the current Eth-Trunk interface and run the lacp preempt delay
delay-time command to configure the preemption delay.

4.16.5 Which Switches Are Recommended for Link


Aggregation in FTTx Scenarios of MAN?
In Figure 4-25, users in the FTTx scenario of the MAN often use PPPoE for
Internet access. If switches use link aggregation, when traffic is aggregated, ensure
that PPPoE packets are load balanced. In such scenarios, the S5700EI, S5710EI,
S5720EI, S5700HI, S5710HI, S5720HI, S5730SI, S5730S-EI, S6700EI, S6720EI,
S6720S-EI, S6720SI, S6720S-SI, S6720LI, S6720S-LI are recommended.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 176


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration

Figure 4-25 FTTx scenario of the MAN

Internet

BRAS
Eth-TrunK

Switch

OLT OLT OLT

ONU ONU ONU

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 177

You might also like