Professional Documents
Culture Documents
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration
● Increased bandwidth
The maximum bandwidth of the link aggregation interface is the sum of the
bandwidth of member interfaces.
● Higher reliability
When an active link fails, traffic on this active link is switched to another
active link, improving reliability of the link aggregation interface.
● Load balancing
In a link aggregation group (LAG), traffic is load balanced among active links
of member interfaces.
Figure 3-2 Relationship of the LAG, LAG interface, member interface, and member
link
NOTE
The upper threshold for the number of active interfaces is inapplicable to the manual load
balancing mode.
Basic Concepts
● LACP system priority
LACP system priorities determine the sequence in which devices at two ends
of an Eth-Trunk select active interfaces to join a LAG. In order for a LAG to be
established, both devices must select the same interfaces as active interfaces.
To achieve this, one device (with a higher priority) is responsible for selecting
the active interfaces. The other device (with a lower priority) then selects the
same interfaces as active interfaces. In priority comparisons, numerically
lower values have higher priority.
● LACP interface priority
LACP interface priorities affect which interfaces of an Eth-Trunk are selected
as active interfaces. A smaller numerical value represents a higher priority.
The interfaces with the highest LACP interface priority become active
interfaces.
● M:N backup of member interfaces
LACP mode is also called M:N mode, where M refers to the number of active
links and N refers to the number of backup links. This mode guarantees high
reliability and allows traffic to be load balanced among M active links.
In Figure 3-4, M+N links with the same attributes (in the same LAG) are set
up between two devices. When data is transmitted over the aggregated link,
traffic is load balanced among M active links, with no data transmitted over N
backup links. Therefore, the actual bandwidth of the aggregated link is the
sum of the M links' bandwidth, and the maximum bandwidth of the
aggregated link is the sum of the (M+N) links' bandwidth.
If one of the M links fails, LACP selects an available link with a higher priority
from the N backup links to replace the faulty link. The actual bandwidth of
the aggregated link is still the sum of M links' bandwidth, but the maximum
bandwidth of the aggregated link is the sum of the (M+N-1) links' bandwidth.
NOTE
To learn more information about the format of the LACPDU, use Packet Format Query Tool.
Figure 3-6 Selecting the Actor and active links in LACP mode
In Figure 3-7, Port 1, Port 2, and Port 3 are member interfaces of an Eth-Trunk;
DeviceA acts as the Actor; the upper threshold for the number of active interfaces
is 2; LACP priorities of Port 1, Port 2, and Port 3 are 10, 20, and 30 respectively.
When LACP negotiation is complete, Port 1 and Port 2 are selected as active
interfaces because their LACP priorities are higher, and Port 3 is used as the
backup interface.
● Port 1 becomes faulty, causing Port3 to take its place and transmit traffic.
When Port 1 recovers, if LACP preemption is not enabled on the Eth-Trunk,
Port 1 remains in backup state. If LACP preemption is enabled on the Eth-
Trunk, after Port1 recovers, it becomes active again due to having a higher
priority than Port3, which reverts to being the backup interface.
● With LACP preemption enabled, setting a higher LACP priority for Port 3 will
allow it to replace Port 1 or Port 2 as an active interface without either of
them first becoming faulty. If LACP preemption is not enabled, the system
does not re-select active interfaces even if the priority of a backup interface is
set higher than that of an active interface.
LACP preemption delay
The LACP preemption delay is the time a backup link waits before becoming the
active link after an active link becomes faulty. The LACP preemption delay is used
to prevent unstable data transmission over an Eth-Trunk link caused by frequent
status changes of member links.
In Figure 3-7, Port 1 becomes inactive due to a link fault, which then recovers. If
LACP preemption is enabled and the LACP preemption delay is set, Port 1
becomes active again only after the LACP preemption delay.
Switchover between active and inactive links
In LACP mode, a link switchover in a LAG is triggered if a device at one end
detects one of the following events:
● An active link goes Down.
● Ethernet OAM detects a link fault.
● LACP detects a link fault.
● An active interface becomes unavailable.
● When LACP preemption is enabled, a backup interface becomes the active
interface as soon as its priority is changed to be higher than that of the
current active interface.
When any of the preceding events occurs, LACP takes effect with the following
sequence of events:
1. Shuts down the faulty link.
2. Selects the backup link with the highest priority among N backup links to
replace the faulty active link.
3. The backup link with the highest priority becomes the active link and begins
forwarding data.
Table 3-1 Comparison between the manual mode and LACP mode
Item Manual Mode LACP Mode
Fault This mode can only detect This mode can detect member link
detection member link disconnections, link layer faults,
disconnections. and incorrect link connections.
balancing ensures that data is transmitted in the correct sequence, but cannot
ensure efficient bandwidth usage.
Traffic Forwarding
In Figure 3-8, an Eth-Trunk is located at the data link layer, between the MAC
address and LLC sub-layers.
The Eth-Trunk module maintains a forwarding table that consists of the following
fields:
● Hash key
The hash key is calculated through the hash algorithm based on the MAC
address or IP address in a data frame.
● Interface number
Eth-Trunk forwarding entries are limited by the maximum number of member
interfaces in an Eth-Trunk. Different hash keys map to different outbound
interfaces.
For example, an Eth-Trunk supports a maximum of eight member interfaces.
If physical interfaces 1, 2, 3, and 4 are bundled into an Eth-Trunk, the Eth-
Trunk forwarding table contains eight entries, as shown in Figure 3-9. In the
Eth-Trunk forwarding table, hash keys are 0, 1, 2, 3, 4, 5, 6, and 7, and the
corresponding interface numbers are 1, 2, 3, 4, 1, 2, 3, and 4.
The Eth-Trunk module uses the Eth-Trunk forwarding table to forward data frames
according to the following process:
1. The Eth-Trunk module receives a packet from the MAC sub-layer, and then
extracts its source MAC address/IP address or destination MAC address/IP
address.
2. The Eth-Trunk module calculates the hash key using the hash algorithm.
3. Based on the hash key, the Eth-Trunk module searches for the interface
number in the Eth-Trunk forwarding table, and then sends the data frame
from the corresponding interface.
After the Eth-Trunk in the stack is configured to preferentially forward local traffic,
the following functions are implemented:
● Local device forwards traffic it receives
When there are outbound interfaces of the Eth-Trunk on DeviceB and these
interfaces are functioning properly, the Eth-Trunk forwarding table of DeviceB
contains only local member interfaces as outbound interfaces. The hash
algorithm is used to select one of these local member interfaces, and traffic is
only forwarded through DeviceB.
● Another device forwards traffic received by local device
When there are no outbound interfaces of the Eth-Trunk on DeviceB or these
interfaces are faulty, the Eth-Trunk forwarding table of DeviceB contains all
available member interfaces (including those on other devices). The hash
algorithm is used to select a member interface on DeviceC as the outbound
interface, and traffic is forwarded through DeviceC.
NOTE
● This function is only valid for known unicast packets, and is invalid for unknown unicast
packets, broadcast packets, and multicast packets.
● Before configuring an Eth-Trunk to preferentially forward local traffic, ensure that
member interfaces of the local Eth-Trunk have sufficient bandwidth to forward local
traffic; otherwise, traffic may be discarded.
3.2.7 E-Trunk
Enhanced Trunk (E-Trunk) is an extension of the Link Aggregation Control Protocol
(LACP). E-Trunk controls and implements link aggregation among multiple
devices, whereas LACP does so for just one device. While LACP can guarantee
reliability when a card fails, E-Trunk does so even when a device fails.
E-Trunk is suitable to scenarios where a CE is dual-homed to a network. In this
scenario, E-Trunk can be used to protect PEs and links between the CE and PEs. In
Figure 3-12, without E-Trunk, a CE can be connected through an Eth-Trunk link to
only one PE. If the Eth-Trunk or PE fails, the CE cannot communicate with the PE.
By using E-Trunk, the CE can be dual-homed to PEs, providing device-level
protection.
NOTE
E-Trunk is supported by only the following models: S5720I-SI, S5735-S, S5735S-S, S5735-S-I,
S5735S-H, S5736-S, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S.
Basic Concepts
Table 3-2 describes the basic concepts of E-Trunk.
E-Trunk Constraints
Using Figure 3-13 as an example, to improve reliability of links between the CE
and PEs and guarantee that traffic is properly switched between these links, pay
attention to the following points:
● The configurations at both ends of the E-Trunk link must be consistent. The
Eth-Trunks linked directly to the PEs and the CE must be configured with the
same working rate and duplex mode so that both Eth-Trunks have the same
hash key and join the same E-Trunk. After the Eth-Trunks are added to the E-
Trunk, both PEs must contain the same LACP system priorities and IDs. The
interfaces connecting the CE to PE1 and PE2 must be added to the same Eth-
Trunk. The Eth-Trunk on the CE can have a different ID from that of the PEs.
For example, the CE is configured with Eth-Trunk 1, and both PEs are
configured with Eth-Trunk 10.
● To ensure Layer 3 connectivity, the IP address of the local PE must be the
same as the local address of the remote PE and vice versa. Therefore, it is
recommended that the addresses of the PEs are configured as loopback
interface addresses.
● The two PEs must be configured with the same security key, if necessary.
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 3-15 Switches are connected across a transmission device using link
aggregation
Figure 3-16 Switches are connected to transmission devices using link aggregation
Different types of network adapters use different link aggregation configurations. For details,
refer to the network adapter operation guide.
E-Trunk is supported by only the following models: S5720I-SI, S5735-S, S5735S-S, S5735-S-I,
S5735S-H, S5736-S, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S.
As shown in Figure 3-19, the Enhanced Trunk (E-Trunk) protects the links between
CE1 and two PEs (PE1 and PE2) on the network. CE1 is connected to PE1 and PE2
using two Eth-Trunks in LACP mode. The two Eth-Trunks form an E-Trunk to
implement backup and enhance the network reliability.
Scenario Task
Licensing Requirements
Ethernet link aggregation is a basic feature of a switch and is not under license
control.
NOTE
To view detailed information about software mappings, visit Info-Finder, select a product
series or product model, and click Hardware Center.
The S5731-L and S5731S-L are remote units and do not support web-based management,
YANG, or commands. They can be configured only through configuration delivery by the
central device. For details, see "Simplified Architecture Configuration (the Solar System
Solution)" in the S300, S500, S2700, S5700, and S6700 V200R021C10 Configuration Guide -
Device Management.
Scenario Precautions
Switches are connected ● The switches at both ends must use link
across a transmission aggregation in LACP mode.
device ● The transmission device between the switches
must be configured to transparently transmit
LACPDUs.
Context
Generally, a switch supports a fixed maximum number of LAGs and a fixed
maximum number of member interfaces in each LAG. On the S5731-H, S5731-S,
S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, S6730S-S, S6735-S,
S6720-EI, and S6720S-EI, you can run the assign trunk command to set the
maximum number of LAGs and the maximum number of member interfaces in
each LAG, implementing flexible networking and meeting various service
requirements.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run assign trunk { trunk-group group-number | trunk-member member-
number }*
The maximum number of LAGs and the maximum number of member interfaces
in each LAG are set.
By default, the device supports a maximum of 128 LAGs and 8 member interfaces
in each LAG. member-number can be 8, 16, 32, or 64, and member-number
multiplied by group-number cannot exceed 2048 on the S6735-S, S6720-EI and
S6720S-EI. member-number multiplied by group-number cannot exceed 8192 on
the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-
S, and S6730S-S.
----End
● By default, if the value of member-number configured for an Eth-Trunk using the assign
trunk { trunk-group group-number | trunk-member member-number }* command is
larger than 16 on the S6735-S, S6720-EI and S6720S-EI or larger than 32 on the S5731-
H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, and S6730S-S,
known unicast packets are load balanced using the enhanced mode, and broadcast,
unknown-unicast, and multicast (BUM) packets are load balanced based on their source
and destination MAC addresses. Known unicast packets must be load balanced using
the enhanced mode (the load balancing mode can be configured using the load-
balance command). Otherwise, packet loss or uneven load balancing may occur.
● After the Eth-Trunk specifications are modified, save the configuration and restart the
switch to make the modification take effect.
● If you use the assign trunk command to modify Eth-Trunk specifications, the existing
Eth-Trunk configuration will become invalid or be lost. Exercise caution when you run
the assign trunk command. When the configured Eth-Trunk specifications are reduced
and the Eth-Trunks that exceed the specifications are configured, the configuration of
excess Eth-Trunks is invalid.
Run the display trunk configuration command in any view to check the default
specifications of the maximum number of Eth-Trunks that are supported and
maximum number of member interfaces in each Eth-Trunk, current specifications,
and configured specifications.
Context
Each LAG has one logical interface, that is, an Eth-Trunk. Before configuring link
aggregation, create an Eth-Trunk.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
An Eth-Trunk is created and the Eth-Trunk interface view is displayed.
If the specified Eth-Trunk already exists, this command directly displays the Eth-
Trunk interface view.
trunk-id defines the Eth-Trunk ID. The following is the value range of trunk-id for
different models:
● S2720-EI, S5720I-SI, S5720-LI, and S5720S-LI: 0-119
● S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S2730S-S, S5735-L-I, S5735-
L1,S300, S5735-L, S5735S-L, S5735S-L1, S5735S-L-M, S5735-S, S500, S5735-S-
I, S5735S-S, S6735-S, S6720-EI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and
S6730S-S: 0-127
● S5735S-H and S5736-S: 0-249
On the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H,
S6730-S, S6730S-S, S6735-S, S6720-EI, and S6720S-EI, you can run the assign
trunk command to set the value, and run the display trunk configuration
command to check the configuration.
----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.
Step 3 Run mode manual load-balance
The Eth-Trunk is configured to work in manual mode.
By default, an Eth-Trunk works in manual mode.
Before configuring an Eth-Trunk, ensure that both devices use the same working
mode.
NOTE
If an Eth-Trunk interface has member interfaces, you can switch the Eth-Trunk interface's
working mode between manual mode and LACP mode. However, if the Eth-Trunk interface
is added to an E-Trunk, you cannot change its working mode.
----End
Procedure
● Add member interfaces to an Eth-Trunk in the Eth-Trunk interface view.
a. Run system-view
NOTE
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 and
those of different data flows are forwarded on different physical links.
You can configure a common load balancing mode in which IP addresses or MAC
addresses of packets are used to load balance packets; you can also configure an
enhanced load balancing mode for Layer 2, IP, and MPLS packets.
Load balancing is valid only for outgoing traffic; therefore, the load balancing
modes for the interfaces at both ends of a link can be different and do not affect
each other.
If an incorrect load balancing mode is configured, traffic will be unevenly load
balanced among Eth-Trunk member interfaces. The following restrictions apply
when configuring a load balancing mode:
● In practical services, you need to configure a proper load balancing mode
based on traffic characteristics. When a parameter of traffic changes
frequently, you can set the load balancing mode based on this parameter to
ensure that the traffic load is balanced evenly. For example, if IP addresses in
packets change frequently, use the load balancing mode based on dst-ip, src-
ip, or src-dst-ip so that traffic can be properly load balanced among physical
links. If MAC addresses in packets change frequently and IP addresses are
fixed, use the load balancing mode based on dst-mac, src-mac, or src-dst-
mac so that traffic can be properly load balanced among physical links.
● If the majority of service traffic is MPLS packets, you need to set the
enhanced load balancing mode. You can run the mpls field command in the
load balancing profile view to configure the load balancing mode of MPLS
packets.
● On a network where an Eth-Trunk and a stack are configured, if the local-
preference enable command is run to configure an Eth-Trunk interface to
preferentially forward local traffic, traffic arriving at the local device is
preferentially forwarded through Eth-Trunk member interfaces of the local
device. This function is enabled by default. If there is no Eth-Trunk member
interface on the local device, traffic is forwarded through Eth-Trunk member
interfaces on another device. This forwarding mode effectively saves
bandwidth resources of member devices in the stack and improves traffic
forwarding efficiency.
Procedure
● Configure a common load balancing mode.
a. Run system-view
NOTE
The S2720-EI, S5720I-SI, S5720-LI, S5720S-LI, S5735S-H, S5736-S use the src-dst-
ip, source TCP or UDP port number, and destination TCP or UDP port number in
the hash algorithm for load balancing regardless of whether you configure this
parameter.
The S2720-EI, S5720I-SI, S5720-LI, S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L,
S5735S-L, S5735S-L1, S5735S-L-M, S5720S-LI, S5735-S, S500, S5735S-S, S5735-S-
I, S5735S-H, S5736-S support only one load balancing mode globally. If the load
balancing mode of an Eth-Trunk is modified, the modification takes effect on all
Eth-Trunks. If an Eth-Trunk is created, the load balancing mode of the Eth-Trunk
is the same as that of the original Eth-Trunks on the switch.
● Configure an enhanced load balancing mode.
a. Run system-view
A load balancing profile is created and its view is displayed. Only one
load balancing profile can be created.
NOTE
● If the value of member-number configured for an Eth-Trunk using the assign trunk
{ trunk-group group-number | trunk-member member-number }* command is
larger than 16 on the S6735-S, S6720-EI and S6720S-EI or larger than 32 on the
S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S,
and S6730S-S, only the enhanced mode can be used for load balancing. If the
enhanced mode is not used, problems such as packet loss and uneven load
balancing may occur.
● Enhanced load balancing is only supported by the following models: S5735S-H,
S5736-S, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S.
● The preceding load balancing modes apply only to known unicast traffic. To
configure a load balancing mode for broadcast, unknown-unicast, and multicast
(BUM) traffic, run the unknown-unicast load-balance { dmac | smac |
smacxordmac | enhanced [ lbid ] } command in the system view. Load balancing
for BUM traffic is only supported by the following models: S5731-H, S5731-S,
S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI, S6720S-EI, S6730-H, S6730S-H,
S6730-S, and S6730S-S. Only the S6735-S, S6720-EI and S6720S-EI support the
lbid parameter.
----End
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 S5731-H, S5731-S,
S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, S6730S-S, S6735-S,
S6720-EI, and S6720S-EI, you can run the assign trunk command to set the
maximum number of LAGs and the maximum number of member interfaces in
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run assign trunk { trunk-group group-number | trunk-member member-
number }*
The maximum number of LAGs and the maximum number of member interfaces
in each LAG are set.
By default, the device supports a maximum of 128 LAGs and 8 member interfaces
in each LAG. member-number can be 8, 16, 32, or 64, and member-number
multiplied by group-number cannot exceed 2048 on the S6735-S, S6720-EI and
S6720S-EI. member-number multiplied by group-number cannot exceed 8192 on
the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-
S, and S6730S-S.
----End
● By default, if the value of member-number configured for an Eth-Trunk using the assign
trunk { trunk-group group-number | trunk-member member-number }* command is
larger than 16 on the S6735-S, S6720-EI and S6720S-EI or larger than 32 on the S5731-
H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S, and S6730S-S,
known unicast packets are load balanced using the enhanced mode, and broadcast,
unknown-unicast, and multicast (BUM) packets are load balanced based on their source
and destination MAC addresses. Known unicast packets must be load balanced using
the enhanced mode (the load balancing mode can be configured using the load-
balance command). Otherwise, packet loss or uneven load balancing may occur.
● After the Eth-Trunk specifications are modified, save the configuration and restart the
switch to make the modification take effect.
● If you use the assign trunk command to modify Eth-Trunk specifications, the existing
Eth-Trunk configuration will become invalid or be lost. Exercise caution when you run
the assign trunk command. When the configured Eth-Trunk specifications are reduced
and the Eth-Trunks that exceed the specifications are configured, the configuration of
excess Eth-Trunks is invalid.
Run the display trunk configuration command in any view to check the default
specifications of the maximum number of Eth-Trunks that are supported and
maximum number of member interfaces in each Eth-Trunk, current specifications,
and configured specifications.
Context
Each LAG has one logical interface, that is, an Eth-Trunk. Before configuring link
aggregation, create an Eth-Trunk.
Procedure
Step 1 Run system-view
If the specified Eth-Trunk already exists, this command directly displays the Eth-
Trunk interface view.
trunk-id defines the Eth-Trunk ID. The following is the value range of trunk-id for
different models:
● S2720-EI, S5720I-SI, S5720-LI, and S5720S-LI: 0-119
● S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S2730S-S, S5735-L-I, S5735-
L1,S300, S5735-L, S5735S-L, S5735S-L1, S5735S-L-M, S5735-S, S500, S5735-S-
I, S5735S-S, S6735-S, S6720-EI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and
S6730S-S: 0-127
● S5735S-H and S5736-S: 0-249
----End
Context
In LACP mode, you must manually create an Eth-Trunk and add interfaces to the
Eth-Trunk. However, active interfaces are selected through LACP negotiation,
which is flexible.
Procedure
Step 1 Run system-view
Before configuring an Eth-Trunk, ensure that both devices use the same working
mode.
If an Eth-Trunk interface has member interfaces, you can switch the Eth-Trunk
interface's working mode between manual mode and LACP mode. However, if the
Eth-Trunk interface is added to an E-Trunk, you cannot change its working mode.
----End
Configuration Tips
To delete existing member interfaces, run the undo eth-trunk command in the
interface view or the undo trunkport interface-type interface-number command
in the Eth-Trunk interface view.
Procedure
● Add member interfaces to an Eth-Trunk in the Eth-Trunk interface view.
a. Run system-view
The system view is displayed.
b. Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
c. (Optional) Run mixed-rate link enable
Interfaces with different rates are allowed to join the same Eth-Trunk.
By default, interfaces with different rates are not allowed to join the
same Eth-Trunk.
d. Run trunkport interface-type { interface-number1 [ to interface-
number2 ] } &<1-8> [ mode { active | passive } ]
A member interface is added to the Eth-Trunk.
NOTE
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.
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 and
those of different data flows are forwarded on different physical links.
You can configure a common load balancing mode in which IP addresses or MAC
addresses of packets are used to load balance packets; you can also configure an
enhanced load balancing mode for Layer 2, IP, and MPLS packets.
Load balancing is valid only for outgoing traffic; therefore, the load balancing
modes for the interfaces at both ends of a link can be different and do not affect
each other.
If an incorrect load balancing mode is configured, traffic will be unevenly load
balanced among Eth-Trunk member interfaces. The following restrictions apply
when configuring a load balancing mode:
● In practical services, you need to configure a proper load balancing mode
based on traffic characteristics. When a parameter of traffic changes
frequently, you can set the load balancing mode based on this parameter to
ensure that the traffic load is balanced evenly. For example, if IP addresses in
packets change frequently, use the load balancing mode based on dst-ip, src-
ip, or src-dst-ip so that traffic can be properly load balanced among physical
links. If MAC addresses in packets change frequently and IP addresses are
fixed, use the load balancing mode based on dst-mac, src-mac, or src-dst-
mac so that traffic can be properly load balanced among physical links.
● If the majority of service traffic is MPLS packets, you need to set the
enhanced load balancing mode. You can run the mpls field command in the
load balancing profile view to configure the load balancing mode of MPLS
packets.
● On a network where an Eth-Trunk and a stack are configured, if the local-
preference enable command is run to configure an Eth-Trunk interface to
Procedure
● Configure a common load balancing mode.
a. Run system-view
The system view is displayed.
b. Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
c. Run load-balance { dst-ip | dst-mac | src-ip | src-mac | src-dst-ip | src-
dst-mac }
A load balancing mode is configured for the Eth-Trunk interface.
By default, the switch load balances packets based on src-dst-ip.
NOTE
The S2720-EI, S5720I-SI, S5720-LI, S5720S-LI, S5735S-H, S5736-S use the src-dst-
ip, source TCP or UDP port number, and destination TCP or UDP port number in
the hash algorithm for load balancing regardless of whether you configure this
parameter.
The S2720-EI, S5720I-SI, S5720-LI, S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L,
S5735S-L, S5735S-L1, S5735S-L-M, S5720S-LI, S5735-S, S500, S5735S-S, S5735-S-
I, S5735S-H, S5736-S support only one load balancing mode globally. If the load
balancing mode of an Eth-Trunk is modified, the modification takes effect on all
Eth-Trunks. If an Eth-Trunk is created, the load balancing mode of the Eth-Trunk
is the same as that of the original Eth-Trunks on the switch.
● Configure an enhanced load balancing mode.
a. Run system-view
The system view is displayed.
b. Run load-balance-profile profile-name
A load balancing profile is created and its view is displayed. Only one
load balancing profile can be created.
c. Run the following commands as required. You can configure a load
balancing mode for Layer 2 packets, IPv4 packets, IPv6 packets, and
MPLS packets respectively.
● If the value of member-number configured for an Eth-Trunk using the assign trunk
{ trunk-group group-number | trunk-member member-number }* command is
larger than 16 on the S6735-S, S6720-EI and S6720S-EI or larger than 32 on the
S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S,
and S6730S-S, only the enhanced mode can be used for load balancing. If the
enhanced mode is not used, problems such as packet loss and uneven load
balancing may occur.
● Enhanced load balancing is only supported by the following models: S5735S-H,
S5736-S, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S.
● The preceding load balancing modes apply only to known unicast traffic. To
configure a load balancing mode for broadcast, unknown-unicast, and multicast
(BUM) traffic, run the unknown-unicast load-balance { dmac | smac |
smacxordmac | enhanced [ lbid ] } command in the system view. Load balancing
for BUM traffic is only supported by the following models: S5731-H, S5731-S,
S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI, S6720S-EI, S6730-H, S6730S-H,
S6730-S, and S6730S-S. Only the S6735-S, S6720-EI and S6720S-EI support the
lbid parameter.
----End
Context
LACP system priorities determine the sequence in which devices at two ends of an
Eth-Trunk select active interfaces to join a LAG.
In order for a LAG to be established, both devices must select the same interfaces
as active interfaces. To achieve this, one device (with a higher priority) is
responsible for selecting the active interfaces. The other device (with a lower
priority) then selects the same interfaces as active interfaces.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run lacp priority priority
The LACP system priority is set.
In priority comparisons, numerically lower values have higher priority. By default,
the LACP system priority is 32768.
The end with a smaller priority value functions as the Actor. If the two ends have
the same LACP system priority, the end with a smaller MAC address functions as
the Actor.
----End
Context
In LACP mode, LACP interface priorities are set to prioritize interfaces of the same
device. Interfaces with higher priorities are selected as active interfaces.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The member interface view is displayed.
Step 3 Run lacp priority priority
The LACP priority of the member interface is configured.
By default, the LACP interface priority is 32768. In priority comparisons,
numerically lower values have higher priority.
By default, the system selects active interfaces based on interface priorities. This
may lead to low-speed member interfaces with high priorities being selected as
NOTE
If the max active-linknumber link-number command is run in the Eth-Trunk interface view,
you need to run the lacp preempt enable command to enable LACP preemption on the
current Eth-Trunk interface. Otherwise, interfaces with high LACP interface priorities may
fail to be selected as active interfaces.
----End
Context
The LACP preemption function ensures that the interface with the highest LACP
priority will return to functioning as an active interface after recovering from a
fault. If LACP preemption is disabled, the interface cannot become active interface
after it recovers.
The LACP preemption delay is the period that an inactive interface waits before
changing to the active interface. The LACP preemption delay reduces the chances
of instable data transmission on an Eth-Trunk due to frequent status changes of
some links.
Procedure
Step 1 Run system-view
----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.
Step 3 Run lacp timeout { fast [ user-defined user-defined ] | slow }
The timeout interval at which LACPDUs are received is set.
By default, the timeout interval at which an Eth-Trunk receives LACPDUs is 90
seconds.
● After you run the lacp timeout command, the local end notifies the remote
end of the timeout interval by sending LACPDUs. When fast is specified, the
interval for sending LACPDUs is 1 second. When slow is specified, the interval
for sending LACPDUs is 30 seconds.
● The timeout interval for receiving LACPDUs is three times the interval for
sending LACPDUs. When fast is specified, the timeout interval for receiving
LACPDUs is 3 seconds. When slow is specified, the timeout interval for
receiving LACPDUs is 90 seconds.
● You can use different modes of the timeout interval at the two ends.
However, to facilitate maintenance, you are advised to use the same mode at
both ends.
● Each member interface in an Eth-Trunk processes a maximum of 20 LACPDUs
every second; a switch processes a maximum of 100 LACPDUs every second.
Extra LACPDUs are dropped.
----End
Context
A switch uses an Eth-Trunk in LACP mode to directly connect to a server. Before
the server obtains a configuration file, negotiation fails at the two ends because
the directly connected interface in LACP. To address this issue, configure an Eth-
Trunk member interface in Up state to forward data packets if the remote
interface does not join the Eth-Trunk.
Procedure
Step 1 Run system-view
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.
● Run the display load-balance-profile [ profile-name ] command to check
the load balancing profile of the Eth-Trunk.
----End
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6730-H, S6730S-H, S6730-S,
and S6730S-S support this configuration.
Prerequisites
● Link aggregation in LACP mode has been configured, the maximum number
of active links at both ends is 1, and two member interfaces have been added
to the Eth-Trunk at both ends. For details, see 3.8 Configuring Link
Aggregation in LACP Mode.
● Basic Y.1731 configurations have been completed, including the Maintenance
Association (MA), Maintenance Domain (MD), Maintenance Association End
Point (MEP), and test instance. For details, see Y.1731 Configuration in S300,
S500, S2700, S5700, and S6700 V200R021C10 Configuration Guide -
Reliability. In this scenario, note the following points:
– The map vlan vlan-id command cannot be used to bind an MA to a
VLAN.
– Only the outward-facing MEP can be created.
Procedure
Step 1 Run system-view
Step 3 Run one of following commands to configure the interface according to your
network requirements:
1. Run delay-measure two-way { delay-threshold | variation-threshold } test-
id test-id trigger if-down
The backup member interface is associated with the primary member interface,
and the priority of the backup member interface is dynamically changed.
When the primary link's quality recovers, run the lacp force-switch command in
the Eth-Trunk interface view to enable forcible switching if no preemption is
configured or preemption is enabled but the delay is not reached.
----End
NOTE
Pre-configuration Tasks
Before configuring an Eth-Trunk to preferentially forward local traffic, complete
the following tasks:
● 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
NOTE
This operation is not required on the S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L, S5735S-
L, S5735S-L1, S5735S-L-M, S5735-S, S500, and S5735S-S.
NOTE
This function is only valid for known unicast packets, and is invalid for unknown unicast,
broadcast, and multicast packets.
----End
After the configuration is complete, hosts in the VLANs can use these sub-
interfaces to communicate with each other. Eth-Trunk sub-interfaces can be
configured to terminate Dot1q and QinQ VLAN tags.
After Layer 2 Eth-Trunk sub-interfaces are configured, the Eth-Trunk provides Layer
2 functions and the sub-interfaces provide Layer 3 functions.
NOTE
Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI, S6720S-EI,
S6730-H, S6730S-H, S6730-S, and S6730S-S support Eth-Trunk sub-interfaces.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
An Eth-Trunk is created and the Eth-Trunk interface view is displayed.
Step 3 Run quit
The system view is displayed.
Step 4 Run interface eth-trunk trunk-id.subnumber
An Eth-Trunk sub-interface is created.
subnumber specifies the number of a sub-interface. The value is in the range 1 to
4096.
NOTE
● Only the S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI, S6720S-
EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support Ethernet sub-interfaces.
● Only hybrid and trunk interfaces on the preceding switches support Layer 2 Ethernet
sub-interface configuration.
● After you run the undo portswitch command to switch Layer 2 interfaces on the
preceding series of switches into Layer 3 interfaces, you can configure Layer 3 Ethernet
sub-interfaces on the interfaces.
● After an interface is added to an Eth-Trunk, sub-interfaces cannot be configured on the
interface.
● VLAN termination sub-interfaces cannot be created on a VCMP client.
----End
NOTE
E-Trunk is supported by only the following models: S5720I-SI, S5735-S, S5735S-S, S5735-S-I,
S5735S-H, S5736-S, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S, S6720-EI,
S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S.
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.
The master and backup devices in an E-Trunk must use the same LACP priority.
----End
Context
The E-Trunk priority determines the master or backup role of an E-Trunk member
device.
Procedure
Step 1 Run system-view
An E-Trunk is created and the E-Trunk view is displayed, or the view of an existing
E-Trunk is directly displayed.
The member devices in an E-Trunk must be configured with the same E-Trunk ID.
The E-Trunk priority is used for master/backup negotiation between two devices.
The device with a higher priority is the master. In priority comparisons, numerically
lower values have higher priority.
If the two devices have the same priority, the device with a smaller system ID is
the master.
----End
Context
E-Trunk packets are sent with the source IP address and protocol port number
configured on the local device. When you change the local or remote IP address
on a device, you must change the corresponding address on the remote device.
Otherwise, E-Trunk packets are dropped.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run e-trunk e-trunk-id
The E-Trunk view is displayed.
Step 3 Run peer-address peer-ip-address source-address source-ip-address
The local and remote IP addresses of the E-Trunk are configured.
The remote IP address of the local device must be the same as the local IP address
of the remote device. For example, when an E-Trunk is created between device A
and device B and the local and remote IP addresses on device A are 10.1.1.1 and
10.2.2.2 respectively, the local and remote IP addresses on device B must be
10.2.2.2 and 10.1.1.1 respectively.
----End
NOTE
This function is supported by only the following models: S5720I-SI, S5735-S, S5735S-S,
S5735-S-I, S5735S-H, S5736-S, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6735-S,
S6720-EI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run e-trunk e-trunk-id
The E-Trunk view is displayed.
Step 3 Run e-trunk track bfd-session session-name bfd-session-name
The E-Trunk is bound to a BFD session.
BFD sessions are used to quickly detect faults of the link between the two E-Trunk
member devices.
When a BFD session is bound with E-Trunk, by default, the system does not allow
the bound BFD session to be deleted. To delete the bound BFD session, run the
----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.
The IDs of the Eth-Trunks added to an E-Trunk can be different on two E-Trunk
member devices. In this case, you must specify the remote-eth-trunk parameter
to enable the E-Trunk to work normally.
----End
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.
NOTE
When an E-Trunk is working normally, changing the hello packet sending interval or timeout
interval may cause flapping of the E-Trunk between master and backup devices. Before
changing the hello packet sending interval or timeout interval, you are advised to configure
member Eth-Trunks to work in forcible master/backup state. After the new configuration takes
effect, restore the working mode to automatic.
----End
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.
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
Context
If the backup device in an E-Trunk does not receive any hello packet from the
master device within the timeout interval (as specified in the hello packets sent by
the master device), the backup device becomes the master.
Procedure
Step 1 Run system-view
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 at least.
NOTE
When an E-Trunk is working normally, changing the hello packet sending interval or
timeout interval may cause flapping of the E-Trunk between master and backup devices.
Before changing the hello packet sending interval or timeout interval, you are advised to
configure member Eth-Trunks to work in forcible master/backup state. After the new
configuration takes effect, restore the working mode to automatic.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run e-trunk e-trunk-id
The E-Trunk view is displayed.
Step 3 Run timer revert delay delay-value
The revertive switching delay is set.
By default, the revertive switching delay is 120s.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run e-trunk e-trunk-id
----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, packets are dropped due to failure of the E-Trunk
sequence number check, causing dual master devices in the E-Trunk.
----End
● Run the undo eth-trunk command in the Eth-Trunk member interface view
to delete a specified member interface from an Eth-Trunk.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo eth-trunk
Deleting an Eth-Trunk
Delete all member interfaces from an Eth-Trunk, and then run the undo interface
eth-trunk trunk-id command in the system view.
<HUAWEI> system-view
[HUAWEI] undo interface eth-trunk 10
Networking Requirements
In Figure 3-21, SwitchA and SwitchB connect to devices in VLAN 10 and VLAN 20
through Ethernet links, and heavy traffic is transmitted between SwitchA and
SwitchB.
SwitchA and SwitchB can provide higher link bandwidth to implement inter-VLAN
communication. Data transmission and link reliability need to be ensured.
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 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
Run the display eth-trunk 1 command in any view to check whether the Eth-
Trunk is created and whether member interfaces are added.
[SwitchA] display eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL Hash arithmetic: According to SA-XOR-DA
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 3
--------------------------------------------------------------------------------
PortName Status Weight
GigabitEthernet0/0/1 Up 1
GigabitEthernet0/0/2 Up 1
GigabitEthernet0/0/3 Up 1
The preceding command output shows that Eth-Trunk 1 has three member
interfaces: GigabitEthernet0/0/1, GigabitEthernet0/0/2, and GigabitEthernet0/0/3.
The member interfaces are all in Up state. The Operate status of Eth-Trunk 1 is
Up.
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 10 20
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20
load-balance src-dst-mac
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
eth-trunk 1
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 20
#
return
Networking Requirements
In Figure 3-22, SwitchA and SwitchB connect to devices in VLAN 10 and VLAN 20
through Ethernet links, and heavy traffic is transmitted between SwitchA and
SwitchB. The link between SwitchA and SwitchB is required to provide high
bandwidth to implement inter-VLAN communication. Link aggregation in LACP
mode is configured on SwitchA and SwitchB to improve the bandwidth and
reliability. The following requirements must be met:
● Two active links implement load balancing.
● One link functions as the backup link. When a fault occurs on an active link,
the backup link replaces the faulty link to maintain reliable data transmission.
● Devices in the same VLAN can communicate.
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
GigabitEthernet0/0/2 32768 00e0-fca6-7f85 32768 6146 2609 11111100
GigabitEthernet0/0/3 32768 00e0-fca6-7f85 32768 6147 2609 11110000
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
#
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
On the network shown in Figure 3-23, Switch3 and Switch4 are connected
through stack cables to increase the total switching capacity. The two switches are
considered as one logical switch. To improve reliability, physical interfaces on the
two switches are added to an Eth-Trunk. Traffic from two VLANs, VLAN 2 and
VLAN 3, is forwarded through both the two interfaces GE1/0/1 and GE1/0/2 on
the PE when the network runs properly. This provides high bandwidth use
efficiency between devices and low traffic forwarding efficiency.
To improve traffic forwarding efficiency, each interface should only forward traffic
from one VLAN (in this example, GE1/0/1 forwards traffic from VLAN 2 and
GE1/0/2 forwards traffic from VLAN3). To achieve this goal, configure the Eth-
Trunk to preferentially forward local traffic.
Figure 3-23 Preferentially forwarding traffic through the local member interface
Configuration Roadmap
The configuration roadmap is as follows:
1. Create an Eth-Trunk.
2. Add member interfaces to the Eth-Trunk.
3. Configure the Eth-Trunk to preferentially forward local traffic.
4. Configure the Layer 2 forwarding function.
Procedure
Step 1 Create an Eth-Trunk and configure the Eth-Trunk to allow packets from all VLANs
to pass through.
# Configure the stack.
<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.
On the S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L, S5735S-L, S5735S-L1,
S5735S-L-M, S5735-S, S500, S5735-S-I, and S5735S-S, run the following command:
[Stack] local-preference enable
# 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
Procedure
1. Run the display eth-trunk command to check whether the load balancing
mode of the Eth-Trunk meets networking requirements. For example, source
or destination IP address-based load balancing is not recommended in Layer 2
networking.
2. Run the load-balance command to set an appropriate load balancing mode.
Procedure
1. Run the display eth-trunk trunk-id command to check whether the lower
threshold for the number of active interfaces of an Eth-Trunk is set.
If the number of Eth-Trunk member interfaces in Up state is lower than the
lower threshold, the Eth-Trunk becomes Down.
2. Run the least active-linknumber link-number command to configure the
lower threshold for the number of active interfaces of an Eth-Trunk to be
smaller than the number of Eth-Trunk member interfaces in Up state.
The local and remote devices can be configured with different lower
thresholds for the number of active interfaces. If the lower thresholds are
different, a larger value becomes effective.