01-03 Link Aggregation Configuration
01-03 Link Aggregation Configuration
Switches
Configuration Guide - Ethernet Switching 3 Link Aggregation Configuration
Link aggregation is a technology that bundles multiple Ethernet links into a logical
link to increase bandwidth, improve reliability, and load balance traffic.
Purpose
As networks grow in scale, users require Ethernet backbone networks to provide
higher bandwidth and reliability. In the past, to increase the bandwidth, users had
to replace legacy devices with high-speed 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 the bandwidth
of member interfaces.
● Higher reliability
When an active link fails, traffic on this active link moves 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 link
members.
3.2.1 Concepts
In Figure 3-1, DeviceA and DeviceB are connected through three Ethernet physical
links. These links bundle into a logical link, and their bandwidths are combined to
form the total bandwidth of the logical link. The three physical Ethernet links
provide backup for each other, improving reliability.
NOTE
Both devices connected by the Eth-Trunk must use the same number of physical interfaces,
interface rate, jumbo, and flow control mode.
Eth-Trunk
DeviceA DeviceB
The upper threshold for the number of active interfaces is inapplicable to the manual
load balancing mode. For details about the manual load balancing mode, see 3.2.3
Link Aggregation in Manual Load Balancing Mode.
● Lower threshold for the number of active interfaces
When the number of active interfaces falls below the lower threshold, the
Eth-Trunk goes Down. This guarantees the minimum available bandwidth for
the Eth-Trunk.
For example, if the Eth-Trunk is required to provide a minimum bandwidth of
2 Gbit/s and each member link's bandwidth is 1 Gbit/s, the lower threshold
must be set to 2 or larger.
HASH-KEY 0 1 2 3 4 5 6 7 8 15
PORT 1 2 3 4 1 2 3 4 1 4
traffic evenly. The manual load balancing mode is suitable in scenarios where the
link between two directly connected devices requires a high bandwidth but the
devices do not support the LACP protocol.
DeviceA DeviceB
Eth-Trunk
DeviceC
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.
LACPDU
Figure 3-6 Selecting the Actor and active links in LACP mode
LACP port priority LACP port priority
DeviceA DeviceB
1 3
2 2
3 1
The device with higher The device with lower
system priority system priority
Compare system priority
and determine the Actor
LACP port priority LACP port priority
DeviceA 1 3 DeviceB
2 2
3 1
Actor
The Actor determines
active links
LACP port priority LACP port priority
DeviceA DeviceB
1 3
2 2
3 1
Actor
● LACP preemption
When LACP preemption is enabled, interfaces with higher priorities in a LAG
always function as active interfaces.
As shown 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.
Active link
Backup link
Eth-Trunk
Active link
Backup link
Eth-Trunk
NOTE
Eth-Trunk in dynamic LACP mode can be used only in a scenario where a Huawei device is
interconnected with a server. (Ports on the server must be isolated from each other. For
example, NICs on the server cannot be configured to work in bridge mode. If the ports are not
isolated, loops may occur on the network.) In other scenarios, you are advised to deploy Eth-
Trunk in static LACP mode.
When an Eth-Trunk is used to forward data frames, data frames of the same data
flow may be transmitted over different physical links. This mode ensures optimal
bandwidth utilization. However, data frames may arrive at the destination in a
different order to which they were transmitted, resulting to mis-sequencing.
Concepts
● Stack device
The stack device is a logical device formed by connecting multiple devices
through dedicated stack cables. In Figure 3-10, DeviceB and DeviceC are
connected to form a logical device.
● Inter-device Eth-Trunk
An inter-chassis Eth-Trunk contains physical interfaces of multiple devices in a
stack. When a device in the stack fails or a physical interface added to the
Eth-Trunk fails, traffic can be transmitted between devices through stack
cables. This ensures reliable transmission and implements device backup.
● Preferential forwarding of local traffic
In network b of Figure 3-10, traffic from DeviceB or DeviceC is only
forwarded through local member interfaces when the network runs properly.
In network a of Figure 3-10, traffic is forwarded across devices through stack
cables.
DeviceA DeviceA
Eth-Trunk Eth-Trunk
iStack iStack
Data flow 1
Data flow 2
Stack cable
As shown in Figure 3-10, 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:
● This function is only valid for known unicast packets, and is invalid for unknown unicast,
broadcast, 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.
Stacking
Interfaces on member switches in a stack can be bundled into an Eth-Trunk.
This inter-device link aggregation mode is applied to scenarios where the stack is
connected to other devices, and protects the link between upstream and
downstream devices. The Eth-Trunk can still work even if a member switch fails or
one link of the Eth-Trunk fails, ensuring reliable transmission of data traffic. This
prevents single-point failures of a member device in a stack and greatly improves
the network-wide reliability.
For details, see Stack Configuration in the CloudEngine 8800, 7800, 6800, and
5800 Series Switches Configuration Guide - Virtualization Configuration Guide.
Stack
M-LAG
M-LAG allows two access switches in the same state to perform link aggregation
negotiation with the access device. In Figure 3-12, the access device
communicates with the M-LAG through link aggregation, achieving device-level
reliability instead of only card-level reliability. The M-LAG is a dual-active system
that is composed of two access switches.
M-LAG master and backup devices forward data simultaneously and their
forwarding behaviors are the same. The forwarding behaviors of M-LAG master
and backup device roles are different only in scenarios where faults occur.
For details, see M-LAG Configuration in the CloudEngine 8800, 7800, 6800, and
5800 Series Switches Configuration Guide - Ethernet Switching Configuration
Guide.
DAD link
Peer-link
M-LAG Lite
Figure 3 shows the inter-device link aggregation on the M-LAG Lite networking.
Compared with inter-device link aggregation in a stack or M-LAG system, inter-
device link aggregation in an M-LAG Lite system removes the heartbeat cable
(iStack link or peer-link) required for establishing a stack/M-LAG between devices.
Inter-device link aggregation in an M-LAG Lite system simplifies deployment,
saves costs, and ensures that services are not interrupted during the upgrade.
In Figure 3, the same Eth-Trunk ID, LACP system ID, LACP system priority, and
different numbers of Eth-Trunk member interfaces are configured on DeviceB and
DeviceC. (On one member device, the lacp port-id-extension enable command is
run in views of all the member interfaces to increase the number of each member
interface by 32768.) In this way, the inter-device Eth-Trunk interface negotiation
can be successful. The two devices evenly load balance data. When one device
fails, traffic can be forwarded through the other device, implementing device-level
reliability.
DeviceB and DeviceC must be Layer 3 gateways and cannot be Layer 2 transparent
transmission devices. If an upstream device functions as the gateway, the ARP
entries of the server or switch learned by the gateway have two egresses, causing
MAC address flapping. Therefore, the devices to which the server or switch
connects in M-LAG Lite mode must be Layer 3 gateways.
For details about M-LAG Lite, see "Example for Configuring M-LAG Lite" in
Configuration Examples for Comprehensive Scenarios in the CloudEngine 8800,
7800, 6800, and 5800 Series Switches Configuration Guide - Typical Configuration
Examples.
Internet
DeviceB DeviceC
Eth-Trunk
Internet
SwitchA
Eth-Trunk1 Eth-Trunk2
SwitchB SwitchC
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 load balancing mode.
Licensing Requirements
Ethernet link aggregation is a basic function of the switch, and as such is
controlled by the license for basic software functions. The license for basic
software functions has been loaded and activated before delivery. You do not need
to manually activate it.
Version Requirements
Table 3-2 Products and minimum version supporting Ethernet link aggregation
CE9860EI V200R020C00
CE8860EI V100R006C00
CE8861EI/CE8868EI V200R005C10
CE8850-32CQ-EI V200R002C50
CE8850-64CQ-EI V200R005C00
CE7850EI V100R003C00
CE7855EI V200R001C00
CE6810EI V100R003C00
CE6810-48S4Q-LI/CE6810-48S- V100R003C10
LI
CE6810-32T16S4Q-LI/ V100R005C10
CE6810-24S2Q-LI
CE6850EI V100R001C00
CE6850-48S6Q-HI V100R005C00
CE6850-48T6Q-HI/CE6850U-HI/ V100R005C10
CE6851HI
CE6855HI V200R001C00
CE6856HI V200R002C50
CE6857EI V200R005C10
CE6860EI V200R002C50
CE6865EI V200R005C00
CE6870-24S6CQ-EI V200R001C00
CE6870-48S6CQ-EI V200R001C00
CE6870-48T6CQ-EI V200R002C50
CE6875-48S4CQ-EI V200R003C00
CE6880EI V200R002C50
CE6881K V200R019C10
CE6881E V200R019C10
CE6863K V200R019C10
CE5810EI V100R002C00
CE5850EI V100R001C00
CE5850HI V100R003C00
CE5855EI V100R005C10
CE5880EI V200R005C10
CE5881 V200R020C00
NOTE
For details about the mapping between software versions and switch models, see the
Hardware Query Tool.
Feature Limitations
Licensing Requirements and Limitations Before an Eth-Trunk Is Configured
● Table 3-3 describes the specifications of Ethernet link aggregation.
Version Specification
Context
Typically, the number of LAGs supported by a switch is fixed. However, you can
run the assign forward eth-trunk mode command to flexibly set the number of
LAGs supported by a switch, implementing flexible networking and meeting
diversified service requirements.
NOTE
The number of LAGs supported by the CE5810EI, CE5880EI, and CE6880EI is fixed. The
CE5810EI, CE5880EI, and CE6880EI do not support a variable number of LAGs.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run assign forward eth-trunk mode { 64 | 128 | 256 | 512 | 1024 }
The number of LAGs supported by the device is set.
For CE6870EI and CE6875EI, the number of LAGs supported by the device can be
set using the assign forward eth-trunk mode { 256 | 512 | 1024 } command.
By default, the CE6870EI and CE6875EI support 512 LAGs; other models support
128 LAGs.
NOTE
After the assign forward eth-trunk mode command is used to change the number of
LAGs supported by the device, restart the device to make the configuration take effect.
----End
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 value ranges of different models are
different. Table 3-5 lists value ranges of different models.
CE6870EI and The value range can be adjusted using the assign forward
CE6875EI eth-trunk mode { 256 | 512 | 1024 } command.
● When 256 is specified, the value is in the range 0 to
255. Each Eth-Trunk allows a maximum of 64 member
interfaces.
● When 512 is specified, the value is in the range 0 to
511. Each Eth-Trunk allows a maximum of 32 member
interfaces. The default value is 512.
● When 1024 is specified, the value is in the range 0 to
1023. Each Eth-Trunk allows a maximum of 16 member
interfaces.
Other models: The value range can be adjusted using the assign forward
eth-trunk mode { 64 | 128 | 256 | 512 | 1024 } command.
● When 64 is specified, the value is in the range 0 to 63.
Each Eth-Trunk allows a maximum of 32 member
interfaces.
● When 128 is specified, the value is in the range 0 to
127. Each Eth-Trunk allows a maximum of 16 member
interfaces. The default value is 128.
● When 256 is specified, the value is in the range 0 to
255. Each Eth-Trunk allows a maximum of 8 member
interfaces.
● When 512 is specified, the value is in the range 0 to
511. Each Eth-Trunk allows a maximum of 4 member
interfaces.
● When 1024 is specified, the value is in the range 0 to
1023. Each Eth-Trunk allows at most 2 member
interfaces.
----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 remote device
does not support LACP.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Step 3 Run mode manual [ load-balance ]
The Eth-Trunk is configured to work in manual load balancing mode.
By default, an Eth-Trunk works in manual load balancing mode.
Before configuring an Eth-Trunk, ensure that both devices use the same working
mode.
Step 4 Run commit
The configuration is committed.
----End
● Devices at both ends of an Eth-Trunk must use the same number of physical
interfaces, interface rate, duplex mode, jumbo, and flow control mode.
● In a stack scenario, it is recommended that the number of member interfaces
added to a LAG be the nth power of 2. Otherwise, unknown unicast traffic
may be unevenly load balanced.
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. Run trunkport interface-type { interface-number1 [ to interface-
number2 ] } &<1-n>
A member interface is added to the Eth-Trunk.
When you add member interfaces to an Eth-Trunk in a batch, if one
interface cannot be added to the Eth-Trunk, all subsequent interfaces in
the batch cannot be added to the Eth-Trunk, either.
NOTE
For the CE5810EI, the value of n is 8. For the CE5880EI and CE6880EI, the value of n
is 64. For other models, the value of n depends on the assign forward eth-trunk
mode command.
d. Run commit
The configuration is committed.
● Add member interfaces to an Eth-Trunk in the member interface view.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The member interface view is displayed.
c. Run eth-trunk trunk-id
The member interface is added to an Eth-Trunk.
d. Run commit
The configuration is committed.
----End
Follow-up Procedure
When the status of an Eth-Trunk member interface changes, the system sends
traps containing the status change information for you to confirm whether the
device encounters any fault. If you want to know the ID of the Eth-Trunk to which
the member interface belongs, run the trunk-member trap in private-mib
enable command to enable Eth-Trunk member interfaces to send traps through a
private MIB. Traps sent through a private MIB carry the number of the specific
Eth-Trunk interface.
After the trunk-member trap in private-mib enable command is run, traps are
sent through a private MIB, instead of a public MIB. In this case, you can view the
traps only by using the private MIB of Huawei.
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.
Step 4 Run commit
The configuration is committed.
----End
Context
On an Eth-Trunk interface, you can load balance traffic among member interfaces
according to the weights configured for the member interfaces.
The higher the weight of a member interface, the heavier the load over the
member link. Therefore, you can configure a higher weight for a member interface
so that the member link can carry a heavier load.
Procedure
Step 1 Run system-view
The load balancing weight is configured for the Eth-Trunk member interface.
----End
Context
An Eth-Trunk supports per-packet load balancing and per-flow load balancing.
● Per-packet load balancing can improve Eth-Trunk bandwidth efficiency to
ensure even load balancing among equal-cost routes, but cannot prevent
packet mis-sequencing. To ensure packet sequencing, confirm that the device
or terminal receiving traffic supports packet reassembly in case of packet mis-
sequencing. Switches support the following per-packet load balancing modes:
– Random mode: The outbound interface of packets is generated randomly
and calculated based on the time when the packets reach the Eth-Trunk.
When the IP address and MAC address of known unicast packets remain
unchanged, configure random per-packet load balancing.
– Round-robin mode: Eth-Trunk member interfaces forward traffic in turn.
When known unicast packets have a similar length, configure round-
robin per-packet load balancing.
● Per-flow load balancing ensures that packets of the same data flow are
forwarded on the same physical link and those of different data flows are
forwarded on different physical links. Table 3-6 lists the load balancing
modes for different types of packets.
IPv4 packets src-ip, dst-ip, l4- src-ip, dst-ip, l4- The load
src-port and l4- src-port, l4-dst- balancing mode
dst-port port, and is relevant to the
protocol packet type and
irrelevant to the
IPv6 packets src-ip, dst-ip, l4- src-ip, dst-ip, packet
src-port, and l4- protocol, l4-src- forwarding
dst-port port, and l4-dst- process.
port
For example,
MPLS packets Ingress/Egress/ For switches even if the
Transit: top- excluding the system provides
label and 2nd- CE6865EI, only Layer 2
label CE6857EI, forwarding for
CE8861EI, and IPv4 packets, the
CE8868EI: IPv4 packets are
load balanced
Ingress/Egress/
according to the
Transit: top-
load balancing
label, 2nd-label,
mode for IPv4
dst-ip, and src-ip
packets. When
For the the system
CE6865EI, cannot identify
CE6857EI, IPv4, IPv6, or
CE8861EI, and MPLS packets,
CE8868EI: the system load
Ingress/Egress/ balances packets
Transit: top- based on src-
label, 2nd-label, mac, dst-mac,
3rd-label, 4th- src-interface,
label, 5th-label, and eth-type for
dst-ip, src-ip, Layer 2 packets.
and src-
interface
NOTE
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.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Run load-balance profile profile-name
A load balancing profile is configured and its view is displayed. profile-name
specifies the name of the load balancing profile.
By default, there is a load balancing profile named default.
Run the following commands as required. You can configure a load balancing
mode for Layer 2 packets, IPv4 packets, IPv6 packets, FCoE, and MPLS packets
respectively.
By default, the switch load balances IPv6 packets based on the source IP
address (src-ip), destination IP address (dst-ip), transport-layer source port
numbers (l4-src-port), and transport-layer destination port numbers (l4-dst-
port).
● Run mpls [ top-label | dst-ip | src-ip | 2nd-label | 3rd-label | 4th-label | 5th-
label | src-interface ] *
A load balancing mode is configured for MPLS packets.
By default, the switch load balances MPLS packets based on the two outer
labels (top-label and 2nd-label).
NOTE
Only the CE6865EI, CE6857EI, CE8861EI, and CE8868EI support 3rd-label, 4th-label,
5th-label, and src-interface. If src-ip or dst-ip is configured, 4th-label or 5th-label
cannot be configured.
In V200R005C10 and earlier versions, if 4th-label and 5th-label are configured for
load balancing of MPLS packets in the load balancing profile view or ECMP view, this
configuration takes effect for both Eth-Trunk and ECMP. The load balancing mode
based on src-ip and dst-ip conflicts with that based on 4th-label and 5th-label, and
the last delivered configuration takes effect. Therefore, the effective load balancing
mode is inconsistent with that in the configuration file.
● Run fcoe { dst-fcid | src-fcid } *
A load balancing mode is configured for a stack port or fabric port in the
specified load balancing profile.
By default, a stack port or fabric port load balances packets based on hash-
mode (1) and universal-id (1) in a load balancing profile.
Step 3 (Optional) Run quit
Return to the system view.
Step 4 Run the following commands as required.
● Configure a load balancing mode for known unicast traffic.
a. Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
b. Run load-balance { dst-ip | dst-mac | random | round-robin | src-ip |
src-mac | src-dst-ip | src-dst-mac | enhanced [ resilient ] profile profile-
name }
A load balancing mode is configured for the Eth-Trunk.
By default, the load balancing mode of the Eth-Trunk is enhanced
profile.
NOTE
The CE5810-48T4S-EI uses dual chips that are connected through two
interfaces. Traffic between chips is load balanced between the two
interfaces. The load balancing mode is the same as enhanced profile on an
Eth-Trunk. When the global load balancing mode is changed, the load
balancing mode on two interfaces between chips is also affected.
c. Run commit
The configuration is committed.
● Configure a load balancing mode for unknown unicast traffic.
a. Run load-balance unknown-unicast { mac | enhanced }
A load balancing mode is configured.
By default, the load balancing mode is enhanced.
b. Run commit
The configuration is committed.
----End
Follow-up Procedure
● Configure simulated calculation of an Eth-Trunk outbound interface.
Configure simulated calculation of an Eth-Trunk outbound interface after
specifying the 5-tuple information, source MAC address, and destination
address.
display load-balance forwarding-path unicast interface eth-trunk trunk-id src-interface interface-
type interface-number { ethtype ethtype-number | vlan vlan-id | [ [ src-ip src-ip-data | dst-ip dst-ip-
data ] * | [ src-ipv6 src-ipv6-data | dst-ipv6 dst-ipv6-data ] * ] | src-mac src-mac-data | dst-mac dst-
mac-data | protocol { protocol-number | icmp | igmp | ip | ospf | tcp [ l4-src-port src-port-data | l4-
dst-port dst-port-data ] * | udp [ l4-src-port src-port-data | l4-dst-port dst-port-data ] * } } * slot slot-
id
● Verifying the Configuration
Verify the outbound interface of packets that contain specified 5-tuple
information, source MAC address, and destination MAC address.
display port forwarding-path { src-ip src-ip-data | dst-ip dst-ip-data | src-mac src-mac-data | dst-
mac dst-mac-data | protocol { protocol-number | gre | icmp | igmp | ip | ipinip | ospf | tcp [ l4-src-
port src-port-data | l4-dst-port dst-port-data ] * | udp [ l4-src-port src-port-data | l4-dst-port dst-
port-data ] * } } *
Context
An Eth-Trunk uses flow-based load balancing. Per-flow load balancing ensures
that packets of the same data flow are forwarded on the same physical link and
those of different data flows are forwarded on different physical links.
Load balancing is valid only for outgoing traffic; therefore, interfaces at both ends
of the link can use different load balancing modes.
Table 3-7 lists load balancing modes for different types of packets.
Procedure
Step 1 Run system-view
Step 3 Run the following commands as required. You can configure load balancing modes
for Layer 2, IPv4, IPv6, MPLS, VPLS, TRILL, and FCoE packets, respectively.
● Run l2 [ src-mac | dst-mac | vlan | eth-type ] *
During Layer 2 forwarding, the switch load balances only IPv4, IPv6, 802.1ah, ARP, and
CFM packets based on eth-type.
During Layer 2 forwarding, an Eth-Trunk configured with Dot1q tunnel, VLAN stacking,
VLL, or VPLS cannot load balance packets based on the VLAN ID.
● Run ip [ src-ip | dst-ip | l4-src-port | l4-dst-port | protocol ] *
To load balance IPv6 packets based on the transport-layer source and destination port
numbers, run the ip [ l4-src-port | l4-dst-port ] * command.
● Run mpls [ 2nd-label | 3rd-label | top-label ] * or mpls [ src-ip | dst-ip | l4-
src-port | l4-dst-port ] *
A load balancing mode is configured for MPLS packets in the specified load
balancing profile.
By default, MPLS packets are load balanced based on top-label, 2nd-label,
and fields in the inner IP header (IPv4/IPv6: src-ip, dst-ip, l4-src-port, and l4-
dst-port).
NOTE
On an IPv6 underlay network, if the IPv6 VXLAN function is enabled and the switch
functions as a transit or egress node on the MPLS network, configurations related to
the hash field in inner information in MPLS packets do not take effect in the load
balancing profile. In this scenario, the mpls inner-type { ipv4 | ipv6 | l2 | any }
command cannot be used to change the load balancing mode for MPLS packets in the
load balancing profile. Instead, you can use the source and destination IP addresses in
inner information in MPLS packets to configure a load balancing mode in the load
balancing profile.
– The mpls [ inner-ip | inner-ipv6 ] * command can be configured only when the
IPv6 VXLAN function is enabled. In addition, this command cannot be used to
configure a load balancing mode for VPLS packets. If the IPv6 VXLAN function is
disabled, the switch automatically deletes the configurations related to the mpls
[ inner-ip | inner-ipv6 ] * command.
– For the CE6870EI and CE6875EI, if MPLS packets with four or more labels are
received, Eth-Trunk or ECMP load balancing cannot be implemented based on the
inner IP header.
– For the CE6870EI and CE6875EI, if the implicit null label is disabled and the outer
label is popped out (for example, ASBR in inter-AS VPN Option B and inter-AS VPN
Option C networking), packets may be unable to be load balanced in the load
balancing mode using ECMP or Eth-Trunk based on the inner field in MPLS packets.
– The mpls [ inner-ip | inner-ipv6 ] * command takes effect only on the CE6875EI.
● Run user-defined ethernet-over-mpls [ dot1q-tagtag-number ] { inner-
sipsip-offsetsip-nybble-number | inner-dipdip-offsetdip-nybble-number } *
Load balancing based on the inner IP address of VPLS packets is configured
on the outbound Eth-Trunk on the transit node.
● Run fcoe { dst-fcid | src-fcid } *
NOTE
----End
Follow-up Procedure
● Configure simulated calculation of an Eth-Trunk outbound interface.
Run the display load-balance forwarding-path unicast interface eth-trunk
trunk-id src-interface interface-type interface-number { ethtype ethtype-
number | vlan vlan-id | [ [ src-ip src-ip-data | dst-ip dst-ip-data ] * | [ src-ipv6
src-ipv6-data | dst-ipv6 dst-ipv6-data ] * ] | src-mac src-mac-data | dst-mac
dst-mac-data | protocol { protocol-number | icmp | igmp | ip | ospf | tcp [ l4-
src-port src-port-data | l4-dst-port dst-port-data ] * | udp [ l4-src-port src-
port-data | l4-dst-port dst-port-data ] * } } * slot slot-id command to
configure simulated calculation of an Eth-Trunk outbound interface after the
5-tuple information, source MAC address, and destination address are
specified.
● Verify the configuration.
Run the display port forwarding-path { src-ip src-ip-data | dst-ip dst-ip-data
| src-mac src-mac-data | dst-mac dst-mac-data | protocol { protocol-number |
gre | icmp | igmp | ip | ipinip | ospf | tcp [ l4-src-port src-port-data | l4-dst-
port dst-port-data ] * | udp [ l4-src-port src-port-data | l4-dst-port dst-port-
data ] * } } * [ enhanced ] command to check the outbound interface of
packets that contain specified 5-tuple information, source MAC address, and
destination MAC address.
Run the display port forwarding-path mpls { { src-ip src-ip-data [ ip-mask-
len | source-ip-mask ] | dst-ip dst-ip-data [ ip-mask-len | dst-ip-mask ] } * |
{ src-ipv6 src-ipv6-data [ ipv6-mask-len ] | dst-ipv6 dst-ipv6-data [ ipv6-
mask-len ] } * }{ transit label-number labelnum | ingress | egress label-
number labelnum } command to check the outbound interface of MPLS
packets that contain information such as the inner source IP address,
destination IP address, role, and number of labels.
Context
By default, a CE switch processes received PPPoE packets as common Ethernet
packets. Figure 3-15 shows the format of PPPoE packets. The switch cannot
identify the 5-tuple information in PPPoE packets and performs the hash
algorithm based on the outer Ethernet frame of common Layer 2 packets by
default. Fields in the Layer 2 frames of PPPoE packets are fixed except the source
MAC address, so packets are often unevenly load balanced on an Eth-Trunk. To
improve the load balancing effect, use inner information of PPPoE packets for load
balancing.
PPP
Version Type Code Session_ID Length PPPoE
Packet
IP
PPP PPP
Packet Padding
NOTE
The CE5880EI and CE6880EI can identify PPPoE packets and load balance the PPPoE
packets without configuring Eth-Trunk load balancing.
Procedure
● Configure a load balancing mode for PPPoE packets on the CE6870EI and
CE6875EI.
a. Run system-view
By default, the switch load balances PPPoE packets based on the source
MAC address (smac), destination MAC address (dmac), and VLAN ID
(vlan).
You can specify session-id and l4-src-port so that the switch load
balances PPPoE packets based on the session ID and transport-layer
source port of PPPoE packets.
c. Run commit
NOTE
Context
A server is often equipped with two or more network adapters. When a server
connects to a switch, one network adapter is used for server management and the
other network adapters are used for traffic forwarding. In this case, there is much
idle time on the network adapter used for server management and switch
interfaces, and the bandwidth use efficiency is low. To address this issue, upgrade
the server software so that the network adapter used for server management can
be also used for traffic forwarding. When the switch uses an Eth-Trunk to connect
to the server, one Eth-Trunk member interface can be bound to a VLAN for server
management. In addition, service VLANs can be configured on the Eth-Trunk so
that service traffic is load balanced among all Eth-Trunk member interfaces. The
bandwidth use efficiency is therefore improved.
NOTE
NOTE
● This function applies to the scenario where a switch connects to a server, and it can only be
configured on the member interface connecting to the server's management NIC.
● In an Eth-Trunk, only one member interface can be bound to a VLAN or VLANs and one
member interface can be bound to a maximum of eight VLANs. Member interfaces of
multiple Eth-Trunks can be bound to the same VLAN.
● The switch supports a maximum of 256 bound VLANs. If N Eth-Trunk member interfaces
are bound to M VLANs, the maximum value of N multiplied by M is 256.
● After this command is configured, packets from the bound VLAN can be only forwarded
through the bound Eth-Trunk member interface. Non-unicast traffic on the Eth-Trunk can
be only forwarded through the bound Eth-Trunk member interface.
● When an Eth-Trunk member interface is bound to a VLAN or VLANs, VLAN mapping, VLAN
stacking, MUX VLAN, or FCoE VLAN cannot be configured.
● When an Eth-Trunk member interface is bound to a VLAN or VLANs, M-LAG cannot be
configured.
● If Layer 2 sub-interfaces are created on an Eth-Trunk and a member interface is bound to
an independent VLAN, the VLAN cannot connect to non-VXLAN tunnels.
Procedure
Step 1 Run system-view
----End
Procedure
● Run the display eth-trunk [ trunk-id [ interface interface-type interface-
number | verbose ] | brief ] command to check the Eth-Trunk configuration.
● Run the display eth-trunk membership trunk-id command to check
information about Eth-Trunk member interfaces.
● Run the display load-balance profile [ profile-name ] command to check the
load balancing profile of the Eth-Trunk.
● Run the display forward eth-trunk mode command to check the number of
LAGs supported by the device.
----End
Context
Typically, the number of LAGs supported by a switch is fixed. However, you can
run the assign forward eth-trunk mode command to flexibly set the number of
LAGs supported by a switch, implementing flexible networking and meeting
diversified service requirements.
NOTE
The number of LAGs supported by the CE5810EI, CE5880EI, and CE6880EI is fixed. The
CE5810EI, CE5880EI, and CE6880EI do not support a variable number of LAGs.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run assign forward eth-trunk mode { 64 | 128 | 256 | 512 | 1024 }
The number of LAGs supported by the device is set.
For CE6870EI and CE6875EI, the number of LAGs supported by the device can be
set using the assign forward eth-trunk mode { 256 | 512 | 1024 } command.
By default, the CE6870EI and CE6875EI support 512 LAGs; other models support
128 LAGs.
NOTE
After the assign forward eth-trunk mode command is used to change the number of
LAGs supported by the device, restart the device to make the configuration take effect.
----End
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 value ranges of different models are
different. Table 3-8 lists value ranges of different models.
CE6870EI and The value range can be adjusted using the assign forward
CE6875EI eth-trunk mode { 256 | 512 | 1024 } command.
● When 256 is specified, the value is in the range 0 to
255. Each Eth-Trunk allows a maximum of 64 member
interfaces.
● When 512 is specified, the value is in the range 0 to
511. Each Eth-Trunk allows a maximum of 32 member
interfaces. The default value is 512.
● When 1024 is specified, the value is in the range 0 to
1023. Each Eth-Trunk allows a maximum of 16 member
interfaces.
Other models: The value range can be adjusted using the assign forward
eth-trunk mode { 64 | 128 | 256 | 512 | 1024 } command.
● When 64 is specified, the value is in the range 0 to 63.
Each Eth-Trunk allows a maximum of 32 member
interfaces.
● When 128 is specified, the value is in the range 0 to
127. Each Eth-Trunk allows a maximum of 16 member
interfaces. The default value is 128.
● When 256 is specified, the value is in the range 0 to
255. Each Eth-Trunk allows a maximum of 8 member
interfaces.
● When 512 is specified, the value is in the range 0 to
511. Each Eth-Trunk allows a maximum of 4 member
interfaces.
● When 1024 is specified, the value is in the range 0 to
1023. Each Eth-Trunk allows at most 2 member
interfaces.
----End
Context
Link aggregation can work in manual load balancing mode, static LACP mode, or
dynamic LACP mode.
In LACP mode, you must manually create an Eth-Trunk and add interfaces to the
Eth-Trunk. However, LACP controls active interfaces through negotiation.
Eth-Trunks in dynamic LACP mode are used only when a Huawei device connects
to a server. For other scenarios, configuring Eth-Trunks in static LACP mode is
recommended to reduce the chances of potential loops.
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 Configure a working mode of the Eth-Trunk.
Configure the static or dynamic LACP mode.
● When the two directly connected devices support LACP, static LACP is
recommended.
Run mode lacp-static
The Eth-Trunk is configured to work in static LACP mode.
Before configuring an Eth-Trunk, ensure that both devices use the same
working mode.
● When a device is directly connected to a server, the dynamic LACP mode is
often used. You can also use the static LACP mode.
Run mode lacp-dynamic
The Eth-Trunk is configured to work in dynamic LACP mode.
----End
Context
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
NOTE
The rate of the interface added to the Eth-Trunk interface is not limited. For
example, 10G and 100G interfaces can be added to the same Eth-Trunk interface.
d. Run trunkport interface-type { interface-number1 [ to interface-
number2 ] } &<1-n>
NOTE
For the CE5810EI, the value of n is 8. For the CE5880EI and CE6880EI, the value of n
is 64. For other models, the value of n depends on the assign forward eth-trunk
mode command.
----End
Follow-up Procedure
When the status of an Eth-Trunk member interface changes, the system sends
traps containing the status change information for you to confirm whether the
device encounters any fault. If you want to know the ID of the Eth-Trunk to which
the member interface belongs, run the trunk-member trap in private-mib
enable command to enable Eth-Trunk member interfaces to send traps through a
private MIB. Traps sent through a private MIB carry the number of the specific
Eth-Trunk interface.
After the trunk-member trap in private-mib enable command is run, traps are
sent through a private MIB, instead of a public MIB. In this case, you can view the
traps only by using the private MIB of Huawei.
Context
The number of Up member links affects the status and bandwidth of an Eth-
Trunk. To ensure that the Eth-Trunk functions properly and is less affected by
member link status changes, set the following thresholds.
● Lower threshold for the number of active interfaces: When the number of
active interfaces falls below this threshold, the Eth-Trunk goes Down. This
guarantees the Eth-Trunk a minimum available bandwidth.
● Upper threshold for the number of active interfaces: When the number of
active interfaces reaches this threshold, you can add new member interfaces
to the Eth-Trunk, but excess member interfaces enter the Down state. This
improves network reliability with assured bandwidth.
The upper threshold for the number of active interfaces at the local end can be
different from that at the remote end. If the two values are different, the smaller
one is used.
NOTE
After the upper and lower thresholds for the number of active interfaces are set, the range
of the active interface quantity is specified. Depending on the negotiation result of the local
and remote ends on a link, the number of active interfaces can reach the upper threshold
at most. The active interface is selected as follows: select an Actor based on the system
priority and system ID, and then select the active interface based on the port priority and
port ID of the Actor. To configure a specific interface as the active interface, run the lacp
priority command in the interface view to increase the interface priority.
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 is 8 on the
CE5810EI. for CE5880EI and CE6880EI, the upper threshold for the number of
active interfaces is 64, for other models, the upper threshold for the number of
active interfaces depends on the assign forward eth-trunk mode command:
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.
----End
Context
On an Eth-Trunk interface, you can load balance traffic among member interfaces
according to the weights configured for the member interfaces.
The higher the weight of a member interface, the heavier the load over the
member link. Therefore, you can configure a higher weight for a member interface
so that the member link can carry a heavier load.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The Eth-Trunk member interface view is displayed.
Step 3 Run distribute-weight weight-value
The load balancing weight is configured for the Eth-Trunk member interface.
The default weight of an Eth-Trunk member interface is 1.
The total weight of member interfaces in an Eth-Trunk cannot exceed the
maximum number of member interfaces allowed.
Step 4 Run commit
The configuration is committed.
----End
Context
An Eth-Trunk supports per-packet load balancing and per-flow load balancing.
● Per-packet load balancing can improve Eth-Trunk bandwidth efficiency to
ensure even load balancing among equal-cost routes, but cannot prevent
packet mis-sequencing. To ensure packet sequencing, confirm that the device
or terminal receiving traffic supports packet reassembly in case of packet mis-
sequencing. Switches support the following per-packet load balancing modes:
– Random mode: The outbound interface of packets is generated randomly
and calculated based on the time when the packets reach the Eth-Trunk.
When the IP address and MAC address of known unicast packets remain
unchanged, configure random per-packet load balancing.
– Round-robin mode: Eth-Trunk member interfaces forward traffic in turn.
When known unicast packets have a similar length, configure round-
robin per-packet load balancing.
● Per-flow load balancing ensures that packets of the same data flow are
forwarded on the same physical link and those of different data flows are
forwarded on different physical links. Table 3-9 lists the load balancing
modes for different types of packets.
IPv4 packets src-ip, dst-ip, l4- src-ip, dst-ip, l4- The load
src-port and l4- src-port, l4-dst- balancing mode
dst-port port, and is relevant to the
protocol packet type and
irrelevant to the
IPv6 packets src-ip, dst-ip, l4- src-ip, dst-ip, packet
src-port, and l4- protocol, l4-src- forwarding
dst-port port, and l4-dst- process.
port
For example,
MPLS packets Ingress/Egress/ For switches even if the
Transit: top- excluding the system provides
label and 2nd- CE6865EI, only Layer 2
label CE6857EI, forwarding for
CE8861EI, and IPv4 packets, the
CE8868EI: IPv4 packets are
load balanced
Ingress/Egress/
according to the
Transit: top-
load balancing
label, 2nd-label,
mode for IPv4
dst-ip, and src-ip
packets. When
For the the system
CE6865EI, cannot identify
CE6857EI, IPv4, IPv6, or
CE8861EI, and MPLS packets,
CE8868EI: the system load
Ingress/Egress/ balances packets
Transit: top- based on src-
label, 2nd-label, mac, dst-mac,
3rd-label, 4th- src-interface,
label, 5th-label, and eth-type for
dst-ip, src-ip, Layer 2 packets.
and src-
interface
NOTE
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.
Procedure
Step 1 Run system-view
Run the following commands as required. You can configure a load balancing
mode for Layer 2 packets, IPv4 packets, IPv6 packets, FCoE, and MPLS packets
respectively.
Only the CE6865EI, CE6857EI, CE8861EI, and CE8868EI support 3rd-label, 4th-label,
5th-label, and src-interface. If src-ip or dst-ip is configured, 4th-label or 5th-label
cannot be configured.
In V200R005C10 and earlier versions, if 4th-label and 5th-label are configured for
load balancing of MPLS packets in the load balancing profile view or ECMP view, this
configuration takes effect for both Eth-Trunk and ECMP. The load balancing mode
based on src-ip and dst-ip conflicts with that based on 4th-label and 5th-label, and
the last delivered configuration takes effect. Therefore, the effective load balancing
mode is inconsistent with that in the configuration file.
● Run fcoe { dst-fcid | src-fcid } *
A load balancing mode is configured for a stack port or fabric port in the
specified load balancing profile.
By default, a stack port or fabric port load balances packets based on hash-
mode (1) and universal-id (1) in a load balancing profile.
The CE5810-48T4S-EI uses dual chips that are connected through two
interfaces. Traffic between chips is load balanced between the two
interfaces. The load balancing mode is the same as enhanced profile on an
Eth-Trunk. When the global load balancing mode is changed, the load
balancing mode on two interfaces between chips is also affected.
c. Run commit
The configuration is committed.
● Configure a load balancing mode for unknown unicast traffic.
a. Run load-balance unknown-unicast { mac | enhanced }
A load balancing mode is configured.
By default, the load balancing mode is enhanced.
b. Run commit
The configuration is committed.
----End
Follow-up Procedure
● Configure simulated calculation of an Eth-Trunk outbound interface.
Configure simulated calculation of an Eth-Trunk outbound interface after
specifying the 5-tuple information, source MAC address, and destination
address.
display load-balance forwarding-path unicast interface eth-trunk trunk-id src-interface interface-
type interface-number { ethtype ethtype-number | vlan vlan-id | [ [ src-ip src-ip-data | dst-ip dst-ip-
data ] * | [ src-ipv6 src-ipv6-data | dst-ipv6 dst-ipv6-data ] * ] | src-mac src-mac-data | dst-mac dst-
mac-data | protocol { protocol-number | icmp | igmp | ip | ospf | tcp [ l4-src-port src-port-data | l4-
dst-port dst-port-data ] * | udp [ l4-src-port src-port-data | l4-dst-port dst-port-data ] * } } * slot slot-
id
● Verifying the Configuration
Verify the outbound interface of packets that contain specified 5-tuple
information, source MAC address, and destination MAC address.
display port forwarding-path { src-ip src-ip-data | dst-ip dst-ip-data | src-mac src-mac-data | dst-
mac dst-mac-data | protocol { protocol-number | gre | icmp | igmp | ip | ipinip | ospf | tcp [ l4-src-
port src-port-data | l4-dst-port dst-port-data ] * | udp [ l4-src-port src-port-data | l4-dst-port dst-
port-data ] * } } *
Context
An Eth-Trunk uses flow-based load balancing. Per-flow load balancing ensures
that packets of the same data flow are forwarded on the same physical link and
those of different data flows are forwarded on different physical links.
Load balancing is valid only for outgoing traffic; therefore, interfaces at both ends
of the link can use different load balancing modes.
Table 3-10 lists load balancing modes for different types of packets.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run load-balance profile profile-name
A load balancing profile is configured and its view is displayed. profile-name
specifies the name of the load balancing profile.
By default, there is a load balancing profile named default.
Step 3 Run the following commands as required. You can configure load balancing modes
for Layer 2, IPv4, IPv6, MPLS, VPLS, TRILL, and FCoE packets, respectively.
● Run l2 [ src-mac | dst-mac | vlan | eth-type ] *
During Layer 2 forwarding, the switch load balances only IPv4, IPv6, 802.1ah, ARP, and
CFM packets based on eth-type.
During Layer 2 forwarding, an Eth-Trunk configured with Dot1q tunnel, VLAN stacking,
VLL, or VPLS cannot load balance packets based on the VLAN ID.
● Run ip [ src-ip | dst-ip | l4-src-port | l4-dst-port | protocol ] *
To load balance IPv6 packets based on the transport-layer source and destination port
numbers, run the ip [ l4-src-port | l4-dst-port ] * command.
● Run mpls [ 2nd-label | 3rd-label | top-label ] * or mpls [ src-ip | dst-ip | l4-
src-port | l4-dst-port ] *
A load balancing mode is configured for MPLS packets in the specified load
balancing profile.
By default, MPLS packets are load balanced based on top-label, 2nd-label,
and fields in the inner IP header (IPv4/IPv6: src-ip, dst-ip, l4-src-port, and l4-
dst-port).
NOTE
On an IPv6 underlay network, if the IPv6 VXLAN function is enabled and the switch
functions as a transit or egress node on the MPLS network, configurations related to
the hash field in inner information in MPLS packets do not take effect in the load
balancing profile. In this scenario, the mpls inner-type { ipv4 | ipv6 | l2 | any }
command cannot be used to change the load balancing mode for MPLS packets in the
load balancing profile. Instead, you can use the source and destination IP addresses in
inner information in MPLS packets to configure a load balancing mode in the load
balancing profile.
– The mpls [ inner-ip | inner-ipv6 ] * command can be configured only when the
IPv6 VXLAN function is enabled. In addition, this command cannot be used to
configure a load balancing mode for VPLS packets. If the IPv6 VXLAN function is
disabled, the switch automatically deletes the configurations related to the mpls
[ inner-ip | inner-ipv6 ] * command.
– For the CE6870EI and CE6875EI, if MPLS packets with four or more labels are
received, Eth-Trunk or ECMP load balancing cannot be implemented based on the
inner IP header.
– For the CE6870EI and CE6875EI, if the implicit null label is disabled and the outer
label is popped out (for example, ASBR in inter-AS VPN Option B and inter-AS VPN
Option C networking), packets may be unable to be load balanced in the load
balancing mode using ECMP or Eth-Trunk based on the inner field in MPLS packets.
– The mpls [ inner-ip | inner-ipv6 ] * command takes effect only on the CE6875EI.
● Run user-defined ethernet-over-mpls [ dot1q-tagtag-number ] { inner-
sipsip-offsetsip-nybble-number | inner-dipdip-offsetdip-nybble-number } *
Load balancing based on the inner IP address of VPLS packets is configured
on the outbound Eth-Trunk on the transit node.
● Run fcoe { dst-fcid | src-fcid } *
By default, the Eth-Trunk load balancing mode on egress and transit nodes of
the TRILL network is ipv4.
– l2: indicates load balancing based on the source MAC address,
destination MAC address, and VLAN ID. The items used in load balancing
depend on the l2 command.
– ipv4: indicates load balancing based on the source MAC address,
destination MAC address, source IPv4 address, destination IPv4 address,
and VLAN ID. The items used in load balancing depend on the l2 and ip
commands.
– ipv6: indicates load balancing based on the source MAC address,
destination MAC address, source IPv6 address, destination IPv6 address,
and VLAN ID. The items used in load balancing depend on the l2 and
ipv6 commands.
● Run eth-trunk { src-interface | seedseed-data | universal-iduniversal-id |
hash-modehash-mode-id } *
An Eth-Trunk load balancing mode is configured in the specified load
balancing profile.
NOTE
----End
Follow-up Procedure
● Configure simulated calculation of an Eth-Trunk outbound interface.
Run the display load-balance forwarding-path unicast interface eth-trunk
trunk-id src-interface interface-type interface-number { ethtype ethtype-
number | vlan vlan-id | [ [ src-ip src-ip-data | dst-ip dst-ip-data ] * | [ src-ipv6
src-ipv6-data | dst-ipv6 dst-ipv6-data ] * ] | src-mac src-mac-data | dst-mac
dst-mac-data | protocol { protocol-number | icmp | igmp | ip | ospf | tcp [ l4-
src-port src-port-data | l4-dst-port dst-port-data ] * | udp [ l4-src-port src-
port-data | l4-dst-port dst-port-data ] * } } * slot slot-id command to
configure simulated calculation of an Eth-Trunk outbound interface after the
Context
By default, a CE switch processes received PPPoE packets as common Ethernet
packets. Figure 3-16 shows the format of PPPoE packets. The switch cannot
identify the 5-tuple information in PPPoE packets and performs the hash
algorithm based on the outer Ethernet frame of common Layer 2 packets by
default. Fields in the Layer 2 frames of PPPoE packets are fixed except the source
MAC address, so packets are often unevenly load balanced on an Eth-Trunk. To
improve the load balancing effect, use inner information of PPPoE packets for load
balancing.
PPP
Version Type Code Session_ID Length PPPoE
Packet
IP
PPP PPP
Packet Padding
NOTE
The CE5880EI and CE6880EI can identify PPPoE packets and load balance the PPPoE
packets without configuring Eth-Trunk load balancing.
Procedure
● Configure a load balancing mode for PPPoE packets on the CE6870EI and
CE6875EI.
a. Run system-view
By default, the switch load balances PPPoE packets based on the source
MAC address (smac), destination MAC address (dmac), and VLAN ID
(vlan).
You can specify session-id and l4-src-port so that the switch load
balances PPPoE packets based on the session ID and transport-layer
source port of PPPoE packets.
c. Run commit
By default, the switch load balances PPPoE packets based on the source
MAC address (smac) and destination MAC address (dmac).
You can specify session-id and l4-src-port so that the switch load
balances PPPoE packets based on the session ID and transport-layer
source port of PPPoE packets.
NOTE
----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 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 system selects active interfaces based on interface priorities. This
may lead to low-speed member interfaces with high priorities being selected as
active interfaces, providing less bandwidth for services. To select high-speed
member interfaces as active interfaces, run the lacp select { priority | speed }
command to configure the system to select active interfaces based on the
interface rate.
----End
Context
When devices are connected through Eth-Trunk interfaces in LACP mode, the
device with a higher LACP system priority functions as the LACP Actor. The other
device then selects active member interfaces based on the interface priorities of
the LACP Actor. If the two connected devices have the same LACP system priority,
the LACP system IDs determine the device priorities. To configure an LACP system
ID, run the lacp system-id command. The device with a higher priority then
becomes the LACP Actor. The other device then selects active member interfaces
based on the interface priorities of the LACP Actor.
In this scenario, two Layer 3 Eth-Trunks of the device use the bridge MAC address
by default. When the MAC address is the same, the Layer 3 protocol cannot work.
To ensure that Layer 3 traffic is forwarded normally, configure the MAC address in
Layer 3 mode for at least one Eth-Trunk so that the two Eth-Trunks use different
MAC addresses.
Procedure
Step 1 Run system-view
----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 unstable data transmission on an Eth-Trunk due to frequent status changes of
some links.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Step 3 Run lacp preempt enable
LACP preemption is enabled for the Eth-Trunk.
----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.
● 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.
Step 4 Run commit
The configuration is committed.
----End
Context
A server often has two or more NICs. One NIC is used for server management and
service traffic forwarding, other NICs are used for only service traffic forwarding. In
Figure 3-17, a switch is connected to a server through the Eth-Trunk that is added
to VLAN 10 and VLAN 20. VLAN 10 and VLAN 20 are used for forwarding
management packets and service packets, respectively. An independent VLAN
needs to be configured on an Eth-Trunk member interface that connected to the
management NIC of a server, that is, VLAN 10 needs to be bound to the Eth-Trunk
member interface so that the Eth-Trunk member interface can be specially used
for server management. This prevents management packets from being discarded
when management packets are load balanced on different NICs. In addition,
service traffic of VLAN 20 can still be load balanced on all Eth-Trunk member
interfaces, improving the bandwidth usage.
VLAN 10 VLAN 20
Eth-Trunk
Interface configured with
the independent VLAN
Interface of the management NIC
When the Eth-Trunk member interface configured with the independent VLAN is
in Unselect state during LACP negotiation, it cannot forward packets. In this
situation, you can run the trunk member vlan lacp disable command to
configure a flexibly independent VLAN on an Eth-Trunk member interface. When
the Eth-Trunk member interface is in Unselect state, the flexibly independent
VLAN becomes available. The system automatically disables LACP so that the Eth-
Trunk member interface in Unselect state can still forward packets. When the
flexibly independent VLAN becomes available, the Eth-Trunk member interface can
only forward packets in the local VLAN but cannot process traffic from other
VLANs. When the Eth-Trunk member interface enters the Select state, the
independent VLAN becomes available and the Eth-Trunk member interface can
still process traffic from other VLANs.
NOTE
The CE6870EI and CE6875EI do not support the independent VLAN and flexibly
independent VLAN, and the CE5880EI and CE6880EI do not support the flexibly
independent VLAN.
NOTE
● This function applies to the scenario where a switch connects to a server, and it can only be
configured on the member interface connecting to the server's management NIC.
● In an Eth-Trunk, only one member interface can be bound to a VLAN or VLANs and one
member interface can be bound to a maximum of eight VLANs. Member interfaces of
multiple Eth-Trunks can be bound to the same VLAN.
● The switch supports a maximum of 256 bound VLANs. If N Eth-Trunk member interfaces
are bound to M VLANs, the maximum value of N multiplied by M is 256.
● After this command is configured, packets from the bound VLAN can be only forwarded
through the bound Eth-Trunk member interface. Non-unicast traffic on the Eth-Trunk can
be only forwarded through the bound Eth-Trunk member interface.
● When an Eth-Trunk member interface is bound to a VLAN or VLANs, VLAN mapping, VLAN
stacking, MUX VLAN, or FCoE VLAN cannot be configured.
● When an Eth-Trunk member interface is bound to a VLAN or VLANs, M-LAG cannot be
configured.
● If Layer 2 sub-interfaces are created on an Eth-Trunk and a member interface is bound to
an independent VLAN, the VLAN cannot connect to non-VXLAN tunnels.
Procedure
● Bind an independent VLAN to an Eth-Trunk member interface.
a. Run system-view
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
After this lacp force-up command is run, the force-up state takes effect only
when all the member interfaces of the Eth-Trunk interface in static LACP mode
time out in receipt of LACPDUs.
When all the Eth-Trunk member interfaces' force-up state takes effect, the
minimum number of active member links configured using the least active-
linknumber link-number command still takes effect, but the maximum number of
active member links configured using the max active-linknumber link-number
command stops taking effect.
----End
Context
● If the state of an Eth-Trunk frequently flaps, the LACP protocol status of the
Eth-Trunk also flaps, affecting the Eth-Trunk operations. To resolve this
problem, enable the state flapping suppression function on the Eth-Trunk
working in LACP mode.
● After LACP negotiation succeeds on an Eth-Trunk interface, the interface will
save the source MAC address of the most recently received packet, and will
check the source MAC addresses of packets. If the Eth-Trunk interface receives
a packet with the source MAC address being different from the one which
saved, the Eth-Trunk may be flapped because the once more negotiation.
To prevent an Eth-Trunk interface from alternating between Up and Down,
enable the invalid-MAC-based flapping suppression function on the Eth-Trunk
interface working in LACP mode. After this function is enabled, the Eth-Trunk
interface drops the packet and records the packet information if receiving a
packet with the source MAC address being different from the valid one. In this
manner, the Eth-Trunk interface does not alternate between Up and Down
even if packet flapping occurs.
Procedure
● Enable the state flapping suppression function on an Eth-Trunk.
a. Run system-view
Procedure
● Run the display eth-trunk [ trunk-id [ interface interface-type interface-
number | verbose ] | brief ] command to check the Eth-Trunk configuration.
● Run the display eth-trunk membership trunk-id command to check
information about Eth-Trunk member interfaces.
● Run the display load-balance profile [ profile-name ] command to check the
load balancing profile of the Eth-Trunk.
● Run the display forward eth-trunk mode command to check the number of
LAGs supported by the device.
----End
Context
Determine whether to enable preferentially forwarding of local traffic on an Eth-
Trunk based on actual needs:
● If active interfaces in the local Eth-Trunk have sufficient bandwidth to forward
traffic on the local device, enable this function to improve traffic forwarding
efficiency and increase bandwidth use efficiency between stack devices.
● If active interfaces in the local Eth-Trunk do not have sufficient bandwidth to
forward traffic on the local device, disable this function to prevent packet loss.
Some traffic on the local device is forwarded through member interfaces on
another device.
NOTE
For the CE8860EI, when the system resource mode is set to the large ARP mode or the UFT
flexible resource mode of ARP entries, preferentially forwarding of local traffic does not apply to
Layer 3 traffic whose outbound interface in the ARP entry is an Eth-Trunk member interface.
Pre-configuration Tasks
Before enabling local preferential forwarding on an Eth-Trunk, complete the
following tasks:
● Create an Eth-Trunk and add physical interfaces to the Eth-Trunk.
● Establish a stack.
● Ensure that member interfaces of the local Eth-Trunk have sufficient
bandwidth to forward local traffic.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The view of an Eth-Trunk is displayed.
Step 3 Run undo local-preference disable
The Eth-Trunk is configured to preferentially forward local traffic.
By default, an Eth-Trunk forwards traffic preferentially through local member
interfaces.
NOTE
This function is valid only for known unicast packets, and does not work with unknown
unicast packets, broadcast packets, and multicast packets.
----End
Procedure
Step 1 Run system-view
subnumber specifies the number of the Layer 3 sub-interface. The value is in the
range 1 to 99999999.
NOTE
By default, the LinkDown alarm (Trap OID: 1.3.6.1.6.1.1.5.3) is generated when the status of a
Layer 2 or Layer 3 sub-interface changes. If a large number of Layer 2 or Layer 3 sub-interfaces
exist on a device, the LinkDown alarm is reported on the sub-interfaces at the interval of several
minutes. In this case, an NMS has to process a large number of interface status change alarms,
which overloads the NMS. To resolve this problem, run the subinterface trap updown disable
command in the system view to disable LinkDown alarm generation on the Layer 2 or Layer 3
sub-interfaces as needed. After this command is run, the LinkDown alarm is no longer
generated on any of the device's Layer 2 or Layer 3 sub-interfaces in case of a status change.
Therefore, exercise caution when running this command.
----End
Prerequisites
Eth-Trunk interfaces have been configured to work in LACP mode.
Context
A device reports an LACP alarm if its Eth-Trunk service in LACP mode fails. To
prevent the device from frequently reporting such alarms, LACP alarm control can
be enabled. After this function is enabled, the device reports
hwLacpNegotiateFailed, hwLacpPartialLinkLoss, hwLacpTotalLinkLoss, or Eth-Trunk
linkdown alarms only when LACP negotiation fails due to the following reasons:
● The device's physical link goes Down.
● LACP negotiation times out.
● LACP determines that packets are looped back.
● LACP determines that the system ID and port key in the LACPDU from the
peer end on the local port are inconsistent with those from the peer end on
the reference port.
NOTE
The CE6850EI, CE6810EI, and CE5800 series switches do not support this function.
Procedure
Step 1 Run system-view
The system view is displayed.
Although a clear alarm is reported, the problem triggering the alarm persists.
----End
Procedure
Step 1 Run system-view
----End
Follow-up Procedure
If traffic flows through the interface, you can use the display port forwarding-
path path-id pathnum statistics command to check statistics on the packets that
contain specified 5-tuple information.
Context
NOTICE
Procedure
● Run the reset lacp statistics eth-trunk [ trunk-id [ interface interface-type
interface-number ] ] command to clear statistics on transmitted and received
LACP packets.
● Run the reset port forwarding-path path-id pathnum statistics command
to clear statistics on the packets that contain the specified 5-tuple
information.
----End
Context
During routine maintenance, run the following commands in any view to check
the LAG operating status.
Procedure
● Run the display eth-trunk [ trunk-id [ interface interface-type interface-
number | verbose ] | brief ] command to check the Eth-Trunk configuration.
● Run the display lacp statistics eth-trunk [ trunk-id [ interface interface-type
interface-number ] ] command to check the statistics about LACPDUs sent
and received in LACP mode.
● Run the display interface eth-trunk [ trunk-id ] command to check the Eth-
Trunk status.
● Run the display eth-trunk membership trunk-id command to check
information about member interfaces of an Eth-Trunk.
----End
NOTE
The ping test applies to scenarios where two devices are directly connected through an Eth-
Trunk.
Pre-configuration Tasks
Before using ping to monitor the reachability of Layer 3 Eth-Trunk member
interfaces, complete the following task:
● Run the undo portswitch command to configure the Eth-Trunk to work in
Layer 3 mode and configure an IP address for the Layer 3 Eth-Trunk.
NOTE
Procedure
Step 1 Enable the receive end to monitor Layer 3 Eth-Trunk member interfaces.
1. Run the system-view command to enter the system view.
2. Run the trunk member-port-inspect command to enable the receive end to
monitor Layer 3 Eth-Trunk member interfaces.
By default, the receive end is disabled from monitoring Layer 3 Eth-Trunk
member interfaces.
NOTE
The trunk member-port-inspect command takes effect for all Layer 3 Eth-Trunks on
a device. To test the connectivity of Eth-Trunks, disable this function after detection of
Eth-Trunk member interfaces is completed. If this function is not disabled, the device
keeps monitoring Eth-Trunk member interfaces, which consumes a lot of system
resources.
Step 2 Enable the transmit end to monitor Layer 3 Eth-Trunk member interfaces.
1. Run the ping [ ip ] [ -8021p 8021p-value | -a source-ip-address | -c count | -d
| { -f | ignore-mtu } | -h ttl-value | -i interface-type interface-number | -m
time | -p pattern | -q | -r | -ri | -s packetsize | -system-time | -t timeout | { -
tos tos-value | -dscp dscp-value } | -v | -vpn-instance vpn-instance-name ] *
host [ ip-forwarding ] command to enable the transmit end to monitor the
reachability of Layer 3 Eth-Trunk member interfaces.
NOTE
When testing the reachability of Layer 3 Eth-Trunk member interfaces, you must specify
the -a and -i parameters in the ping command. -a and -i indicate the source IP address
and source interface of ICMP Echo Request packets respectively.
----End
Networking Requirements
In Figure 3-18, 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.
VLAN10 VLAN10
VLAN20 VLAN20
Configuration Roadmap
The configuration roadmap is as follows:
1. Create an Eth-Trunk and add member interfaces to the Eth-Trunk to increase
link bandwidth.
2. Create VLANs and add interfaces to the VLANs.
3. Configure a load balancing mode to ensure that traffic is load balanced
among Eth-Trunk member interfaces.
Procedure
Step 1 Create an Eth-Trunk on SwitchA and SwitchB, and add member interfaces to the
Eth-Trunk.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] interface eth-trunk 1
[*SwitchA-Eth-Trunk1] mode manual load-balance
[*SwitchA-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/3
[*SwitchA-Eth-Trunk1] commit
[~SwitchA-Eth-Trunk1] quit
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] interface eth-trunk 1
[*SwitchB-Eth-Trunk1] mode manual load-balance
[*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/3
[*SwitchB-Eth-Trunk1] commit
[~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] commit
[~SwitchA-Eth-Trunk1] quit
NOTE
If the device is CE6870EI or CE6875EI, see 3.7.8 (Optional) Configuring a Load Balancing
Mode (CE6870EI and CE6875EI).
The preceding command output shows that Eth-Trunk 1 has three member
interfaces: 10GE1/0/1, 10GE1/0/2, and 10GE1/0/3. The member interfaces are all
in Up state. The Operating Status of Eth-Trunk 1 is up.
----End
Configuration Files
● Configuration file of SwitchA
#
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 10GE1/0/1
eth-trunk 1
#
interface 10GE1/0/2
eth-trunk 1
#
interface 10GE1/0/3
eth-trunk 1
#
interface 10GE1/0/4
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/5
port link-type trunk
port trunk allow-pass vlan 20
#
return
Networking Requirements
To improve bandwidth and connection reliability, configure a link aggregation
group (LAG) on two directly connected Switches, as shown in Figure 3-19. The
requirements are as follows:
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.
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
[*HUAWEI] commit
[~SwitchA] interface eth-trunk 1
[*SwitchA-Eth-Trunk1] mode lacp-static
[*SwitchA-Eth-Trunk1] commit
[~SwitchA-Eth-Trunk1] quit
Step 3 Set the system priority on SwitchA to 100 so that SwitchA becomes the Actor.
[~SwitchA] lacp priority 100
[*SwitchA] commit
Step 4 On SwitchA, set the upper threshold for the number of active interfaces to 2.
[~SwitchA] interface eth-trunk 1
[~SwitchA-Eth-Trunk1] lacp max active-linknumber 2
[*SwitchA-Eth-Trunk1] commit
[~SwitchA-Eth-Trunk1] quit
Step 5 Set the LACP interface priority and determine active links on SwitchA.
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] lacp priority 100
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] lacp priority 100
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit
# Check information about the Eth-Trunk of the Switches and check whether
negotiation is successful on the link.
[~SwitchA] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 Working Mode: Static
Preempt Delay: Disabled Hash Arithmetic: profile default
System Priority: 100 System ID: 0025-9e95-7c31
Least Active-linknumber: 1 Max Active-linknumber: 2
Operating Status: up Number Of Up Ports In Trunk: 2
Timeout Period: Slow
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
10GE1/0/1 Selected 10GE 100 1 20289 10111100 1
10GE1/0/2 Selected 10GE 100 2 20289 10111100 1
10GE1/0/3 Unselect 10GE 32768 3 20289 10100000 1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
10GE1/0/1 32768 0025-9e95-7c11 32768 4 20289 10111100
10GE1/0/2 32768 0025-9e95-7c11 32768 5 20289 10111100
10GE1/0/3 32768 0025-9e95-7c11 32768 6 20289 10100000
[~SwitchB] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 Working Mode: Static
Preempt Delay: Disabled Hash Arithmetic: profile default
System Priority: 32768 System ID: 0025-9e95-7c11
Least Active-linknumber: 1 Max Active-linknumber: 16
Operating Status: up Number Of Up Ports In Trunk: 2
Timeout Period: Slow
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
10GE1/0/1 Selected 10GE 32768 4 20289 10111100 1
10GE1/0/2 Selected 10GE 32768 5 20289 10111100 1
10GE1/0/3 Unselect 10GE 32768 6 20289 10100000 1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
10GE1/0/1 100 0025-9e95-7c31 100 1 20289 10111100
10GE1/0/2 100 0025-9e95-7c31 100 2 20289 10111100
10GE1/0/3 100 0025-9e95-7c31 32768 3 20289 10100000
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
10GE1/0/1 and 10GE1/0/2 become the active interfaces and are in Selected state.
Interface 10GE1/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
● Configuration file of SwitchA
#
sysname SwitchA
#
lacp priority 100
#
interface Eth-Trunk1
mode lacp-static
lacp max active-linknumber 2
#
interface 10GE1/0/1
eth-trunk 1
lacp priority 100
#
interface 10GE1/0/2
eth-trunk 1
lacp priority 100
#
interface 10GE1/0/3
eth-trunk 1
#
return
● Configuration file of SwitchB
#
sysname SwitchB
#
interface Eth-Trunk1
mode lacp-static
#
interface 10GE1/0/1
eth-trunk 1
#
interface 10GE1/0/2
eth-trunk 1
#
interface 10GE1/0/3
eth-trunk 1
#
return
Networking Requirements
In Figure 3-20, ServerA is directly connected to SwitchA through an Eth-Trunk in
static LACP mode. ServerB (file server) connected to SwitchA stores ServerA's
network adapter configuration. After ServerA restarts, its configuration is lost and
SwitchA must obtain the configuration from ServerB. SwitchA cannot perform
negotiation with ServerA because ServerA has lost its Eth-Trunk configuration. In
addition, SwitchA's Eth-Trunk cannot go Up and therefore is unable to forward
data.
You can configure the Eth-Trunk on SwitchA to work in dynamic LACP mode.
When LACP negotiation fails, SwitchA can forward packets at Layer 2 through
member interfaces. Therefore, ServerA can successfully obtain the configuration
from ServerB. After ServerA obtains the configuration, an Eth-Trunk in LACP mode
is established. Devices at both ends of the Eth-Trunk send LACPDUs for
negotiation.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the Eth-Trunk on SwitchA to work in dynamic LACP mode, and add
Ethernet physical interfaces to the Eth-Trunk to implement link aggregation.
2. Set the upper threshold for the number of active interfaces to improve
reliability.
3. Set LACP interface priorities and determine active interfaces so that interfaces
with higher priorities are selected as active interfaces.
Procedure
Step 1 Configure the Eth-Trunk on SwitchA to work in dynamic LACP mode and add
Ethernet physical interfaces to the Eth-Trunk.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] interface eth-trunk 1
[*SwitchA-Eth-Trunk1] mode lacp-dynamic
[*SwitchA-Eth-Trunk1] quit
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] eth-trunk 1
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] eth-trunk 1
[*SwitchA-10GE1/0/2] quit
[*SwitchA] interface 10ge 1/0/3
[*SwitchA-10GE1/0/3] eth-trunk 1
[*SwitchA-10GE1/0/3] quit
[*SwitchA] commit
Step 2 On SwitchA, set the upper threshold for the number of active interfaces to 2.
[~SwitchA] interface eth-trunk 1
[~SwitchA-Eth-Trunk1] lacp max active-linknumber 2
[*SwitchA-Eth-Trunk1] quit
[*SwitchA] commit
Step 3 Set LACP interface priorities and determine active links on SwitchA.
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] lacp priority 100
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] lacp priority 100
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit
Trunk ID (1) and working mode (dynamic LACP mode). 10GE1/0/1, 10GE1/0/2,
and 10GE1/0/3 are in Indep state.
[~SwitchA] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 Working Mode: Dynamic
Preempt Delay: Disabled Hash Arithmetic: profile default
System Priority: 32768 System ID: 0025-9e95-7c11
Least Active-linknumber: 1 Max Active-linknumber: 2
Operating Status: up Number Of Up Ports In Trunk: 0
Timeout Period: Slow
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState
Weight
10GE1/0/1 Indep 10GE 100 0 321 10100010 1
10GE1/0/2 Indep 10GE 100 1 321 10100010 1
10GE1/0/3 Indep 10GE 32768 2 321 10100010
1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey
PortState
10GE1/0/1 0 0000-0000-0000 0 0 0 10100011
10GE1/0/2 0 0000-0000-0000 0 0 0 10100011
10GE1/0/3 0 0000-0000-0000 0 0 0 10100011
# After SwitchA receives LACPDUs from ServerA and link aggregation negotiation
between SwitchA and ServerA succeeds, run the display eth-trunk command on
SwitchA to check Eth-Trunk information. The command output shows Eth-Trunk
information, such as Eth-Trunk ID (1) and working mode (dynamic LACP mode).
10GE1/0/1 and 10GE1/0/2 are active interfaces and in Selected state, and
10GE1/0/3 is in Unselect state.
[~SwitchA] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 Working Mode: Dynamic
Preempt Delay: Disabled: Hash Arithmetic: profile default
System Priority: 32768 System ID: 0025-9e95-7c11
Least Active-linknumber: 1 Max Active-linknumber: 2
Operating Status: up Number Of Up Ports In Trunk: 2
Timeout Period: Slow
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState
Weight
10GE1/0/1 Selected 10GE 100 0 321 10111100 1
10GE1/0/2 Selected 10GE 100 1 321 10111100 1
10GE1/0/3 Unselect 10GE 32768 2 321 10100000
1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey
PortState
10GE1/0/1 32768 0025-9e95-7c31 32768 0 321
10111100
10GE1/0/2 32768 0025-9e95-7c31 32768 1 321
10111100
10GE1/0/3 32768 0025-9e95-7c31 32768 2 321 10100000
----End
Configuration Files
Configuration file of SwitchA
#
sysname SwitchA
#
interface Eth-Trunk1
mode lacp-dynamic
lacp max active-linknumber 2
#
interface 10GE1/0/1
eth-trunk 1
lacp priority 100
#
interface 10GE1/0/2
eth-trunk 1
lacp priority 100
#
interface 10GE1/0/3
eth-trunk 1
#
return
Networking Requirements
As shown in Figure 3-21, SwitchB and SwitchC are connected through stack cables
to increase the total capacity of devices. The two switches functions as a logical
switch. SwitchB functions as the master switch and SwitchC as the backup switch.
To implement backup between devices and 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 10GE1/0/1 and
10GE1/0/2 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, 10GE1/0/1 forwards traffic from VLAN 2 and
10GE1/0/2 forwards traffic from VLAN3). To achieve this goal, configure the Eth-
Trunk to preferentially forward local traffic.
Figure 3-21 Preferentially forwarding local traffic through the local member
interface
Network
SwitchA
10GE1/0/1 10GE1/0/2
Eth-Trunk 1
10GE1/0/1 10GE2/0/1
iStack
SwitchB SwitchC
10GE1/0/2 10GE2/0/2
10GE1/0/2 10GE1/0/2
SwitchD SwitchE
10GE1/0/1 10GE1/0/1
VLAN 2 VLAN 33
VLAN
Configuration Roadmap
The configuration roadmap is as follows:
1. Create an Eth-Trunk to implement link aggregation.
2. Add member interfaces to the Eth-Trunk.
3. Enable the Eth-Trunk to preferentially forward local traffic so that traffic is
forwarded by member interfaces on the local device.
4. Configure Layer 2 forwarding to implement Layer 2 connectivity.
Procedure
Step 1 Create an Eth-Trunk and specify the allowed VLANs.
# Configure the stack. In this example, SwitchB is the master switch.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] vlan batch 2 3
[*SwitchB] interface eth-trunk 1
[*SwitchB-Eth-Trunk1] port link-type trunk
[*SwitchB-Eth-Trunk1] port trunk allow-pass vlan 2 3
[*SwitchB-Eth-Trunk1] commit
[~SwitchB-Eth-Trunk1] quit
# Configure SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 2 3
[*SwitchA] interface eth-trunk 1
[*SwitchA-Eth-Trunk1] port link-type trunk
[*SwitchA-Eth-Trunk1] port trunk allow-pass vlan 2 3
[*SwitchA-Eth-Trunk1] commit
[~SwitchA-Eth-Trunk1] quit
# Configure SwitchA.
[~SwitchA] interface 10GE 1/0/1
[~SwitchA-10GE1/0/1] eth-trunk 1
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10GE 1/0/2
[*SwitchA-10GE1/0/2] eth-trunk 1
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit
Step 3 In the stack, configure the Eth-Trunk to preferentially forward local traffic.
[~SwitchB] interface eth-trunk 1
[~SwitchB-Eth-Trunk1] undo local-preference disable
[*SwitchB-Eth-Trunk1] commit
[~SwitchB-Eth-Trunk1] quit
# Configure SwitchD.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchD
[*HUAWEI] commit
[~SwitchD] vlan 2
[*SwitchD-vlan2] quit
[*SwitchD] interface 10GE 1/0/1
[*SwitchD-10GE1/0/1] port link-type trunk
[*SwitchD-10GE1/0/1] port trunk allow-pass vlan 2
[*SwitchD-10GE1/0/1] quit
[*SwitchD] interface 10GE 1/0/2
[*SwitchD-10GE1/0/2] port link-type trunk
[*SwitchD-10GE1/0/2] port trunk allow-pass vlan 2
[*SwitchD-10GE1/0/2] quit
[*SwitchD] commit
# Configure SwitchE.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchE
[*HUAWEI] commit
[~SwitchE] vlan 3
[*SwitchE-vlan3] quit
[*SwitchE] interface 10GE 1/0/1
[*SwitchE-10GE1/0/1] port link-type trunk
[*SwitchE-10GE1/0/1] port trunk allow-pass vlan 3
[*SwitchE-10GE1/0/1] quit
[*SwitchE] interface 10GE 1/0/2
[*SwitchE-10GE1/0/2] port link-type trunk
[*SwitchE-10GE1/0/2] port trunk allow-pass vlan 3
[*SwitchE-10GE1/0/2] quit
[*SwitchE] commit
----End
Configuration Files
● Configuration file of the stack
#
sysname SwitchB
#
vlan batch 2 to 3
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
interface 10GE1/0/1
eth-trunk 1
#
interface 10GE1/0/2
port link-type trunk
Networking Requirements
In Figure 3-22, DeviceA is dual-homed to DeviceB and DeviceC. The Eth-Trunk in
LACP mode is deployed on DeviceA, and its member interfaces are connected to
10GE1/0/1 and 10GE1/0/2 of DeviceB and DeviceC. 10GE1/0/1 and 10GE1/0/2 use
the same rate and duplex mode. Traffic needs to be load balanced on the two
devices.
Internet
DeviceB DeviceC
10GE1/0/1 10GE1/0/1
~10GE1/0/2 ~10GE1/0/2
10GE1/0/1~10GE1/0/4
Eth-Trunk
DeviceA
Configuration Roadmap
The configuration roadmap is as follows:
1. Create Eth-Trunk 1 in static LACP mode on DeviceA, DeviceB, and DeviceC and
add member interfaces to Eth-Trunk 1 to implement link aggregation.
2. Configure the same LACP system ID on DeviceB and DeviceC.
3. Configure the same LACP system priority on DeviceB and DeviceC.
4. Configure number of Eth-Trunk member interfaces on DeviceC to increase by
32768 to prevent repeated numbers of Eth-Trunk member interfaces in LACP
mode on DeviceB and DeviceC.
Procedure
Step 1 Create Eth-Trunk 1 in LACP mode on DeviceA, DeviceB, and DeviceC and add
member interfaces to Eth-Trunk 1.
<HUAWEI> system-view
[~HUAWEI] sysname DeviceA
[*HUAWEI] commit
[~DeviceA] interface eth-trunk 1
[*DeviceA-Eth-Trunk1] mode lacp-static
[*DeviceA-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/4
[*DeviceA-Eth-Trunk1] commit
[~DeviceA-Eth-Trunk1] quit
<HUAWEI> system-view
[~HUAWEI] sysname DeviceB
[*HUAWEI] commit
[~DeviceB] interface eth-trunk 1
Step 3 Set the LACP system priority on DeviceB and DeviceC to 100.
[~DeviceB] lacp priority 100
[*DeviceB] commit
[~DeviceC] lacp priority 100
[*DeviceC] commit
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
10GE1/0/1 100 00e0-cf00-0000 32768 32769 321 10111100
10GE1/0/2 100 00e0-cf00-0000 32768 32770 321 10111100
10GE1/0/1 100 00e0-cf00-0000 32768 4 321 10111100
10GE1/0/2 100 00e0-cf00-0000 32768 5 321 10111100
[~DeviceB] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 Working Mode: Static
Preempt Delay: Disabled Hash Arithmetic: profile default
System Priority: 100 System ID: 00e0-cf00-0000
Least Active-linknumber: 1 Max Active-linknumber: 32
Operating Status: up Number Of Up Ports In Trunk: 2
Timeout Period: Slow
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
10GE1/0/1 Selected 10GE 32768 4 321 10111100 1
10GE1/0/2 Selected 10GE 32768 5 321 10111100 1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
10GE1/0/3 100 e468-a356-0cb1 32768 4 321 10111100
10GE1/0/4 100 e468-a356-0cb1 32768 2 321 10100010
[~DeviceC] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 Working Mode: Static
Preempt Delay: Disabled Hash Arithmetic: profile default
System Priority: 100 System ID: 00e0-cf00-0000
Least Active-linknumber: 1 Max Active-linknumber: 16
Operating Status: up Number Of Up Ports In Trunk: 2
Timeout Period: Slow
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
10GE1/0/1 Selected 10GE 32768 32769 321 10111100 1
10GE1/0/2 Selected 10GE 32768 32770 321 10111100 1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
10GE1/0/1 100 e468-a356-0cb1 32768 3 321 10111100
10GE1/0/2 100 e468-a356-0cb1 32768 1 321 10100010
The preceding information shows that the value of Operating Status on each
device is up, negotiation of Eth-Trunk 1 is successful. Member interfaces on
DeviceB and DeviceC are active interfaces in Selected state, member interfaces of
DeviceB and DeviceC can load balance traffic. The PortNo parameter on DeviceC
indicates that the numbers of Eth-Trunk member interfaces on DeviceC to increase
by 32768.
----End
Configuration Files
● DeviceA configuration file
#
sysname DeviceA
#
interface Eth-Trunk1
mode lacp-static
#
interface 10GE1/0/1
eth-trunk 1
#
interface 10GE1/0/2
eth-trunk 1
#
interface 10GE1/0/3
eth-trunk 1
#
interface 10GE1/0/4
eth-trunk 1
#
return
● DeviceB configuration file
#
sysname DeviceB
#
lacp priority 100
#
interface Eth-Trunk1
mode lacp-static
lacp system-id 00e0-cf00-0000
#
interface 10GE1/0/1
eth-trunk 1
#
interface 10GE1/0/2
eth-trunk 1
#
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.
NOTE
You can set the load balancing mode based on traffic models. When a parameter of
traffic changes frequently, you can set the load balancing mode based on this
parameter to ensure that the traffic is load balanced evenly. For example, if IP
addresses of packets change frequently, use the load balancing mode based on dst-ip,
src-ip, or src-dst-ip. If MAC addresses of packets change frequently but IP addresses
are fixed, use the load balancing mode based on dst-mac, src-mac, or src-dst-mac.
Fault Description
SwitchA is configured with link aggregation, but SwitchB is not configured with
link aggregation. As a result, the physical status of the member interface on
SwitchA is Up but the link protocol status is Down.
SwitchA SwitchB
10GE1/0/1 10GE1/0/1
10GE1/0/2 Eth-Trunk 10GE1/0/2
10GE1/0/3 10GE1/0/3
Eth-Trunk 1 Eth-Trunk 1
Procedure
Step 1 Run the display this command on 10GE1/0/1, 10GE1/0/2, and 10GE1/0/3 of
SwitchB. The three interfaces do no join the Eth-Trunk.
If interfaces join the Eth-Trunk, you can view the following configuration in the
command output.
#
interface 10GE1/0/1
eth-trunk 1
#
Step 2 On SwitchB, configure the same link aggregation mode as SwitchA. For details,
see 3.7 Configuring Link Aggregation in Manual Load Balancing Mode or 3.8
Configuring Link Aggregation in LACP Mode.
----End