01-04 Link Aggregation Configuration
01-04 Link Aggregation Configuration
Switches
Configuration Guide - Ethernet Switching 4 Link Aggregation Configuration
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.
Eth-Trunk not
configured
Eth-Trunk
configured
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.
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.
DeviceA DeviceB
D%
E%
Eth-Trunk
D%+E%=100%
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.
DeviceA DeviceB
Eth-Trunk
DeviceC
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.
DeviceA DeviceB
Eth-Trunk
Eth-Trunk 1 Eth-Trunk 1
Active link
Backup link
Item Description
LACPDU
Active link
Backup link
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.
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.
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.
HASH-KEY 0 1 2 3 4 5 6 7
PORT 1 2 3 4 1 2 3 4
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.
You can use the following load balancing modes according to the actual
networking:
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.
Concepts
● Stack device
DeviceA DeviceA
Eth-Trunk Eth-Trunk
Stack Stack
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.
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
● 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.
In normal situations:
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.
Core
Network
PE-AGG
Eth-Trunk 1
UPE
…… ……
VoIP DATA
IPTV
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.
Figure 4-14 Switches are connected across a transmission device using link
aggregation
Transmission
device
Core site
Transmission
device
Transmission Transmission
device device
Access site 2
Different types of network adapters use different link aggregation configuration. See the
network adapter operation guide.
Network
Eth-Trunk 1
Network
CSS
VLAN 2 VLAN 3
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.
PE1
Eth-Trunk10
Eth-Trunk20
E-Trunk1 Internet
CE1
Eth-Trunk10
PE2
Loopback1
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
Scenario Task
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
S2710SI V100R006(C03&C05)
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
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.
● 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.
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.
● Manual
● LACP
You can use the following load balancing modes based on actual networking:
Parameter Value
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 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.
● After the Eth-Trunk specifications are modified, save the configuration and
restart the switch to make the modification take effect.
----End
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
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.
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
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
----End
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.
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
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
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
NOTE
▪ 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.
----End
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
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.
● After the Eth-Trunk specifications are modified, save the configuration and
restart the switch to make the modification take effect.
----End
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
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
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
Interfaces with different rates are allowed to be added to the same Eth-
Trunk.
NOTE
----End
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 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.
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.
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 threshold for the number of active interfaces must be greater than or
equal to the lower threshold for the number of active interfaces.
NOTE
----End
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
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.
▪ 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
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
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
By default, the LACP interface priority is 32768. A smaller priority value indicates a
higher LACP priority.
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
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.
Procedure
Step 1 Run system-view
----End
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
● 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
Context
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.
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
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
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.
----End
Prerequisites
NOTE
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.
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
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.
Pre-configuration Tasks
Before configuring an Eth-Trunk to preferentially forward local traffic, complete
the following tasks:
Procedure
Step 1 Run system-view
NOTE
This function is only valid for known unicast packets, and is invalid for unknown unicast
packets, broadcast packets, and multicast packets.
----End
Context
If Layer 2 switching devices belong to different VLANs, and hosts in the VLANs
need to communicate with each other, you need to create sub-interfaces on the
Eth-Trunk connecting a Layer 3 device to a Layer 2 switching device, bind a VLAN
to each sub-interface, and configure an IP address for each sub-interface.
After the configuration is complete, hosts in the VLANs can use these sub-
interfaces to communicate with each other. Eth-Trunk sub-interfaces can be
configured to terminate Dot1q and QinQ VLAN tags.
After Layer 2 Eth-Trunk sub-interfaces are configured, the Eth-Trunk provides Layer
2 functions and the sub-interfaces provide Layer 3 functions.
NOTE
Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support the Eth-Trunk sub-interface.
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.
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.
----End
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.
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.
The master and backup devices in an E-Trunk must use the same LACP priority.
----End
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
Procedure
Step 1 Run system-view
The system view is displayed.
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
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
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
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
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.
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.
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
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.
Procedure
Step 1 Run system-view
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
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
By default, the value of hello-times is 10. The unit is 100 ms, so the default
interval is 1s.
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 default time multiplier is 20. It is recommended that you set the time
multiplier to 3 or more.
----End
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
----End
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
----End
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
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.
VLAN10 VLAN10
VLAN20 VLAN20
Configuration Roadmap
The configuration roadmap is as follows:
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
# 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
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
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
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.
Figure 4-23 Networking diagram for configuring link aggregation in LACP mode
VLAN 10 VLAN 10
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
[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
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 32768 00e0-fca6-7f85 32768 6145 2609 11111100
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
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.
Figure 4-24 Preferentially forwarding traffic through the local member interface
Network
PE
GE1/0/1 GE1/0/2
Eth-Trunk 10
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.
<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
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
# 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
# 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
----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
#
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
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
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.
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.
Internet
BRAS
Eth-TrunK
Switch