CloudEngine 8800, 7800, 6800, and 5800 V200R005C10 Configuration Guide - Ethernet Switching
CloudEngine 8800, 7800, 6800, and 5800 V200R005C10 Configuration Guide - Ethernet Switching
Switches
V200R005C10
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective
holders.
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and
the customer. All or part of the products, services and features described in this document may not be
within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements,
information, and recommendations in this document are provided "AS IS" without warranties, guarantees
or representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute a warranty of any kind, express or implied.
Website: https://e.huawei.com
Intended Audience
This document is intended for network engineers responsible for CE series switches
configuration and management. You should be familiar with basic Ethernet
knowledge and have extensive experience in network deployment and
management.
Symbol Conventions
The symbols that may be found in this document are defined as follows.
Symbol Description
Command Conventions
The command conventions that may be found in this document are defined as
follows.
Convention Description
Security Conventions
● Password setting
– When configuring a password, the cipher text is recommended. To ensure
device security, change the password periodically.
– When you configure a password in plain text that starts and ends with
%^%#......%^%# (the password can be decrypted by the device), the
password is displayed in the same manner as the configured one in the
configuration file. Do not use this setting. After the system master key is
set using the set master-key command, do not start and end the key
with %@%# because the string starting and ending with %@%# is
considered as a valid cipher-text key.
– When you configure a password in cipher text, different features cannot
use the same cipher-text password. For example, the cipher-text password
set for the AAA feature cannot be used for other features.
– After the system software is downgraded and the switch restarts with the
configuration of the higher version, AAA, VTY, serial interface login, and
SNMP user passwords become invalid. As a result, users fail to log in to
the switch using the passwords and the switch is disconnected from the
network management system.
To address this problem, take the following measures:
i. If no password is configured for the console port, log in to the device
through the console port, and reconfigure AAA and password for
users such as VTY and SNMP users. For security purposes, the
console port password is recommended.
ii. If a password is configured for login through the console port, the
password becomes invalid after the downgrade and you cannot log
in to the switch through the console port. In the case of downgrade
to a version later than V200R005C10, contact Huawei technical
support engineers for assistance. If the version is downgraded to
V200R005C10 or an earlier version, perform the following steps to
resolve the issue:
1) Connect to the console port.
2) Power cycle the device. During the startup, enter Ctrl+B
according to the prompt to enter the BIOS menu.
3) Select 7.Modify console password to delete and change the
console port password.
4) Restart the device, log in to the device through the console port,
and reconfigure the password for AAA, VTY, or SNMP user.
● Encryption algorithm
Currently, the device uses the following encryption algorithms: DES, 3DES,
AES, DSA, RSA, DH, ECDH, HMAC, SHA1, SHA2, PBKDF2, scrypt, and MD5.
The encryption algorithm depends on the applicable scenario. Use the
recommended encryption algorithm; otherwise, security defense requirements
may be not met.
– For the symmetrical encryption algorithm, use AES with the key of 256
bits or more.
– When you need to use an asymmetric cryptography, RSA (2048-bit or
longer key) is recommended. In addition, use different key pairs for
encryption and signature.
– For the digital signature, RSA (2048-bit or longer key) or DSA (2048-bit
or longer key) is recommended.
– For key negotiation, DH (2048-bit or longer key) or ECDH (256-bit or
longer key) is recommended.
– For the hash algorithm, use SHA with the key of 256 bits or more.
– For the HMAC algorithm, use HMAC-SHA2.
– DES, 3DES, RSA and AES are reversible encryption algorithm. If protocols
are used for interconnection, the locally stored password must be
reversible.
– SHA1, SHA2, and MD5 are irreversible encryption algorithm. When
configuring a password for local administrator, it is recommended that
you use the SHA2 irreversible encryption algorithm.
Declaration
● This manual is only a reference for you to configure your devices. The
contents in the manual, such as command line syntax, and command outputs,
are based on the device conditions in the lab. The manual provides
instructions for general scenarios, but do not cover all usage scenarios of all
product models. The contents in the manual may be different from your
actual device situations due to the differences in software versions, models,
and configuration files. The manual will not list every possible difference. You
should configure your devices according to actual situations.
● The specifications provided in this manual are tested in lab environment (for
example, the tested device has been configured with a certain type of cards or
only one protocol is run on the device). Results may differ from the listed
specifications when you attempt to obtain the maximum values with multiple
functions enabled on the device.
● In this document, public IP addresses may be used in feature introduction and
configuration examples and are for reference only unless otherwise specified.
Contents
8 GVRP Configuration............................................................................................................429
8.1 Overview of GVRP.............................................................................................................................................................. 429
8.2 Understanding GVRP......................................................................................................................................................... 430
8.2.1 Basic Concepts..................................................................................................................................................................430
8.2.2 Packet Format.................................................................................................................................................................. 434
8.2.3 Working Mechanism...................................................................................................................................................... 435
8.3 Application Scenarios for GVRP..................................................................................................................................... 437
8.4 Licensing Requirements and Limitations for GVRP................................................................................................ 438
8.5 Default Settings for GVRP............................................................................................................................................... 441
8.6 Configuring GVRP............................................................................................................................................................... 441
8.6.1 Enabling GVRP................................................................................................................................................................. 441
8.6.2 (Optional) Setting GARP Timers................................................................................................................................442
8.6.3 Verifying the GVRP Configuration............................................................................................................................. 444
8.7 Maintaining GVRP.............................................................................................................................................................. 444
8.7.1 Clearing GVRP Statistics............................................................................................................................................... 445
11.7.5 (Optional) Manually Configuring the Mapping Between MSTIs and VLANs.......................................... 610
11.7.6 Enabling VBST................................................................................................................................................................ 612
11.7.7 Verifying the Configuration of Basic VBST Functions...................................................................................... 614
11.8 Setting VBST Parameters That Affect VBST Convergence................................................................................. 614
11.8.1 Setting the Network Diameter................................................................................................................................ 614
11.8.2 Setting Values of VBST Timers.................................................................................................................................615
11.8.3 Setting the VBST Timeout Interval......................................................................................................................... 616
11.8.4 Setting the Link Type of a Port................................................................................................................................ 617
11.8.5 Setting the Maximum Transmission Rate of a Port.......................................................................................... 618
11.8.6 Configuring a Port as an Edge Port and BPDU Filter Port............................................................................. 619
11.8.7 Setting the Maximum Number of Hops of VBST.............................................................................................. 620
11.8.8 Verifying the Configuration of VBST Parameters That Affect VBST Convergence.................................621
11.9 Configuring Protection Functions of VBST.............................................................................................................. 621
11.9.1 Configuring BPDU Protection on a Switching Device...................................................................................... 621
11.9.2 Configuring TC Protection on a Switching Device.............................................................................................622
11.9.3 Configuring Root Protection on a Port................................................................................................................. 623
11.9.4 Configuring Loop Protection on a Port................................................................................................................. 624
11.9.5 Verifying the Configuration of VBST Protection Functions............................................................................ 625
11.10 Setting Parameters for Interworking Between a Huawei Datacom Device and a Non-Huawei Device
......................................................................................................................................................................................................... 625
11.11 Maintaining VBST.......................................................................................................................................................... 627
11.11.1 Displaying VBST Running Information and Statistics.................................................................................... 627
11.11.2 Clearing VBST Statistics........................................................................................................................................... 627
11.12 Configuration Examples for VBST............................................................................................................................ 628
11.12.1 Example for Configuring VBST.............................................................................................................................. 628
12.7.1.4 Adding a Layer 2 Port to an ERPS Ring and Configuring the Port Role................................................ 668
12.7.1.5 (Optional) Configuring Timers in an ERPS Ring............................................................................................ 670
12.7.1.6 (Optional) Configuring the MEL Value............................................................................................................. 670
12.7.1.7 Verifying the ERPS Configuration........................................................................................................................ 671
12.7.2 Configuring ERPSv2..................................................................................................................................................... 671
12.7.2.1 Creating an ERPS Ring.............................................................................................................................................671
12.7.2.2 Configuring the Control VLAN..............................................................................................................................673
12.7.2.3 Configuring an ERP Instance and Activating the Mapping Between the ERP Instance and VLAN
......................................................................................................................................................................................................... 673
12.7.2.4 Adding a Layer 2 Port to an ERPS Ring and Configuring the Port Role................................................ 675
12.7.2.5 Configuring the Topology Change Notification Function........................................................................... 677
12.7.2.6 (Optional) Configuring ERPS Protection Switching.......................................................................................678
12.7.2.7 (Optional) Configuring Timers in an ERPS Ring............................................................................................ 679
12.7.2.8 Verifying the ERPS Configuration........................................................................................................................ 680
12.8 Maintaining ERPS............................................................................................................................................................. 680
12.8.1 Clearing ERPS Statistics.............................................................................................................................................. 680
12.9 Configuration Examples for ERPS...............................................................................................................................680
12.9.1 Example for Configuring ERPS Multi-instance................................................................................................... 680
12.9.2 Example for Configuring an ERPS Multi-ring Network................................................................................... 690
12.10 Troubleshooting ERPS.................................................................................................................................................. 700
12.10.1 Traffic Forwarding Fails in an ERPS Ring........................................................................................................... 700
1 Ethernet Switching
NOTE
To distinguish Ethernet frames of the two types, Ethernet frames defined in RFC 894 are
called Ethernet_II frames and Ethernet frames defined in RFC 1042 IEEE 802.3 are called
frames in this document.
History
In 1972, when Robert Metcalfe (father of Ethernet) was hired by Xerox, his first
job was to connect computers in Xerox's Palo Alto Research Center (PARC) to the
As Ethernet technology develops rapidly, Ethernet has become the most widely
used LAN technology and replaced most of other LAN standards, such as token
ring, fiber distributed data interface (FDDI), and attached resource computer
network (ARCNET). After rapid development of 100M Ethernet in the 20th
century, gigabit Ethernet and even 10G Ethernet are now expanding their
applications as promoted by international standardization organizations and
industry-leading enterprises.
Purpose
Ethernet is a universal communication protocol standard used for local area
networks (LANs). This standard defines the cable type and signal processing
method used for LANs.
Ethernet networks are broadcast networks established based on the Carrier Sense
Multiple Access with Collision Detection (CSMA/CD) mechanism. Collisions restrict
Ethernet performance. Early Ethernet devices such as hubs work at the physical
layer, and cannot confine collisions to a particular scope. This restricts network
performance improvement. Working at the data link layer, switches are able to
confine collisions to a particular scope. Switches help improve Ethernet
performance and have replaced hubs as mainstream Ethernet devices. However,
switches do not restrict broadcast traffic on the Ethernet. This affects Ethernet
performance. Dividing a LAN into virtual local area networks (VLANs) on switches
or using Layer 3 switches can solve this problem.
Ethernet uses passive medium and transmits data in broadcast mode. It defines
protocols used on the physical layer and data link layer, interfaces between the
two layers, and interfaces between the data link layer and upper layers.
Physical Layer
The physical layer determines basic physical attributes of Ethernet, including data
coding, time scale, and electrical frequency.
The physical layer is the lowest layer in the Open Systems Interconnection (OSI)
reference model and is closest to the physical medium (communication channel)
that transmits data. Data is transmitted on the physical layer in binary bits (0 or
1). Transmission of bits depends on transmission devices and physical media, but
the physical layer does not refer to a specific physical device or a physical media.
Actually, the physical layer is located above a physical medium and provides the
data link layer with physical connections to transmit original bit streams.
Network
layer
LLC layer
Data link
layer MA
Physica layer
C
l
layer
The following sections describe concepts involved in the physical layer and data
link layer.
● 10BASE-5
● 10BASE-T
● 10BASE-F
● 100BASE-T4
● 100BASE-TX
● 100BASE-FX
● 1000BASE-SX
● 1000BASE-LX
● 1000BASE-TX
● 10GBASE-T
● 10GBASE-LR
● 10GBASE-SR
In the preceding standards, 10, 100, 1000 and 10G stand for transmission rates,
and BASE represents baseband.
● 10M Ethernet cable standards
Table 1-1 lists the 10M Ethernet cable standards defined in IEEE 802.3.
NOTE
Coaxial cables have a fatal defect: Devices are connected in series and therefore a
single-point failure can cause the breakdown of the entire network. As the physical
standards of coaxial cables, 10BASE-2 and 10BASE-5 have fallen into disuse.
● 100M Ethernet cable standards
100M Ethernet is also called Fast Ethernet (FE). Compared with 10M Ethernet,
100M Ethernet has a faster transmission rate at the physical layer, but they
have no difference at the data link layer.
Table 1-2 lists the 100M Ethernet cable standards.
Both 10Base-T and 100Base-TX apply to Category 5 twisted pair cables. They
have different transmission rates. The 10Base-T transmits data at 10 Mbit/s,
whereas the 100Base-TX transmits data at 100 Mbit/s.
The 100Base-T4 is rarely used now.
● Gigabit Ethernet cable standards
Gigabit Ethernet is developed on the basis of the Ethernet standard defined in
IEEE 802.3. Based on the Ethernet protocol, Gigabit Ethernet increases the
transmission rate to 10 times the FE transmission rate, reaching 1 Gbit/s.
Table 1-3 lists the Gigabit Ethernet cable standards.
Gigabit Ethernet technology can upgrade the existing Fast Ethernet from 100
Mbit/s to 1000 Mbit/s.
The physical layer of Gigabit Ethernet uses 8B10B coding. In traditional
Ethernet technology, the data link layer delivers 8-bit data sets to its physical
layer. After processing the data sets, the physical layer sends them to the data
link layer. The data sets are still 8 bits after processing.
The situation is different on the Gigabit Ethernet of optical fibers. The
physical layer maps the 8-bit data sets transmitted from the data link layer to
10-bit data sets and then sends them out.
● 10G Ethernet cable standards
1.2.3 CSMA/CD
● Definition of CSMA/CD
Ethernet was originally designed to connect computers and other digital
devices on a shared physical line. The computers and digital devices can
access the shared line only in half-duplex mode. Therefore, a mechanism of
collision detection and avoidance is required to prevent multiple devices from
contending for the line. This mechanism is called the carrier Sense Multiple
Access with Collision Detection (CSMA/CD).
The concept of CSMA/CD is described as follows:
– Carrier sense (CS)
Before transmitting data, a station checks whether the line is idle to
reduce chances of collision.
– Multiple access (MA)
Data sent by a station can be received by multiple stations.
– Collision detection (CD)
If two stations transmit electrical signals at the same time, the voltage
amplitude doubles the normal amplitude as signals of the two stations
accumulate. The situation results in collision.
The stations stop transmission after detecting the collision, and resume
the transmission after a random delay.
● CSMA/CD working process
CSMA/CD works as follows:
a. A station continuously detects whether the shared line is idle.
▪ If the line is in use, the station waits until the line becomes idle.
b. If two stations send data at the same time, a collision occurs on the line,
and signals on the line become unstable.
c. After detecting the instability, the station immediately stops sending
data.
d. The station sends a series of disturbing pulses. After a period of time, the
station resumes the data transmission.
The station sends disturbing pulses to inform other stations, especially
the station that sends data at the same time, that a collision occurred on
the line.
After detecting a collision, the station waits for a random period of time,
and then resumes the data transmission.
The use of minimum frame length can prevent the following situation: station A
finishes sending the last bit, but the first bit does not arrive at station B, which is
far from station A. Station B considers that the line is idle and begins to send data,
leading to a collision.
The upper layer protocol must ensure that the Data field of a packet contains at
least 46 bytes, so that the total length of the Data field, the 14-byte Ethernet
frame header, and the 4-byte check code at the frame tail can reach the minimum
frame length, as shown in Figure 1-2. If the Data field is less than 46 bytes, the
upper layer must pad the field to 46 bytes.
● Half-duplex mode
The half-duplex mode has the following features:
– Data can only be sent or received at any time.
– The CSMA/CD mechanism is used.
– The maximum transmission distance is limited.
Hubs work in half-duplex mode.
● Full-duplex mode
After Layer 2 switches replace hubs, the shared Ethernet changes to the
switched Ethernet, and the half-duplex mode is replaced by the full-duplex
mode. As a result, the transmission rate increases greatly, and the maximum
throughput doubles the transmission rate.
The full-duplex mode solves the problem of collisions and eliminates the need
for the CSMA/CD mechanism.
The full-duplex mode has the following features:
– Data can be sent and received at the same time.
– The maximum throughput doubles the transmission rate.
– This mode does not have the limitation on the transmission distance.
All network cards, Layer 2 devices (except hubs), and Layer 3 devices
produced support the full-duplex mode.
The following hardware components are required to realize the full-duplex
mode:
– Full-duplex network cards and chips
– Physical media with separate data transmission and receiving channels
– Point-to-point connection
Broadcast Domain
Packets are broadcast in a collision domain, which results in a low bandwidth
efficiency and degrades packet processing performance of network devices.
Therefore, broadcasting of packets must be restricted. For example, the ARP
protocol sends broadcast packets to obtain MAC addresses mapping specified IP
addresses. The all 1s MAC address FFFF-FFFF-FFFF is the broadcast MAC address.
All nodes must process data frames with this MAC address as the destination MAC
address. A broadcast domain is a group of nodes, among which broadcast packet
from one node can reach all the other nodes. A network bridge forwards unicast
packets according to its MAC address table and forwards broadcast packets to all
its ports. Therefore, nodes connected to all ports of a bridge belong to a broadcast
domain, but each port belongs to a different collision domain.
c. The MAC sub-layer adds the destination MAC address and source MAC
address to the data, calculates the length of the data frame, and forms
an Ethernet frame.
d. The Ethernet frame is sent to the peer according to the destination MAC
address.
e. The peer compares the destination MAC address with entries in the MAC
address table.
Field Description
Type The 2-byte Type field identifies the upper layer protocol of
the Data field. The receiver can know the meaning of the
Data field according to the Type field.
Ethernet allows multiple protocols to coexist on a LAN. The
hexadecimal values in the Type field of an Ethernet_II frame
stand for different protocols.
● Frames with the Type field value 0800 are IP frames.
● Frames with the Type field value 0806 are Address
Resolution Protocol (ARP) frames.
● Frames with the Type field value 8035 are Reverse
Address Resolution Protocol (RARP) frames.
● Frames with the Type field value 8137 are Internetwork
Packet Exchange (IPx) and Sequenced Packet Exchange
(SPx) frames.
As shown in Figure 1-5, the format of an IEEE 802.3 frame is similar to that
of an Ethernet_II frame except that the Type field is changed to the Length
field in an IEEE 802.3 frame, and the LLC field and the Sub-Network Access
Protocol (SNAP) field occupy 8 bytes of the Data field.
Length The Length field specifies the number of bytes in the Data
field.
SNAP The SNAP field consists of the Org Code field and the Type
field. Three bytes in the Org Code field are all 0s. The Type
field functions the same as the Type field in Ethernet_II
frames.
NOTE
For description about other fields, see the description of Ethernet_II frames.
Based on the values of DSAP and SSAP, IEEE 802.3 frames can be divided into
the following types:
– If DSAP and SSAP are both 0xff, the IEEE 802.3 frame changes to a
Netware-Ethernet frame that carries NetWare data.
– If DSAP and SSAP are both 0xaa, the IEEE 802.3 frame changes to an
Ethernet_SNAP frame.
Ethernet_SNAP frames can be encapsulated with data of multiple
protocols. The SNAP can be considered as an extension of the Ethernet
protocol. SNAP allows vendors to define their own Ethernet transmission
protocols.
The Ethernet_SNAP standard is defined by IEEE 802.1 to guarantee
interoperability between IEEE 802.3 LANs and Ethernet networks.
– Other values of DSAP and SSAP indicate IEEE 802.3 frames.
The following is an example that describes the applications of SSAP and DSAP.
Assume that terminals A and B use connection-oriented services. Data is
transmitted in the following process:
A Layer 2 device parses and learns source MAC addresses of Ethernet frames and
maintains a mapping table of MAC addresses and ports. This table is called a MAC
address table. When receiving an Ethernet frame, the device searches for the
destination MAC address of the frame in the MAC table to determine through
which port to forward this frame.
1. When the Layer 2 device receives an Ethernet frame, it records the source
MAC address and the inbound port of the frame in the MAC address table to
guide Layer 2 forwarding. If the same MAC address entry exists in the MAC
address table, the device resets the aging time of the entry. An aging
mechanism is used to maintain entries in the MAC address table. Entries that
are not updated within the aging time are deleted from the MAC address
table.
2. The device looks up the MAC address table based on the destination MAC
address of the Ethernet frame. If no matching entry is found, the device
forwards the frame to all its ports except the port from which the frame is
received. If the destination MAC address of the frame is a broadcast address,
the device forwards the frame to all its ports except the port from which the
frame is received. If a matching entry is found in the MAC address table, the
device forwards the frame to the port specified in the entry.
PC A Port 2
Port 1
Port 3
PC C
MAC C MAC A Type Data MA
CC
MA
CA
Typ
e Dat
a
Although Layer 2 devices can isolate collision domains, they cannot isolate
broadcast domains. As described in the Layer 2 forwarding process, broadcast
packets and packets that do not match nay entry in the MAC address table are
forwarded to all ports (except the port from which the frame is received). Packet
broadcasting consumes much bandwidth on network links and brings security
issues. Routers can isolate broadcast domains, but high costs and low forwarding
performance of routers limit the application of routers in Layer 2 forwarding. The
virtual local area network (VLAN) technology is introduced to solve this problem
in Layer 2 switching.
Figure 1-7 shows the MAC addresses, IP addresses, and gateway addresses of the
hosts, MAC address of the Layer 3 switch, and IP addresses of Layer 3 interfaces
configured in VLANs on the Layer 3 switch. The process of a ping from PC A to PC
B is as follows (the Layer 3 switch has not created any MAC address entry):
1. PC A finds that the destination IP address 10.2.1.2 (PC B) is on a different
network segment than its own IP address. Therefore, PC A sends an ARP
request to request for the MAC address mapping the gateway address
10.1.1.1.
2. L3 Switch receives the ARP request from PC A and finds that 10.1.1.1 is the IP
address of its own Layer 3 interface. L3 switch then sends an ARP reply to PC
A. The ARP reply carries the MAC address of its Layer 3 interface (MAC
Switch). In addition, L3 switch adds the mapping between the IP address and
MAC address of PC A (10.1.1.2 and MAC A) to its ARP table. The IP address
and MAC address of PC A are carried in the ARP request sent from PC A. And
L3 Switch adds the mapping between the source MAC address and VLAN ID
of the packet and outbound port to its MAC table.
3. After PC A receives the ARP reply from the gateway (L3 Switch), it sends an
ICMP request packet. In the ICMP request packet, the destination MAC
address (DMAC) is MAC Switch; the source MAC address (SMAC) is MAC A;
the source IP address (SIP) is 10.1.1.2; the destination IP address (DIP) is
10.2.1.2.
4. When L3 Switch receives the ICMP request packet, it looks up the MAC
address table according to the destination MAC address and VLAN ID of the
packet and finds the entry with the MAC address of its Layer 3 interface, the
packet needs to be forwarded at Layer 3. Then L3 Switch looks up Layer 3
forwarding entries of the switching chip to guide Layer 3 forwarding.
5. The switching chip loops up Layer 3 forwarding entries according to the
destination IP address of the packet. The entry lookup fails because no entry
has been created. The switching chip then sends the packet to the CPU for
software processing.
6. The CPU looks up the software routing table according to the destination IP
address of the packet and finds a directly connected network segment,
network segment of PC B. Then the CPU looks up its ARP table, and the
lookup still fails. Therefore, L3 Switch sends an ARP request to all ports in
VLAN 3 (network segment of PC B), to request the MAC address mapping IP
address 10.2.1.2.
7. After PC B receives the ARP request from L3 Switch, it checks the ARP request
and finds that 10.2.1.2 is its own IP address. PC B then sends an ARP reply
carrying its MAC address (MAC B). Meanwhile, PC B records the mapping
between the IP address and MAC address of L3 Switch (10.2.1.1 and MAC
Switch) in its ARP table.
8. When L3 Switch receives the ARP reply from PC B, it records the mapping
between the IP address and MAC address of PC B (10.2.1.2 and MAC B) in its
ARP table. L3 Switch changes the destination MAC address in the ICMP
request packet sent from PC A to MAC B and changes the source MAC
address to its own MAC address (MAC Switch), and then sends the ICMP
request to PC B. The Layer 3 forwarding entry containing the IP address and
MAC address of PC B, outbound VLAN ID, and outbound port is also added to
the Layer 3 forwarding of the switching chip. Subsequent packets sent from
PC A to PC B are directly forwarded according to this hardware entry.
9. When PC B receives the ICMP request packet from L3 Switch, it sends an ICMP
reply packet to PC A. The forwarding process for the ICMP reply packet is
similar to that for the ICMP request packet except that the ICMP reply packet
is directly forwarded to PC A by the switching chip according to the hardware
entry. The reason is that L3 Switch has obtained the mapping between the IP
address and MAC address of PC A and added matching Layer 3 forwarding
entry to the L3 forwarding table of the switching chip.
10. Subsequent packets exchanged between PC A and PC B are forwarded
following the same process: MAC address table lookup, Layer 3 forwarding
table lookup, and hardware forwarding by the switching chip.
In a summary, a Layer 3 switch provides high-speed Layer 3 switching through one
routing process (forwarding the first packet to the CPU and creating a hardware
Layer 3 forwarding entry) and multiple switching processes (hardware forwarding
of subsequent packets).
Data center
backbone
network
Core Layer
Access Layer
Server
Term Description
MAC Short for Media Access Control. At the data link layer of the
OSI model, the MAC sub-layer is adjacent to the physical
layer.
Abbreviations
Abbreviation Full Name
GE Gigabit Ethernet
This chapter describes how to configure the MAC address table. Each station or
server has a unique Medium Access Control (MAC) address. When a device
exchanges data with connected stations or servers, the device records their MAC
addresses, access interfaces, and VLAN IDs for unicast forwarding.
Static MAC address entry ● Static MAC address When static MAC
entries are manually address entries are
configured and configured, authorized
delivered to each LPU. users can use network
Static MAC address resources and other
entries never age. users are prevented
● The static MAC from using the bound
address entries saved MAC addresses to
in the system are not initiate attacks.
lost after a system
restart, LPU hot swap,
or LPU reset.
● After an interface is
statically bound to a
MAC address, other
interfaces discard
packets from this
source MAC address.
● Each static MAC
address entry can have
only one outbound
interface.
● Statically binding an
interface to a MAC
address does not affect
the learning of
dynamic MAC address
entries on the
interface.
Elements
Each entry in a MAC address table is identified by a MAC address and a VLAN ID
or VSI. When a destination host joins multiple VLANs or VSIs, the host's MAC
address corresponds to multiple VLAN IDs or VSIs in the MAC address table. Table
2-2 lists four MAC address entries, which specify the outbound interfaces for
packets with specified destination MAC addresses and VLAN IDs or VSI names. For
example, the first MAC address entry is used to forward the packets with
destination MAC address 0011-0022-0034 and VLAN 10 through outbound
interface 10GE3/0/1.
0011-0022-0034 10 10GE3/0/1
0011-0022-0034 20 10GE2/0/4
0011-0022-0035 30 Eth-Trunk20
Functions
A MAC address table is used for unicast forwarding of packets. In Figure 2-1,
when packets sent from PC1 to PC3 reach the switch, the switch searches its MAC
address table for the destination MAC address MAC3 and VLAN 10 in the packets
to obtain outbound interface Port3. The switch then forwards packets to PC3 from
Port3.
Port3 PC3
MAC3 MAC1 VLAN10 Type Data MAC
3 M
AC1
VLAN
1 0 Typ
e Da
ta
PortA
As shown in Figure 2-2, HostA sends a data frame to SwitchA. When receiving the
data frame, SwitchA obtains the source MAC address (HostA's MAC address) and
VLAN ID of the frame.
● If the MAC address entry does not exist in the MAC address table, SwitchA
adds an entry with the new MAC address, PortA, and VLAN ID to the MAC
address table.
● If the MAC address entry exists in the MAC address table, SwitchA resets the
aging timer of the MAC address entry and updates the entry.
NOTE
MAC address entry learning and update are triggered on a device only when the
device receives data frames.
1 2 3 4
0 T T T T
t1 t2 t3 Time
t2: The hit flag of the entry t3: The entry with MAC
with MAC address 00e0-fc00- address 00e0-fc00-0001
0001 and VLAN ID 1 is set to and VLAN ID 1 is deleted
0, but the entry is not deleted. because its hit flag is 0.
As shown in Figure 2-3, the aging time of MAC address entries is set to T. At t1,
packets with source MAC address 00e0-fc00-0001 and VLAN ID 1 arrive at an
interface, which has joined VLAN 1. If no entry with MAC address 00e0-fc00-0001
and VLAN 1 exists in the MAC address table, the MAC address is learned as a
dynamic MAC address entry in the MAC address table, and the hit flag of the
entry is set to 1.
1. At t2, if the device finds that the hit flag of the matching dynamic MAC
address entry with MAC address 00e0-fc00-0001 and VLAN 1 is 1, the device
sets the hit flag to 0 but does not delete the MAC address entry.
2. If no packet with source MAC address 00e0-fc00-0001 and VLAN 1 enters the
device between t2 and t3, the hit flag of the matching MAC address entry is
always 0.
3. At t3, the device finds that the hit flag of the matching MAC address entry is
0. The device considers that the aging time of the MAC address entry has
expired and deletes the MAC address entry.
The minimum holdtime of a dynamic MAC address entry ranges from T to 2T on
the device.
You can set the aging time of MAC address entries to control the life cycle of
dynamic MAC address entries in a MAC address table.
MAC address flapping does not occur frequently on a network unless a network
loop occurs. If MAC address flapping frequently occurs on your network, you can
quickly locate the fault and eliminate the loops according to alarms and MAC
address flapping records.
Network
Port1
MAC:11-22-33
SwitchA
Port2 Access port
MAC:11-22-33
Users
SwitchB
SwitchC SwitchD
Broadcast
storm
Incorrect
Data flow
connection
NOTE
MAC address flapping detection allows a device to detect changes in traffic transmission
paths based on learned MAC addresses, but the device cannot obtain the entire network
topology. It is recommended that this function be used on the interface connected to a user
network where loops may occur.
Port1
Switch
interface in the ARP entry is still 10GE1/0/1. At T3, the aging time of the ARP
entry expires, and the outbound interface in the ARP entry is changed to
10GE1/0/2 through ARP aging probe. Between T2 and T3, the outbound interface
in the ARP entry is unavailable, interrupting communication between devices on
different network segments.
● If ARP entries exist and the outbound interface of MAC entries is inconsistent
with that of ARP entries, ARP entries are updated based on MAC entries, and
outbound interface information is updated.
● If ARP entries do not exist, a broadcast suppression table is searched based on
MAC entries and ARP probe is re-initiated to update ARP entries and
outbound interface information.
Port1
Switch
Network
Switch
LSW1 LSW2
Incorrect connection
Aging of dynamic Set the aging time according to 2.7.3 Setting the
MAC address your needs. Set the aging time to Aging Time of
entries needs to be a large value or 0 (not to age Dynamic MAC
flexibly controlled. dynamic MAC address entries) on Address Entries
a stable network; set a short
aging time in other situations.
The switch needs A faulty host or device may send 2.10 Configuring the
to discard packets packets with an all-0 source or Switch to Discard
with an all-0 destination MAC address to a Packets with an
source or switch. Configure the switch to All-0 MAC Address
destination MAC discard such packets and send an
address. alarm to the NMS so that the
network administrator can locate
the faulty host or device based on
the alarm information.
The switch needs After a DHCP user goes offline, 2.11 Configuring the
to discard packets the MAC address entry of the user Switch to Discard
in which ages out. If there are packets Packets That Do Not
destination MAC destined for this user, the system Match Any MAC
addresses do not cannot find the MAC address Address Entry
match the MAC entry. The system then broadcasts
address table. the packets to all interfaces in the
VLAN. In this case, all users
receive the packets, which bring
security risks. After the switch is
configured to discard packets that
do not match any MAC address
entry, the switch discards such
packets. This function mitigates
the burden on the switch and
enhances security.
License Requirements
The MAC address table 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 2-5 Products and minimum version supporting the MAC address table
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
Feature Description
MAC address ● MAC address learning limiting rules are invalid for existing
learning online users and valid for only new online users.
● If the VLANIF interface is not configured, the device can
learn the local system MAC address.
● Disabling MAC address learning and limiting the number of
learned MAC addresses are valid for a Layer 2 main interface
and its Layer 2 sub-interfaces for the CE6870EI and
CE6875EI.
● The hardware learns MAC address entries at line speed for
the CE6870EI and CE6875EI. When many MAC address
entries are learned in a short period of time, the number of
MAC address entries in the hardware table is larger than the
number of MAC address entries in the software table. When
many MAC address entries are aged in a short period of
time, the number of MAC address entries in the software
table is larger than the number of MAC address entries in
the hardware table. MAC address entries in the software and
hardware tables keep consistent through synchronization.
● On the switches except the CE5880EI, CE6875EI, CE6880EI,
CE6870EI, if the number of MAC addresses learned in the
VLAN reaches the upper limit or the MAC address learning
function is disabled in the VLAN, the packet discarding
function configured using the mac-address limit action
discard command does not take effect on interfaces in the
VLAN.
● Port security and MAC address limiting cannot be configured
on an interface.
● In the SVF, disabling MAC address learning cannot be
configured in the traffic behavior view.
● After MAC address limiting is configured on an interface, the
VXLAN packets received by an interface on a switch model
excluding the CE5880EI, CE6875EI, CE6880EI, CE6870EI are
not affected by this function.
● By default, on the CE6870EI and CE6875EI, the TRILL
function cannot be configured together with any of the
FCOE, port security, MAC VLAN, blackhole MAC, MAC limit,
disabling MAC address learning, URPF, DHCP snooping, or
802.1X functions. To use these functions together with TRILL,
run the trill adjacency-check disable command. The TRILL
function takes precedence over the preceding functions. If
the TRILL function is configured after the preceding
functions are configured, only the TRILL function takes
effect.
Feature Description
Feature Description
Context
MAC addresses and interfaces are bound statically in static MAC address entries.
A device cannot distinguish packets from authorized and unauthorized users when
it learns source MAC addresses of packets to maintain the MAC address table. This
causes network risks. If an unauthorized user uses the MAC address of an
authorized user as the source MAC address of attack packets and connects to
another interface of the device, the device learns an incorrect MAC address entry.
As a result, packets destined for the authorized user are forwarded to the
unauthorized user. For security purposes, you can create static MAC address
entries to bind MAC addresses of authorized users to specified interfaces. This
prevents unauthorized users from intercepting data of authorized users.
Static MAC address entries have the following characteristics:
● A static MAC address entry will not be aged out. After being saved, a static
MAC address entry will not be lost after a system restart, and can only be
deleted manually.
● The VLAN bound to a static MAC address entry must have been created and
assigned to the interface bound to the entry.
● The MAC address in a static MAC address entry must be a unicast MAC
address, and cannot be a multicast or broadcast MAC address.
● A static MAC address entry takes precedence over a dynamic MAC address
entry. The system discards packets with flapping static MAC addresses.
Procedure
Step 1 Run system-view
The system view is displayed.
----End
Context
Blackhole MAC address entries can be used to filter out invalid MAC addresses. To
prevent a hacker from using a MAC address to attack a user device or network,
configure the MAC address of an untrusted user as the blackhole MAC address.
The switch directly discards the received packets where the source or destination
MAC address is the blackhole MAC address and the VLAN ID of the packets
corresponds to the blackhole MAC address.
NOTE
The CE6870EI and CE6875EI devices forward Layer 3 packets with the source MAC
addresses matching blackhole MAC address entries.
Procedure
Step 1 Run system-view
----End
Context
To prevent explosive increase of MAC address entries, set the aging time for
dynamic MAC address entries.
Because the network topology changes frequently, the switch will learn more and
more MAC addresses. Therefore, the aging time needs to be set properly for
dynamic MAC address entries so that the switch can delete unneeded MAC
address entries to prevent a sharp increase of MAC address entries. A shorter
aging time makes the switch more sensitive to network changes and is applicable
to networks where network topology changes frequently. A longer aging time
makes the switch more insensitive to network changes and is only applicable to
stable networks.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run mac-address aging-time aging-time
The aging time is set for dynamic MAC address entries.
The aging time is 0 or an integer that ranges from 60 to 1000000, in seconds. The
default value is 300. The value 0 indicates that dynamic MAC address entries will
not be aged out.
NOTE
When the aging time is 0, MAC address entries can be fixed. To clear the fixed MAC address
entries, set the aging time to a non-0 value. The system then deletes fixed MAC address
entries after twice the aging time.
----End
After MAC address learning is disabled on an interface, the switch does not learn
source MAC addresses of data frames received by the interface, but the dynamic
MAC address entries learned on the interface are not immediately deleted. These
dynamic MAC address entries are deleted after the aging time expires or can be
manually deleted using commands.
Procedure
Disable MAC address learning on an interface
1. Run system-view
The system view is displayed.
2. Run interface interface-type interface-number
The interface view is displayed.
3. Run mac-address learning disable [ action { discard | forward } ]
MAC address learning is disabled on the interface.
By default, MAC address learning is enabled on an interface.
By default, the switch takes the forward action after MAC address learning is
disabled. That is, the switch forwards packets according to the MAC address
table. When the action is set to discard, the switch looks up the source MAC
address of the packet in the MAC address table. If the source MAC address is
found in the MAC address table, the switch forwards the packet according to
the matching MAC address entry. If the source MAC address is not found, the
switch discards the packet.
4. Run commit
The configuration is committed.
Disabling MAC address learning in the traffic behavior view (This function is
not supported in the SVF.)
1. Configure a traffic classifier.
a. Run system-view
The system view is displayed.
b. Run traffic classifier classifier-name [ type { and | or } ]
A traffic classifier is created and the traffic classifier view is displayed, or
the view of an existing traffic classifier is displayed.
▪ If a traffic classifier does not contain any ACL rules, packets match
the traffic classifier only if they match all the rules in the classifier.
The logical operator or means that packets match a traffic classifier if
they match one or more rules in the classifier.
By default, the relationship between rules in a traffic classifier is or.
c. Run if-match
Matching rules are defined for the traffic classifier.
For details about matching rules in a traffic classifier, see "Configuring a
Traffic Classifier" in "MQC Configuration" of the CloudEngine 8800, 7800,
6800, and 5800 Series Switches Configuration Guide - QoS Configuration
Guide.
d. Run commit
The configuration is committed.
e. Run quit
Exit from the traffic behavior view.
2. Configure a traffic behavior.
a. Run traffic behavior behavior-name
A traffic behavior is created and the traffic behavior view is displayed, or
the view of an existing traffic behavior is displayed.
b. Run mac-address learning disable
MAC address learning is disabled in a traffic behavior.
c. (Optional) Run statistics enable
The traffic statistics function is enabled.
d. Run commit
The configuration is committed.
e. Run quit
Exit from the traffic behavior view.
f. Run quit
Exit from the system view.
3. Configure a traffic policy.
a. Run system-view
The system view is displayed.
b. Run traffic policy policy-name
A traffic policy is created and the traffic policy view is displayed, or the
view of an existing traffic policy is displayed.
c. Run classifier classifier-name behavior behavior-name [ precedence
precedence-value ]
A traffic behavior is bound to a traffic classifier in the traffic policy.
d. Run commit
The configuration is committed.
e. Run quit
Exit from the traffic policy view.
f. Run quit
Exit from the system view.
4. Apply the traffic policy.
NOTE
● Run the display system tcam fail-record [ slot slot-id ] command to display
TCAM delivery failures.
● Run the display system tcam service brief [ slot slot-id ] command to
display the group index and rule count occupied by different services.
● Run the display system tcam service { cpcar slot slot-id | service-name slot
slot-id [ chip chip-id ] } command to display IDs of entries delivered by
services on the specified chip or in the specified slot.
● Run one of the following commands to display data of a traffic policy that
has been applied:
– display system tcam service traffic-policy { global | vlan vlan-id |
interface interface-type interface-number | vpn-instance vpn-instance-
name | qos group group-id | bridge-domain bd-id } policy-name
{ inbound | outbound } [ slot slot-id [ chip chip-id ] ]
NOTE
Procedure
● Disable MAC address learning on an interface.
a. Run system-view
The system view is displayed.
NOTE
● (For the CE6870EI and CE6875EI) Run the display system tcam match-rules
slot slot-id [ [ ingress | egress | group group-id ] | [ chip chip-id ] ] *
command to display matched entries.
Context
The MAC address limiting function controls the number of access users to prevent
MAC addresses from hackers.
An insecure network is vulnerable to MAC address attacks. When hackers send a
large number of forged packets with different source MAC addresses to the switch,
the MAC address table of the switch will be filled with useless MAC address
entries. As a result, the switch cannot learn source MAC addresses of valid packets.
You can limit the number of MAC address entries learned on the switch. When the
number of learned MAC address entries reaches the limit, the switch does not
learn new MAC address entries. You can also configure an action to take when the
number of MAC address entries reaches the limit. This prevents MAC address
attacks and improves network security.
Procedure
● Limit the number of MAC address entries learned on an interface.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run mac-address limit maximum max-num
The maximum number of MAC address entries that can be learned on
the interface is set.
By default, the number of MAC address entries learned on an interface is
not limited.
d. Run mac-address limit alarm { disable | enable }
The switch is configured to or not to generate an alarm when the
number of learned MAC address entries reaches the limit.
By default, the switch generates an alarm when the number of learned
MAC address entries reaches the limit.
e. Run commit
The configuration is committed.
● Limit the number of MAC address entries learned in a VLAN.
a. Run system-view
The system view is displayed.
b. Run vlan vlan-id
Context
A device usually uses a hash algorithm to learn MAC address entries to improve
MAC address forwarding performance. When multiple MAC addresses map the
same key value, a MAC address hash conflict may occur. When a MAC address
hash conflict occurs, the device may fail to learn many MAC addresses and can
only broadcast traffic destined for these MAC addresses. The heavy broadcast
traffic increases the load on the device. In this case, use an appropriate hash
algorithm to mitigate the hash conflict.
NOTE
● Only the CE5810EI, CE5850HI, CE6800 series (excluding CE6880EI, CE6870EI and
CE6875EI), CE7800 series, and CE8800 series support the configuration of a Hash
Algorithm.
● MAC addresses are distributed on a network randomly, so the best hash algorithm
cannot be determined. Generally, the default hash algorithm is the best one, so do not
change the hash algorithm unless you have special requirements.
● An appropriate hash algorithm can reduce hash conflicts, but cannot prevent them.
● After the hash algorithm is changed, restart the device to make the configuration take
effect.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run mac-address hash-mode { crc16-lower | crc16-upper | crc32-lower | crc32-
upper | lsb }
A hash algorithm is configured.
The default hash algorithm is crc32-lower.
Step 3 Run commit
The configuration is committed.
----End
The CE5880EI, CE6870EI, CE6875EI, and CE6880EI do not support this function.
Procedure
Step 1 Run system-view
----End
Context
You can configure the device to prevent MAC address flapping between interfaces
with the same priority to improve network security.
The switches are configured to prevent MAC address flapping between interfaces
with the same priority. After a device (such as the server) connected to switches
power off, another interface on switches learns the same MAC address as the
device. The device cannot learn the correct MAC address after it powers on.
Procedure
Step 1 Run system-view
The device is configured to prevent MAC address flapping between interfaces with
the same priority.
By default, the device allows MAC address flapping between interfaces with the
same priority.
----End
Procedure
● Run the display current-configuration command to view the MAC address
learning priorities of interfaces.
----End
Context
MAC address flapping detection detects all MAC addresses on the device. If MAC
address flapping occurs, the device sends an alarm to the NMS. MAC address
flapping occurs when a MAC address is learned by two or three interfaces in the
same VLAN and the MAC address entry learned later overrides the earlier one.
Generally, the interface that first learns the MAC address is the correct outbound
interface, which is called the original interface. The interface that learns the MAC
address later is called the flapped interface. The flapped interface is often the
interface where a loop occurs or an interface on the downstream network where a
loop occurs. The flapped interface needs to be shut down or configured with
storm control.
By default, the system performs MAC address flapping detection in all VLANs. In a
data center virtualization scenario (virtual terminal migration), MAC address
flapping may occur. This is a normal situation where MAC address flapping
detection is not required. You can configure the whitelist of VLANs in MAC address
flapping detection to prevent MAC address flapping detection from being
performed in a specified VLAN.
If modifying the aging time of flapping MAC address entries takes a long time,
MAC address flapping may occur again and the Error-Down time may be
increased. To ensure that the system performs MAC address flapping detection in
a timely manner, adjust the aging time of flapping MAC addresses correctly.
When a loop on a network causes MAC address flapping and the network does
not support loop prevention protocols, to eliminate the loop, configure an action
to take after MAC address flapping occurs on the corresponding interface.
On VXLAN networks, MAC address flapping detection can be performed based on
Layer 2 sub-interfaces. The device shuts down a Layer 2 sub-interface when
detecting MAC address flapping on the sub-interface. Only one Layer 2
subinterface can be shut down within a MAC entry aging interval.
NOTE
● To prevent uplink traffic interruption, do not configure the action performed when MAC
address flapping is detected on upstream interfaces.
● MAC address flapping detection can only detect loops on interfaces, but cannot obtain
the entire network topology. If the user network connected to the switch supports loop
prevention protocols, use the loop prevention protocols instead of MAC address flapping
detection.
● When MAC address flapping occurs in a VLAN or BD and the loop is not eliminated, if
the interface is added to or removed from an Eth-Trunk, the values of Original-Port and
Move-Ports in MAC address flapping records remain unchanged. After the loop is
eliminated, delete MAC address flapping entries and perform detection again. This
prevents the incorrect source and flapped interfaces from being detected, loop location,
and punishment action (Error-Down state or storm control) from being delivered to the
incorrect flapped interface.
● The MAC address flapping detection function can only detect a single ring. When there
are multiple rings, the MAC address flapping detection function detects only the first
ring. That is, if two or more rings exist in a VLAN, the system reports only alarms about
interfaces in the first ring, regardless of whether the port status in the first ring is Up or
Down.
● The MAC address flapping detection function can only detect the first ring in a VLAN
within the configurable aging time (5 minutes by default). For example, MAC address
flapping between PortA and PortB. After PortA or Port B goes Down and MAC address
flapping between PortC and PortD within the same aging time, the flapped interfaces in
the alarm are still PortA and PortB.
● By default, MAC address triggered ARP entry update is enabled. If MAC address flapping
occurs for more than 10 times, MAC address triggered ARP entry update is disabled.
After MAC address flapping is eliminated, MAC address triggered ARP entry update is
enabled automatically.
● On models excluding the CE5880EI and CE6880EI, when MAC address flapping occurs
on an interface, the system suppresses packets. In this case, the forwarding rate of the
outbound interface is 1% of the bandwidth of the inbound interface by default. Packets
are not suppressed in the following two situations:
● The interface is configured with storm control and storm suppression.
● Multicast is enabled globally.
● If the MAC address flaps to the peer-link, traffic suppression associated with MAC
address flapping does not take effect on the peer-link.
Procedure
Step 1 Run system-view
NOTE
This command can be configured for all interfaces and is only valid for the flapped
interface.
Step 7 (Optional) Configure the action performed on the interface when MAC address
flapping is detected on the interface.
1. Run interface interface-type interface-number
The interface view is displayed.
Or run interface interface-type interface-number.subnum mode l2
The Layer 2 sub-interface view is displayed.
2. Run mac-address flapping trigger error-down
The interface is configured to enter the Error-Down state after MAC address
flapping occurs.
By default, an interface is not configured to enter the Error-Down state after
MAC address flapping occurs.
Step 8 Run commit
The configuration is committed.
----End
Follow-up Procedure
When the action is set to error-down, if MAC address flapping occurs, the
interface enters the Error-Down state and the device sends an alarm to the NMS.
The device records the status of an interface as Error-Down when it detects that a
fault occurs. The interface in Error-Down state cannot receive or send packets and
the interface indicator is off. You can run the display error-down recovery
command to check information about all interfaces in Error-Down state on the
device.
When the interface is in Error-Down state, check the cause. You can use the
following modes to restore the interface status:
● Manual (after the interface enters the Error-Down state)
When there are few interfaces in Error-Down state, you can run the
shutdown and undo shutdown commands in the interface view or run the
restart command to restore the interface.
● Auto (before the interface enters the Error-Down state)
If there are many interfaces in Error-Down state, the manual mode brings in
heavy workload and the configuration of some interfaces may be ignored. To
prevent this problem, run the error-down auto-recovery cause mac-address-
flapping interval interval-value command in the system view to enable an
interface in error-down state to go Up and set a recovery delay. You can run
the display error-down recovery command to view automatic recovery
information about the interface.
NOTE
This mode is invalid for the interface that has entered the Error-Down state, and is only
valid for the interface that enters the Error-Down state after the error-down auto-
recovery cause mac-address-flapping interval interval-value command is used.
Context
A faulty network device may send packets with an all-0 source or destination MAC
address to the switch. You can configure the switch to discard such packets.
You can configure the switch to discard packets with an all-0 source or destination
MAC address.
NOTE
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run drop illegal-mac enable
The switch is enabled to discard packets with an all-0 MAC address.
By default, the switch does not discard packets with an all-0 MAC address.
Step 3 Run commit
The configuration is committed.
----End
Context
After the switch is configured to discard packets that do not match any MAC
address entries, such packets are discarded, which reduces the load on the switch
and enhances system security.
After a DHCP user goes offline, the MAC address entry of the user ages out. If
there are packets destined for this user, the switch cannot find the MAC address
entry and therefore broadcasts the packets to all interfaces in the VLAN. In this
case, all users receive the packets, which bring security risks. To reduce the load on
the switch and enhance security, configure the switch to discard packets that do
not match any MAC address entries.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run vlan vlan-id
The VLAN view is displayed.
Step 3 Run mac-address miss action discard
The switch is configured to discard packets that do not match any MAC address
entries.
By default, the switch broadcasts the packets that do not match any MAC address
entries in a VLAN.
----End
Context
For the packets in which the destination MAC address and the configured static
MAC address conflict, the device can be configured to or not to discard packets.
NOTE
Only the CE6850HI, CE6850U-HI, CE6851HI, CE6855HI, CE6856HI, CE6857EI, CE6865EI, CE7800
series, and CE8800 series switches support the function.
By default, the device discards packets in which the destination MAC address and
the configured static MAC address conflict. This function reduces the device
burden and ensures security.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run undo mac-address drop static-conflict enable
The device is disabled from discarding packets in which the destination MAC
address and the configured static MAC address conflict.
By default, the device is enabled to discard packets in which the destination MAC
address and the configured static MAC address conflict.
Step 3 Run commit
The configuration is committed.
----End
Context
The MAC address-triggered ARP entry update enables the switch to update the
corresponding ARP entry when the outbound interface in a MAC address entry
changes.
On the Ethernet, MAC address entries are used to guide Layer 2 data forwarding.
The ARP entries that define the mapping between IP addresses and MAC
addresses guide communication between devices on different network segments.
The outbound interface in a MAC address entry is updated by packets, whereas
the outbound interface in an ARP entry is updated after the aging time is reached.
In this case, the outbound interfaces in the MAC address entry and ARP entry may
be different. In Figure 2-11, SwitchA and SwitchB function as gateways of the
server and have VRRP enabled to enhance reliability. VRRP packets are transmitted
on the directly connected link between the two switches. When the server sends
packets, only one network interface is selected to forward packets. When a
network fault or traffic exception is detected, another network interface is used.
Figure 2-11 Networking for configuring MAC address-triggered ARP entry update
when a VRRP active/backup switchover is performed
Port2 Port2
Port1 Port1
Port1 Port2
Server
● SwitchA functions as the master device, and the server uses Port2 to send
packets. SwitchA learns the ARP entry and MAC address entry on Port2, and
SwitchB learns the server MAC address on Port1.
● When the server detects that Port2 is faulty, the server uses Port1 to forward
service packets. SwitchA then learns the server MAC address on Port1. If the
server does not send an ARP Request packet to SwitchA, SwitchA still
maintains the ARP entry on Port2. In this case, packets sent from SwitchA to
the server are still forwarded through Port2 until the ARP entry is aged out.
To solve the problem, configure MAC address-triggered ARP entry update. This
function enables the device to update the corresponding ARP entry when the
outbound interface in a MAC address entry changes.
Procedure
Step 1 Run system-view
NOTE
● This command takes effect only for dynamic ARP entries. Static ARP entries are not
updated when the corresponding MAC address entries change.
● The mac-address update arp enable command does not take effect after ARP entry
fixing is enabled by using the arp anti-attack entry-check { fixed-mac | fixed-all |
send-ack } enable command.
● After the mac-address update arp enable command is run, the switch updates an ARP
entry only when the outbound interface in the corresponding MAC address entry
changes.
● By default, MAC address triggered ARP entry update is enabled. If MAC address flapping
occurs for more than 10 times, MAC address triggered ARP entry update is disabled.
After MAC address flapping is eliminated, MAC address triggered ARP entry update is
enabled automatically.
----End
Context
The port bridge function enables an interface to forward packets in which the
source and destination MAC addresses are the same.
By default, an interface does not forward packets whose source and destination
MAC addresses are both learned by this interface. When the interface receives
such a packet, it discards the packet as an invalid packet.
After the port bridge function is enabled on the interface, the interface forwards
such a packet if the destination MAC address of the packet is in the MAC address
table.
The port bridge function is used in the following scenarios:
The device is used as an access device in a data center and is connected to servers.
Each server is configured with multiple virtual machines. The virtual machines
need to transmit data to each other. If data between virtual machines is
transmitted on the server, the data transmission rate and server performance may
be affected. To improve the data transmission rate and server performance, enable
the port bridge function on the interfaces connected to the servers so that the
device forwards data packets between the virtual machines.
NOTE
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 Run port bridge enable
The port bridge function is enabled.
----End
Action Command
Context
NOTE
Procedure
● Run the reset mac-address flapping record [ all ] command in the user view
to clear MAC address flapping records.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Run mac-address notification interval interval-time
The interval at which the device checks MAC address learning or aging is set.
By default, the device checks MAC address learning or aging at intervals of 10s.
Step 3 Run interface interface-type interface-number
The interface view is displayed.
Step 4 Run mac-address notification { aging | learning | all }
The trap function for MAC address learning or aging is enabled.
By default, the trap function for MAC address learning or aging is disabled.
----End
Networking Requirements
As shown in Figure 2-12, the MAC address of the user host PC1 is
0002-0002-0002 and that of the user host PC2 is 0003-0003-0003. PC1 and PC2
are connected to the Switch through the LSW. The LSW is connected to 10GE1/0/1
of the Switch, which belongs to VLAN 2. The MAC address of the server is
0004-0004-0004. The server is connected to 10GE1/0/2 of the Switch. 10GE1/0/2
belongs to VLAN 2.
● To prevent hackers from using MAC addresses to attack the network,
configure two static MAC address entries for each user host on the Switch.
● To prevent hackers from stealing user information by forging the MAC
address of the server, configure a static MAC address entry on the Switch for
the server.
NOTE
This example applies to the scenario where there are few users. When there are many
users, perform dynamic binding according to Example for Configuring Port Security.
Network Server
Switch
10GE1/0/2
10GE1/0/1
LSW
PC1 PC2
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a VLAN and add an interface to the VLAN to implement Layer 2
forwarding.
2. Configure static MAC address entries to prevent MAC address attacks.
3. Configure the aging time of dynamic MAC address entries to update the
entries.
Procedure
Step 1 Configure static MAC address entries.
# Create VLAN 2 and add 10GE1/0/1 and 10GE1/0/2 to VLAN 2.
<HUAWEI> system-view
[~HUAWEI] sysname Switch
[*HUAWEI] commit
[~Switch] vlan 2
[*Switch-vlan2] quit
[*Switch] interface 10ge 1/0/1
[*Switch-10GE1/0/1] port link-type trunk
[*Switch-10GE1/0/1] port trunk allow-pass vlan 2
[*Switch-10GE1/0/1] quit
[*Switch] interface 10ge 1/0/2
[*Switch-10GE1/0/2] port link-type trunk
[*Switch-10GE1/0/2] port trunk allow-pass vlan 2
[*Switch-10GE1/0/2] quit
[*Switch] commit
# Run the display mac-address static command in any view to check whether the
static MAC address entries are successfully added to the MAC address table.
[~Switch] display mac-address static vlan 2
BD : bridge-domain Age : dynamic MAC learned time in seconds
-------------------------------------------------------------------------------
MAC Address VLAN/VSI/BD Learned-From Type
-------------------------------------------------------------------------------
0002-0002-0002 2/-/- 10GE1/0/1 static
0003-0003-0003 2/-/- 10GE1/0/1 static
0004-0004-0004 2/-/- 10GE1/0/2 static
-------------------------------------------------------------------------------
Total items: 3
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 2
#
mac-address aging-time 500
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 2
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 2
#
mac-address static 0002-0002-0002 10GE1/0/1 vlan 2
mac-address static 0003-0003-0003 10GE1/0/1 vlan 2
mac-address static 0004-0004-0004 10GE1/0/2 vlan 2
#
return
Networking Requirements
As shown in Figure 2-13, user network 1 is connected to Switch on the 10GE1/0/1
through an LSW. User network 2 is connected to Switch on the 10GE1/0/2 through
another LSW. Both 10GE1/0/1 and 10GE1/0/2 belong to VLAN 2. To prevent MAC
address attacks and limit the number of access users on the device, limit MAC
address learning on all the interfaces in VLAN 2.
Network
Switch
10GE1/0/1 10GE1/0/2
LSW LSW
User User
VLAN 2
network 1 network 2
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a VLAN and add an interface to the VLAN to implement Layer 2
forwarding.
2. Limit MAC address learning on all the interfaces in the VLAN to prevent MAC
address attacks and limit the number of access users.
Procedure
Step 1 Limit MAC address learning.
# Add 10GE1/0/1 and 10GE1/0/2 to VLAN 2.
<HUAWEI> system-view
[~HUAWEI] sysname Switch
[*HUAWEI] commit
[~Switch] vlan 2
[*Switch-vlan2] quit
[*Switch] interface 10ge 1/0/1
[*Switch-10GE1/0/1] port link-type trunk
[*Switch-10GE1/0/1] port trunk allow-pass vlan 2
[*Switch-10GE1/0/1] quit
[*Switch] interface 10ge 1/0/2
[*Switch-10GE1/0/2] port link-type trunk
[*Switch-10GE1/0/2] port trunk allow-pass vlan 2
[*Switch-10GE1/0/2] quit
[*Switch] commit
# Run the display mac-address limit command in any view to check whether the
MAC address limiting rule is successfully configured.
[~Switch] display mac-address limit
MAC Address Limit is enabled
Total MAC Address limit rule count : 1
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 2
#
vlan 2
mac-address limit maximum 100
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 2
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 2
#
return
Networking Requirements
Employees of an enterprise need to access the enterprise server. If an attacker uses
the server MAC address as the source MAC address to send packets to another
interface, the server MAC address is learned on the interface. Packets sent to the
server are sent to unauthorized users. In this case, employees cannot access the
server, and important data will be intercepted by the attacker.
10GE1/0/1 VLAN 10
Switch
10GE1/0/2 PC4
MAC:11-22-33
LSW
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Create a VLAN and add interfaces to the VLAN.
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 10
#
interface 10GE1/0/1
port default vlan 10
mac-address learning priority 2
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 10
#
return
Networking Requirements
As shown in Figure 2-15, a loop occurs on a user network because network cables
between two LSWs are incorrectly connected. The loop causes MAC address
flapping and bridge table flapping.
You can enable MAC address flapping detection on the Switch to detect MAC
address flapping and discover loops.
Network
Switch
10GE1/0/1 10GE1/0/2
LSW1 LSW2
Incorrect
connection
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Enable MAC address flapping detection.
<HUAWEI> system-view
[~HUAWEI] sysname Switch
[*HUAWEI] commit
[~Switch] mac-address flapping detection
[*Switch] commit
Step 3 Shut down 10GE1/0/1 and 10GE1/0/2 when MAC address flapping is detected.
[~Switch] interface 10ge 1/0/1
[~Switch-10GE1/0/1] mac-address flapping trigger error-down
[*Switch-10GE1/0/1] quit
[*Switch] interface 10ge 1/0/2
[*Switch-10GE1/0/2] mac-address flapping trigger error-down
[*Switch-10GE1/0/2] quit
[*Switch] commit
Step 4 Configure automatic recovery and set the automatic recovery time for the
shutdown interface.
[~Switch] error-down auto-recovery cause mac-address-flapping interval 500
[*Switch] commit
After the configuration is complete, when the MAC address on 10GE1/0/1 flaps to
10GE1/0/2, 10GE1/0/2 is shut down. Run the display mac-address flapping
command to view the flapping records.
[~Switch] display mac-address flapping
MAC Address Flapping Configurations :
-------------------------------------------------------------------------------
Flapping detection : Enable
Aging time(s) : 500
Quit-VLAN Recover time(m) : --
Exclude VLAN-list : --
Security level : Middle
Exclude BD-list : --
-------------------------------------------------------------------------------
S : start time E : end time (D) : error down
-------------------------------------------------------------------------------
Time : S:2017-08-24 14:40:11 E:2017-08-24 14:40:23
VLAN/BD : 1/-
MAC Address : 0025-9e95-7c24
Original-Port: 10GE1/0/1
Move-Ports : 10GE1/0/2(D)
MoveNum : 83
-------------------------------------------------------------------------------
Total items on slot 1: 1
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
mac-address flapping aging-time 500
#
error-down auto-recovery cause mac-address-flapping interval 500
#
interface 10GE1/0/1
mac-address flapping trigger error-down
#
interface 10GE1/0/2
mac-address flapping trigger error-down
#
return
Fault Description
MAC address entries cannot be learned on the device, so Layer 2 forwarding fails.
Procedure
Step 1 Check that the configurations on the interface are correct.
Run the display mac-address command in any view to check whether the binding
relationships between the MAC address, VLAN, and interface are correct.
<HUAWEI> display mac-address
Flags: * - Backup
# - forwarding logical interface, operations cannot be performed based
on the interface.
BD : bridge-domain Age : dynamic MAC learned time in seconds
-------------------------------------------------------------------------------
MAC Address VLAN/VSI/BD Learned-From Type
-------------------------------------------------------------------------------
0025-9e80-2494 1/-/- 10GE1/0/1 dynamic
-------------------------------------------------------------------------------
Total items: 1
If not, re-configure the binding relationships between the MAC address, VLAN,
and interface.
If yes, go to step 2.
Step 2 Check whether a loop on the network causes MAC address flapping.
● Remove the loop from the network.
If no loop exists, go to step 3.
Step 3 Check that MAC address learning is enabled.
Check whether MAC address learning is enabled in the interface view and the
VLAN view.
[~HUAWEI-10GE1/0/1] display this
#
interface 10GE1/0/1
mac-address learning disable
port link-type trunk
port trunk allow-pass vlan 10
#
return
[~HUAWEI-vlan10] display this
#
vlan 10
mac-address learning disable
#
return
Total items: 2
By default, the limit on the number of secure dynamic MAC addresses is 1 after
port security is enabled.
----End
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
4 M-LAG Configuration
M-LAG
Purpose
As an inter-device link aggregation technology, M-LAG increases link bandwidth,
improves link reliability, and implements load balancing. It has the following
advantages:
● High reliability
M-LAG protects link reliability for entire devices.
● Simplified network and configuration
M-LAG is a horizontal virtualization technology that virtualizes two dual-
homed devices into one device. M-LAG prevents loops on a Layer 2 network
and implements redundancy. M-LAG greatly simplifies the network and
configuration.
● Independent upgrade
Two devices can be upgraded independently. This prevents service interruption
when either device is upgrading.
Reference
● M-LAG Best Practices: CloudEngine Series Switches M-LAG Technical Topics
● Video: CloudEngine Series Switch M-LAG Feature Introduction
Network
Dual-Active
Detection
Packets
peer-link
SwitchA SwitchB
M-LAG
M-LAG M-LAG
member member
interface interface
Switch
Dual-active
system
DFS master device The device is configured with M-LAG and is in master
state. It is also called the M-LAG master device.
DFS backup device The device is configured with M-LAG and is in backup
state. It is also called the M-LAG backup device.
NOTE
A DFS group consists of a master device and a backup device.
Under normal circumstances, both the master and backup
devices forward service traffic and their forwarding behaviors
are the same. The master and backup devices have different
forwarding behaviors only when a fault occurs.
Concept Description
Dual-Active Detection A DAD link is used for M-LAG master and backup
(DAD) link devices to exchange DAD packets at Layer 3.
NOTE
Under normal circumstances, the DAD link does not
participate in any traffic forwarding behaviors in the M-LAG. It
is only used to detect whether two master devices exist when
a fault occurs. The DAD link can be an external link, for
example, if the M-LAG is connected to an IP network and the
two member devices can communicate through the IP
network, the link that enables communication between the
member devices can function as the DAD link. An independent
link that provides Layer 3 reachability can also be configured
as the DAD link, for example, a link between management
interfaces of the member devices can function as the DAD
link.
HB DFS master device The device negotiates to the master state through the
heartbeat link.
NOTE
Under normal circumstances, the HB DFS master/backup
status negotiation through heartbeat packets does not affect
traffic forwarding behaviors in the M-LAG. It is used only in
secondary fault rectification scenarios. If faults on the original
DFS master device are rectified and the peer-link fault persists,
the corresponding interfaces on the backup device are
triggered to enter the Error-Down state based on the HB DFS
master/backup status. This mechanism prevents abnormal
traffic forwarding in the scenario where two master devices
exist and improves device reliability.
HB DFS backup device The device negotiates to the backup state through the
heartbeat link.
NOTE
Under normal circumstances, the HB DFS master/backup
status negotiation through heartbeat packets does not affect
traffic forwarding behaviors in the M-LAG. It is used only in
secondary fault rectification scenarios. If faults on the original
DFS master device are rectified and the peer-link fault persists,
the corresponding interfaces on the backup device are
triggered to enter the Error-Down state based on the HB DFS
master/backup status. This mechanism prevents abnormal
traffic forwarding in the scenario where two master devices
exist and improves device reliability.
Concept Description
Network
DAD link
SwitchA SwitchB
peer-link
M-LAG establishment
A DFS group consists of a master device and a backup device. Under normal
circumstances, both the master and backup devices forward service traffic and their
forwarding behaviors are the same. The master and backup devices have different
forwarding behaviors only when a fault occurs.
3. Master/backup negotiation of M-LAG member interfaces
After DFS group master/backup negotiation is successful, the two devices
send M-LAG device information packets carrying configuration information of
M-LAG member interfaces to each other through the peer-link. After member
interface information is synchronized, master and backup M-LAG member
interfaces are determined.
When the local and remote member interfaces synchronize information, the
interface that changes from Down to Up first becomes the master M-LAG
member interface, and the other interface becomes the backup M-LAG
member interface. By default, revertive switching is not performed between
the master and backup interfaces. That is, if the device where the original
master M-LAG member interface resides recovers from a failure, the original
backup interface that becomes the master interface remains in master state,
and the original master interface that recovers from a failure is still in backup
state. The master/backup negotiation mechanism of M-LAG member
interfaces differs from that of the DFS group.
NOTE
The master and backup M-LAG member interfaces have different forwarding behaviors
only when the M-LAG forwards multicast traffic.
4. DAD
After M-LAG master and backup devices are negotiated, the two devices send
M-LAG DAD packets at an interval of 1s through the DAD link. If a device
detects that the peer-link fails, it sends three DAD packets at an interval of
100 ms to accelerate detection. If both devices can receive packets from each
other, the dual-active system starts to work.
Under normal circumstances, the DAD link does not participate in any traffic
forwarding behaviors in the M-LAG. It is only used to detect whether two
master devices exist when the DFS group pairing or peer-link fails. Therefore,
the M-LAG still works properly even if DAD fails. The DAD link can be an
external link, for example, if the M-LAG is connected to an IP network and
the two member devices can communicate through the IP network, the link
that enables communication between the member devices can function as the
DAD link. An independent link that provides Layer 3 reachability can also be
configured as the DAD link, for example, a link between management
interfaces of the member devices can function as the DAD link.
– The DAD link is deployed between management interfaces. Management
interface IP addresses bound to the DFS group must be reachable to each
other, and VPN instances are bound to management interfaces to ensure
that DAD packets and service packets are separated.
– The DAD link is deployed on a service network, and the IP address bound
to the DFS group must be reachable at Layer 3. If peer-link interfaces
establish a routing neighbor relationship, DAD packets on the service
network are transmitted through the peer-link using the optimal route. If
the peer-link fails, DAD packets are transmitted to the remote device
through the suboptimal path during route convergence, and the DAD
time is 0.5s or 1s longer.
NOTE
In V200R005C10 and later versions, two devices send DAD packets at the specified
interval immediately after the heartbeat link is Up. In secondary fault rectification
scenarios where enhanced DAD for secondary faults is enabled, faults on the original
DFS master or backup device are rectified and the peer-link fault persists. If the local
and remote devices' IP addresses are bound to the DFS group, M-LAG devices
negotiate the HB DFS master/backup status based on the DFS information carried in
DAD packets, and the corresponding interfaces on the HB DFS backup device are
triggered to enter the Error-Down state, preventing abnormal traffic forwarding in the
scenario where two master devices exist.
5. M-LAG information synchronization
When working properly, the two devices send M-LAG synchronization packets
through the peer-link to synchronize information with each other in real time.
M-LAG synchronization packets include MAC address entries, ARP entries, STP
and VRRP packets information. The devices also send the status of M-LAG
member interfaces. In this way, traffic forwarding is not affected when any
device fails, ensuring that normal services are not interrupted.
NOTE
For the CE6870EI, CE6875EI, and CE5880EI, after a VLANIF or VBDIF interface is
configured on an M-LAG member device, the real MAC address of the VLANIF or
VBDIF interface is synchronized to the peer device through the M-LAG synchronization
channel and delivered as a dynamic MAC address.
Type Description
ND ND packet synchronization
Type Description
Ethernet
Network
DAD link
peer-link
Unidirectional Blocked
isolation interface
Unidirectional isolation in the M-LAG loop prevention mechanism takes effect for
Layer 2 traffic (including unicast, multicast, and broadcast traffic) and Layer 3
multicast traffic, and does not take effect for Layer 3 unicast traffic.If the access device
is single-homed to the M-LAG, the M-LAG does not deliver the unidirectional isolation
configuration of the corresponding M-LAG member interface.
● If the access device is single-homed to the M-LAG, the M-LAG does not
deliver the unidirectional isolation configuration of the corresponding M-LAG
member interface.
Implementation Principles
In Figure 4-5, a device is dual-homed to an M-LAG. M-LAG devices deliver the
global ACL configuration in the following sequence:
● Rule 1: Layer 3 unicast packets with a peer-link interface as the source
interface and an M-LAG member interface as the destination interface are
allowed to pass through.
● Rule 2: All packets with a peer-link interface as the source interface and an
M-LAG member interface as the destination interface are rejected.
M-LAG devices use the ACL rule group to implement unidirectional isolation
between peer-link interfaces and M-LAG member interfaces. Flooding traffic such
as broadcast traffic from a peer-link interface to an M-LAG member interface is
isolated. When an M-LAG device detects that the local M-LAG member interface is
in Down state, the device sends M-LAG synchronization packets through the peer-
link to instruct the remote device to revoke the automatically delivered
unidirectional isolation ACL rule group of the corresponding M-LAG member
interface.
peer-link
Broadcast Unidirectional
traffic isolation
Whether BPDU
protection is enabled
LACP mode
VBDIF interface
configuration
● BD ID
● IPv4 address
● IPv6 address
● VRRP4 group
● MAC address
● Status
NOTE
The device only checks the
virtual MAC address by
default.
For the IPv6 address and
VRRP4 configuration, the
consistency check only
take effect when the
VBDIF interface is up. If the
VBDIF interface is down,
the preceding
configurations do not take
effect on the interface.
VLANIF interface
configuration
● VLAN ID
● IPv4 address
● IPv6 address
● VRRP4 group
● VRRP6 group
● MAC address
● Status
NOTE
The device only checks the
virtual MAC address by
default.
For the IPv6 address and
VRRP4 configuration, the
consistency check only
take effect when the
VLANIF interface is up. If
the VLANIF interface is
down, the preceding
configurations do not take
effect on the interface.
Parameters
Number of member
interfaces of the Eth-
Trunk to which an M-
LAG member interface
belongs
NOTE
Only the numbers of
member interfaces of Eth-
Trunks are compared. The
physical Up/Down status
or bandwidth of member
interfaces is not checked.
For north-south unicast traffic from the M-LAG access side, M-LAG member
devices forward the traffic together after receiving it from the access device
through aggregated links in load balancing mode. M-LAG master and backup
devices forward received north-south unicast traffic to the network side based on
the routing table.
For east-west unicast traffic, when the M-LAG dual-active system is set up and
there is no single-homing interface, Layer 2 traffic is preferentially forwarded
through the local M-LAG device, and Layer 3 traffic is forwarded through dual-
active gateways. Layer 2 and Layer 3 east-west unicast traffic is not forwarded
through the peer-link and is directly forwarded to corresponding member
interfaces by M-LAG master and backup devices.
Network
DAD link
Peer-link
Ethernet Ethernet
Network Network
Ethernet Ethernet
Network Network
NOTE
In versions earlier than V200R003C00, only the M-LAG device where the master M-
LAG member interface resides forwards multicast traffic to the multicast group
member. In V200R003C00 and later versions, both devices where the master and
backup M-LAG member interfaces reside can forward multicast traffic to the multicast
group member to implement load balancing. If the two M-LAG devices run different
versions, the multicast traffic forwarding rule is subject to the device running the
earlier version.
In V200R003C00 and later versions, for the CE6870EI and CE6875EI, an M-LAG
consisting of standalone switches or stacks supports IPv6 Layer 3 multicast, and an M-
LAG consisting of other models does not support IPv6 Layer 3 multicast.
When ServerA functions as a multicast source and ServerB functions as a
multicast group member, traffic sent by the multicast source is load balanced
to M-LAG master and backup devices. After receiving the traffic, M-LAG
master and backup devices query the local multicast forwarding table and
forward the traffic.
IP IP
Network Network
Multicast
ServerA Receiver ServerA source
IP
Network
DAD link
Master Backup
Peer-link
S-1 Receiver
Link failure
Multicast traffic forwarding from
a network-side multicast source
Independent Layer 3 link
Ethernet
Network
DAD link
Peer-link
Master Backup
S-1 S-2
Blocked interface
Unidirectional isolation
Access-side broadcast traffic
Network-side broadcast traffic
IP
Network
DAD link
Peer-link
Master Backup
S-1 S-2
Unidirectional isolation
Uplink Failure
Network Network
Uplink failure
S-1 S-1
DAD packets are generally transmitted through the DAD link between
management interfaces. Therefore, DAD between M-LAG master and backup
devices is not affected when an uplink fails. The dual-active system is not affected,
and M-LAG master and backup devices still properly forward traffic. In Figure
4-13, traffic passing the M-LAG master device is forwarded through the peer-link
because the uplink of the M-LAG master device fails.
If the DAD link is on a service network and the faulty uplink is the DAD link, the
M-LAG works properly without being affected. If the peer-link also fails, DAD
cannot be performed and packet loss occurs.
Downlink Failure
Network Network
Downlink
failure
S-1 S-1
If a downlink M-LAG member interface fails, the DFS group master and backup
states do not change. However, if the faulty M-LAG member interface is in master
state, the backup M-LAG member interface changes to master state, and traffic is
switched to the corresponding link for transmission. The link of the faulty M-LAG
member interface goes Down, and the dual-homing networking changes to
single-homing networking. The MAC address of the faulty M-LAG member
interface is changed to that of the peer-link interface in corresponding entries.
After the faulty M-LAG member interface recovers, the status of M-LAG member
interfaces is not changed. The backup M-LAG member interface that changes to
the master M-LAG member interface remains in master state, and the original
master M-LAG member interface is in backup state after the fault is rectified. You
can run the display dfs-group dfs-group-id node node-id m-lag command to
view the status of an M-LAG member interface.
Assume that a multicast source is at the network side and a multicast group
member is at the access side. If the M-LAG member interface on the M-LAG
master device fails, the device instructs the remote device to update multicast
entries through M-LAG synchronization packets. M-LAG master and backup
devices do not load balance traffic depending on whether the last digit of the
multicast group address is an odd or even number, and all multicast traffic is
forwarded by the M-LAG backup device on which the M-LAG member interface is
Up. If the M-LAG member interface on the M-LAG backup device fails, multicast
traffic is forwarded similarly.
Network Network
M-LAG master
device failure
S-1 S-1
If the M-LAG master device fails, the M-LAG backup device becomes the master
device and continues to forward traffic, and its Eth-Trunk link is still in Up state.
The Eth-Trunk link of the M-LAG master device goes Down, and the dual-homing
networking changes to single-homing networking.
If the M-LAG backup device fails, the M-LAG master and backup status remains
unchanged, and the Eth-Trunk link of the M-LAG backup device goes Down. The
Eth-Trunk link of the M-LAG master device is still in Up state and continues to
forward traffic. The dual-homing networking changes to single-homing
networking.
When a faulty M-LAG member device recovers, the peer-link goes Up first, and the
two M-LAG member devices renegotiate their master and backup roles. After the
negotiation succeeds, the M-LAG member interface on the faulty M-LAG member
device goes Up and traffic is load balanced. Both the M-LAG master and backup
devices retain their original roles after recovering from a fault.
Peer-Link Failure
Network Network
Peer-link failure
S-1 S-1
Faulty link
Error-Down interface
If the peer-link fails but the DAD heartbeat status is normal when M-LAG is used
for dual-homing access on a common Ethernet, VXLAN, or IP network, interfaces
excluding the logical interface, management interface, peer-link interface, and
stack interface on the M-LAG backup device enter the Error-Down state by
default. If the peer-link fails but the DAD heartbeat status is normal when M-LAG
is used for dual-homing access on a TRILL network, the M-LAG member interface
on the M-LAG backup device enters the Error-Down state.
When the faulty peer-link recovers, the M-LAG member interface in the Error-
Down state automatically restores to the Up state after 240s by default, and the
other interfaces in the Error-Down state automatically restore to the Up state
immediately.
You can run the dual-active detection error-down mode routing-switch
command to configure logical interfaces to enter the Error-Down state when the
peer-link fails but the DAD heartbeat status is normal in an M-LAG scenario. If the
peer-link fails but the DAD heartbeat status is normal when M-LAG is used for
dual-homing access on a VXLAN or IP network, the VLANIF interface, VBDIF
interface, loopback interface, and M-LAG member interface on the M-LAG backup
device enter the Error-Down state.
NOTE
After logical interfaces are configured to change to Error-Down state when the peer-link
fails but the DAD heartbeat status is normal in an M-LAG, if a faulty peer-link interface in
the M-LAG recovers, the devices restore VLANIF interfaces, VBDIF interfaces, and loopback
interfaces to Up state 6 seconds after DFS group pairing succeeds to ensure that ARP entry
synchronization on a large number of VLANIF interfaces is normal. If a delay after which
the Layer 3 protocol status of the interface changes to Up is configured, the delay after
which VLANIF interfaces, VBDIF interfaces, and loopback interfaces go Up is the configured
delay plus 6 seconds.
You can run the m-lag unpaired-port suspend and m-lag unpaired-port
reserved commands to flexibly configure whether an interface enters the Error-
Down state when the peer-link fails but the DAD heartbeat status is normal in an
M-LAG scenario. Table 4-4 describes the interfaces in the Error-Down state when
the peer-link fails, the DAD heartbeat status is normal, and the following functions
are configured.
Table 4-4 Interfaces in the Error-Down state when the peer-link fails but the DAD
heartbeat status is normal
Device Configuration M-LAG Access to a Common
Ethernet, VXLAN, or IP Network
Figure 4-17 Networking when enhanced DAD for secondary faults is enabled
1 Network Network 2
Peer-link failure
Enhanced DAD
for secondary
faults
Backup Master
DAD link DAD link
S-1 S-1
Faulty link
Interface in Error-
Down state
As shown in scenario 2 in Figure 4-17, if the peer-link fails but the DAD heartbeat
status is normal when M-LAG is used for dual-homing access, some interfaces on
the DFS backup device enter the Error-Down state. In this case, the DFS master
device continues to work. If the DFS master device cannot work because it is
powered off or it restarts due to a fault, both the DFS master and backup devices
cannot forward traffic, as shown in scenario 3 in Figure 4-17.
In this scenario, enhanced DAD for secondary faults ensures nonstop forwarding
when secondary faults occur, meeting reliability requirements. As shown in Figure
4-17, this function is used to describe different fault phases and triggered
behaviors.
1. Peer-link failure: If the peer-link fails but the DAD heartbeat status is normal,
some interfaces (for details, see Peer-Link Failure) on the DFS backup device
are triggered to enter the Error-Down state. The DFS master device continues
to work.
2. DFS master device failure: If the peer-link fails and the DFS master device
cannot work because it is powered off or it restarts because of a fault, the M-
LAG master and backup devices cannot forward traffic and services are
interrupted.
3. Enhanced DAD for secondary faults enabled: If enhanced DAD for secondary
faults is enabled, the DFS backup device can detect that the DFS master
device fails through the DAD mechanism (because it does not receive any
heartbeat packets from the master device within a certain period). The
backup device then becomes the DFS master device, restores the interfaces in
Error-Down state to the Up state, and forwards traffic.
4. Secondary fault rectification scenario: Faults on the original DFS master
device are rectified and the peer-link failure persists.
– If the LACP M-LAG system ID is switched to the LACP system ID of the
local device within a certain period, the access device selects only one of
the uplinks as the active link during LACP negotiation. The actual traffic
forwarding is normal.
– If the default LACP M-LAG system ID is used, that is, it is not switched,
two M-LAG devices use the same system ID to negotiate with the access
device. Therefore, links to both devices can be selected as the active link.
In this scenario, because the peer-link failure persists, M-LAG devices
cannot synchronize information such as the priority and system MAC
address of each other. As a result, two M-LAG master devices exist, and
multicast traffic forwarding may be abnormal. In this case, as shown in
Figure 4-18, the HB DFS master/backup status is negotiated through
heartbeat packets carrying necessary information for DFS group master/
backup negotiation (such as the DFS group priority and system MAC
address). Some interfaces (for details, see Peer-Link Failure) on the HB
DFS backup device are triggered to enter the Error-Down state. The HB
DFS master device continues to work.
NOTE
If secondary faults occur on the DFS backup device after the peer-link fails, traffic
forwarding is not affected. The DFS master device continues to forward traffic.
S-1 S-1
Single-level M-LAG
● Connecting a switch in dual-homing mode
As shown in Figure 4-19, to ensure reliability, a switch is connected to a
network to implement link redundancy. MSTP can be deployed to implement
redundancy, but the link use efficiency is low and many bandwidth resources
are wasted. To implement redundancy and improve the link use efficiency,
deploy M-LAG between SwitchA and SwitchB so that the switch can be dual-
homed to SwitchA and SwitchB. SwitchA and SwitchB load balance traffic.
When one device fails, traffic can be rapidly switched to the other device to
ensure nonstop service transmission.
Ethernet/IP/
TRILL/VXLAN
Network
peer-link
Switch A Switch B
M-LAG
Switch
Server 1 Server 2
The configuration of dual homing a server is the same as common link aggregation
configuration. Ensure that the server and switches use the same link aggregation mode.
The LACP mode at both ends is recommended.
Ethernet/IP/
TRILL/VXLAN
Network
peer-link
Switch A Switch B
M-LAG
Server
Multi-level M-LAG
As shown in Figure 4-21, after M-LAG is deployed between SwitchA and SwitchB,
M-LAG is deployed between SwitchC and SwitchD. The two M-LAGs are
connected. This deployment simplifies networking and allows more servers to be
connected to the network in dual-homing mode. Before deploying multi-level M-
LAG, configure Virtual Spanning Tree Protocol (V-STP).
Network
Peer-link
SwitchC SwitchD
Peer-link
SwitchA SwitchB
Server
NOTE
● When the root bridge mode is used, two devices that constitute an M-LAG must function as
root bridges on a Layer 2 network and do not support M-LAG cascading in the root bridge
mode.
● When the V-STP mode is used, two devices that constitute an M-LAG can choose not to
function as root bridges on a Layer 2 network. The networking is flexible and the two
devices support M-LAG cascading. V-STP is recommended because it can eliminate loops
caused by incorrect M-LAG configurations or connections.
License Requirements
M-LAG 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
CE8868EI V200R005C10
CE8861EI V200R005C10
CE8860EI V100R006C00
CE8850-32CQ-EI V200R002C50
CE8850-64CQ-EI V200R005C00
CE7850EI V100R005C10
CE7855EI V200R001C00
CE6810EI V100R005C10
CE6810LI V100R005C10
CE6850EI V100R005C10
CE6850HI/CE6850U-HI/ V100R005C10
CE6851HI
CE6855HI V200R001C00
CE6856HI V200R002C50
CE6857EI V200R005C10
CE6860EI V200R002C50
CE6865EI V200R005C00
CE6870-24S6CQ-EI/ V200R001C00
CE6870-48S6CQ-EI
CE6870-48T6CQ-EI V200R002C50
CE6875EI V200R003C00
CE6880EI V200R005C00
CE5880EI V200R005C10
CE5810EI V100R005C10
CE5850EI V100R005C10
CE5850HI V100R005C10
CE5855EI V100R005C10
NOTE
For details about the mapping between software versions and switch models, see the
Hardware Query Tool.
● During M-LAG setup, you must use optical modules or copper transceiver
modules that are certified for Huawei data center switches. If high-speed
cables or active optical cables (AOCs) are used, you must purchase cables
from Huawei. Optical or copper transceiver modules that are not certified for
Huawei Ethernet switches, and cables not purchased from Huawei cannot
ensure transmission reliability and may affect service stability. Huawei is not
liable for any problem caused by the use of optical or copper modules that
are not certified for Huawei data center switches, or cables not purchased
from Huawei, and will not fix such problems.
● The two devices that constitute an M-LAG must use the same model. If one
end is an SVF, the other end must be an SVF. If one end is a CloudEngine
8800, 7800, 6800, and 5800 series switches, the other end must be a
CloudEngine 8800, 7800, 6800, and 5800 series switches. It is recommended
that devices at both ends use the same model and version.
● The two devices that constitute an M-LAG need to be configured with the
root bridge and bridge ID or V-STP. They are virtualized into one device for
STP calculation to prevent loops.
● When the root bridge mode is used to configure M-LAG, the two devices that
constitute an M-LAG must use the same bridge ID and the highest root
priority so that the devices function as the root nodes.
● When the switch used as the root bridge is configured with M-LAG, the switch
does not support STP multi-process. When the switch is configured with both
V-STP and M-LAG, the switch does not support the MSTP mode or STP multi-
process in versions earlier than V200R002C50; the switch does not support the
MSTP mode but supports the STP multi-process in V200R002C50 and later
versions.
● In V-STP scenarios, configure M-LAG and connect cables according to the
following sequence:
a. Configure V-STP.
b. Configure a DFS group and peer-link interfaces.
c. Use a cable to connect peer-link interfaces of M-LAG master and backup
devices.
d. Configure M-LAG member interfaces and use cables to connect M-LAG
master and backup devices and the user-side host or switching device.
● If the M-LAG consistency check mode is set to strict mode and the system
detects that type 1 configurations of the two M-LAG devices are inconsistent,
contact the device administrator to immediately adjust the configurations and
not restart the devices. If type 1 configurations are inconsistent, member
interfaces on the M-LAG backup device enter the Error-Down state and the
alarm about type 1 configuration inconsistency is generated.
If the administrator does not adjust the configurations and restarts the M-
LAG master device, interfaces on the M-LAG backup device may enter the
Error-Down state because of type 1 configuration inconsistency during re-
negotiation between M-LAG devices when the master device is recovering. In
this case, M-LAG member interfaces on the M-LAG master device go Up after
a delay. As a result, both the M-LAG master and backup devices fail to
forward traffic, and services are interrupted.
If M-LAG configuration consistency check is disabled and type 1 and type 2
configurations of M-LAG master and backup devices are inconsistent, traffic
forwarding may be abnormal. You are advised to manually adjust
configurations of M-LAG master and backup devices to ensure that they have
consistent type 1 and type 2 configurations, and enable M-LAG configuration
consistency check.
● If the system software of M-LAG member switches is upgraded from a version
earlier than V200R003C00 to V200R019C10 or a later version, the M-LAG
configuration consistency check fails during the upgrade. If the system
software of M-LAG member switches is upgraded from a version between
V200R003C00 and V200R005C10 to V200R019C10 or a later version, the M-
LAG configuration consistency check is not supported during the upgrade.
After the upgrade is complete, the M-LAG configuration consistency check is
performed.
Limitations on Configuring Dual-Active Gateways
● When the two devices that constitute an M-LAG function as gateways and
servers are single-homed or dual-homed to the two devices, pay attention to
the following points:
– (Recommended) Select the access mode in which the same IP and MAC
addresses are configured for VLANIF and VBDIF interfaces. This mode is
supported in V100R006C00 and later versions. In V200R002C50 and
earlier versions, if the same IP and MAC addresses are configured on two
VLANIF or VBDIF interfaces, the IP and MAC address conflict alarm
hwEthernetARPMACIPConflict is generated. It is normal that this alarm is
generated in this scenario. You can ignore this alarm. To mask this alarm,
run the undo snmp-agent trap enable feature-name arp trap-name
hwethernetarpmacipconflict command to disable the alarm function
for this conflict. After the alarm function for this conflict is disabled, you
cannot detect loops on the network through alarms, and user services
may be interrupted. Exercise caution when performing this operation. In
V200R003C00SPC810 and later versions, if the same IP and MAC
addresses are configured on two VLANIF and VBDIF interfaces, the
conflict alarm is not generated.
– In a data center, if M-LAG dual-active gateways need to be deployed, you
are advised to deploy them by configuring IP addresses and virtual MAC
addresses of VLANIF/VBDIF interfaces, not by configuring VRRP.
the MAC address of the faulty M-LAG member interface is changed to that of
a peer-link interface in corresponding entries.
● In V200R005C10 and earlier versions, if a static ARP entry with a specified M-
LAG member interface as the outbound interface is configured in an M-LAG
dual-homing scenario, the outbound interface of the ARP entry cannot be
changed to a peer-link interface when the M-LAG member interface fails. As a
result, traffic cannot be forwarded. Therefore, do not configure a static ARP
entry with a specified M-LAG member interface as the outbound interface in
an M-LAG dual-homing scenario.
● In V200R005C00 and earlier versions, if a static IPv6 neighbor entry with a
specified M-LAG member interface as the outbound interface is configured in
an M-LAG dual-homing scenario, the outbound interface of the entry cannot
be changed to a peer-link interface when the M-LAG member interface fails.
As a result, traffic cannot be forwarded. Therefore, do not configure a static
IPv6 neighbor entry with a specified M-LAG member interface as the
outbound interface in an M-LAG dual-homing scenario. In V200R005C10, you
can enable enhanced M-LAG Layer 3 forwarding on switches except the
CE6810LI, CE5880EI, and CE6880EI to apply for backup FRR resources for all
ND entries with M-LAG member interfaces as outbound interfaces. The
outbound interfaces can be changed to peer-link interfaces to establish active
and standby paths for traffic forwarding. However, FRR resources applied for
static IPv6 peer relationship entries are not released when the M-LAG
member interface goes Down and the corresponding VLANIF interface is still
Up. As a result, the corresponding system resources are not released.
● If an access device is dual-homed to M-LAG master and backup devices
through Layer 2 sub-interfaces and one Layer 2 sub-interface is Down, north-
south traffic cannot be forwarded through the peer-link because of the M-
LAG unidirectional isolation mechanism, resulting in packet loss. In the M-LAG
unidirectional isolation mechanism, if a device is dual-homed to the M-LAG in
active-active mode through main interfaces, all packets excluding Layer 3
known unicast packets from a peer-link interface to an M-LAG member
interface are isolated.
● After logical interfaces are configured to change to Error-Down state when
the peer-link fails but the DAD heartbeat status is normal in an M-LAG, if a
faulty peer-link interface in the M-LAG recovers, the devices restore VLANIF
interfaces, VBDIF interfaces, and loopback interfaces to Up state 6 seconds
after DFS group pairing succeeds to ensure that ARP entry synchronization on
a large number of VLANIF interfaces is normal. If a delay after which the
Layer 3 protocol status of the interface changes to Up is configured, the delay
after which VLANIF interfaces, VBDIF interfaces, and loopback interfaces go
Up is the configured delay plus 6s.
Limitations on Interconnection with an M-LAG
● In M-LAG scenarios, when the switch connects to the Network Attached
Storage (NAS) device or a load balancer, the NAS device or load balancer (for
example, F5 load balancer enabled with Auto Last Hop) does not send an ARP
request message to learn the gateway's MAC address. Instead, the NAS device
or load balancer analyzes data flows from the gateway and uses the source
MAC address in data flows received first as the gateway's MAC address. In this
case, the same MAC address needs to be configured on VLANIF interfaces of
the two switches (switches excluding the CE6870EI and CE6875EI) that
constitute an M-LAG; otherwise, the NAS device or load balancer may fail to
Stack Switches can set up a stack, and the stack then can be
used to establish an M-LAG as an independent device.
SVF Switches can set up an SVF system, and the SVF system
then can be used to establish an M-LAG as an independent
device. In an SVF system, M-LAG member interfaces must
be on spine or leaf switches. The interfaces cannot be on
both spine and leaf switches.
QinQ and VLAN The M-LAG is accessed through VLAN mapping and VLAN
Mapping stacking. Layer 3 services, including ARP, ND, and ICMP are
not supported.
IP unicast routing ● The two devices that constitute an M-LAG cannot set
up routing neighbor relationships with the devices to be
accessed.
● If two member devices in an M-LAG need to establish a
neighbor relationship, you are advised to manually
configure router IDs on the two M-LAG devices. If the
devices automatically obtain router IDs, the neighbor
relationship may fail to be established due to a router
ID conflict.
● M-LAG member devices function as active-active
gateways. An independent link between M-LAG
member devices is used as the best-effort link and
OSPF is configured. M-LAG member devices import the
direct route of a downstream server connected to the
M-LAG and advertise the route to each other. IP FRR is
configured, and the direct route is specified as the
primary link and the dynamic OSPF route is specified as
the backup link. When a network-side device sends
traffic to the server, the traffic is transmitted along the
backup path on the M-LAG gateways because there is
no ARP entry for the primary link. As a result, a loop
occurs between the M-LAG member devices and the
network-side device cannot access the server. In this
case, you can run the ip ip-prefix ip-prefix-name
[ index index-number ] { permit | deny } ipv4-address
mask-length [ match-network ] [ greater-equal
greater-equal-value ] [ less-equal less-equal-value ]
command on the M-LAG gateways to configure an
OSPF routing policy to permit all routes excluding the
direct route.
FCoE The M-LAG function is not available if FSB and FCF or FSB
and NPV coexist on the device.
MPLS/L3VPN For devices that support MPLS and L3VPN, MPLS and
L3VPN cannot be configured on M-LAG member
interfaces.
Storm control You are not advised to configure storm control for
multicast packets on physical member interfaces of a peer-
link. Otherwise, M-LAG synchronization packets may be
suppressed, resulting in abnormal forwarding of data
packets in the M-LAG system.
Context
When the root bridge mode is used to configure M-LAG, the M-LAG master and
backup devices must be used as root bridges and configured with the same bridge
ID on the STP network so that the two devices are simulated into one root bridge.
Procedure
Step 1 Run system-view
By default, a switch does not function as the root bridge of any spanning tree.
After the configuration is complete, the priority of the device is 0 and cannot be
changed.
The MAC address of the device that participates in spanning tree calculation is
specified.
By default, the device's MAC address is the bridge MAC address of the device that
participates in spanning tree calculation. You are advised to use the smaller MAC
address of the M-LAG master and slave device as the bridge MAC address for
spanning tree calculation.
----End
Context
A Dynamic Fabric Service (DFS) group is used for device pairing. A DFS group
needs to be bound to an IP address so that DFS master and backup devices can
exchange Dual-Active Detection (DAD) packets. The bound IP address is used for
communication with the remote end.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run dfs-group dfs-group-id
A DFS group is created and its view is displayed, or the view of an existing DFS
group is displayed.
Step 3 Bind the DFS group to an IP address based on the actual scenario.
When a device is dual-homed to PEs on an Ethernet, a VXLAN, or an IP network,
bind the DFS group to an IP address. Run either of the following commands. The
commands cannot be configured simultaneously.
● Run source ip ip-address [ vpn-instance vpn-instance-name ] [ peer peer-ip-
address [ udp-port port-number ] ]
The DFS group is bound to an IPv4 address and a VPN instance.
● Run source ipv6 ipv6-address [ vpn-instance vpn-instance-name ] [ peer
peer-ipv6-address [ udp-port port-number ] ]
The DFS group is bound to an IPv6 address and a VPN instance.
Assume that the heartbeat IP address and UDP port number of the peer device are
specified when the heartbeat IP address for communication bound to a DFS group
is configured. When the configuration takes effect, the two M-LAG devices
immediately start to send and receive heartbeat packets and negotiate the HB
DFS master/backup status. In scenarios where enhanced DAD for secondary faults
is enabled, if faults on the original DFS master device are rectified and the peer-
link fault persists, the corresponding interfaces on the backup device are triggered
to enter the Error-Down state based on the HB DFS master/backup status. This
mechanism prevents abnormal traffic forwarding in the scenario where two
master devices exist and improves device reliability.
Step 4 (Optional) Run priority priority
The priority of the DFS group is set.
The priority of a DFS group is used for master/backup negotiation between two
devices. A larger value indicates a higher priority of the device. The device with a
higher priority is the master device.
If the priorities of two devices are the same, the device with a smaller MAC
address is the master device.
By default, the priority of a DFS group is 100.
Step 5 (Optional) Run m-lag up-delay value [ auto-recovery interval interval-time ]
The delay for the M-LAG member interface to report the Up event is set.
To ensure the revertive switching performance, the default delay for the M-LAG
member interface to report the Up event is 240s, and the automatic recovery
interval is not configured in scenarios such as switch restart, card reset, or peer-
link fault recovery.
Step 6 (Optional) Run set lacp system-id switch-delay { switch-delay-time |
immediately }
In this case, enhanced DAD for secondary faults can be enabled. When the peer-
link fails and secondary faults occur, the DFS backup device detects the fault on
the DFS master device and restores the interfaces in Error-Down state to forward
traffic. This ensures nonstop transmission when secondary faults occur.
If the peer-link fault persists after secondary faults are rectified, two master
devices may exist. It is recommended that you specify the IP address of the peer
device when configuring the IP address bound to the DFS group. In this case, if the
peer-link fault persists after the faulty device recovers, the corresponding
interfaces on the HB DFS backup device are triggered to enter the Error-Down
state, preventing abnormal traffic forwarding in the scenario where two master
devices exist.
Logical interfaces are configured to enter the Error-Down state when the peer-link
fails but the DAD status is normal in an M-LAG scenario.
By default, logical interfaces are not triggered to enter the Error-Down state when
the peer-link fails but the DAD status is normal in an M-LAG scenario. On a dual-
homing TRILL network where M-LAG is deployed, when the peer-link fails but the
DAD status is normal, the M-LAG interface on the backup device enters the Error-
Down state. On a dual-homing Ethernet or IP network where M-LAG is deployed,
when the peer-link fails but the DAD status is normal, physical interfaces except
the logical interface, interface configured with m-lag unpaired-port reserved,
management interface, peer-link interface, and stack interface on the backup
device all enter the Error-Down state.
NOTE
After logical interfaces are configured to change to Error-Down state when the peer-link
fails but the DAD heartbeat status is normal in an M-LAG, if a faulty peer-link interface in
the M-LAG recovers, the devices restore VLANIF interfaces, VBDIF interfaces, and loopback
interfaces to Up state 6 seconds after DFS group pairing succeeds to ensure that ARP entry
synchronization on a large number of VLANIF interfaces is normal. If a delay after which
the Layer 3 protocol status of the interface changes to Up is configured, the delay after
which VLANIF interfaces, VBDIF interfaces, and loopback interfaces go Up is the configured
delay plus 6 seconds.
The system is configured not to trigger the remote M-LAG device to delete the
corresponding MAC address on the peer-link interface under certain conditions.
By default, the system triggers the remote M-LAG device to delete the
corresponding MAC address on the peer-link interface under certain conditions.
----End
Prerequisites
The DFS group between two devices in the M-LAG has been paired successfully
and the master and backup states have been negotiated.
Context
The M-LAG configuration falls into two types: key configuration (Type 1) and
common configuration (Type 2), as described in Table 4-8. Two M-LAG
consistency check modes are available: strict and loose.
● Key configuration (Type 1): If the configurations of two devices in the M-LAG
are inconsistent, problems may occur, for example, loops may occur or
packets are discarded for a long period of time though the M-LAG status is
normal.
Whether BPDU
protection is enabled
LACP mode
VBDIF interface
configuration
● BD ID
● IPv4 address
● IPv6 address
● VRRP4 group
● MAC address
● Status
NOTE
The device only checks the
virtual MAC address by
default.
For the IPv6 address and
VRRP4 configuration, the
consistency check only
take effect when the
VBDIF interface is up. If the
VBDIF interface is down,
the preceding
configurations do not take
effect on the interface.
VLANIF interface
configuration
● VLAN ID
● IPv4 address
● IPv6 address
● VRRP4 group
● VRRP6 group
● MAC address
● Status
NOTE
The device only checks the
virtual MAC address by
default.
For the IPv6 address and
VRRP4 configuration, the
consistency check only
take effect when the
VLANIF interface is up. If
the VLANIF interface is
down, the preceding
configurations do not take
effect on the interface.
Parameters
Number of member
interfaces of the Eth-
Trunk to which an M-
LAG member interface
belongs
NOTE
Only the numbers of
member interfaces of Eth-
Trunks are compared. The
physical Up/Down status
or bandwidth of member
interfaces is not checked.
Procedure
● Configure M-LAG consistency check.
a. Run system-view
The system view is displayed.
b. Run dfs-group dfs-group-id
Exception Handling
● In loose mode, if the key or common configuration of two devices in the M-
LAG is inconsistent, either of the following alarms is triggered:
"ETRUNK_1.3.6.1.4.1.2011.5.25.178.8.2.1 hwMLagConsistencyCheckType1" and
"ETRUNK_1.3.6.1.4.1.2011.5.25.178.8.2.3 hwMLagConsistencyCheckType2".
When the configuration of two devices in the M-LAG is adjusted, M-LAG
consistency check is successful and the alarm is cleared.
● In strict mode, if the key configuration of two devices in the M-LAG is
inconsistent, member interfaces on the M-LAG backup device enter the Error-
Down state and the alarm about key configuration inconsistency is generated:
"ETRUNK_1.3.6.1.4.1.2011.5.25.178.8.2.1 hwMLagConsistencyCheckType1".
The device records the status of an interface as Error-Down when it detects
that a fault occurs. The interface in Error-Down state cannot receive or send
packets and the interface indicator is off. You can run the display error-down
recovery command to check information about all interfaces in Error-Down
state on the device.
When the interface enters the Error-Down state, adjust the configuration of
M-LAG master and backup devices. You are not advised to manually restore
the interface or run the error-down auto-recovery cause m-lag interval
interval-value command in the system view to enable the interface to go Up
automatically. Otherwise, excess packets, packet loss, or forwarding failure
may occur. Exercise caution when you perform the preceding operation.
If the M-LAG consistency check mode is set to strict mode and the system
detects that type 1 configurations of the two M-LAG devices are inconsistent,
it is recommended that the device administrator immediately adjust the
configurations, and it is not recommended that the device administrator
restart the devices. If type 1 configurations are inconsistent, member
interfaces on the M-LAG backup device enter the Error-Down state and the
alarm about type 1 configuration inconsistency is generated.
If the administrator does not adjust the configurations and restarts the M-
LAG master device, interfaces on the M-LAG backup device may enter the
Error-Down state because of type 1 configuration inconsistency during re-
negotiation between M-LAG devices when the master device is recovering. In
this case, M-LAG member interfaces on the M-LAG master device go Up after
a delay. As a result, both the M-LAG master and backup devices fail to
forward traffic, and services are interrupted.
----End
Context
A peer-link is a direct aggregated link between two devices configured with M-
LAG. It is used to exchange protocol packets and transmit some traffic, and
ensures normal running of M-LAG.
Prerequisites
The direct link between two devices configured with M-LAG has been configured
as an aggregated link.
Procedure
Step 1 Run system-view
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.
NOTE
STP needs to be disabled because two devices need to be simulated into one STP root bridge
and the directly connected interface cannot be blocked.
----End
Procedure
● When the Eth-Trunk works in manual load balancing mode, perform the
following operations.
a. Run system-view
The system view is displayed.
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 dfs-group dfs-group-id m-lag m-lag-id
The Eth-Trunk is bound to a DFS group, that is, the Eth-Trunk is
configured as an M-LAG member interface.
NOTE
The two devices configured with M-LAG must use the same M-LAG ID.
e. Run commit
The configuration is committed.
● (Recommended) When the Eth-Trunk works in LACP mode, perform the
following operations.
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>
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.
NOTE
The two devices configured with M-LAG must use the same M-LAG ID.
f. (Optional) Configure the LACP M-LAG system priority and system ID.
▪ Run the quit command to exit from the Eth-Trunk interface view.
NOTE
After the DFS pairing succeeds in V200R001C00 and later versions, the
master device automatically synchronizes its LACP M-LAG system priority
and system ID to the backup device. The M-LAG member interface of the
backup device uses the synchronized LACP M-LAG system priority and
system ID to perform LACP negotiation. You do not need to manually
configure the LACP M-LAG system priority and system ID.
▪ Run the lacp m-lag priority priority command to set the LACP M-
LAG system priority.
The default LACP M-LAG system priority is 32768.
○ The LACP M-LAG system priority is valid for the M-LAG
composed of an Eth-Trunk in LACP mode, whereas the LACP
system priority configured by the lacp priority command is valid
for an Eth-Trunk in LACP mode.
○ The LACP M-LAG system priority configured in the Eth-Trunk
interface view takes effect only on the Eth-Trunk. When DFS
pairing succeeds, the M-LAG master device does not synchronize
the LACP M-LAG system priority of the Eth-Trunk to the M-LAG
backup device. Therefore, the LACP M-LAG system priority of an
Eth-Trunk must be configured on both the M-LAG master and
backup devices and be the same.
----End
Context
On a dual-homing IP or VXLAN network, both the M-LAG master and backup
devices need to function as Layer 3 gateways. In this case, VLANIF/VBDIF
interfaces corresponding to M-LAG member interfaces must have the same IP
address and MAC address. You can configure the same IP address and run the
mac-address command to configure the same virtual MAC address for the
VLANIF/VBDIF interfaces.
Procedure
● Configure an IP address and a MAC address for a VLANIF/VBDIF interface to
implement dual-active gateway.
a. Run system-view
The system view is displayed.
b. Run interface { vlanif vlan-id | vbdif bd-id }
The VLANIF or VBDIF interface view is displayed.
c. Configure an IP address for the interface:
NOTE
----End
Context
On a dual-homing Ethernet, VXLAN, or IP network where M-LAG is deployed,
when the peer-link fails but the DAD status is normal, interfaces except the
management interface, peer-link interface, and stack interface on the backup
device all enter the Error-Down state. When the faulty peer-link is restored, the M-
LAG interface in Error-Down state goes Up after 240 seconds by default and other
interfaces in Error-Down state go Up automatically.
Table 4-9 describes the Error-Down state of interfaces when the peer-link fails but
the DAD status is normal.
Table 4-9 Error-Down state of interfaces when the peer-link fails but the DAD
status is normal
Device where both m-lag unpaired- Only the M-LAG member interface
port suspend and m-lag unpaired- and the interface configured with m-
port reserved are configured lag unpaired-port suspend are in
Error-Down state.
Procedure
Step 1 Run system-view
----End
NOTE
CE6810LI, CE5880EI, and CE6880EI switches do not support enhanced M-LAG Layer 3
forwarding in an IPv6 scenario.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run m-lag forward layer-3 enhanced enable
Enhanced M-LAG Layer 3 forwarding is enabled in an IPv6 scenario.
By default, enhanced M-LAG Layer 3 forwarding is disabled in an IPv6 scenario.
After enhanced M-LAG Layer 3 forwarding is enabled in an IPv6 scenario, backup
FRR resources are requested for all ND entries with M-LAG member interfaces as
outbound interfaces. The outbound interfaces can be changed to peer-link
interfaces to establish active and standby paths for traffic forwarding. If the FEI
side detects that an M-LAG member interface fails, dual-homing networking is
changed to single-homing networking. The next hop in the corresponding ND
entry is changed from the M-LAG member interface to the peer-link interface. This
improves the switchover performance when faults occur.
NOTE
● After enhanced M-LAG Layer 3 forwarding is enabled in an IPv6 scenario, the active and
standby paths may fail to be delivered due to increased next-hop resource consumption.
As a result, packet loss occurs.
● After enhanced M-LAG Layer 3 forwarding is enabled in an IPv6 scenario, the TTL value
decreases by 1 on the M-LAG master and backup devices because packets are forwarded
inside the M-LAG.
● After enhanced M-LAG Layer 3 forwarding is enabled, you need to configure an Eth-
Trunk interface to clear all the learned ND entries when the Eth-Trunk joining in or
being removed from M-LAG. This prevents the upper-layer protocol module from
detecting the waste of FRR resources caused by the change of M-LAG member
interfaces.
● After enhanced M-LAG Layer 3 forwarding is enabled, you can disable this function only
after 300s. After enhanced M-LAG Layer 3 forwarding is disabled, you can enable this
function only after 300s.
Follow-up Procedure
After M-LAG is configured, if the peer-link fails but the heartbeat status is normal,
some interfaces on the backup device will enter the Error-Down state. The device
records the status of an interface as Error-Down when it detects that a fault
occurs. The interface in Error-Down state cannot receive or send packets and the
interface indicator is off. You can run the display error-down recovery command
to check information about all interfaces in Error-Down state on the device.
When M-LAG is used for dual-homing to an Ethernet, VXLAN network, or IP
network and the peer-link fails but the heartbeat is normal, all physical interfaces
except the management interface, peer-link interface, and stack interface on the
backup device will enter the error-down state. When the peer-link recovers, the M-
LAG interface in Error-Down state becomes Up after 240 seconds by default, and
the physical interfaces in Error-Down state are restored to Up state.
When the interface enters the Error-Down state, locate the cause. You are not
advised to manually restore the interface or run the error-down auto-recovery
cause m-lag interval interval-value command in the system view to enable the
interface to go Up automatically. Otherwise, packet loss or forwarding failure may
occur. Exercise caution when you perform the preceding operation.
Context
Virtual Spanning Tree Protocol (V-STP) is a Layer 2 topology management feature
and virtualizes two STP-enabled devices into one device to perform STP
calculation.
STP can detect the M-LAG master or backup status. After V-STP is enabled on the
M-LAG master and backup devices and M-LAG master/backup negotiation is
successful, two devices are virtualized into one device for port role calculation and
fast convergence. STP needs to synchronize the bridge information and instance
priority of the M-LAG master and backup devices. After M-LAG master/backup
negotiation is successful, the backup device uses the bridge MAC address and
instance priority that is synchronized from the master device for STP calculation
and packet transmission. This ensures STP parameter calculation on the virtualized
device.
When configuring V-STP, ensure that the STP/RSTP timer settings on the two
devices that constitute an M-LAG be the same. Otherwise, network flapping may
occur.
Procedure
Step 1 Run system-view
V-STP does not support the MSTP mode, and supports multi-process. By default,
an MSTP process works in MSTP mode. Currently, only STP and RSTP modes are
supported in V-STP scenarios. The MSTP process therefore must be configured to
work in STP or RSTP mode in V-STP scenarios.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run dfs-group dfs-group-id
A DFS group is created and its view is displayed, or the view of an existing DFS
group is displayed.
Step 3 Bind the DFS group to an IP address based on the actual scenario.
When a device is dual-homed to PEs on an Ethernet, a VXLAN, or an IP network,
bind the DFS group to an IP address. Run either of the following commands. The
commands cannot be configured simultaneously.
● Run source ip ip-address [ vpn-instance vpn-instance-name ] [ peer peer-ip-
address [ udp-port port-number ] ]
Assume that the heartbeat IP address and UDP port number of the peer device are
specified when the heartbeat IP address for communication bound to a DFS group
is configured. When the configuration takes effect, the two M-LAG devices
immediately start to send and receive heartbeat packets and negotiate the HB
DFS master/backup status. In scenarios where enhanced DAD for secondary faults
is enabled, if faults on the original DFS master device are rectified and the peer-
link fault persists, the corresponding interfaces on the backup device are triggered
to enter the Error-Down state based on the HB DFS master/backup status. This
mechanism prevents abnormal traffic forwarding in the scenario where two
master devices exist and improves device reliability.
The priority of a DFS group is used for master/backup negotiation between two
devices. A larger value indicates a higher priority of the device. The device with a
higher priority is the master device.
If the priorities of two devices are the same, the device with a smaller MAC
address is the master device.
The delay for the M-LAG member interface to report the Up event is set.
To ensure the revertive switching performance, the default delay for the M-LAG
member interface to report the Up event is 240s, and the automatic recovery
interval is not configured in scenarios such as switch restart, card reset, or peer-
link fault recovery.
The authentication mode and password of DFS group synchronization packets are
configured.
The stack status indicator is enabled to display the DFS group master and backup
status.
By default, the stack status indicator does not display the DFS group master and
backup status.
After the stack status indicator is enabled to display the DFS group master and
backup status, the stack status indicator on the DFS master device is steady on
and that on the DFS backup device is off.
When an access device is connected to M-LAG master and backup devices using
M-LAG dual-homing access mode or Layer 2 access mode, you cannot disable or
delay the Error-Down action.
On a dual-homing network where M-LAG is deployed, when the peer-link fails but
the DAD status is normal, some interfaces on the DFS backup device enter the
Error-Down state. In this case, the DFS master device continues to work. When the
DFS master device cannot work because it is powered off or it restarts, the M-LAG
master and backup devices cannot forward traffic.
In this case, enhanced DAD for secondary faults can be enabled. When the peer-
link fails and secondary faults occur, the DFS backup device detects the fault on
the DFS master device and restores the interfaces in Error-Down state to forward
traffic. This ensures nonstop transmission when secondary faults occur.
If the peer-link fault persists after secondary faults are rectified, two master
devices may exist. It is recommended that you specify the IP address of the peer
device when configuring the IP address bound to the DFS group. In this case, if the
peer-link fault persists after the faulty device recovers, the corresponding
interfaces on the HB DFS backup device are triggered to enter the Error-Down
state, preventing abnormal traffic forwarding in the scenario where two master
devices exist.
Logical interfaces are configured to enter the Error-Down state when the peer-link
fails but the DAD status is normal in an M-LAG scenario.
By default, logical interfaces are not triggered to enter the Error-Down state when
the peer-link fails but the DAD status is normal in an M-LAG scenario. On a dual-
homing TRILL network where M-LAG is deployed, when the peer-link fails but the
DAD status is normal, the M-LAG interface on the backup device enters the Error-
Down state. On a dual-homing Ethernet or IP network where M-LAG is deployed,
when the peer-link fails but the DAD status is normal, physical interfaces except
the logical interface, interface configured with m-lag unpaired-port reserved,
management interface, peer-link interface, and stack interface on the backup
device all enter the Error-Down state.
On the IP or VXLAN network where M-LAG is deployed, when the dual-active
detection error-down mode routing-switch command is used, only VLANIF
interfaces, VBDIF interfaces, loopback interfaces, and M-LAG member interfaces
are triggered to enter the Error-Down state.
NOTE
After logical interfaces are configured to change to Error-Down state when the peer-link
fails but the DAD heartbeat status is normal in an M-LAG, if a faulty peer-link interface in
the M-LAG recovers, the devices restore VLANIF interfaces, VBDIF interfaces, and loopback
interfaces to Up state 6 seconds after DFS group pairing succeeds to ensure that ARP entry
synchronization on a large number of VLANIF interfaces is normal. If a delay after which
the Layer 3 protocol status of the interface changes to Up is configured, the delay after
which VLANIF interfaces, VBDIF interfaces, and loopback interfaces go Up is the configured
delay plus 6 seconds.
----End
NOTE
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp process process-id
An STP process is created and the STP process view is displayed.
Step 3 Run stp mode { stp | rstp }
The working mode of the STP process is configured.
By default, the working mode of an STP process is MSTP. V-STP does not support
the MSTP mode, so the V-STP mode needs to switch to STP or RSTP. When a
switch starts, the default STP process with the ID of 0 exists. STP configurations in
the system view and interface view belong to STP process 0.
Step 4 Run stp enable
MSTP of the STP process is enabled.
By default, STP in a process is disabled.
Step 5 Run commit
The configuration is committed.
----End
Context
The M-LAG configuration falls into two types: key configuration (Type 1) and
common configuration (Type 2), as described in Table 4-10. Two M-LAG
consistency check modes are available: strict and loose.
● Key configuration (Type 1): If the configurations of two devices in the M-LAG
are inconsistent, problems may occur, for example, loops may occur or
packets are discarded for a long period of time though the M-LAG status is
normal.
In strict mode, if the key configuration of two devices in the M-LAG is
inconsistent, member interfaces on the M-LAG backup device enter the Error-
Down state and the alarm about key configuration inconsistency is generated.
In loose mode, if the key configuration of two devices in the M-LAG is
inconsistent, the alarm about key and common configuration inconsistency is
generated.
● Common configuration (Type 2): If the configurations of two devices in the
M-LAG are inconsistent, the M-LAG status may be abnormal. Compared with
Whether BPDU
protection is enabled
LACP mode
VBDIF interface
configuration
● BD ID
● IPv4 address
● IPv6 address
● VRRP4 group
● MAC address
● Status
NOTE
The device only checks the
virtual MAC address by
default.
For the IPv6 address and
VRRP4 configuration, the
consistency check only
take effect when the
VBDIF interface is up. If the
VBDIF interface is down,
the preceding
configurations do not take
effect on the interface.
VLANIF interface
configuration
● VLAN ID
● IPv4 address
● IPv6 address
● VRRP4 group
● VRRP6 group
● MAC address
● Status
NOTE
The device only checks the
virtual MAC address by
default.
For the IPv6 address and
VRRP4 configuration, the
consistency check only
take effect when the
VLANIF interface is up. If
the VLANIF interface is
down, the preceding
configurations do not take
effect on the interface.
Parameters
Number of member
interfaces of the Eth-
Trunk to which an M-
LAG member interface
belongs
NOTE
Only the numbers of
member interfaces of Eth-
Trunks are compared. The
physical Up/Down status
or bandwidth of member
interfaces is not checked.
Procedure
● Configure M-LAG consistency check.
a. Run system-view
The system view is displayed.
b. Run dfs-group dfs-group-id
Exception Handling
● In loose mode, if the key or common configuration of two devices in the M-
LAG is inconsistent, either of the following alarms is triggered:
"ETRUNK_1.3.6.1.4.1.2011.5.25.178.8.2.1 hwMLagConsistencyCheckType1" and
"ETRUNK_1.3.6.1.4.1.2011.5.25.178.8.2.3 hwMLagConsistencyCheckType2".
When the configuration of two devices in the M-LAG is adjusted, M-LAG
consistency check is successful and the alarm is cleared.
● In strict mode, if the key configuration of two devices in the M-LAG is
inconsistent, member interfaces on the M-LAG backup device enter the Error-
Down state and the alarm about key configuration inconsistency is generated:
"ETRUNK_1.3.6.1.4.1.2011.5.25.178.8.2.1 hwMLagConsistencyCheckType1".
The device records the status of an interface as Error-Down when it detects
that a fault occurs. The interface in Error-Down state cannot receive or send
packets and the interface indicator is off. You can run the display error-down
recovery command to check information about all interfaces in Error-Down
state on the device.
When the interface enters the Error-Down state, adjust the configuration of
M-LAG master and backup devices. You are not advised to manually restore
the interface or run the error-down auto-recovery cause m-lag interval
interval-value command in the system view to enable the interface to go Up
automatically. Otherwise, excess packets, packet loss, or forwarding failure
may occur. Exercise caution when you perform the preceding operation.
If the M-LAG consistency check mode is set to strict mode and the system
detects that type 1 configurations of the two M-LAG devices are inconsistent,
it is recommended that the device administrator immediately adjust the
configurations, and it is not recommended that the device administrator
restart the devices. If type 1 configurations are inconsistent, member
interfaces on the M-LAG backup device enter the Error-Down state and the
alarm about type 1 configuration inconsistency is generated.
If the administrator does not adjust the configurations and restarts the M-
LAG master device, interfaces on the M-LAG backup device may enter the
Error-Down state because of type 1 configuration inconsistency during re-
negotiation between M-LAG devices when the master device is recovering. In
this case, M-LAG member interfaces on the M-LAG master device go Up after
a delay. As a result, both the M-LAG master and backup devices fail to
forward traffic, and services are interrupted.
----End
Context
A peer-link is a direct aggregated link between two devices configured with M-
LAG. It is used to exchange protocol packets and transmit some traffic, and
ensures normal running of M-LAG.
Prerequisites
The direct link between two devices configured with M-LAG has been configured
as an aggregated link.
Procedure
Step 1 Run system-view
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
Procedure
● When the Eth-Trunk works in manual load balancing mode, perform the
following operations.
a. Run system-view
The system view is displayed.
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 dfs-group dfs-group-id m-lag m-lag-id
The Eth-Trunk is bound to a DFS group, that is, the Eth-Trunk is
configured as an M-LAG member interface.
NOTE
The two devices configured with M-LAG must use the same M-LAG ID.
e. (Optional) Run stp binding process process-id
The port is added to the specified MSTP process.
After STP multi-process is enabled, some M-LAG member interfaces on
M-LAG devices can be managed in each process. Devices perform STP
calculation based on processes, and the interfaces that are not in
processes do not participate in STP calculation of processes. The M-LAG
member port is added to the specified MSTP process.
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.
NOTE
The two devices configured with M-LAG must use the same M-LAG ID.
f. (Optional) Run stp binding process process-id
The port connected to the access link is added to the specified MSTP
process.
After STP multi-process is enabled, some M-LAG member interfaces on
M-LAG devices can be managed in each process. Devices perform STP
calculation based on processes, and the interfaces that are not in
processes do not participate in STP calculation of processes. The M-LAG
member port is added to the specified MSTP process.
▪ Run the quit command to exit from the Eth-Trunk interface view.
NOTE
After the DFS pairing succeeds in V200R001C00 and later versions, the
master device automatically synchronizes its LACP M-LAG system priority
and system ID to the backup device. The M-LAG member interface of the
backup device uses the synchronized LACP M-LAG system priority and
system ID to perform LACP negotiation. You do not need to manually
configure the LACP M-LAG system priority and system ID.
▪ Run the lacp m-lag priority priority command to set the LACP M-
LAG system priority.
The default LACP M-LAG system priority is 32768.
○ The LACP M-LAG system priority is valid for the M-LAG
composed of an Eth-Trunk in LACP mode, whereas the LACP
system priority configured by the lacp priority command is valid
for an Eth-Trunk in LACP mode.
○ The LACP M-LAG system priority configured in the Eth-Trunk
interface view takes effect only on the Eth-Trunk. When DFS
pairing succeeds, the M-LAG master device does not synchronize
the LACP M-LAG system priority of the Eth-Trunk to the M-LAG
backup device. Therefore, the LACP M-LAG system priority of an
Eth-Trunk must be configured on both the M-LAG master and
backup devices and be the same.
----End
Prerequisites
The M-LAG member interface has been added to the corresponding VLAN, or the
Layer 2 sub-interface of the Eth-Trunk to which the M-LAG member interface
belongs has been added to the corresponding BD.
Context
On a dual-homing IP or VXLAN network, both the M-LAG master and backup
devices need to function as Layer 3 gateways. In this case, VLANIF/VBDIF
interfaces corresponding to M-LAG member interfaces must have the same IP
address and MAC address. You can configure the same IP address and run the
mac-address command to configure the same virtual MAC address for the
VLANIF/VBDIF interfaces.
Procedure
● Configure an IP address and a MAC address for a VLANIF/VBDIF interface to
implement dual-active gateway.
a. Run system-view
NOTE
----End
Table 4-11 Error-Down state of interfaces when the peer-link fails but the DAD
status is normal
Device where both m-lag unpaired- Only the M-LAG member interface
port suspend and m-lag unpaired- and the interface configured with m-
port reserved are configured lag unpaired-port suspend are in
Error-Down state.
Procedure
Step 1 Run system-view
The interface is configured not to enter the Error-Down state when the peer-link
fails but the DAD status is normal.
----End
NOTE
CE6810LI, CE5880EI, and CE6880EI switches do not support enhanced M-LAG Layer 3
forwarding in an IPv6 scenario.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run m-lag forward layer-3 enhanced enable
Enhanced M-LAG Layer 3 forwarding is enabled in an IPv6 scenario.
By default, enhanced M-LAG Layer 3 forwarding is disabled in an IPv6 scenario.
After enhanced M-LAG Layer 3 forwarding is enabled in an IPv6 scenario, backup
FRR resources are requested for all ND entries with M-LAG member interfaces as
outbound interfaces. The outbound interfaces can be changed to peer-link
interfaces to establish active and standby paths for traffic forwarding. If the FEI
side detects that an M-LAG member interface fails, dual-homing networking is
changed to single-homing networking. The next hop in the corresponding ND
entry is changed from the M-LAG member interface to the peer-link interface. This
improves the switchover performance when faults occur.
NOTE
● After enhanced M-LAG Layer 3 forwarding is enabled in an IPv6 scenario, the active and
standby paths may fail to be delivered due to increased next-hop resource consumption.
As a result, packet loss occurs.
● After enhanced M-LAG Layer 3 forwarding is enabled in an IPv6 scenario, the TTL value
decreases by 1 on the M-LAG master and backup devices because packets are forwarded
inside the M-LAG.
● After enhanced M-LAG Layer 3 forwarding is enabled, you need to configure an Eth-
Trunk interface to clear all the learned ND entries when the Eth-Trunk joining in or
being removed from M-LAG. This prevents the upper-layer protocol module from
detecting the waste of FRR resources caused by the change of M-LAG member
interfaces.
● After enhanced M-LAG Layer 3 forwarding is enabled, you can disable this function only
after 300s. After enhanced M-LAG Layer 3 forwarding is disabled, you can enable this
function only after 300s.
----End
Follow-up Procedure
After M-LAG is configured, if the peer-link fails but the heartbeat status is normal,
some interfaces on the backup device will enter the Error-Down state. The device
records the status of an interface as Error-Down when it detects that a fault
occurs. The interface in Error-Down state cannot receive or send packets and the
interface indicator is off. You can run the display error-down recovery command
to check information about all interfaces in Error-Down state on the device.
When M-LAG is used for dual-homing to an Ethernet, VXLAN network, or IP
network and the peer-link fails but the heartbeat is normal, all physical interfaces
except the management interface, peer-link interface, and stack interface on the
backup device will enter the error-down state. When the peer-link recovers, the M-
LAG interface in Error-Down state becomes Up after 2 minutes by default, and the
physical interfaces in Error-Down state are restored to Up state.
When the interface enters the Error-Down state, locate the cause. You are not
advised to manually restore the interface or run the error-down auto-recovery
cause m-lag interval interval-value command in the system view to enable the
interface to go Up automatically. Otherwise, packet loss or forwarding failure may
occur. Exercise caution when you perform the preceding operation.
Context
During M-LAG operating status monitoring, you can check causes for fault
locating if an M-LAG fault occurs.
Procedure
Step 1 Run the display m-lag troubleshooting [ history ]command to check causes for
the M-LAG faults.
This command can display the causes of a maximum of 100 recent faults at most.
----End
Context
Before you check causes of M-LAG faults within a certain period, clear the existing
historical fault event information on the device.
NOTE
The historical fault event information about M-LAG faults cannot be restored after being
cleared. Confirm your operation before clearing the historical fault event information.
Procedure
● Run the reset m-lag troubleshooting history command in the user view to
clear historical fault event information about M-LAG faults.
----End
Networking Requirements
As shown in Figure 4-22, a server is dual-homed to an Ethernet network through
M-LAG. The customer requires high service reliability. Link aggregation between
the server and devices only achieves link-level reliability, and a fault on a device
may cause service interruption. M-LAG can be configured. When devices work
properly, links load balance traffic and a fault of any device does not affect
services. High service reliability is therefore ensured. On an Ethernet network, the
blocked interface cannot transmit heartbeat packets of M-LAG master and backup
devices; therefore, a DFS group is configured and bound to the IP address of the
management interface to ensure that heartbeat packets of M-LAG master and
backup devices can be transmitted normally.
Ethernet
Network
SwitchC SwitchD
10GE1/0/1 10GE1/0/2
10GE1/0/2 10GE1/0/1
Peer-link 1
10GE1/0/1 10GE1/0/2 10GE1/0/2 10GE1/0/1
10GE1/0/3 10GE1/0/3
SwitchA SwitchB
10GE1/0/4 10GE1/0/4
10GE1/0/6 10GE1/0/5 10GE1/0/5 10GE1/0/6
Server
Configuration Roadmap
1. Configure SwitchA and SwitchB as the root bridge and configure the same
bridge ID to ensure that M-LAG master and backup devices are used as root
bridges.
2. Configure IP addresses for management interfaces on SwitchA and SwitchB to
ensure Layer 3 connectivity and transmission of heartbeat packets of M-LAG
master and backup devices.
3. Configure M-LAG on SwitchA and SwitchB so that the server is dual-homed to
SwitchA and SwitchB.
4. Create VLANIF interfaces on SwitchC and SwitchD and configure IP addresses
for the VLANIF interfaces. Create VRRP groups on the VLANIF interfaces and
configure VRRP groups as gateways of M-LAG master and backup devices.
Procedure
Step 1 Configure SwitchA and SwitchB as root bridges and configure the same bridge ID
for them.
NOTE
If the two devices that constitute an M-LAG connect to downstream switching devices, you must
configure root protection.
# Configure SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] stp root primary
[*SwitchA] stp bridge-address 39-39-39
[*SwitchA] interface eth-trunk 1
[*SwitchA-Eth-Trunk1] trunkport 10ge 1/0/5
[*SwitchA-Eth-Trunk1] trunkport 10ge 1/0/6
[*SwitchA-Eth-Trunk1] stp edged-port enable
[*SwitchA-Eth-Trunk1] commit
[~SwitchA-Eth-Trunk1] quit
# Configure SwitchB.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] stp root primary
[*SwitchB] stp bridge-address 39-39-39
[*SwitchB] interface eth-trunk 1
[*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/5
[*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/6
[*SwitchB-Eth-Trunk1] stp edged-port enable
[*SwitchB-Eth-Trunk1] commit
[~SwitchB-Eth-Trunk1] quit
# Configure SwitchB.
[~SwitchB] interface meth 0/0/0
[~SwitchB-MEth0/0/0] ip address 10.1.1.2 24
[*SwitchB-MEth0/0/0] quit
[*SwitchB] commit
Step 3 Create a DFS group and bind IP addresses of management interfaces to the DFS
group on SwitchA and SwitchB.
Configure IP addresses for management interfaces on SwitchA and SwitchB to
ensure Layer 3 connectivity.
# Configure SwitchA.
[~SwitchA] dfs-group 1
[*SwitchA-dfs-group-1] source ip 10.1.1.1
[*SwitchA-dfs-group-1] priority 150
[*SwitchA-dfs-group-1] quit
[*SwitchA] commit
# Configure SwitchB.
[~SwitchB] dfs-group 1
[*SwitchB-dfs-group-1] source ip 10.1.1.2
[*SwitchB-dfs-group-1] priority 120
[*SwitchB-dfs-group-1] quit
[*SwitchB] commit
# Configure SwitchB.
[~SwitchB] interface eth-trunk 0
[*SwitchB-Eth-Trunk0] trunkport 10ge 1/0/3
[*SwitchB-Eth-Trunk0] trunkport 10ge 1/0/4
[*SwitchB-Eth-Trunk0] undo stp enable
[*SwitchB-Eth-Trunk0] mode lacp-static
[*SwitchB-Eth-Trunk0] peer-link 1
[*SwitchB-Eth-Trunk0] quit
[*SwitchB] commit
Step 5 Add Eth-Trunks that connect SwitchA and SwitchB to the server to VLAN 11 and
bind the Eth-Trunks to the DFS group.
The uplink interface of the server connected to the switch needs to be bound to
an aggregation link, and the link aggregation modes on the server and switch
must be consistent.
# Configure SwitchA.
[~SwitchA] vlan batch 11
[*SwitchA] interface eth-trunk 1
[*SwitchA-Eth-Trunk1] mode lacp-dynamic
[*SwitchA-Eth-Trunk1] port link-type access
[*SwitchA-Eth-Trunk1] port default vlan 11
[*SwitchA-Eth-Trunk1] dfs-group 1 m-lag 1
[*SwitchA-Eth-Trunk1] quit
[*SwitchA] commit
# Configure SwitchB.
[~SwitchB] vlan batch 11
[*SwitchB] interface eth-trunk 1
[*SwitchB-Eth-Trunk1] mode lacp-dynamic
[*SwitchB-Eth-Trunk1] port link-type access
[*SwitchB-Eth-Trunk1] port default vlan 11
[*SwitchB-Eth-Trunk1] dfs-group 1 m-lag 1
[*SwitchB-Eth-Trunk1] quit
[*SwitchB] commit
Step 6 Configure the links between SwitchA and SwitchC and between SwitchB and
SwitchD as aggregated links, and configure interface types and allowed VLANs.
# Configure SwitchA.
[~SwitchA] interface eth-trunk 2
[*SwitchA-Eth-Trunk2] mode lacp-static
# Configure SwitchB.
[~SwitchB] interface eth-trunk 2
[*SwitchB-Eth-Trunk2] mode lacp-static
[*SwitchB-Eth-Trunk2] port link-type trunk
[*SwitchB-Eth-Trunk2] port trunk allow-pass vlan 11
[*SwitchB-Eth-Trunk2] trunkport 10ge 1/0/1
[*SwitchB-Eth-Trunk2] trunkport 10ge 1/0/2
[*SwitchB-Eth-Trunk2] quit
[*SwitchB] commit
# Configure SwitchC.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchC
[*HUAWEI] commit
[~SwitchC] vlan batch 11
[*SwitchC] interface eth-trunk 2
[*SwitchC-Eth-Trunk2] mode lacp-static
[*SwitchC-Eth-Trunk2] port link-type trunk
[*SwitchC-Eth-Trunk2] port trunk allow-pass vlan 11
[*SwitchC-Eth-Trunk2] trunkport 10ge 1/0/1
[*SwitchC-Eth-Trunk2] trunkport 10ge 1/0/2
[*SwitchC-Eth-Trunk2] quit
[*SwitchC] commit
# Configure SwitchD.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchD
[*HUAWEI] commit
[~SwitchD] vlan batch 11
[*SwitchD] interface eth-trunk 2
[*SwitchD-Eth-Trunk2] mode lacp-static
[*SwitchD-Eth-Trunk2] port link-type trunk
[*SwitchD-Eth-Trunk2] port trunk allow-pass vlan 11
[*SwitchD-Eth-Trunk2] trunkport 10ge 1/0/1
[*SwitchD-Eth-Trunk2] trunkport 10ge 1/0/2
[*SwitchD-Eth-Trunk2] quit
[*SwitchD] commit
Step 7 Create VLANIF interfaces on SwitchC and SwitchD and configure IP addresses for
the VLANIF interfaces. Create VRRP groups on the VLANIF interfaces.
# Configure VRRP group 1 on SwitchC and set the priority of SwitchC to 120.
[~SwitchC] interface vlanif 11
[*SwitchC-Vlanif11] ip address 10.2.1.1 24
[*SwitchC-Vlanif11] vrrp vrid 1 virtual-ip 10.2.1.111
[*SwitchC-Vlanif11] vrrp vrid 1 priority 120
[*SwitchC-Vlanif11] quit
[*SwitchC] commit
Failed reason:
1 -- Relationship between vlan and port is inconsistent
2 -- STP configuration under the port is inconsistent
3 -- STP port priority configuration is inconsistent
4 -- LACP mode of M-LAG is inconsistent
5 -- M-LAG configuration is inconsistent
6 -- The number of M-LAG members is inconsistent
# Check M-LAG information on SwitchB.
[~SwitchA] display dfs-group 1 node 2 m-lag brief
* - Local node
Failed reason:
1 -- Relationship between vlan and port is inconsistent
2 -- STP configuration under the port is inconsistent
3 -- STP port priority configuration is inconsistent
4 -- LACP mode of M-LAG is inconsistent
5 -- M-LAG configuration is inconsistent
6 -- The number of M-LAG members is inconsistent
In the preceding command outputs, the value of Heart beat state is OK,
indicating that the heartbeat is normal. SwitchA is used as Node 1, its priority
is 150, and its status is Master. SwitchB is used as Node 2, its priority is 120,
and its status is Backup. The value of Causation is -, and the values of Port
State of Node 1 and Node 2 are both Up, and the M-LAG status of Node 1
and Node 2 is both active, indicating that the M-LAG configuration is correct.
● Run the display vrrp command on SwitchC and SwitchD. You can see that
SwitchC is in Master state and SwitchD is in Backup state.
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
dfs-group 1
priority 150
source ip 10.1.1.1
#
vlan batch 11
#
stp bridge-address 0039-0039-0039
stp instance 0 root primary
#
interface MEth0/0/0
ip address 10.1.1.1 255.255.255.0
#
interface Eth-Trunk0
stp disable
mode lacp-static
peer-link 1
#
interface Eth-Trunk1
port default vlan 11
stp edged-port enable
mode lacp-dynamic
dfs-group 1 m-lag 1
#
interface Eth-Trunk2
port link-type trunk
interface 10GE1/0/6
eth-trunk 1
#
return
● SwitchC configuration file
#
sysname SwitchC
#
vlan batch 11
#
interface Vlanif11
ip address 10.2.1.1 255.255.255.0
vrrp vrid 1 virtual-ip 10.2.1.111
vrrp vrid 1 priority 120
#
interface Eth-Trunk2
port link-type trunk
port trunk allow-pass vlan 11
mode lacp-static
#
interface 10GE1/0/1
eth-trunk 2
#
interface 10GE1/0/2
eth-trunk 2
#
return
● SwitchD configuration file
#
sysname SwitchD
#
vlan batch 11
#
interface Vlanif11
ip address 10.2.1.2 255.255.255.0
vrrp vrid 1 virtual-ip 10.2.1.111
#
interface Eth-Trunk2
port link-type trunk
port trunk allow-pass vlan 11
mode lacp-static
#
interface 10GE1/0/1
eth-trunk 2
#
interface 10GE1/0/2
eth-trunk 2
#
return
Networking Requirements
As shown in Figure 4-23, the switch is dual-homed to the IP network through M-
LAG. The requirements are as follows:
● When one access link fails, traffic can be fast switched to the other link to
ensure reliability.
● The load balancing mode can be used to forward traffic to make full use of
bandwidth and ensure that two links are in active state.
IP
Network
SwitchC
10GE1/0/1 10GE1/0/2
10GE1/0/1~1/0/4
Switch
Configuration Roadmap
The configuration roadmap is as follows:
In a V-STP scenario, to prevent a port from being blocked due to the spanning tree
calculation result, configure the main interface to implement Layer 3 connectivity or
disable the spanning tree protocol on the IP network.
5. On SwitchA and SwitchB, associate uplink and downlink interfaces with the
Monitor Link group to prevent a user-side traffic forwarding failure and traffic
loss due to the uplink fault.
Procedure
Step 1 On the switch, bind the uplink interface to an Eth-Trunk.
<HUAWEI> system-view
[~HUAWEI] sysname Switch
[*HUAWEI] commit
[~Switch] vlan batch 11
[*Switch] interface eth-trunk 20
[*Switch-Eth-Trunk20] mode lacp-static
[*Switch-Eth-Trunk20] port link-type trunk
[*Switch-Eth-Trunk20] port trunk allow-pass vlan 11
[*Switch-Eth-Trunk20] trunkport 10ge 1/0/1 to 1/0/4
[*Switch-Eth-Trunk20] quit
[*Switch] commit
Step 2 Configure the V-STP, DFS group, peer-link, and M-LAG interface on SwitchA and
SwitchB.
# Configure SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] stp mode rstp
[~SwitchA] stp bridge-address 1-1-1
[*SwitchA] stp v-stp enable
[*SwitchA] interface loopback 0
[*SwitchA-LoopBack0] ip address 10.1.1.1 32
[*SwitchA-LoopBack0] quit
[*SwitchA] dfs-group 1
[*SwitchA-dfs-group-1] source ip 10.1.1.1
[*SwitchA-dfs-group-1] priority 150
[*SwitchA-dfs-group-1] quit
[*SwitchA] interface eth-trunk 1
[*SwitchA-Eth-Trunk1] trunkport 10ge 1/0/4
[*SwitchA-Eth-Trunk1] trunkport 10ge 1/0/5
[*SwitchA-Eth-Trunk1] mode lacp-static
[*SwitchA-Eth-Trunk1] peer-link 1
[*SwitchA-Eth-Trunk1] quit
[*SwitchA] vlan batch 11
[*SwitchA] interface eth-trunk 10
[*SwitchA-Eth-Trunk10] mode lacp-static
[*SwitchA-Eth-Trunk10] port link-type trunk
[*SwitchA-Eth-Trunk10] port trunk allow-pass vlan 11
[*SwitchA-Eth-Trunk10] trunkport 10ge 1/0/2
[*SwitchA-Eth-Trunk10] trunkport 10ge 1/0/3
[*SwitchA-Eth-Trunk10] dfs-group 1 m-lag 1
[*SwitchA-Eth-Trunk10] quit
[*SwitchA] commit
# Configure SwitchB.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] stp mode rstp
[~SwitchB] stp bridge-address 1-1-1
[*SwitchB] stp v-stp enable
[*SwitchB] interface loopback 0
[*SwitchB-LoopBack0] ip address 10.1.1.2 32
[*SwitchB-LoopBack0] quit
[*SwitchB] dfs-group 1
[*SwitchB-dfs-group-1] source ip 10.1.1.2
[*SwitchB-dfs-group-1] priority 120
[*SwitchB-dfs-group-1] quit
[*SwitchB] interface eth-trunk 1
[*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/4
[*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/5
[*SwitchB-Eth-Trunk1] mode lacp-static
[*SwitchB-Eth-Trunk1] peer-link 1
[*SwitchB-Eth-Trunk1] quit
[*SwitchB] vlan batch 11
[*SwitchB] interface eth-trunk 10
Step 3 On SwitchA and SwitchB, configure an IP address and a MAC address for a VLANIF
interface to implement dual-active gateway of access devices.
VLANIF interfaces corresponding to M-LAG member interfaces of M-LAG master
and backup devices must be configured with the same IP address and MAC
address so that M-LAG devices use the same IP address and virtual MAC address.
# Configure SwitchA.
[~SwitchA] interface vlanif 11
[*SwitchA-Vlanif11] ip address 10.2.1.1 24
[*SwitchA-Vlanif11] mac-address 0000-5e00-0101
[*SwitchA-Vlanif11] quit
[*SwitchA] commit
# Configure SwitchB.
[~SwitchB] interface vlanif 11
[*SwitchB-Vlanif11] ip address 10.2.1.1 24
[*SwitchB-Vlanif11] mac-address 0000-5e00-0101
[*SwitchB-Vlanif11] quit
[*SwitchB] commit
Step 4 Configure OSPF on SwitchA, SwitchB, and SwitchC to ensure Layer 3 connectivity.
# Configure SwitchA.
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] undo portswitch
[*SwitchA-10GE1/0/1] ip address 10.3.1.1 24
[*SwitchA-10GE1/0/1] quit
[*SwitchA] ospf 1
[*SwitchA-ospf-1] area 0
[*SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.1 0.0.0.0
[*SwitchA-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[*SwitchA-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
[*SwitchA-ospf-1-area-0.0.0.0] quit
[*SwitchA-ospf-1] quit
[*SwitchA] commit
# Configure SwitchB.
[~SwitchB] interface 10ge 1/0/1
[~SwitchB-10GE1/0/1] undo portswitch
[*SwitchB-10GE1/0/1] ip address 10.4.1.1 24
[*SwitchB-10GE1/0/1] quit
[*SwitchB] ospf 1
[*SwitchB-ospf-1] area 0
[*SwitchB-ospf-1-area-0.0.0.0] network 10.1.1.2 0.0.0.0
[*SwitchB-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[*SwitchB-ospf-1-area-0.0.0.0] network 10.4.1.0 0.0.0.255
[*SwitchB-ospf-1-area-0.0.0.0] quit
[*SwitchB-ospf-1] quit
[*SwitchB] commit
# Configure SwitchC.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchC
[*HUAWEI] commit
[~SwitchC] interface 10ge 1/0/1
[~SwitchC-10GE1/0/1] undo portswitch
[*SwitchC-10GE1/0/1] ip address 10.3.1.2 24
[*SwitchC-10GE1/0/1] quit
[*SwitchC] interface 10ge 1/0/2
[*SwitchC-10GE1/0/2] undo portswitch
[*SwitchC-10GE1/0/2] ip address 10.4.1.2 24
[*SwitchC-10GE1/0/2] quit
[*SwitchC] ospf 1
[*SwitchC-ospf-1] area 0
[*SwitchC-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
[*SwitchC-ospf-1-area-0.0.0.0] network 10.4.1.0 0.0.0.255
[*SwitchC-ospf-1-area-0.0.0.0] quit
[*SwitchC-ospf-1] quit
Step 5 On SwitchA and SwitchB, associate uplink and downlink interfaces with the
Monitor Link group.
# Configure SwitchA.
[~SwitchA] monitor-link group 1
[*SwitchA-mtlk-group1] port 10ge 1/0/1 uplink
[*SwitchA-mtlk-group1] port eth-trunk 10 downlink 1
[*SwitchA-mtlk-group1] quit
[*SwitchA] commit
# Configure SwitchB.
[~SwitchB] monitor-link group 1
[*SwitchB-mtlk-group1] port 10ge 1/0/1 uplink
[*SwitchB-mtlk-group1] port eth-trunk 10 downlink 1
[*SwitchB-mtlk-group1] quit
[*SwitchB] commit
In the preceding command outputs, the value of Heart beat state is OK,
indicating that the heartbeat is normal. SwitchA is used as Node 1, its priority is
150, and its status is Master. SwitchB is used as Node 2, its priority is 120, and its
status is Backup. The value of Causation is -, the values of Port State of Node 1
and Node 2 are both Up, and the M-LAG status of both Node 1 and Node 2 is
active, indicating that the M-LAG configuration is correct.
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
dfs-group 1
priority 150
source ip 10.1.1.1
#
vlan batch 11
#
stp mode rstp
stp bridge-address 0001-0001-0001
stp v-stp enable
#
interface Vlanif11
ip address 10.2.1.1 255.255.255.0
mac-address 0000-5e00-0101
#
interface Eth-Trunk1
mode lacp-static
peer-link 1
#
interface Eth-Trunk10
port link-type trunk
port trunk allow-pass vlan 11
mode lacp-static
dfs-group 1 m-lag 1
#
interface 10GE1/0/1
undo portswitch
ip address 10.3.1.1 255.255.255.0
#
interface 10GE1/0/2
eth-trunk 10
#
interface 10GE1/0/3
eth-trunk 10
#
interface 10GE1/0/4
eth-trunk 1
#
interface 10GE1/0/5
eth-trunk 1
#
interface LoopBack0
ip address 10.1.1.1 255.255.255.255
#
monitor-link group 1
port 10GE1/0/1 uplink
port Eth-Trunk10 downlink 1
#
ospf 1
area 0.0.0.0
network 10.1.1.1 0.0.0.0
network 10.2.1.0 0.0.0.255
network 10.3.1.0 0.0.0.255
#
return
#
sysname SwitchC
#
interface 10GE1/0/1
undo portswitch
ip address 10.3.1.2 255.255.255.0
#
interface 10GE1/0/2
undo portswitch
ip address 10.4.1.2 255.255.255.0
#
ospf 1
area 0.0.0.0
network 10.3.1.0 0.0.0.255
network 10.4.1.0 0.0.0.255
#
return
5 VLAN Configuration
Definition
Virtual Local Area Network (VLAN) technology divides a physical LAN into
multiple broadcast domains, each of which is called a VLAN.
Purpose
Ethernet technology implements data communication over shared media based on
Carrier Sense Multiple Access/Collision Detection (CSMA/CD). When an Ethernet
network has a large number of hosts, both collisions and broadcast storms
become a serious problem, affecting network performance and in some cases
causing the network to completely break down. Although using switches to
connect LANs can prevent collisions, they cannot isolate broadcast packets or
improve network quality.
VLAN technology divides a physical LAN into multiple VLANs to isolate broadcast
domains. Because each VLAN functions as a separate broadcast domain, hosts can
communicate directly with other hosts only if they are in the same VLAN.
SwitchA SwitchB
VLAN2 VLAN3
Figure 5-1 shows a simple VLAN networking diagram. Two switches are placed in
different locations (for example, in different floors of a building). Each switch is
connected to two servers that respectively belong to different VLANs, and the four
servers belong to two VLANs.
Benefits
The VLAN technology brings the following benefits to customers:
● Limits scope of broadcast domains: A broadcast domain is limited in a VLAN.
This saves bandwidth and improves network processing capabilities.
● Enhances LAN security: Packets from different VLANs are transmitted
separately, preventing hosts in a VLAN from communicating directly with
hosts in another VLAN.
● Improves network robustness: A fault in one VLAN does not affect hosts in
other VLANs.
● Allows flexible definition of virtual groups: With VLAN technology, hosts in
different geographical locations can be grouped together, thereby simplifying
network construction and maintenance.
PRI 3 bits Priority (PRI), indicating the The value ranges from 0 to 7. The
frame priority. greater the value, the higher the
priority. These values can be used
to prioritize different classes of
traffic to ensure that frames with
high priorities are transmitted first
when traffic is heavy.
CFI 1 bit Canonical Format Indicator If the value is 0, the MAC address
(CFI), indicating whether is in the canonical format. CFI is
the MAC address is in used to ensure compatibility
canonical format. between Ethernet networks and
Token Ring networks. It is always
set to zero for Ethernet switches.
Each frame sent by a 802.1Q-capable switch carries a VLAN ID. The following are
the two types of Ethernet frames in a VLAN:
● Tagged frames: frames with 4-byte 802.1Q tags.
● Untagged frames: frames without 4-byte 802.1Q tags.
Link Types
As shown in Figure 5-4, there are the following types of VLAN links:
● Access link: connects a host to a switch. Generally, a host does not know
which VLAN it belongs to, and host hardware cannot distinguish frames with
VLAN tags. Therefore, hosts send and receive only untagged frames.
● Trunk link: connects a switch to another switch or to a router. Data of
different VLANs is transmitted along a trunk link. The two ends of a trunk link
must be able to distinguish frames with VLAN tags. Therefore, only tagged
frames are transmitted along trunk links.
VLAN3 VLAN3
Server3 Server4
Access link
3
3 3
2 Trunk link Trunk link 2
DeviceB DeviceA DeviceC
2
Access link
Server1 Server2
VLAN2 VLAN2
Access Link
Trunk Link
NOTE
● A host does not need to know the VLAN to which it belongs. It sends only untagged
frames.
● After receiving an untagged frame from a host, a switching device determines the
VLAN to which the frame belongs. The determination is based on the configured
VLAN assignment method such as port information, and then the switching device
processes the frame accordingly.
● If the frame needs to be forwarded to another switching device, the frame must be
transparently transmitted along a trunk link. Frames transmitted along trunk links
must carry VLAN tags to allow other switching devices to properly forward the frame
based on the VLAN information.
● Before sending the frame to the destination host, the switching device connected to
the destination host removes the VLAN tag from the frame to ensure that the host
receives an untagged frame.
Generally, only tagged frames are transmitted on trunk links; only untagged frames are
transmitted on access links. In this manner, switching devices on the network can properly
process VLAN information and hosts are not concerned about VLAN information.
Port Types
After the 802.1Q defines VLAN frames, ports can be classified into four types:
● Access port
As shown in Figure 5-4, an access port on a switch connects to the port on a
host. The access port can only connect to an access link. Only the VLAN
whose ID is the same as the default VLAN ID is allowed on the access port.
Ethernet frames sent from the access port are untagged frames.
● Trunk port
As shown in Figure 5-4, a trunk port on a switch connects to another switch.
It can only connect to a trunk link. Multiple tagged VLAN frames are allowed
on the trunk port.
● Hybrid port
As shown in Figure 5-5, a hybrid port on a switch can connect either to a host
or to another switch. A hybrid port can connect either to an access link or to a
trunk link. The hybrid port allows multiple VLAN frames and removes tags
from some VLAN frames on the outbound port.
Hybrid Port
Access Link
Trunk Link
● QinQ port
QinQ ports are enabled with the IEEE 802.1 QinQ protocol. A QinQ port adds
a tag to a single-tagged frame and supports a maximum of 4094 x 4094
VLAN tags, which meets the requirement for the VLAN quantity.
Figure 5-6 shows the format of a QinQ frame. The outer tag is often called
the public tag and carries the VLAN ID of the public network, whereas the
inner tag is often called the private tag and carries the VLAN ID of the private
network.
Default VLAN
The default VLAN ID of an interface is called the port default VLAN ID (PVID). The
meaning of the default VLAN varies according to the port type.
For details on different PVIDs and methods of processing Ethernet frames, see
Frame processing based on the port type.
VLAN Assignment
VLAN assignment is a basic VLAN configuration. Users in the same VLAN can
communicate with each other. Table 5-2 shows the VLAN assignment methods
and their usage scenarios.
The switch supports multiple VLAN assignment modes, the priority is of MAC
address-based VLAN assignment or IP subnet-based VLAN assignment, protocol-
based VLAN assignment, interface-based VLAN assignment in a descending order.
● If packets match both MAC address-based VLAN assignment and IP subnet-
based VLAN assignment, by default, MAC address-based VLAN assignment is
Access Accepts an untagged ● Accepts the tagged After the PVID tag
port frame and adds a tag frame if the frame's is stripped, the
with the default VLAN VLAN ID matches frame is
ID to the frame. the default VLAN transmitted.
ID.
● Discards the tagged
frame if the frame's
VLAN ID differs
from the default
VLAN ID.
QinQ QinQ ports are enabled with the IEEE 802.1 QinQ protocol. A QinQ
port port adds a tag to a single-tagged frame, and supports a maximum of
4094 x 4094 VLAN tags, which meets the requirement on the number
of VLANs.
NOTE
Because all interfaces join VLAN 1 by default, broadcast storms may occur if unknown
unicast, multicast, or broadcast packets exist in VLAN 1. To prevent loops, delete interfaces
that do not need to be added to VLAN 1 from VLAN 1.
Intra-VLAN Communication
Sometimes VLAN users are connected to different switches, in which case the
VLAN spans multiple switches. Since ports between these switches must recognize
and send packets belonging to the VLAN, the trunk link technology becomes
helpful in simplifying this solution.
● Trunk line
The trunk link transparently transmits VLAN packets between switches.
● Backbone line
The trunk link transmits packets belonging to multiple VLANs.
VLAN 3
VLAN 2
UserA UserB
As shown in Figure 5-7, the trunk link between DeviceA and DeviceB must both
support the intra-communication of VLAN 2 and the intra-communication of
VLAN 3. Therefore, the ports at both ends of the trunk link must be configured to
belong to both VLANs. That is, Port2 on DeviceA and Port1 on DeviceB must
belong to both VLAN 2 and VLAN 3.
Inter-VLAN Communication
After VLANs are configured, users in different VLANs cannot directly communicate
with each other. To implement communication between VLANs, use either of the
following methods:
● Layer 3 sub-interface
As shown in Figure 5-8, DeviceA is a Layer 3 switch supporting Layer 3 sub-
interface, and DeviceB is a Layer 2 switch. LANs are connected using the
switched Ethernet interface on DeviceB and the routed Ethernet interface on
DeviceA. User hosts are assigned to VLAN2 and VLAN3. To implement inter-
VLAN communication, configure as follows:
– On DeviceA, create two Layer 3 sub-interfaces Port1.1 and Port2.1 on the
Ethernet interface connecting to DeviceB, and configure 802.1Q
encapsulation on Layer 3 sub-interfaces corresponding to VLAN2 and
VLAN3.
– Configure IP addresses for Layer 3 sub-interfaces.
– Set types of Ethernet interfaces connecting DeviceB and DeviceA to
Trunk or Hybrid, to allow VLAN2 and VLAN3 frames.
– Set the default gateway address to the IP address of the Layer 3 sub-
interface mapping the VLAN to which the user host belongs.
DeviceA
Port1.1 Port2.1
VLAN Trunk
DeviceB
Access port
VLANIF2 VLANIF3
to correspond to one Layer 3 logic interface. However, this can waste IP addresses.
Figure 5-10 shows the VLAN division in the device.
VLANIF3:10.1.1.17
2 10.1.1.0/28 10.1.1.1 14 13 10
3 10.1.1.16/2 10.1.1.17 6 5 5
9
4 10.1.1.24/3 10.1.1.25 2 1 1
0
mode even if the optimal scheme is used. Nearly half of the addresses is wasted.
In addition, if VLAN 2 is accessed to three servers instead of 10 servers later, the
extra addresses will not be used by other VLANs and will be wasted.
This division is inconvenient for the later network upgrade and expansion. Assume
that two more servers need to be added to VLAN 4 and VLAN 4 does not want to
change the assigned IP addresses, and the addresses after 10.1.1.24 has been
assigned to others, a new subnet with the mask length as 29 bits and a new VLAN
need to be assigned for the new customers of VLAN 4. Therefore, the customers of
VLAN 4 have only three servers, but the customers are assigned to two subnets
and are not in the same VLAN. As a result, this is inconvenient for network
management.
In above, many IP addresses are used as the addresses of subnets, directional
broadcast addresses of subnets, and default addresses of network gateways of
subnets. These IP addresses cannot be used as the server addresses in the VLAN.
The limit on address assignation reduces the addressing flexibility, so that many
idle addresses are wasted. To solve this problem, VLAN aggregation is used.
Principle
The VLAN aggregation technology, also known as the super-VLAN, provides a
mechanism that partitions the broadcast domain using multiple VLANs in a
physical network so that different VLANs can belong to the same subnet. In VLAN
aggregation, two concepts are involved, namely, super-VLAN and sub-VLAN.
● Super-VLAN: It is different from the common VLAN. In the super-VLAN, only
Layer 3 interfaces are created and physical ports are not contained. The super-
VLAN can be viewed as a logical Layer 3 concept. It is a collection of many
sub-VLANs.
● Sub-VLAN: It is used to isolate broadcast domains. In the sub-VLAN, only
physical ports are contained and Layer 3 VLANIF interfaces cannot be created.
The Layer 3 switching with the external network is implemented through the
Layer 3 interface of the super-VLAN.
A super-VLAN can contain one or more sub-VLANs retaining different broadcast
domains. The sub-VLAN does not occupy an independent subnet segment. In the
same super-VLAN, IP addresses of servers belong to the subnet segment of the
super-VLAN, regardless of the mapping between servers and sub-VLANs.
The same Layer 3 interface is shared by sub-VLANs. Some subnet IDs, default
gateway addresses of the subnets, and directed broadcast addresses of the
subnets are saved and different broadcast domains can use the addresses in the
same subnet segment. As a result, subnet differences are eliminated, addressing
becomes flexible and idle addresses are reduced.
Table 5-4 is used to explain the implementation. Suppose that user demands are
unchanged. In VLAN 2, 10 server addresses are demanded; in VLAN 3, five server
addresses are demanded; in VLAN 4, one server address is demanded.
According to the implementation of VLAN aggregation, create VLAN 10 and
configure VLAN 10 as a super-VLAN. Then assign a subnet address 10.1.1.0/24
with the mask length being 24 to VLAN 10; 10.1.1.0 is the subnet ID and 10.1.1.1
is the gateway address of the subnet, as shown in Figure 5-11. Address
assignments of sub-VLANs (VLAN 2, VLAN 3, and VLAN 4) are shown in Table
5-5.
L3 Switch
Super VLAN 10
VLANIF10:10.1.1.1/24
Table 5-5 Example for assigning Server addresses in VLAN aggregation mode
VLAN Subnet Gateway Number of Number of Practical
address available available requirement
addresses servers s
3 5 10.1.1.12-10.1.1. 5
16
4 1 10.1.1.17 1
(10.1.1.2 to 10.1.1.17). A total of 19 IP addresses are used, that is, the 16 server
addresses together with the subnet ID (10.1.1.0), the default gateway of the
subnet (10.1.1.1), and the directed broadcast address of the subnet (10.1.1.255). In
the network segment, 236 addresses (255 - 19 = 236) are available, which can be
used by any server in the sub-VLAN.
Super-VLAN 4
VLANIF 4
IP:10.10.10.3/24
MAC:3-3-3
VLAN 3 VLAN 2
Sub-VLAN 3 Sub-VLAN 2
HostA HostB
IP:10.10.10.1/24 IP:10.10.10.2/24
MAC:1-1-1 MAC:2-2-2
You can enable inter-VLAN proxy ARP on VLANIF 4 of the Switch to solve this
problem.
a. Host A sends an ARP Request packet for the MAC address of Host B.
b. After receiving the ARP Request packet, the Switch detects that the
destination IP address is not its IP address and determines that the
requested MAC address is not its MAC address. The Switch then checks
whether there is an ARP entry of Host B.
Internet
Switch2
Port1 VLAN Trunk all
Port3 VLAN Trunk all
Switch1
Port1 Port2
Super VLAN 10
VLANIF10:10.1.1.1/24
VLAN 2 VLAN 3
Server A Server B
10.1.1.2/24 10.1.1.3/24
The frame that accesses Switch1 through Port1 on Server A is tagged with the
ID of VLAN 2. The VLAN ID, however, is not changed to the ID of VLAN 10 on
Switch1 even if VLAN 2 is the sub-VLAN of VLAN 10. After passing through
Port3, which is the trunk type, this frame still carries the ID of VLAN 2.
That is, Switch1 itself does not send the frames of VLAN 10. In addition,
Switch1 discards the frames of VLAN 10 that are sent to Switch1 by other
devices because Switch1 has no corresponding physical port for VLAN 10.
A super-VLAN has no physical port. This limitation is obligatory, as shown
below:
– If you configure the super-VLAN and then the trunk interface, the frames
of a super-VLAN are filtered automatically according to the VLAN range
set on the trunk interface.
As shown in Figure 5-13, no frame of the super-VLAN 10 passes through
Port3 on Switch1, even though the interface allows frames from all
VLANs to pass through.
– If you finish configuring the trunk interface and allow all VLANs to pass
through, you still cannot configure the super-VLAN on Switch1. The root
cause is that any VLAN with physical ports cannot be configured as the
super-VLAN, and the trunk interface allows only the frames tagged with
VLAN IDs to pass through. Therefore, no VLAN can be configured as a
super-VLAN.
As for Switch1, the valid VLANs are just VLAN 2 and VLAN 3, and all frames
are forwarded in these VLANs.
● Layer 3 communication between a sub-VLAN and an external network
Super VLAN 4
VLANIF4:10.1.1.1/24
VLAN 2 VLAN 3
Server A Server B
10.1.1.2/24 10.1.1.3/24
Basic Concepts
As shown in Table 5-6, a MUX VLAN is classified into principal VLANs and
subordinate VLANs; a subordinate VLAN is classified into separate VLANs and
group VLANs.
Internet
Principal Port
Switch
On an aggregation device, you can create a VLANIF interface for the principal
VLAN. The IP address of the VLANIF interface can be used as the gateway address
of a server. As shown in Figure 5-16, MUX VLAN is configured on aggregation
switch Switch1 to implement isolation or interworking.
Internet
VLAN2
(Principal VLAN)
Switch1
If the device works as the gateway or provides the snooping functions for only
some VLANs, the device does not need to process protocol packets in other VLANs.
After the protocol packets in other VLANs are sent to the CPU, the CPU needs to
forward them to other devices. This mechanism is called software forwarding.
Switch
User A User A
VLAN 10 VLAN 10
Switch A
Trunk Link
L2 Switch
As shown in Figure 5-19, if VLAN 2, VLAN 3, and VLAN 4 only belong to SwitchA,
you can configure a VLANIF interface for each VLAN on SwitchA to implement the
communications between these VLANs.
As shown in Figure 5-20, VLAN 2, VLAN 3, and VLAN 4 are VLANs across different
switches. In such a situation, you can configure a VLANIF interface respectively on
Switch A and Switch B for each VLAN, and then configure a static route or run a
routing protocol between Switch A and Switch B.
Network
Switch
Proxy ARP
As shown in Figure 5-21, four VLANs, namely, VLAN 21, VLAN 22, VLAN 31, and
VLAN 32, are configured. If these VLANs need to communicate with each other,
you should configure an IP address for each VLAN on the Switch.
Alternatively, you can enable VLAN aggregation to aggregate VLAN 21 and VLAN
22 into super VLAN 2, and VLAN 31 and VLAN 32 into super VLAN 3. Therefore,
you can save IP addresses by only assigning IP addresses to the super VLANs.
After Proxy ARP is configured on Switch, the sub-VLANs in each super VLAN can
communicate with each other.
Licensing Requirements
VLAN 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
CE8860EI V100R006C00
CE8861EI/CE8868EI V200R005C10
CE8850-32CQ-EI V200R002C50
CE8850-64CQ-EI V200R005C00
CE7850EI V100R003C00
CE7855EI V200R001C00
CE6810EI V100R003C00
CE6810-32T16S4Q-LI, V100R005C10
CE6810-24S2Q-LI
CE6850EI V100R001C00
CE6850-48S6Q-HI V100R005C00
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
CE5810EI V100R002C00
CE5850EI V100R001C00
CE5850HI V100R003C00
CE5855EI V100R005C10
CE5880EI V200R005C10
NOTE
For details about the mapping between software versions and switch models, see the
Hardware Query Tool.
▪ These reserved VLANs take effect without requiring the restart of the
switch. You can configure a maximum of eight reserved VLAN ranges
for Layer 3 main interfaces. The reserved VLAN ranges specified
using the vlan reserved for main-interface startvlanid to endvlanid
command multiple times cannot overlap.
Default VLAN ID 1
Damping time 0s
Procedure
Step 1 Run system-view
Step 2 (Optional) Run vlan assign { global | local } { vlan-id1 [ to vlan-id2 ] } &<1-5>
NOTE
CE5800 series switches excluding CE5880EI, CE6810EI, CE6810LI, and CE6850EI do not support
this command.
forwarder. To prevent VLAN conflicts on the SDN controller and forwarder and
reduce maintenance costs, run the vlan assign command to configure VLAN
assignment.
● global: After VLANs are assigned globally, the VLAN created by the vlan vlan-
id command must be in the allocated VLAN range.
● local: After VLANs are assigned locally, the VLANs allowed by all interfaces
must be in the allocated VLAN range.
Step 3 (Optional) Run vlan reserved vlan-id
A reserved VLAN is configured.
By default, the reserved VLAN ID ranges from 4064 to 4094. After vlan-id is
specified, the VLAN specified by vlan-id to the VLAN specified by vlan-id plus 30
are configured as reserved VLANs.
NOTE
NOTE
When multiple VLANs are created on a switch, you are advised to configure names for the
VLANs to facilitate management.
Run the name vlan-name command in the VLAN view to create a VLAN name. After the
VLAN name is configured, you can run the vlan vlan-name vlan-name command in the
system view to enter the corresponding VLAN view.
Step 7 Add the Ethernet interface to a VLAN. By default, the VLAN and default VLAN that
an interface joins are both VLAN 1.
Run the following command as required.
● Access or QinQ interface
Run the port default vlan vlan-id command to add the interface to the
specified VLAN.
Run the port interface-type { interface-number1 [ to interface-number2 ] }
&<1-10> command in the VLAN view to add one interface or a group of
interfaces to a VLAN.
● Trunk interface
– Run the port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] }
&<1-40> | all } command to add the interface to the specified VLAN.
– (Optional) Run the port trunk pvid vlan vlan-id command to configure
the default VLAN of the trunk interface.
● Hybrid interface
– Run the following command as required.
----End
Context
NOTE
The switch enabled with MAC address-based VLAN assignment cannot process protocol
packets sent to the CPU, and it is recommended that MAC address-based VLAN assignment
be used in Layer 2 transparent transmission scenarios.
VLANs configured based on MAC addresses process only untagged frames, and
treat tagged frames in the same manner as VLANs configured based on ports.
After receiving an untagged frame, a port searches for a MAC-VLAN mapping
based on the source MAC address in the frame.
● If a mapping is found, the port forwards the frame based on the VLAN ID and
priority value in the mapping.
● If no matching mapping is found, the port matches the frame with other
matching rules.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Run vlan assign global { vlan-id1 [ to vlan-id2 ] } &<1-5>
VLANs that can be globally assigned are specified.
NOTE
CE5800 series switches excluding CE5880EI, CE6810EI, CE6810LI, and CE6850EI do not support
this command.
After VLANs are assigned, the VLANs created using the vlan vlan-id command
must be within the assignable VLAN range.
Step 3 (Optional) Run vlan reserved vlan-id
A reserved VLAN is configured.
By default, the reserved VLAN ID ranges from 4064 to 4094. After vlan-id is
specified, the VLAN specified by vlan-id to the VLAN specified by vlan-id plus 30
are configured as reserved VLANs.
NOTE
NOTE
If a device is configured with multiple VLANs, configuring names for these VLANs is
recommended:
Run the name vlan-name command in the VLAN view. After a VLAN name is configured,
you can run the vlan vlan-name vlan-name command in the system view to enter the
corresponding VLAN view.
NOTE
● For CE6870EI and CE6875EI, MAC address-based VLAN assignment cannot be used with
port security or MAC address limiting on the same interface.
● When MAC address-based VLAN assignment is used, the priority of packets with the
VLAN ID of 0 cannot be modified.
● When MAC address-based assignment is configured on the CE6870EI and CE6875EI,
running the mac-vlan enable or undo mac-vlan enable command may cause few
packets to be discarded. Exercise caution when you run this command.
----End
IP subnet-based assignment allows users to easily join a VLAN, transfer from one
VLAN to another, and exit from a VLAN. IP subnet-based VLAN assignment is
applicable to networks that have traveling users and require simple management.
The switch enabled with IP subnet-based VLAN assignment processes only
untagged frames. After receiving untagged frames, the switch determines the
VLANs to which the frames belong based on their source IP addresses and
network segment addresses before sending them to corresponding VLANs.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Run vlan assign global { vlan-id1 [ to vlan-id2 ] } &<1-5>
VLANs that can be globally assigned are specified.
NOTE
CE5800 series switches excluding CE5880EI, CE6810EI, CE6810LI, and CE6850EI do not support
this command.
After VLANs are assigned, the VLANs created using the vlan vlan-id command
must be within the assignable VLAN range.
Step 3 (Optional) Run vlan reserved vlan-id
A reserved VLAN is configured.
By default, the reserved VLAN ID ranges from 4064 to 4094. After vlan-id is
specified, the VLAN specified by vlan-id to the VLAN specified by vlan-id plus 30
are configured as reserved VLANs.
NOTE
NOTE
If the switch is configured with multiple VLANs, configuring names for these VLANs is
recommended:
Run the name vlan-name command in the VLAN view. After a VLAN name is configured,
you can run the vlan vlan-name vlan-name command in the system view to enter the
corresponding VLAN view.
The CE5810EI and CE5855EI support 256 subnets, the CE6870EI and CE6875EI
support 16 subnets, and other models support 512 subnets. The IP subnet or the
IP address associated with a VLAN cannot be a multicast network segment or
multicast address.
NOTE
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Run vlan assign global { vlan-id1 [ to vlan-id2 ] } &<1-5>
VLANs that can be globally assigned are specified.
NOTE
CE5800 series switches excluding CE5880EI, CE6810EI, CE6810LI, and CE6850EI do not support
this command.
After VLANs are assigned, the VLANs created using the vlan vlan-id command
must be within the assignable VLAN range.
Step 3 (Optional) Run vlan reserved vlan-id
NOTE
If a device is configured with multiple VLANs, configuring names for these VLANs is
recommended:
Run the name vlan-name command in the VLAN view. After a VLAN name is configured,
you can run the vlan vlan-name vlan-name command in the system view to enter the
corresponding VLAN view.
Manually configuring and maintaining VLANs is challenging on a large Layer 2 network.
Configuration inconsistency may occur. To improve maintenance efficiency and simplify
configuration, run the vlan range { vlan-id1 [ to vlan-id2 ] } &<1-10> command to create a
temporary VLAN range and configure services in the VLAN range view. Services are then
delivered in batches to all the VLANs in the VLAN range.
Step 5 Run protocol-vlan [ protocol-index ] { at | ipv4 | ipv6 | ipx { ethernetii | llc | raw
| snap } | mode { ethernetii-etype etype-id1 | llc dsap dsap-id ssap ssap-id |
snap-etype etype-id2 } }
Protocols are associated with VLANs and a protocol profile is specified.
● protocol-index specifies the index of a protocol profile.
A protocol profile depends on protocol types and encapsulation formats, and
a VLAN associated with a protocol can be defined in a protocol profile.
● When specifying the source and destination service access points, pay
attention to the following points:
– dsap-id and ssap-id cannot be both set to 0xaa.
– dsap-id and ssap-id cannot be both set to 0xe0. 0xe0 indicates llc,
encapsulation format of IPX packets.
– dsap-id and ssap-id cannot be both set to 0xff. 0xff indicates raw,
encapsulation format of IPX packets.
Step 6 Run quit
The system view is displayed.
Step 7 Configure attributes for the Ethernet interface.
1. Run interface interface-type interface-number
The view of the interface that allows the protocol-based VLAN is displayed.
----End
Procedure
● Run the display vlan reserved command to view information about reserved
VLANs.
● Run the display port vlan [ interface-type interface-number ] [ active ]
command to view information about interfaces of the VLAN.
● Run the display vlan command to check information about all VLANs or a
specified VLAN.
● Run the display mac-vlan { mac-address { all | mac-address } | vlan vlan-id }
command to check information about VLANs configured based on MAC
addresses.
● Run the display ip-subnet-vlan vlan { all | vlan-id1 [ to vlan-id2 ] }
command to check information about IP subnet associated with VLANs.
● Run the display protocol-vlan vlan { all | vlan-id1 [ to vlan-id2 ] } command
to check the types and indexes of the protocols associated with VLANs.
● Run the display protocol-vlan interface { all | interface-type interface-
number } command to check information about VLANs configured based on
protocols associated with ports.
----End
Pre-configuration Tasks
Before creating a VLANIF interface, complete the following tasks:
● Create a VLAN.
● Associate the VLAN with the physical interface.
NOTE
To implement communication between VLANs, hosts in each VLAN must use the IP address
of the corresponding VLANIF interface as the gateway address.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Run set shutdown default vlanif
A VLANIF interface is Up only when at least one physical port added to the
corresponding VLAN is Up.
The delay-time value ranges from 0 to 20, in seconds. By default, the delay is 0
seconds, indicating that VLAN damping is disabled.
NOTE
● The MTU refers to the maximum length of the Layer 3 IP header and subsequent data
frames, excluding the Layer 2 frame header.
● The mtu value plus the Layer 2 frame header of a VLANIF interface must be smaller
than the jumboframe value of the peer interface; otherwise, some packets may be
discarded.
----End
Context
Users belong to different VLANs and are located on different network segments
can communicate with each other by configuring Layer 3 sub-interfaces.
NOTE
To implement communication between VLANs, hosts in each VLAN must use the IP address
of the corresponding Layer 3 sub-interface as the gateway address.
NOTE
Procedure
Step 1 Run system-view
The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations).
Alternatively, if configuration information supported by both Layer 2 and Layer 3
interfaces exists (for example, mode lacp and lacp system-id configurations), no
configuration that is not supported after the working mode of the interface is
switched can exist. If unsupported configurations exist on the interface, delete the
configurations first and then run the undo portswitch command.
NOTE
If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
----End
Procedure
● Run the display vlan [ vlan-id1 [ to vlan-id2 ] | vlan-name vlan-name |
summary ] command to check information about all VLANs or a specified
VLAN.
● Run the display interface vlanif [ vlan-id ] command to check information
about VLANIF interfaces.
Before running this command, ensure that VLANIF interfaces have been
configured.
----End
Context
In VLAN aggregation, a sub-VLAN can contain only physical interfaces (it cannot
contain VLANIF interfaces). All the interfaces in a sub-VLAN use the same IP
address of the VLANIF interface associated with the super-VLAN. VLAN
aggregation reduces the number of subnet IDs, subnet default gateway addresses,
and directed broadcast IP addresses needed on the network segment and ensures
that IP addresses are assigned efficiently. VLAN aggregation allows each sub-
VLAN to function as a broadcast domain to implement broadcast isolation and
saves IP address resources.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run vlan vlan-id
A sub-VLAN is created and the sub-VLAN view is displayed.
NOTE
If a device is configured with multiple VLANs, it is recommended that you configure a name for
each VLAN.
To do so, run the name vlan-name command in the VLAN view. After a VLAN name is
configured, run the vlan vlan-name vlan-name command in the system view to enter the
corresponding VLAN view.
----End
Prerequisites
Before configuring a super-VLAN, ensure that sub-VLANs have been configured.
Context
A super-VLAN consists of several sub-VLANs. A VLANIF interface can be configured
for the super-VLAN and assigned an IP address (no physical interface can be
added to a super-VLAN).
Procedure
Step 1 Run system-view
A super-VLAN is created.
Before adding sub-VLANs to a super-VLAN, ensure that these sub-VLANs are not
configured with VLANIF interfaces.
----End
Context
The IP address of the VLANIF interface of a super-VLAN must contain the subnet
segments where users in sub-VLANs reside. All the sub-VLANs use the IP address
of the VLANIF interface of the super-VLAN, saving IP addresses.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface vlanif vlan-id
A VLANIF interface is created for a super-VLAN, and the view of the VLANIF
interface is displayed.
Step 3 Run ip address ip-address { mask | mask-length } [ sub ]
An IP address is assigned to the VLANIF interface.
Step 4 Run commit
The configuration is committed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface vlanif vlan-id
The view of the VLANIF interface of the super-VLAN is displayed.
----End
Context
Specifying an IP address range for users in a sub-VLAN filters out unauthorized
users of which IP addresses are beyond the range.
After configuring an IP address pool for a sub-VLAN, note the following points:
● Only packets with IP addresses in the IP address pool are processed in the
sub-VLAN. The packets include ARP Request packets, ARP Reply packets, and
ARP proxy packets. Packets with IP addresses beyond the IP address pool are
discarded.
NOTE
If the sub-VLAN and DHCP address pools are used together, ensure that the range of the
sub-VLAN address pool covers the range of the DHCP address pool. Or, do not use the sub-
VLAN and DHCP address pools together.
● Only entries mapping IP addresses in the IP address pool are learned in the
sub-VLAN.
Procedure
Step 1 Run system-view
----End
NOTE
Pre-configuration Tasks
Before configuring a MUX VLAN, complete the following task:
● Creating VLANs
Context
Ports added to a principal VLAN can communicate with every port in the MUX
VLAN.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run vlan vlan-id
A VLAN is created, and the VLAN view is displayed. If the specified VLAN has been
created, the VLAN view is directly displayed.
The VLAN ID ranges from 1 to 4094 (VLANs 4064 to 4094 are default reserved
VLANs. You can run the vlan reserved command to configure the reserved VLAN
range). If VLANs need to be created in batches, run the vlan batch { vlan-id1 [ to
vlan-id2 ] } &<1-10> command to create VLANs in batches, and then run the vlan
vlan-id command to enter the view of a specified VLAN.
NOTE
If a device is configured with multiple VLANs, configuring names for these VLANs is
recommended:
Run the name vlan-name command in the VLAN view. After a VLAN name is configured,
you can run the vlan vlan-name vlan-name command in the system view to enter the
corresponding VLAN view.
The VLAN ID assigned to a principal VLAN can no longer be used to configure the
VLANIF interface, Super-VLAN, Sub-VLAN, VLAN Mapping, VLAN Stacking.
----End
Context
A VLAN associated with a group port is called a group VLAN. Group ports in a
group VLAN can communicate with each other.
Procedure
Step 1 Run system-view
The VLAN ID assigned to a group VLAN can no longer be used to configure the
VLANIF interface, Super-VLAN, Sub-VLAN, VLAN Mapping, VLAN Stacking.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run vlan vlan-id
The view of a created principal VLAN is displayed.
Step 3 Run subordinate separate vlan-id
A separate VLAN is configured for a subordinate VLAN.
Only one separate VLAN can be configured for a principal VLAN.
Group VLANs and separate VLANs in one MUX VLAN cannot use the same VLAN
ID.
The VLAN ID assigned to a separate VLAN can no longer be used to configure the
VLANIF interface, Super-VLAN, Sub-VLAN, VLAN Mapping, VLAN Stacking.
Step 4 Run commit
The configuration is committed.
----End
Context
After the MUX VLAN function is enabled on a port, the principal VLAN and
subordinate VLAN can communicate with each other; ports in a group VLAN can
communicate with each other; ports in a separate VLAN cannot communicate with
each other.
Pre-configuration Tasks
Before enabling the MUX VLAN function on a port, complete the following task:
● Adding the port to a principal or subordinate VLAN as an access, hybrid, or
trunk interface
Procedure
Step 1 Run system-view
The system view is displayed.
NOTE
● Access interfaces can be added to only one MUX VLAN group. Trunk and hybrid
interfaces can be added to multiple MUX VLAN groups. An interface can be added to a
maximum of 32 MUX VLAN groups.
● The interface enabled with the MUX VLAN function cannot be added to other VLANs of
the MUX VLAN group.
● Disabling MAC address learning or limiting the number of learned MAC addresses on an
interface affects the MUX VLAN function on the interface.
● The MUX VLAN and port security functions cannot be enabled on the same interface.
● In a cascading scenario, the MUX VLAN cannot be enabled between interfaces
connecting access and aggregation devices.
----End
Context
Management VLAN (mVLAN) configuration allows users to use the VLANIF
interface of the mVLAN to log in to the management switch to centrally manage
devices. To use a network management system to manage multiple devices, create
a VLANIF interface on each device and configure a management IP address for the
VLANIF interface. You can then log in to a device and manage it using its
management IP address. If a user-side interface is added to the VLAN, users
connected to the interface can also log in to the device. This brings security risks
to the device.
Pre-configuration Tasks
Before creating a VLANIF interface, complete the following tasks:
● Create a VLAN.
● Associate the VLAN with the physical interface.
Procedure
Step 1 Run system-view
NOTE
If a device is configured with multiple VLANs, configuring names for these VLANs is
recommended:
Run the name vlan-name command in the VLAN view. After a VLAN name is configured,
you can run the vlan vlan-name vlan-name command in the system view to enter the
corresponding VLAN view.
An mVLAN is configured.
After assigning an IP address to the VLANIF interface, you can run the stelnet
command to log in to a management switch to manage attached devices.
----End
Context
If the device is a gateway of some VLANs or snooping functions are deployed in
some VLANs, the device does not need to process protocol packets in other VLANs.
After the protocol packets in other VLANs are sent to the CPU, the CPU needs to
forward them to other devices. This mechanism is called software forwarding.
Software forwarding affects the forwarding speed and efficiency of protocol
packets because protocol packets need to be processed.
To address this issue, deploy transparent transmission of protocol packets in
VLANs where protocol packets do not need to be processed. This function enables
the device to transparently transmit the protocol packets in the VLANs to other
devices, which improves the forwarding speed and efficiency.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run vlan vlan-id
The VLAN view is displayed.
NOTE
If a device is configured with multiple VLANs, configuring names for these VLANs is
recommended:
Run the name vlan-name command in the VLAN view. After a VLAN name is configured,
you can run the vlan vlan-name vlan-name command in the system view to enter the
corresponding VLAN view.
NOTE
----End
Context
All packets sent from user devices are untagged, so user-side interfaces on a
switch does not receive tagged packets, and the interface must be configured as
an access interface. If a user connects a switch to a user-side interface without
permission, the user-side interface may receive tagged packets. To prevent
unauthorized access, you can configure the user-side interface to discard incoming
tagged packets.
Only interfaces that are connected to user devices and do not receive tagged
packets can be configured to discard incoming tagged packets.
Procedure
Step 1 Run system-view
----End
Context
NOTE
● After a hash mode of the VLAN-XLATE table is configured, you must restart the device to
make the configuration take effect.
● Only the CE6850HI, CE6851HI, CE6855HI, CE6856HI, CE6850U-HI, CE6855HI, CE6857EI,
CE6860EI, CE6865EI, CE7800 series, and CE8800 series switches support this function.
Procedure
Step 1 Run system-view
Step 2 Run assign forward vlan-xlate { egress | ingress } hash { crc16-lower | crc16-
upper | crc32-lower | crc32-upper | lsb }
By default, the uplink and downlink hash modes of the VLAN-XLATE table are
both crc32-lower.
----End
Context
You can enable traffic statistics collection on a VLAN or on a VLANIF interface to
monitor VLAN traffic.
Procedure
● Configure traffic statistics collection in a VLAN.
a. Run the system-view command to enter the system view.
b. Run the vlan vlan-id command to enter the VLAN view.
c. In the VLAN view, run the statistics enable command to enable traffic
statistics collection in a VLAN.
By default, traffic statistics collection is disabled in a VLAN.
NOTE
If the forwarding mode on a CE5880EI or CE6880EI switch is cut through, the switch
cannot collect traffic statistics in a VLAN.
Traffic statistics collection in a VLAN and traffic statistics collection on a Layer 2 sub-
interface are mutually exclusive on the CE6870EI and CE6875EI.
d. Run the commit command to commit the configuration.
● Configure traffic statistics collection on a VLANIF interface.
NOTE
Follow-up Procedure
● Run the display vlan vlan-id statistics command in any view to check traffic
statistics in a specified VLAN.
● Run the display interface vlanif [ vlan-id ] command in any view to check
traffic statistics on a VLANIF interface.
Context
If you want to collect traffic statistics for a specified time on an interface, you
must first clear existing statistics on the interface.
NOTICE
Statistics about VLAN packets cannot be restored after you clear it. So, confirm the
action before you use the command.
To clear the statistics of VLAN packets, run the following reset vlan statistics
command in the user view:
Procedure
● Run the reset vlan vlan-id statistics command to clear the packets of the
specified VLAN statistics.
----End
Context
Similar to IP ping, GMAC ping efficiently detects and locates Ethernet faults and
monitors link quality.
NOTE
Procedure
Step 1 Run the system-view command to enter the system view.
Step 2 Run the ping mac enable command to globally enable GMAC ping.
By default, GMAC ping is disabled.
After GMAC ping is enabled on the device, the device can ping the remote device
and respond to the received GMAC ping packets.
Step 3 Run the commit command to commit the configuration.
Step 4 Run the ping mac mac-address vlan vlan-id [ interface interface-type interface-
number | -c count | -s packetsize | -t timeout ] * command to perform GMAC ping
to check connectivity of the link between the local device and the remote device.
----End
Context
Similar to IP traceroute, GMAC trace efficiently detects and locates Ethernet faults
and monitors the link quality.
NOTE
Procedure
Step 1 Configure the devices at both ends of a link and an intermediate device.
Perform the following operations on the devices at both ends of the link to be
tested and intermediate device.
1. Run the system-view command to enter the system view.
2. Run the trace mac enable command to globally enable GMAC trace.
By default, GMAC trace is disabled.
After GMAC ping is enabled on the device, the device can ping the remote
device and respond to received GMAC ping packets.
3. Run the commit command to commit the configuration.
Step 2 Perform GMAC trace.
Perform the following operations on the device at one end of the link to be tested.
1. Run the system-view command to enter the system view.
2. Run the trace mac mac-address vlan vlan-id [ interface interface-type
interface-number | -t timeout ]* command to locate a connectivity fault
between the local device and the remote device.
----End
Networking Requirements
In Figure 5-22, multiple user terminals are connected to switches in a data center.
Users who use the same service all access the network using different devices.
Configure the switch with port-based VLAN assignment and add ports connected
to users who use the same service to the same VLAN. This way, users who use the
same services can directly communicate, but users using different services cannot
communicate over Layer 2.
Configuration Roadmap
1. Create VLANs and add ports connected to users using different services to
different VLANs to isolate Layer 2 traffic.
2. Configure the type of link between SwitchA and SwitchB and VLANs to allow
users who use the same service to communicate.
Procedure
Step 1 Create VLAN2 and VLAN3 on SwitchA, and add ports connecting to user terminals
to different VLANs. Configuration of SwitchB is the same as that of SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 2 3
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port default vlan 2
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port default vlan 3
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit
Step 2 Configure the type of the port connected to SwitchB on SwitchA and the allowed
VLANs. The configuration of SwitchB is the same as that of SwitchA.
Add User1 and User2 to the same IP address segment, for example,
192.168.100.0/24. Add User3 and User4 to the same IP address segment, for
example, 192.168.200.0/24.
Only User1's and User2's terminals can ping each other. Only User3's and User4's
terminals can ping each other.
----End
Configuration Files
● Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 2 to 3
#
interface 10GE1/0/1
port default vlan 2
#
interface 10GE1/0/2
port default vlan 3
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
Figure 5-23 Networking diagram for assigning VLANs based on MAC addresses
Enterprise
network
10GE1/0/1
Switch
Configuration Roadmap
1. Create VLANs and determine which VLAN the users of employees belong to.
2. Add Ethernet interfaces to VLANs so that packets from the VLANs can pass
through the interfaces.
3. Associate MAC addresses of User1, User2, and User3 with the specified VLAN
so that the VLAN of the packet can be determined based on the source MAC
address.
Procedure
Step 1 Configure the Switch.
# Create VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname Switch
[*HUAWEI] commit
[~Switch] vlan batch 10
[*Switch] commit
# Associate MAC addresses of User1, User2, and User3 with VLAN 10.
[~Switch] vlan 10
[~Switch-vlan10] mac-vlan mac-address 22-22-22
[*Switch-vlan10] mac-vlan mac-address 33-33-33
[*Switch-vlan10] mac-vlan mac-address 44-44-44
[*Switch-vlan10] quit
[*Switch] commit
----End
Configuration Files
Configuration file of the Switch
#
sysname Switch
#
vlan batch 10
#
vlan 10
mac-vlan mac-address 0022-0022-0022
mac-vlan mac-address 0033-0033-0033
mac-vlan mac-address 0044-0044-0044
#
interface 10GE1/0/1
port link-type hybrid
port hybrid tagged vlan 10
#
interface 10GE1/0/2
port link-type hybrid
port hybrid untagged vlan 10
mac-vlan enable
#
interface 10GE1/0/3
port link-type hybrid
port hybrid untagged vlan 10
mac-vlan enable
#
interface 10GE1/0/4
port link-type hybrid
port hybrid untagged vlan 10
mac-vlan enable
#
return
NOTE
Production
Campus center Disaster
office recovery
network center
RouterB
RouterA 10GE1/0/3 RouterC
10GE1/0/2 10GE1/0/4
Switch
10GE1/0/5 10GE1/0/7
10GE1/0/6
Configuration Roadmap
1. Create VLANs and determine which VLAN each service belongs to.
2. Associate IP subnets with VLANs so that VLANs of packets can be determined
based on the source IP addresses or specified network segments.
3. Add interfaces to VLANs so that packets of the IP subnet-based VLANs can
pass through the interfaces.
4. Enable IP subnet-based VLAN assignment.
Procedure
Step 1 Create VLANs.
# Create VLAN 100, VLAN 200, and VLAN 300 on the Switch.
<HUAWEI> system-view
[~HUAWEI] sysname Switch
[*HUAWEI] commit
[~Switch] vlan batch 100 200 300
[*Switch] commit
# Set the link type of 10GE1/0/5, 10GE1/0/6, and 10GE1/0/7 to hybrid and add it
to VLAN 100, VLAN 200, and VLAN 300 respectively in untagged mode. And
enable IP subnet-based VLAN assignment on 10GE1/0/5, 10GE1/0/6, and
10GE1/0/7.
[~Switch] interface 10ge 1/0/5
[~Switch-10GE1/0/5] port link-type hybrid
[*Switch-10GE1/0/5] port hybrid untagged vlan 100
[*Switch-10GE1/0/5] ip-subnet-vlan enable
[*Switch-10GE1/0/5] quit
[*Switch] interface 10ge 1/0/6
[*Switch-10GE1/0/6] port link-type hybrid
[*Switch-10GE1/0/6] port hybrid untagged vlan 200
[*Switch-10GE1/0/6] ip-subnet-vlan enable
[*Switch-10GE1/0/6] quit
[*Switch] interface 10ge 1/0/7
[*Switch-10GE1/0/7] port link-type hybrid
[*Switch-10GE1/0/7] port hybrid untagged vlan 300
[*Switch-10GE1/0/7] ip-subnet-vlan enable
[*Switch-10GE1/0/7] quit
[*Switch] commit
The product service, office service, and disaster recovery service can only be
transmitted in the production center, campus office network, and disaster recovery
data center respectively.
----End
Configuration Files
Configuration file of the Switch
#
sysname Switch
#
vlan batch 100 200 300
#
vlan 100
ip-subnet-vlan 1 ip 192.168.1.2 255.255.255.0
#
vlan 200
ip-subnet-vlan 1 ip 192.168.2.2 255.255.255.0
#
vlan 300
ip-subnet-vlan 1 ip 192.168.3.2 255.255.255.0
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 100
device transceiver 10GBASE-COPPER
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 200
device transceiver 10GBASE-COPPER
#
interface 10GE1/0/4
port link-type trunk
port trunk allow-pass vlan 300
device transceiver 10GBASE-COPPER
#
interface 10GE1/0/5
port link-type hybrid
port hybrid untagged vlan 100
ip-subnet-vlan enable
device transceiver 10GBASE-COPPER
#
interface 10GE1/0/6
port link-type hybrid
port hybrid untagged vlan 200
ip-subnet-vlan enable
device transceiver 10GBASE-COPPER
#
interface 10GE1/0/7
port link-type hybrid
port hybrid untagged vlan 300
ip-subnet-vlan enable
device transceiver 10GBASE-COPPER
#
return
Networking Requirements
Users in a company use different services and locate at different network
segments. Users who use the same service belong to different VLANs and they
want to communicate with each other.
In Figure 5-25, User 1 and User 2 use the same service and need to communicate,
but belong to different VLANs and are located on different network segments.
10GE1/0/1 10GE1/0/2
VLANIF10 VLANIF20
10.10.10.2/24 10.10.20.2/24
VLAN 10 VLAN 20
User1 User2
10.10.10.3/24 10.10.20.3/24
Configuration Roadmap
1. Create VLANs on the switches for different users.
2. Add interfaces to VLANs so that packets of the VLANs can pass through the
interfaces.
3. Create VLANIF interfaces and configure IP addresses for the VLANIF interfaces
to implement Layer 3 communication.
NOTE
To implement communication between VLANs, hosts in each VLAN must use the IP address
of the corresponding VLANIF interface as the gateway address.
Procedure
Step 1 Configure the Switch.
# Create VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname Switch
[*HUAWEI] commit
[~Switch] vlan batch 10 20
[*Switch] commit
----End
Configuration Files
Configuration file of the Switch
#
sysname Switch
#
vlan batch 10 20
#
interface Vlanif10
ip address 10.10.10.2 255.255.255.0
#
interface Vlanif20
ip address 10.10.20.2 255.255.255.0
#
interface 10GE1/0/1
port default vlan 10
#
interface 10GE1/0/2
port default vlan 20
#
return
Networking Requirements
A company has many departments that reside on the same network segment. For
security purposes, the company adds different departments to different VLANs.
Users in different departments need to communicate with each other.
Internet
Router
10GE1/0/1 VLAN 10
SwitchB Super-VLAN 4
VLANIF 4:10.1.1.1/24
10GE1/0/5
10GE1/0/5
SwitchA
10GE1/0/1 10GE1/0/3
10GE1/0/2 10GE1/0/4
VLAN2 VLAN3
VLAN 2 VLAN 3
Configuration Roadmap
You can configure VLAN aggregation on SwitchB and add VLANs of different
departments to the super-VLAN so that users in different departments can access
the Internet using the super-VLAN. Proxy ARP can be configured in the super-
VLAN so that users in different departments can communicate with each other.
The configuration roadmap is as follows:
Procedure
Step 1 Configure VLANs and interfaces on SwitchA and SwitchB, add users of different
departments to different VLANs, and configure an interface to transparently
transmit packets to SwitchB.
1. Configure SwitchA.
# Configure 10GE1/0/1 as an access interface. The configurations of
10GE1/0/2 to 10GE1/0/4 are similar to the configuration of 10GE1/0/1, and
are not mentioned here.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] port link-type access
[*SwitchA-10GE1/0/1] quit
[*SwitchA] commit
# Create VLAN 2 and VLAN 3, add 10GE1/0/1 and 10GE1/0/2 to VLAN 2, and
add 10GE1/0/3 and 10GE1/0/4 to VLAN 3.
[~SwitchA] vlan batch 2 3
[*SwitchA] vlan 2
[*SwitchA-vlan2] port 10ge 1/0/1 1/0/2
[*SwitchA-vlan2] quit
[*SwitchA] vlan 3
[*SwitchA-vlan3] port 10ge 1/0/3 1/0/4
[*SwitchA-vlan3] quit
[*SwitchA] commit
# Configure the interface of SwitchA connected to SwitchB to transparently
transmit packets from VLAN 2 and VLAN 3 to SwitchB.
[~SwitchA] interface 10ge 1/0/5
[~SwitchA-10GE1/0/5] port link-type trunk
[*SwitchA-10GE1/0/5] port trunk allow-pass vlan 2 3
[*SwitchA-10GE1/0/5] quit
[*SwitchA] commit
2. Configure SwitchB.
# Create VLAN 2, VLAN 3, VLAN 4, and VLAN 10, and configure the interface
of SwitchB connected to SwitchA to transparently transmit packets from VLAN
2 and VLAN 3 to SwitchB.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] vlan batch 2 3 4 10
[*SwitchB] interface 10ge 1/0/5
[*SwitchB-10GE1/0/5] port link-type trunk
[*SwitchB-10GE1/0/5] port trunk allow-pass vlan 2 3
[*SwitchB-10GE1/0/5] quit
[*SwitchB] commit
[~SwitchB] vlan 4
[~SwitchB-vlan4] aggregate-vlan
[*SwitchB-vlan4] access-vlan 2 to 3
[*SwitchB-vlan4] quit
[*SwitchB] commit
# Create and configure VLANIF 4 so that users in different departments can access
the Internet using super-VLAN 4.
[~SwitchB] interface vlanif 4
[*SwitchB-Vlanif4] ip address 10.1.1.1 24
[*SwitchB-Vlanif4] quit
[*SwitchB] commit
# Create and configure VLANIF 10 and specify its IP address of VLANIF 10 as the
IP address for connecting SwitchB and the router.
[~SwitchB] interface vlanif 10
[*SwitchB-Vlanif10] ip address 10.10.1.1 24
[*SwitchB-Vlanif10] quit
[*SwitchB] commit
# On SwitchB, configure a static route to the router so that users can access the
Internet.
[~SwitchB] ip route-static 0.0.0.0 0.0.0.0 10.10.1.2
[*SwitchB] commit
NOTE
Configure the router interface connected to SwitchB and assign to it the IP address of
10.10.1.2. For details, see the router configuration manual.
Configure an IP address for each server. Ensure that the servers reside on the same
network segment as VLAN 4.
After the preceding steps are complete, servers in each department can access the
Internet. However, servers in VLAN 2 and VLAN 3 cannot ping each other. Proxy
ARP needs to be configured on SwitchB.
After the configuration is complete, users in VLAN 2 and VLAN 3 can ping each
other and access the Internet.
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 2 to 3
#
interface 10GE1/0/1
port default vlan 2
#
interface 10GE1/0/2
port default vlan 2
#
interface 10GE1/0/3
port default vlan 3
#
interface 10GE1/0/4
port default vlan 3
#
interface 10GE1/0/5
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
Networking Requirements
In Figure 5-27, office service servers ServerB, ServerC, ServerD, and ServerE are
deployed on a data center network. All servers can connect to the campus office
network. The data center administrator requires that ServerB should communicate
with ServerC and ServerD should be isolated from ServerE.
To solve the problem, deploy the MUX VLAN on the switch connected to servers,
and connect the principal port to the office network, separate port to servers that
do not need to communicate, and group port to servers that need to
communicate. This saves VLAN IDs on the network and facilitates network
management.
NOTE
Campus
office
network
VLAN2
10GE1/0/1 (Principal VLAN)
Switch
10GE1/0/2 10GE1/0/5
10GE1/0/3 10GE1/0/4
Configuration Roadmap
1. Configure the principal VLAN.
2. Configure the group VLAN.
3. Configure the separate VLAN.
4. Add interfaces to the VLANs and enable the MUX VLAN function.
Procedure
Step 1 Configure a MUX VLAN.
# Create VLAN 2, VLAN 3, and VLAN 4.
<HUAWEI> system-view
[~HUAWEI] sysname Switch
[*HUAWEI] commit
[~Switch] vlan batch 2 3 4
[*Switch] commit
# Configure the Group VLAN and Separate VLAN in the MUX VLAN.
[~Switch] vlan 2
[~Switch-vlan2] mux-vlan
[*Switch-vlan2] subordinate group 3
[*Switch-vlan2] subordinate separate 4
[*Switch-vlan2] quit
[*Switch] commit
# Add interfaces to the VLANs and enable the MUX VLAN function on the
interfaces.
[~Switch] interface 10ge 1/0/1
[~Switch-10GE1/0/1] port default vlan 2
[*Switch-10GE1/0/1] port mux-vlan enable vlan 2
[*Switch-10GE1/0/1] quit
[*Switch] interface 10ge 1/0/2
[*Switch-10GE1/0/2] port default vlan 3
[*Switch-10GE1/0/2] port mux-vlan enable vlan 3
[*Switch-10GE1/0/2] quit
[*Switch] interface 10ge 1/0/3
[*Switch-10GE1/0/3] port default vlan 3
[*Switch-10GE1/0/3] port mux-vlan enable vlan 3
[*Switch-10GE1/0/3] quit
[*Switch] interface 10ge 1/0/4
[*Switch-10GE1/0/4] port default vlan 4
[*Switch-10GE1/0/4] port mux-vlan enable vlan 4
[*Switch-10GE1/0/4] quit
[*Switch] interface 10ge 1/0/5
[*Switch-10GE1/0/5] port default vlan 4
[*Switch-10GE1/0/5] port mux-vlan enable vlan 4
[*Switch-10GE1/0/5] quit
[*Switch] commit
----End
Configuration File
Configuration file of the Switch
#
sysname Switch
#
vlan batch 2 to 4
#
vlan 2
mux-vlan
subordinate separate 4
subordinate group 3
#
interface 10GE1/0/1
port default vlan 2
port mux-vlan enable vlan 2
#
interface 10GE1/0/2
port default vlan 3
port mux-vlan enable vlan 3
#
interface 10GE1/0/3
port default vlan 3
port mux-vlan enable vlan 3
#
interface 10GE1/0/4
port default vlan 4
NOTE
CE5880EI and CE6880EI switches do not support the MUX VLAN function. CE6810LI
switches do not support VLANIF interfaces corresponding to the principal VLAN and sub-
VLAN. They are not applicable to the preceding scenario.
Campus
office
network
Gateway VLANIF2
10GE1/0/1 IP:10.10.10.1/24
10GE1/0/1
VLAN2
Switch1 (Principal VLAN)
10
2 GE
1 /0/ 1/0
1 0 GE /3
1 /0/ 1 10
GE
GE 1/0
10 /1
Switch2 Switch3
10GE1/0/2 10GE1/0/3 10GE1/0/2 10GE1/0/3
Configuration Roadmap
1. Create VLAN 2 to VLAN 4 on Switch1 to Switch3, configure VLAN 2 as the
principal VLAN, VLAN 3 as the subordinate group VLAN, and VLAN 4 as the
subordinate separate VLAN.
2. Connect the gateway to Switch1 through 10GE1/0/1, create VLANIF 2 on the
gateway, configure the IP address 10.10.10.1/24 as the gateway address of
downstream servers.
3. Configure 10GE1/0/1 on Switch2 and Switch3 to allow packets from VLAN 2
to VLAN 4, enable MUX VLAN on the downlink interface, and add the
downlink interface to the VLAN that servers belong to.
Procedure
Step 1 Configure MUX VLAN.
# Create VLAN 2 to VLAN 4 on Switch1, Switch2, and Switch3, and configure
VLAN 2 as the principal VLAN, VLAN 3 as the subordinate group VLAN, and VLAN
4 as the subordinate separate VLAN. Switch1 is used as an example. The
configurations of Switch2 and Switch3 are the same as that of Switch1.
<HUAWEI> system-view
[~HUAWEI] sysname Switch1
[*HUAWEI] commit
[~Switch1] vlan batch 2 3 4
[*Switch1] vlan 2
[*Switch1-vlan2] mux-vlan
[*Switch1-vlan2] subordinate group 3
[*Switch1-vlan2] subordinate separate 4
[*Switch1-vlan2] quit
[*Switch1] commit
# Add 10GE1/0/1 on Switch1 to VLAN 2 and enable MUX VLAN on it, and
configure 10GE1/0/2 and 10GE1/0/3 to allow packets from VLAN 2 to VLAN 4.
[~Switch1] interface 10ge 1/0/1
[~Switch1-10GE1/0/1] port link-type trunk
[*Switch1-10GE1/0/1] port trunk allow-pass vlan 2
[*Switch1-10GE1/0/1] port mux-vlan enable vlan 2
[*Switch1-10GE1/0/1] quit
[*Switch1] interface 10ge 1/0/2
[*Switch1-10GE1/0/2] port link-type trunk
[*Switch1-10GE1/0/2] port trunk allow-pass vlan 2 to 4
[*Switch1-10GE1/0/2] quit
[*Switch1] interface 10ge 1/0/3
[*Switch1-10GE1/0/3] port link-type trunk
[*Switch1-10GE1/0/3] port trunk allow-pass vlan 2 to 4
[*Switch1-10GE1/0/3] quit
[*Switch1] commit
Step 2 Create VLANIF 2 on 10GE1/0/1 connecting the gateway to Switch1, and configure
the IP address 10.10.10.1/24 as the gateway address of downstream servers.
<HUAWEI> system-view
[~HUAWEI] sysname Gateway
[*HUAWEI] commit
[~Gateway] vlan batch 2
[*Gateway] interface 10ge 1/0/1
[*Gateway-10GE1/0/1] port link-type trunk
[*Gateway-10GE1/0/1] port trunk allow-pass vlan 2
[*Gateway-10GE1/0/1] quit
[*Gateway] interface vlanif 2
[*Gateway-Vlanif2] ip address 10.10.10.1 24
[*Gateway-Vlanif2] quit
[*Gateway] commit
NOTE
If the MUX VLAN contains multiple group VLANs and devices in group VLANs need to
communicate, run the arp proxy intra-vlan enable command on the VLANIF interface of
the gateway to configure intra-VLAN proxy ARP.
Step 3 Configure 10GE1/0/1 on Switch2 and Switch3 to allow packets from VLAN 2 to
VLAN 4, enable MUX VLAN on 10GE1/0/2 and 10GE1/0/3, and add the downlink
interfaces to the VLAN that servers belong to. Switch2 is used as an example. The
configuration of Switch3 is the same as that of Switch2.
# Configure 10GE1/0/1 as a trunk interface and configure it to allow packets from
VLAN 2 to VLAN 4.
[~Switch2] interface 10ge 1/0/1
[~Switch2-10GE1/0/1] port link-type trunk
[*Switch2-10GE1/0/1] port trunk allow-pass vlan 2 to 4
[*Switch2-10GE1/0/1] quit
[*Switch2] commit
# Enable MUX VLAN on 10GE1/0/2 and 10GE1/0/3, and add them to the VLAN to
which servers belong.
[~Switch2] interface 10ge 1/0/2
[~Switch2-10GE1/0/2] port default vlan 3
[*Switch2-10GE1/0/2] port mux-vlan enable vlan 3
[*Switch2-10GE1/0/2] quit
[*Switch2] commit
[~Switch2] interface 10ge 1/0/3
[~Switch2-10GE1/0/3] port default vlan 3
[*Switch2-10GE1/0/3] port mux-vlan enable vlan 3
[*Switch2-10GE1/0/3] quit
[*Switch2] commit
----End
Configuration Files
● Gateway configuration file
#
sysname Gateway
#
vlan batch 2
#
interface Vlanif2
ip address 10.10.10.1 255.255.255.0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 2
#
return
● Switch1 configuration file
#
sysname Switch1
#
vlan batch 2 to 4
#
vlan 2
mux-vlan
subordinate separate 4
subordinate group 3
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 2
port mux-vlan enable vlan 2
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4
#
return
● Switch2 configuration file
#
sysname Switch2
#
vlan batch 2 to 4
#
vlan 2
mux-vlan
subordinate separate 4
subordinate group 3
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4
#
interface 10GE1/0/2
port default vlan 3
port mux-vlan enable vlan 3
#
interface 10GE1/0/3
port default vlan 3
port mux-vlan enable vlan 3
#
return
Internet
10GE1/0/2
SwitchB
10GE1/0/1
10GE1/0/3
SwitchA
10GE1/0/1 10GE1/0/2
ServerA ServerB
VLAN10
Configuration Roadmap
1. Allocate the downlink interfaces of SwitchA connected to office servers to
VLAN 10.
2. Enable transparent transmission of protocol packets in a VLAN on SwitchB.
When protocol packets from a specified VLAN reach SwitchB, SwitchB directly
forwards the protocol packets without sending them to the CPU.
Procedure
Step 1 Add the downlink interfaces on SwitchA to VLAN 10 and configure the uplink
interfaces to allow VLAN 10.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan 10
[*SwitchA-vlan10] quit
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port default vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port default vlan 10
[*SwitchA-10GE1/0/2] quit
[*SwitchA] interface 10ge 1/0/3
[*SwitchA-10GE1/0/3] port link-type trunk
[*SwitchA-10GE1/0/3] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/3] quit
[*SwitchA] commit
----End
Configuration Files
Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10
#
interface 10GE1/0/1
port default vlan 10
#
interface 10GE1/0/2
port default vlan 10
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 10
#
return
#
vlan 10
protocol-transparent
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 10
#
return
Procedure
Step 1 Check whether the interfaces connected to the user terminals are in Up state.
Run the display interface interface-type interface-number command in any view
to check the status of the interfaces.
● If the interface is Down, rectify the interface fault.
● If the interface is Up, go to Step 2.
Step 2 Check whether the IP addresses of user terminals are in the same network
segment.
● If they are in different network segments, change the IP addresses of the user
terminals.
● If they are in the same network segment, go to Step 3
Step 3 Check whether the MAC address entries on the Switch are correct.
Run the display mac-address command on the Switch to check whether the MAC
addresses, interfaces, and VLANs in the learned MAC address entries are correct. If
the learned MAC address entries are incorrect, run the undo mac-address mac-
address vlan vlan-id command on the system view to delete the current entries so
that the Switch can learn MAC address entries again.
After the MAC address table is updated, check the MAC address entries again.
● If the MAC address entries are incorrect, go to Step 4.
● If the MAC address entries are correct, go to Step 5.
Step 4 Check whether the VLAN is properly configured.
● Check the VLAN configuration according to the following table.
Whether the Run the display vlan vlan-id command in any view to
VLAN has been check whether the VLAN has been created. If not, run the
created vlan command in system view to create the VLAN.
Whether the Run the display vlan vlan-id command in any view to
interfaces are check whether the VLAN contains the interfaces. If not,
added to the add the interfaces to the VLAN.
VLAN NOTE
If the interfaces are located on different devices, add the
interfaces connecting the devices to the VLAN.
The default type of a Switch interface is Access. You can run the
port link-type command to change the interface type.
– Add an access interface to the VLAN using either of
the following methods:
1. Run the port default vlan command in the
interface view.
2. Run the port command in the VLAN view.
– Add a trunk interface to the VLAN.
Run the port trunk allow-pass vlan command in the
interface view.
– Add a hybrid interface to the VLAN using either of the
following methods:
1. Run the port hybrid tagged vlan command in the
interface view.
2. Run the port hybrid untagged vlan command in
the interface view.
After the preceding operations, if the MAC address entries are correct, go to
Step 5.
Step 5 Check whether Layer 2 port isolation is configured.
Run the interface interface-type interface-number command in the system view
to enter the interface view, and then run the display this command to check
whether Layer 2 port isolation is configured on the interface.
● If Layer 2 port isolation is not configured, go to Step 6.
● If Layer 2 port isolation is configured, run the undo port-isolate enable
command on the interface to disable port isolation. If the fault persists, go to
Step 6.
Step 6 Check whether the correct static Address Resolution Protocol (ARP) entries are
configured on the user terminals. If the static ARP entries are incorrect, modify
them.
----End
Table 5-11 Common causes and solutions for the VLANIF interface going down
Common Cause Solution
All interfaces added to the VLAN are Rectify the fault. A VLANIF interface is
physically Down. Up as long as an interface in the
corresponding VLAN is Up.
The VLANIF interface is shut down. Run the undo shutdown (interface
view) command in the view of the
VLANIF interface to enable the VLANIF
interface.
6 QinQ Configuration
Definition
QinQ expands VLAN space by adding an additional 802.1Q tag to 802.1Q tagged
packets. A packet carries two 802.1Q tags: a public VLAN tag and a private VLAN
tag.
Purpose
Ethernet is widely used on ISP networks, but 802.1Q VLANs are unable to identify
and isolate large numbers of users on metro Ethernet networks because the 12-bit
VLAN tag field defined in IEEE 802.1Q only identifies a maximum of 4096 VLANs.
QinQ was developed to expand VLAN space beyond 4096 VLANs so that a larger
number of users can be identified on a metro Ethernet network.
In addition to expanding VLAN space, QinQ is applied in other scenarios with the
development of metro Ethernet networks and carriers' requirements on refined
service operation. The outer and inner VLAN tags can be used to differentiate
packets based on users and services. For example, the inner tag represents a user,
while the outer tag represents a service. Moreover, QinQ is used as a simple and
practical virtual private network (VPN) technology because inner tags of QinQ
packets are transparently transmitted over a public network. It extends core
multiprotocol label switching (MPLS) VPN services to metro Ethernet networks to
establish an end-to-end VPN.
Benefits
QinQ offers the following benefits:
● Extends VLANs to isolate and identify more users.
● Facilitates service deployment by allowing the inner and outer tags to
represent different information. For example, use the inner tag to identify a
user and the outer tag to identify a service.
VLAN 4 VLAN 3
Customer Customer
network A network B
CE1 CE2
VLAN 1~10 VLAN 1~20
As shown in Figure 6-1, customer network A is divided into private VLANs 1 to 10,
and customer network B is divided into private VLANs 1 to 20. The carrier
allocates public VLANs 3 and 4 to customer networks A and B respectively. When
tagged packets from networks A and B arrive at the carrier network, the packets
are tagged outer VLANs 3 and 4. Therefore, the packets from different customer
networks are separated on the carrier network, even though the customer
networks use overlapping VLAN ranges. When the packets reach the PE on the
other side of the carrier network, the PE removes public VLAN tags from the
packets and forwards the packets to the CE of the respective customer network.
NOTE
Because a QinQ packet has 4 more bytes than an 802.1Q packet, the maximum frame
length allowed by each interface on the carrier network should be at least 1504 bytes. The
default frame length allowed by interfaces of a switch is larger than 1504 bytes, so you do
not need to adjust it. For details on how to configure the frame length allowed by an
interface, see Setting the Jumbo Frame Length Allowed on an Interface.
QinQ
Encapsulation
DA SA 802.1Q TAG 802.1Q TAG LEN/ETYPE DATA FCS
6 Bytes 6 Bytes 4 Bytes 4 Bytes 2 Bytes 46 Bytes~1500 Bytes 4 Bytes
QinQ Implementation
QinQ can be implemented in either of the following ways:
1. Basic QinQ
Basic QinQ is implemented based on interfaces. After basic QinQ is
configured on an interface, the device adds the default VLAN tag of this
interface to all packets regardless of whether the packets carry VLAN tags.
– If a single-tagged packet is received, the packet becomes a double-
tagged packet.
– If an untagged packet is received, the packet is tagged with the default
VLAN ID of the local interface.
2. Selective QinQ
Selective QinQ is implemented based on interfaces and VLAN IDs. That is, an
interface can forward packets based on a single VLAN tag or double VLAN
tags. In addition, the device processes packets received on an interface as
follows based on their VLAN IDs:
– Adds different outer VLAN tags to packets carrying different inner VLAN
IDs.
– Marks outer 802.1p fields and adds different outer VLAN tags to packets
according to the 802.1p fields in inner VLAN tags.
In addition to separating carrier and customer networks, selective QinQ
provides extensive service features and allows flexible networking.
QinQ Encapsulation
QinQ technology converts single-tagged packets into double-tagged packets.
QinQ is classified into basic QinQ and selective QinQ depending on the data
encapsulated:
● Interface-based QinQ encapsulation
This encapsulation mode is also called QinQ tunneling. It encapsulates
packets arriving at the same interface with the same outer VLAN tag, and
therefore cannot distinguish users and services at the same time.
● VLAN ID-based QinQ encapsulation
VLAN ID-based QinQ encapsulation, also called selective QinQ, encapsulates
packets with different outer tags to differentiate users.
● MQC-based QinQ encapsulation
MQC-based QinQ encapsulation, also called selective QinQ, classifies traffic
and encapsulates outer tags of matching data flows.
● Selective QinQ: adds different outer tags to the frames with inner VLAN tags
or frames matching traffic classification rules. VLAN assignment is more
accurate.
6.2.4 TPID
The Tag Protocol Identifier (TPID) specifies the protocol type of a VLAN tag. The
TPID value defined in IEEE 802.1Q is 0x8100.
Figure 6-3 shows the Ethernet packet format defined in IEEE 802.1Q. An IEEE
802.1Q tag lies between the Source Address field and the Length/Type field. A
device determines whether packets carry the specified VLAN tag according to the
TPID. When an interface receives a packet, the device compares the configured
TPID with that in the packet. If they are the same, the packet carries the VLAN
tag. If they are different, the packet does not carry the VLAN tag.
SwicthA SwicthB
Interface3 Core/Backbone Interface3
network
Interface1 Interface2 Interface1 Interface2
Tenant 1 2 to 500 10
Configure QinQ on SwitchA and SwitchB so that tenants using the same service in
different branches are allowed to communicate and tenants using different
services need to be isolated.
● Configure SwitchA to encapsulate outer VLAN 10 to packets entering
Interface1 and outer VLAN 20 to packets entering Interface2.
● Configure SwitchB to encapsulate outer VLAN 10 to packets entering
Interface1 and outer VLAN 20 to packets entering Interface2.
● Configure Interface3 on SwitchA and SwitchB to allow packets from VLAN 10
and VLAN 20.
backbone network. To ensure service security and save VLAN IDs of the core/
backbone network, it is required that traffic in positions A and B be transmitted
through the core/backbone network, users using the same service be allowed to
communicate, and users using different services be isolated. You can configure
VLAN ID-based selective QinQ to meet the requirements.
Interface1 Interface1
User
User
VLAN10~
VLAN10~
VLAN50
VLAN50
Configure selective QinQ on SwitchA and SwitchB so that users using the same
service in different branches are allowed to communicate, and users using
different services are isolated.
● On SwitchA, add VLAN 100 to packets that have inner VLAN IDs 10 to 30 and
enter Interface1, and VLAN 200 to packets that have inner VLAN IDs 31 to 50
and enter Interface1.
● On SwitchB, add VLAN 100 to packets that have inner VLAN IDs 10 to 30 and
enter Interface1, and VLAN 200 to packets that have inner VLAN IDs 31 to 50
and enter Interface1.
● Configure Interface2 on SwitchA and SwitchB to allow packets from VLAN 100
and VLAN 200.
Licensing Requirements
QinQ 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
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
CE5810EI V100R002C00
CE5850EI V100R001C00
CE5850HI V100R003C00
CE5855EI V100R005C10
CE5880EI V200R005C10
NOTE
For details about the mapping between software versions and switch models, see the
Hardware Query Tool.
Feature Limitations
● Selective QinQ based on the VLAN ID can be only enabled on hybrid or trunk
interfaces in the inbound direction.
● The outer VLAN ID must exist and the interface must be added to the outer
VLAN in untagged mode.
● The interface learns the MAC address in the VLAN specified by the outer
VLAN tag of packets.
● The MUX VLAN and selective QinQ based on the VLAN ID cannot be
configured on the same interface.
● If only single-tagged packets from a VLAN need to be transparently
transmitted, do not specify the VLAN as the inner VLAN for selective QinQ.
● If forwarding resources exceed the specifications, VLAN stacking can be
configured. However, after the device restarts, the invalid VLAN stacking
configuration may become valid and valid VLAN stacking configuration may
become invalid.
● If VLAN stacking is configured on an interface corresponding to the VLAN,
VBST negotiation for this VLAN will fail.
● QinQ cannot be used with features such as DHCP, ARP, and IGMP.
● Starting from V200R003C00, for the CE6875EI and CE6870EI, when original
packets carry two or three VLAN tags and the device is configured with IPv6
VXLAN and VLAN stacking, tags in forwarded packets are incorrect. Please
deploy VLAN stacking on the neighboring device.
● The original VLAN specified in the port vlan-stacking command cannot be
the same as the outer VLAN configured on a QinQ Layer 2 sub-interface.
● For the CE6857EI, CE6865EI, CE8861EI, and CE8868EI, no extra VLAN tag can
be added to the original double-tagged packets, even if VLAN stacking is
configured.
● M-LAG cannot be configured together with VLAN Mapping or VLAN Stacking.
Context
Basic QinQ enables the device to add a public tag to incoming packets so that
user packets can be forwarded on the public network. To separate private
networks from public networks and conserve VLAN resources, configure double
802.1Q tags on QinQ interfaces of the device. Inner VLAN tags are used on
internal networks and outer VLAN tags are used on external networks. QinQ
expands VLAN space to 4094x4094 VLANs and allows packets on different private
networks with the same VLAN IDs to be transparently transmitted.
Procedure
Step 1 Run system-view
The VLAN ID of the public VLAN tag, that is, the default VLAN of the interface, is
configured.
----End
Context
Selective QinQ based on the VLAN ID enables the device to add different outer
VLAN tags to received data frames according to VLAN IDs in the frames.
NOTE
● Selective QinQ based on the VLAN ID can be only enabled on hybrid or trunk interfaces
in the inbound direction.
● The outer VLAN ID must exist and the interface must be added to the outer VLAN in
untagged mode.
● The interface learns the MAC address in the VLAN specified by the outer VLAN tag of
packets.
● The MUX VLAN and selective QinQ based on the VLAN ID cannot be configured on the
same interface.
● The original VLAN specified in the port vlan-stacking command cannot be the same as
the outer VLAN configured on a QinQ Layer 2 sub-interface.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 Run port link-type { hybrid | trunk }
The link type of the interface is configured as hybrid or trunk.
By default, the link type of an interface is access.
Step 4 Add the interface to a VLAN.
Run the following command as required.
● Trunk interface
Run the port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] }&<1-40> |
all } command to add the trunk interface to the stacked VLAN.
● Hybrid interface
Run the port hybrid untagged vlan vlan-id command to add the hybrid
interface to the stacked VLAN in untagged mode.
The VLAN ID specified by vlan-id must already exist on the device. The original
VLAN can be not created.
Step 5 Run port vlan-stacking vlan vlan-id1 [ to vlan-id2 ] stack-vlan vlan-id3
[ remark-8021p 8021p-value ]
Selective QinQ based on the VLAN ID is configured.
NOTE
If the port vlan-stacking command has been executed at least three times with specified
VLAN ranges and VLAN ranges are combined twice at least, the configuration of each
command must be committed. Otherwise, packets may be lost. For example, when port
vlan-stacking vlan 31 to 60 stack-vlan 100, port vlan-stacking vlan 20 to 30 stack-vlan
100, and port vlan-stacking vlan 61 to 70 stack-vlan 100 commands are used, VLAN
ranges 20 to 60 and 20 to 70 are combined twice. Therefore, commit the configuration of
each command.
For the CE6865EI, CE6857EI, CE8861EI, and CE8868EI, the qinq protocol and port vlan-
stacking commands cannot be configured together.
Context
MQC-based selective QinQ uses a traffic classifier to classify packets based on
VLAN IDs and associates the traffic classifier with a traffic behavior that defines
the action of adding outer VLAN tags, so that the device can add outer VLAN tags
to packets matching the traffic classifier.
NOTE
Procedure
1. Configure a traffic classifier.
a. Run system-view
The system view is displayed.
b. Run traffic classifier classifier-name [ type { and | or } ]
A traffic classifier is created and the traffic classifier view is displayed, or
the view of an existing traffic classifier is displayed.
and is the logical operator between rules in a traffic classifier, which
means that:
▪ If a traffic classifier does not contain any ACL rules, packets match
the traffic classifier only if they match all the rules in the classifier.
The logical operator or means that packets match a traffic classifier if
they match one or more rules in the classifier.
NOTE
● Run one of the following commands to display data of a traffic policy that
has been applied:
– display system tcam service traffic-policy { global | vlan vlan-id |
interface interface-type interface-number | vpn-instance vpn-instance-
name | qos group group-id | bridge-domain bd-id } policy-name
{ inbound | outbound } [ slot slot-id [ chip chip-id ] ]
NOTE
Context
To enable interoperation between devices from different vendors, set the same
TPID value in outer VLAN tags on the devices. Devices from different vendors or in
different network plans may use different TPID values in VLAN tags of VLAN
packets. To adapt to an existing network plan, the switch supports TPID value
configuration. You can set the TPID value on the switch to be the same as the
TPID value in the network plan to ensure compatibility with the current network.
NOTE
● To implement interoperability with a non-Huawei device, ensure that the protocol type
in the outer VLAN tag added by the switch can be identified by the non-Huawei device.
● The qinq protocol command identifies incoming packets, and adds or changes the TPID
value of outgoing packets.
● For the CE6865EI, CE6857EI, CE8861EI, and CE8868EI, the qinq protocol and port vlan-
stacking commands cannot be configured together.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Networking Requirements
As shown in Figure 6-7, tenant 1 and tenant 2 in a data center are located in
different positions. SwitchA and SwitchB are at the edge of the data center and
connected through the core/backbone network.
The requirements are as follows:
● Tenant 1 and tenant 2 plan their VLANs independently.
● Traffic of the two tenants is transparently transmitted on the core/backbone
network. Devices using the same services in the two branches are allowed to
communicate and devices using different services are isolated.
You can configure QinQ to meet the preceding requirements. VLAN 100 and VLAN
200 provided by the core/backbone network can be used to implement
communication of tenant 1 and tenant 2 respectively.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure VLAN 100 and VLAN 200 on both SwitchA and SwitchB, and set the
link type of interfaces connected to tenants to QinQ and add the interfaces to
VLAN so that different outer VLAN tags are added to different tenants.
2. Add interfaces connected to the core/backbone network on SwitchA and
SwitchB to VLAN 100 and VLAN 200 to permit packets from these VLANs to
pass through.
Procedure
Step 1 Create VLANs.
# Create VLAN 100 and VLAN 200 on SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 100 200
[*SwitchA] commit
Step 3 Configure the interface connected to the core/backbone network on the switch.
# Add 10GE1/0/3 on SwitchA to VLAN 100 and VLAN 200. The configuration of
SwitchB is similar to the configuration of SwitchA, and is not mentioned here.
[~SwitchA] interface 10ge 1/0/3
[~SwitchA-10GE1/0/3] port link-type trunk
[*SwitchA-10GE1/0/3] port trunk allow-pass vlan 100 200
[*SwitchA-10GE1/0/3] commit
[~SwitchA-10GE1/0/3] quit
On a server in a VLAN of tenant 2, ping another server in the same VLAN. The
ping operation succeeds, indicating that devices in tenant 2 can communicate with
each other.
On a server in a VLAN of tenant 2, ping another server in the same VLAN. The
ping operation fails, indicating that tenants are isolated.
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 100 200
#
interface 10GE1/0/1
port link-type dot1q-tunnel
port default vlan 100
#
interface 10GE1/0/2
port link-type dot1q-tunnel
port default vlan 200
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 100 200
#
return
● SwitchB configuration file
#
sysname SwitchB
#
vlan batch 100 200
#
interface 10GE1/0/1
port link-type dot1q-tunnel
port default vlan 100
#
interface 10GE1/0/2
port link-type dot1q-tunnel
port default vlan 200
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 100 200
#
return
SwitchA SwitchB
10GE1/0/2 Core/Backbone 10GE1/0/2
Network
VLAN100
VLAN200
10GE1/0/1 10GE1/0/1
User
User
VLAN10~
VLAN10~
VLAN50
VLAN50
Manufacturing Service: VLAN10 ~ VLAN30
A Office Service: VLAN31 ~ VLAN50 B
Configuration Roadmap
You can configure VLAN ID-based selective QinQ to meet the preceding
requirements. Production service servers communicate in VLAN 100 and office
service servers communicate in VLAN 200 of the core/backbone network, and
different service servers are isolated.
The configuration roadmap is as follows:
1. Create VLAN 100 and VLAN 200 on SwitchA and SwitchB, and configure
selective QinQ on interfaces of SwitchA and SwitchB so that different VLAN
tags are added to different packets of services.
2. Add interfaces of SwitchA and SwitchB connected to the core/backbone
network to VLANs so that packets from VLAN 100 and VLAN 200 are allowed
to pass through.
Procedure
Step 1 Create VLANs.
# Create VLAN 100 and VLAN 200 on SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 100 200
[*SwitchA] commit
[*HUAWEI] commit
[~SwitchB] vlan batch 100 200
[*SwitchB] commit
----End
Configuration Files
● Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 100 200
#
interface 10GE1/0/1
port link-type hybrid
Networking Requirements
As shown in Figure 6-9, servers on a data center network store video and data
information. The MAC addresses of data and video servers are 0003-0003-0003
and 0004-0004-0004 respectively. A school network transmits teachers' office and
multimedia services, and servers are connected through the enterprise backbone
network. The enterprise backbone network allocates VLAN 2 to teachers' office
service and VLAN 3 to multimedia service. SwitchB and SwitchC are edge devices
of the enterprise backbone network.
The requirements are as follows:
● Video and data servers are allocated to different VLANs, so they do not affect
each other.
● Traffic is transparently transmitted on the enterprise backbone network.
Teachers' office service is only transmitted to the data server and multimedia
service is only transmitted to the video server so that services can be
differentiated.
MQC-based selective QinQ can be configured on SwitchB to meet the preceding
requirements.
Data server
10
GE
/2
1/0
1/
SwitchA SwitchB SwitchC SwitchD E
0/
0G
2
Enterprise 1
10GE1/0/1 10GE1/0/2 Teachers' VLAN200
Backbone office
10GE1/0/1 Network 10GE1/0/1
Video server 10
/3 10GE1/0/2 VLAN2,3 10GE1/0/1 GE
E1/0 1 /0/
10G 3
VLAN300
Traffic direction
Multimedia VLAN300
room
Campus
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs on SwitchB and configure SwitchB to add different VLAN tags
to packets of different services.
2. Configure traffic classifiers, traffic behaviors, and bind them in a traffic policy
on SwitchB.
3. Apply the traffic policy to interfaces of SwitchB to implement selective QinQ.
Procedure
Step 1 Create VLANs.
# Create VLAN 200 and VLAN 300 on SwitchA and add interfaces connected to
servers to VLAN 200 and VLAN 300. The configuration of SwitchD is similar to the
configuration of SwitchA, and is not mentioned here.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 200 300
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port default vlan 200
[*SwitchA-10GE1/0/2] quit
[*SwitchA] interface 10ge 1/0/3
[*SwitchA-10GE1/0/3] port default vlan 300
[*SwitchA-10GE1/0/3] quit
[*SwitchA] commit
# On SwitchB, create VLAN 2 and VLAN 3, that is, outer VLAN IDs added to
packets.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] vlan batch 2 3
[*SwitchB] commit
Step 2 Configure traffic classifiers, traffic behaviors, and bind them in a traffic policy on
SwitchB.
[~SwitchB] traffic classifier name1
[*SwitchB-classifier-name1] if-match source-mac 0003-0003-0003
[*SwitchB-classifier-name1] quit
[*SwitchB] traffic behavior name1
[*SwitchB-behavior-name1] vlan-stacking vlan 2
[*SwitchB-behavior-name1] quit
[*SwitchB] traffic classifier name2
[*SwitchB-classifier-name2] if-match source-mac 0004-0004-0004
[*SwitchB-classifier-name2] quit
[*SwitchB] traffic behavior name2
[*SwitchB-behavior-name2] vlan-stacking vlan 3
[*SwitchB-behavior-name2] quit
[*SwitchB] traffic policy name1
[*SwitchB-trafficpolicy-name1] classifier name1 behavior name1
[*SwitchB-trafficpolicy-name1] classifier name2 behavior name2
[*SwitchB-trafficpolicy-name1] quit
[*SwitchB] commit
# Add 10GE 1/0/1 on SwitchA to VLAN 200 and VLAN 300. The configuration of
SwitchD is similar to the configuration of SwitchA, and is not mentioned here.
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 200 300
[*SwitchA-10GE1/0/1] quit
[*SwitchA] commit
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 200 300
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 200 300
#
interface 10GE1/0/2
port default vlan 200
#
interface 10GE1/0/3
port default vlan 300
#
return
● SwitchB configuration file
#
sysname SwitchB
#
vlan batch 2 to 3
#
traffic classifier name1 type or
if-match source-mac 0003-0003-0003 ffff-ffff-ffff
#
traffic classifier name2 type or
if-match source-mac 0004-0004-0004 ffff-ffff-ffff
#
traffic behavior name1
vlan-stacking vlan 2
#
traffic behavior name2
vlan-stacking vlan 3
#
traffic policy name1
Definition
VLAN mapping technology changes VLAN tags in packets to implement the
mapping between different VLANs.
Purpose
In some scenarios, two Layer 2 user networks in the same VLAN are connected
through the backbone network. To implement Layer 2 connectivity between users
and deploy Layer 2 protocols such as MSTP uniformly, the two user networks need
to seamlessly interwork with each other. In this case, the backbone network needs
to transmit VLAN packets from the user networks. Generally, VLAN plan on the
backbone network and user network is different, so the backbone network cannot
directly transmit VLAN packets from a user network.
One method is to configure a Layer 2 tunneling technology such as QinQ or VPLS
to encapsulate VLAN packets into packets on the backbone network so that VLAN
packets are transparently transmitted. However, this method increases extra cost
because packets are encapsulated. In addition, Layer 2 tunneling technology may
not support transparent transmission of packets of some protocol packets. The
other method is to configure VLAN mapping. When VLAN packets from a user
network enter the backbone network, an edge device on the backbone network
changes the C-VLAN ID to the S-VLAN ID. After the packets are transmitted to the
other side, the edge device changes the S-VLAN ID to the C-VLAN ID. This method
implements seamless interworking between two user networks.
VLAN IDs in two directly connected Layer 2 networks are different because of
different plans. The user needs to manage the two networks as a single Layer 2
network. For example, Layer 2 connectivity and Layer 2 protocols need to be
deployed uniformly. VLAN mapping can be configured on the switch connecting
the two user networks to map VLAN IDs on the two user networks. This
implements Layer 2 connectivity and uniform management.
Basic Principles
After receiving a tagged packet, the switch determines to replace a single tag,
double tags, or the outer tag in double tags based on the VLAN mapping mode.
Then the switch learns the MAC addresses contained in the packet. Based on the
source MAC address and mapped VLAN ID, the switch updates the MAC address
entries in the VLAN mapping table. Based on the destination MAC address and the
mapped VLAN ID, the switch searches for the MAC address entries. If the
destination MAC address matches no entry, the switch broadcasts the packet in
the specified VLAN; if the destination MAC address matches an entry, the switch
forwards the packet through the corresponding outbound interface.
As shown in Figure 7-1, VLAN mapping between VLAN 2 and VLAN 3 is
configured on Interface1. Before sending packets from VLAN 2 to VLAN 3,
Interface1 replaces the VLAN tags with VLAN 3 tags. When receiving packets from
VLAN 3, Interface1 replaces the VLAN tags with VLAN 2 tags. Then packets are
forwarded according to the Layer 2 forwarding process. This implements
communication between devices in VLAN 2 and VLAN 3.
3
SwitchA SwitchB
2 3
2 3
172.16.0.1/16 172.16.0.7/16
NOTE
If devices in two VLANs need to communicate through VLAN mapping, the IP addresses of
these devices must be on the same network segment. If IP addresses of these devices are
on different network segments, communication between devices is implemented through
Layer 3 routes. In this case, VLAN mapping is invalid.
Implementation Modes
The device supports VLAN-based and MQC-based VLAN mapping. There are three
VLAN-based VLAN mapping modes:
● 1 to 1 VLAN mapping
When an interface configured with VLAN mapping receives a single-tagged
packet, the interface maps the VLAN tag in the packet to a new VLAN tag.
● 2 to 1 VLAN mapping
When an interface configured with VLAN mapping receives a double-tagged
packet, the interface maps the outer tag of the packet to a specified tag and
transparently transmits the inner tag as the data.
● 2 to 2 VLAN mapping
When an interface configured with VLAN mapping receives a double-tagged
packet, the interface maps the inner and outer VLAN tags in the packet to
new inner and outer VLAN tags.
Headqu
VLAN6
arters
Switch3
Switch2
Switch1
New branch
VLAN5
1 to 1 VLAN Mapping
● 2 to 1 VLAN mapping
As shown in Figure 7-3, on a data center network, the office server and
production server are deployed in the old branch, and the servers are
connected to the core network through the access and aggregation switches.
The network administrator deploys a new branch. To save VLAN resources
and isolate different services, configure QinQ on the aggregation switch. To
retain VLAN deployment of core switch Switch5, configure VLAN mapping on
Switch5.
Internet
IP 201 2
Switch3 Switch4
Aggregation Switch IP 201 3
Switch1 Switch2
Access Switch
● 2 to 2 VLAN mapping
As shown in Figure 7-4, two branches of a data center are deployed in
different positions. To save VLAN resources and plan private VLAN IDs in the
data center, QinQ is used. That is, packets from branches to the ISP network
carry double tags. Because VLAN IDs in packets from branches are different
from the VLAN IDs allocated by the ISP network, user packets are discarded.
As a result, communication between branches is interrupted. Configure 2 to 2
VLAN mapping on Switch2 and Switch3 to map double tags on the branch
network to double tags on the ISP network so that branches can
communicate.
ISP
Switch2 outside tag:50 Switch3
inner tag:60
Switch1 Switch4
Branch 1 Branch 2
outside tag:100 outside tag:200
inner tag:10 inner tag:20
2 to 2 VLAN Mapping
Video server
VLAN200
Enterprise backbone
network
Data server VLAN2 VLAN3
Silver user
Licensing Requirements
VLAN mapping 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
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 V100R003C00
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 V100R003C00
CE5850EI V100R003C00
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
● VLAN-based VLAN mapping can only be configured on a trunk or hybrid
interface, and the interface must be added to the VLAN after mapping in
tagged mode.
● When an interface receives double-tagged packets, the TPID in the inner tag
must be 0x8100. Otherwise, mapping of the inner tag does not take effect.
● Before configuring VLAN-based VLAN mapping, do not enable TRILL on the
interface.
● If forwarding resources exceed the specifications, VLAN mapping can be
configured. However, after the device restarts, the invalid VLAN mapping
configuration may become valid and valid VLAN mapping configuration may
become invalid.
● If VLAN mapping is configured on an interface corresponding to the VLAN,
VBST negotiation for this VLAN will fail.
● For CE6870EI and CE6875EI, supports 1 to 1 VLAN mapping, and does not
support MQC-based VLAN Mapping.
● VLAN mapping cannot be used with IGMP or IGMP snooping.
● Starting from V200R003C00, for the CE6875EI and CE6870EI, when original
packets carry three VLAN tags and the device is configured with IPv6 VXLAN
and VLAN mapping, tags in forwarded packets are incorrect. Please deploy
VLAN mapping on the neighboring device.
● DHCP snooping can only be configured with 1-to-1 VLAN mapping.
● If a traffic classifier references an ACL rule that matches the outer VLAN ID
and the VLAN mapping function is configured:
– For the CE6870EI and CE6875EI: The translated VLAN ID after VLAN
mapping is matched in the inbound direction, and the original VLAN ID
before VLAN mapping is matched in the outbound direction.
– For other models: The translated VLAN ID after VLAN mapping is
matched in both the inbound and outbound directions.
● M-LAG cannot be configured together with VLAN Mapping or VLAN Stacking.
Context
VLAN mapping allows an interface to map the single VLAN tag, double VLAN
tags, or outer VLAN tag in double VLAN tags in received single-tagged or double-
tagged packets to the public VLAN tag or tags.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 Configure the link type of the interface as trunk or hybrid.
NOTE
● VLAN mapping can only be configured on a trunk or hybrid interface. The interface
must be added to the VLAN after mapping in tagged mode.
● When 2 to 1 or 2 to 2 VLAN mapping is configured, the VLAN ID allowed by the
interface enabled with VLAN mapping must be the outer VLAN ID.
● On the CE5810EI, if remark-8021p 8021p-value is specified, 7.5.2 Configuring MQC-
based VLAN Mapping is recommended. Do not configure 2 to 1 or 2 to 2 VLAN
mapping in this situation.
Step 4 Configure VLAN mapping. (CE6870EI and CE6875EI only support 1 to 1 VLAN
mapping.)
NOTE
If the trill enable command has been executed, delete the trill enable command
configuration before running the port vlan-mapping command.
● Configure 1 to 1 VLAN mapping.
Run port vlan-mapping vlan vlan-id1 map-vlan vlan-id3 [ remark-8021p
8021p-value ]
The interface is configured to map a single tag of packets to a specified tag.
● Configure 2 to 1 VLAN mapping.
Run port vlan-mapping vlan vlan-id1 inner-vlan vlan-id2 map-vlan vlan-id3
[ remark-8021p 8021p-value ]
The interface is configured to map the outer VLAN tag in double-tagged
packets to a specified tag and to transparently transmit the inner VLAN tag.
● Configure 2 to 2 VLAN mapping.
Run port vlan-mapping vlan vlan-id1 inner-vlan vlan-id2 map-vlan vlan-id3
map-inner-vlan vlan-id4 [ remark-8021p 8021p-value ]
The interface is configured to map double tags of packets to specified double
tags.
----End
Context
MQC-based VLAN mapping uses a traffic classifier to classify packets based on
VLAN IDs, associates the traffic classifier with a traffic behavior defining VLAN
mapping so that the device can re-mark the VLAN ID in packets matching the
traffic classifier.
NOTE
Procedure
1. Configure a traffic classifier.
a. Run system-view
The system view is displayed.
b. Run traffic classifier classifier-name [ type { and | or } ]
A traffic classifier is created and the traffic classifier view is displayed, or
the view of an existing traffic classifier is displayed.
and is the logical operator between rules in a traffic classifier, which
means that:
▪ If a traffic classifier does not contain any ACL rules, packets match
the traffic classifier only if they match all the rules in the classifier.
The logical operator or means that packets match a traffic classifier if
they match one or more rules in the classifier.
By default, the relationship between rules in a traffic classifier is or.
c. Run if-match
Matching rules are defined for the traffic classifier.
For details about matching rules in a traffic classifier, see "Configuring a
Traffic Classifier" in "MQC Configuration" of the CloudEngine 8800, 7800,
6800, and 5800 Series Switches Configuration Guide - QoS Configuration
Guide.
d. Run commit
The configuration is committed.
e. Run quit
Exit from the traffic behavior view.
2. Configure a traffic behavior.
a. Run traffic behavior behavior-name
A traffic behavior is created and the traffic behavior view is displayed, or
the view of an existing traffic behavior is displayed.
b. Run vlan-mapping vlan vlan-id
The interface is configured to replace the outer VLAN tag in packets.
c. (Optional) Run vlan-mapping inner-vlan inner-vlan-id
The interface is configured to replace the inner VLAN tag in packets.
d. Run commit
The configuration is committed.
e. Run quit
Exit from the traffic behavior view.
f. Run quit
Exit from the system view.
3. Configure a traffic policy.
a. Run system-view
The system view is displayed.
b. Run traffic policy policy-name
A traffic policy is created and the traffic policy view is displayed, or the
view of an existing traffic policy is displayed.
c. Run classifier classifier-name behavior behavior-name [ precedence
precedence-value ]
A traffic behavior is bound to a traffic classifier in the traffic policy.
d. Run commit
The configuration is committed.
e. Run quit
Exit from the traffic policy view.
f. Run quit
Exit from the system view.
4. Apply the traffic policy.
NOTE
Networking Requirements
As shown in Figure 7-6, on a data center network, as services increase, the
network administrator plans a new branch that belongs to VLAN 5. The
headquarters belongs to VLAN 6, and the headquarters and branch belong to the
same network segment. The new branch needs to communicate with the
headquarters.
Switch3
10GE1/0/1
10GE1/0/2
Switch2
10GE1/0/1
10GE1/0/3
Switch1
10GE1/0/1 10GE1/0/2
New branch
VLAN5
Server1 Server2
1 to 1 VLAN Mapping
Configuration Roadmap
The configuration roadmap is as follows:
1. Add the downlink interface on Switch1 connected to the new branch to VLAN
5.
2. Configure 1 to 1 VLAN mapping on Switch2 to implement communication
between the new branch and headquarters.
Procedure
Step 1 Add the downlink interface on Switch1 to VLAN 5 and configure the uplink
interfaces to allow the VLAN5.
<HUAWEI> system-view
[~HUAWEI] sysname Switch1
[*HUAWEI] commit
[~Switch1] vlan 5
[*Switch1-vlan5] quit
[*Switch1] interface 10ge 1/0/1
[*Switch1-10GE1/0/1] port default vlan 5
[*Switch1-10GE1/0/1] quit
[*Switch1] interface 10ge 1/0/2
[*Switch1-10GE1/0/2] port default vlan 5
[*Switch1-10GE1/0/2] quit
[*Switch1] interface 10ge 1/0/3
[*Switch1-10GE1/0/3] port link-type trunk
[*Switch1-10GE1/0/3] port trunk allow-pass vlan 5
[*Switch1-10GE1/0/3] quit
[*Switch1] commit
----End
Configuration Files
● Configuration file of Switch1
#
sysname Switch1
#
vlan batch 5
#
interface 10GE1/0/1
port default vlan 5
#
interface 10GE1/0/2
port default vlan 5
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 5
#
return
● Configuration file of Switch2
#
sysname Switch2
#
vlan batch 6
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 6
port vlan-mapping vlan 5 map-vlan 6
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 6
#
return
● Configuration file of Switch3
#
sysname Switch3
#
vlan batch 6
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 6
#
return
transmitting the same service on old and new branches are located on the same
network segment. To ensure that the same servers can communicate and different
servers are isolated, and save VLAN resources, configure QinQ on aggregation
switches. To retain VLAN deployment of core switch, configure VLAN mapping on
the core switch.
Internet
10GE1/0/3
Core Switch MAC 501 2
10GE1/0/2 10GE1/0/1 MAC 502 3
Switch5
10GE1/0/3 10GE1/0/3
Switch1 Switch2
Access Switch
2 to 1 VLAN Mapping
Configuration Roadmap
The configuration roadmap is as follows:
1. Add interfaces on Switch1 and Switch2 connected to servers to VLANs.
2. Deploy QinQ on Switch3 and Switch4 to save VLAN resources.
3. Configure 2 to 1 VLAN mapping on Switch5 so that the same service can be
transmitted and different services are isolated in old and new branches.
Procedure
Step 1 Add downlink interfaces on Switch1 and Switch2 to VLANs and configure the
uplink interfaces to allow the VLANs.
# Configure Switch1.
<HUAWEI> system-view
[~HUAWEI] sysname Switch1
[*HUAWEI] commit
[~Switch1] vlan batch 2 3
[*Switch1] interface 10ge 1/0/1
[*Switch1-10GE1/0/1] port default vlan 2
[*Switch1-10GE1/0/1] quit
[*Switch1] interface 10ge 1/0/2
[*Switch1-10GE1/0/2] port default vlan 3
[*Switch1-10GE1/0/2] quit
[*Switch1] interface 10ge 1/0/3
[*Switch1-10GE1/0/3] port link-type trunk
[*Switch1-10GE1/0/3] port trunk allow-pass vlan 2 3
[*Switch1-10GE1/0/3] quit
[*Switch1] commit
# Configure Switch2.
<HUAWEI> system-view
[~HUAWEI] sysname Switch2
[*HUAWEI] commit
[~Switch2] vlan batch 2 3
[*Switch2] interface 10ge 1/0/1
[*Switch2-10GE1/0/1] port default vlan 2
[*Switch2-10GE1/0/1] quit
[*Switch2] interface 10ge 1/0/2
[*Switch2-10GE1/0/2] port default vlan 3
[*Switch2-10GE1/0/2] quit
[*Switch2] interface 10ge 1/0/3
[*Switch2-10GE1/0/3] port link-type trunk
[*Switch2-10GE1/0/3] port trunk allow-pass vlan 2 3
[*Switch2-10GE1/0/3] quit
[*Switch2] commit
# Configure the type of 10GE1/0/1 on Switch4 as QinQ and the outer VLAN tag as
VLAN 201.
<HUAWEI> system-view
[~HUAWEI] sysname Switch4
[*HUAWEI] commit
[~Switch4] vlan batch 201
[*Switch4] interface 10ge 1/0/1
This example pings Server4 in the old branch from Server1 in the new branch.
<Server1> ping 172.16.1.2
Pinging 172.16.1.2 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
----End
Configuration Files
● Configuration file of Switch1
#
sysname Switch1
#
vlan batch 2 to 3
#
interface 10GE1/0/1
port default vlan 2
#
interface 10GE1/0/2
port default vlan 3
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
Branch1 Branch2
Server1 Server2
VLAN 10 VLAN 30
2 to 2 VLAN Mapping
Configuration Roadmap
The configuration roadmap is as follows:
1. Add the downlink interface on Switch1 connected to branch 1 to VLAN 10 and
downlink interface on Switch6 connected to branch 2 to VLAN 30.
2. Configure QinQ on Switch2 and Switch5 so that packets sent to the ISP
network carry double tags.
3. Deploy 2 to 2 VLAN mapping on Switch3 and Switch4 to map inner and outer
VLAN IDs of packets to VLAN IDs allowed by the ISP network so that
branches can communicate.
Procedure
Step 1 Add downlink interfaces on Switch1 and Switch6 to VLANs and configure the
uplink interfaces to allow the VLANs.
# Configure Switch1.
<HUAWEI> system-view
[~HUAWEI] sysname Switch1
[*HUAWEI] commit
[~Switch1] vlan 10
[*Switch1-vlan10] quit
[*Switch1] interface 10ge 1/0/1
[*Switch1-10GE1/0/1] port default vlan 10
[*Switch1-10GE1/0/1] quit
[*Switch1] interface 10ge 1/0/2
# Configure Switch6.
<HUAWEI> system-view
[~HUAWEI] sysname Switch6
[*HUAWEI] commit
[~Switch6] vlan 30
[*Switch6-vlan30] quit
[*Switch6] interface 10ge 1/0/1
[*Switch6-10GE1/0/1] port default vlan 30
[*Switch6-10GE1/0/1] quit
[*Switch6] interface 10ge 1/0/2
[*Switch6-10GE1/0/2] port link-type trunk
[*Switch6-10GE1/0/2] port trunk allow-pass vlan 30
[*Switch6-10GE1/0/2] quit
[*Switch6] commit
Step 2 Configure QinQ on Switch2 and Switch5 so that packets sent to the ISP network
carry double tags.
# Configure the type of 10GE1/0/1 on Switch2 as QinQ and the outer VLAN tag as
VLAN 20.
<HUAWEI> system-view
[~HUAWEI] sysname Switch2
[*HUAWEI] commit
[~Switch2] vlan 20
[*Switch2-vlan20] quit
[*Switch2] interface 10ge 1/0/1
[*Switch2-10GE1/0/1] port link-type dot1q-tunnel
[*Switch2-10GE1/0/1] port default vlan 20
[*Switch2-10GE1/0/1] quit
[*Switch2] interface 10ge 1/0/2
[*Switch2-10GE1/0/2] port link-type trunk
[*Switch2-10GE1/0/2] port trunk allow-pass vlan 20
[*Switch2-10GE1/0/2] quit
[*Switch2] commit
# Configure the type of 10GE1/0/1 on Switch5 as QinQ and the outer VLAN tag as
VLAN 40.
<HUAWEI> system-view
[~HUAWEI] sysname Switch5
[*HUAWEI] commit
[~Switch5] vlan 40
[*Switch5-vlan40] quit
[*Switch5] interface 10ge 1/0/1
[*Switch5-10GE1/0/1] port link-type dot1q-tunnel
[*Switch5-10GE1/0/1] port default vlan 40
[*Switch5-10GE1/0/1] quit
[*Switch5] interface 10ge 1/0/2
[*Switch5-10GE1/0/2] port link-type trunk
[*Switch5-10GE1/0/2] port trunk allow-pass vlan 40
[*Switch5-10GE1/0/2] quit
[*Switch5] commit
# Configure Switch4.
<HUAWEI> system-view
[~HUAWEI] sysname Switch4
[*HUAWEI] commit
[~Switch4] vlan batch 50
[*Switch4] interface 10ge 1/0/1
[*Switch4-10GE1/0/1] port link-type trunk
[*Switch4-10GE1/0/1] port trunk allow-pass vlan 50
[*Switch4-10GE1/0/1] port vlan-mapping vlan 40 inner-vlan 30 map-vlan 50 map-inner-vlan 60
[*Switch4-10GE1/0/1] quit
[*Switch4] interface 10ge 1/0/2
[*Switch4-10GE1/0/2] port link-type trunk
[*Switch4-10GE1/0/2] port trunk allow-pass vlan 50
[*Switch4-10GE1/0/2] quit
[*Switch4] commit
----End
Configuration Files
● Configuration file of Switch1
#
sysname Switch1
#
vlan batch 10
#
interface 10GE1/0/1
port default vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 10
#
return
#
vlan batch 20
#
interface 10GE1/0/1
port link-type dot1q-tunnel
port default vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
return
interface 10GE1/0/1
port default vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
return
Networking Requirements
As shown in Figure 7-9, on a data center network, servers store video and data
information. Users are classified into gold and silver users, and gold and silver
users belong to VLAN 200 and VLAN 300 respectively and access servers through
the enterprise backbone network. The enterprise backbone network allocates
VLAN 2 to gold users and VLAN 3 to silver users. Switch2 and Switch3 are edge
devices of the enterprise backbone network. VLAN IDs planned by the video and
data servers and enterprise backbone network are different. To ensure that gold
users can access the video server and silver users can access the data server,
configure MQC-based VLAN mapping on Switch2 and Switch3.
Video server
VLAN200
10
/2 Gold user
G
GE
/0
1
network
VLAN2 VLAN3 10
Data server /3
/0 10GE1/0/1 10GE1/0/2 10GE1/0/2 10GE1/0/1 GE1/0/3
E1
10G Silver user
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Create VLANs.
# Create VLAN 200 and VLAN 300 on Switch1 and add interfaces connected to
servers to VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname Switch1
[*HUAWEI] commit
[~Switch1] vlan batch 200 300
[*Switch1] interface 10ge 1/0/2
[*Switch1-10GE1/0/2] port default vlan 200
[*Switch1-10GE1/0/2] quit
[*Switch1] interface 10ge 1/0/3
[*Switch1-10GE1/0/3] port default vlan 300
[*Switch1-10GE1/0/3] quit
[*Switch1] commit
# Create VLAN 200 and VLAN 300 on Switch4 and add interfaces connected to
users to VLAN 200 and VLAN 300. The configuration of Switch1 is similar to the
configuration of Switch4, and the configuration details are not mentioned here.
# On Switch2, create VLAN 2 and VLAN 3.
<HUAWEI> system-view
[~HUAWEI] sysname Switch2
[*HUAWEI] commit
[~Switch2] vlan batch 2 3
[*Switch2] commit
Step 2 Configure traffic classifiers, traffic behaviors, and traffic policies on Switch2 and
Switch3.
# Configure traffic classifiers, traffic behaviors, and traffic policies on Switch2.
[~Switch2] traffic classifier name1
[*Switch2-classifier-name1] if-match vlan 200
[*Switch2-classifier-name1] quit
[*Switch2] traffic behavior name1
[*Switch2-behavior-name1] vlan-mapping vlan 2
[*Switch2-behavior-name1] quit
[*Switch2] traffic classifier name2
[*Switch2-classifier-name2] if-match vlan 300
[*Switch2-classifier-name2] quit
[*Switch2] traffic behavior name2
[*Switch2-behavior-name2] vlan-mapping vlan 3
[*Switch2-behavior-name2] quit
[*Switch2] traffic policy name1
[*Switch2-trafficpolicy-name1] classifier name1 behavior name1
[*Switch2-trafficpolicy-name1] classifier name2 behavior name2
[*Switch2-trafficpolicy-name1] quit
[*Switch2] commit
# Add 10GE1/0/1 on Switch1 to VLAN 200 and VLAN 300. The configuration of
10GE1/0/1 on Switch4 is similar to the configuration of Switch1, and the
configuration details are not mentioned here.
[~Switch1] interface 10ge 1/0/1
[*Switch1-10GE1/0/1] port link-type trunk
[*Switch1-10GE1/0/1] port trunk allow-pass vlan 200 300
[*Switch1-10GE1/0/1] quit
[*Switch1] commit
After the preceding configuration is complete, gold users can access the video
server and silver users can access the data server.
----End
Configuration Files
● Configuration file of Switch1
#
sysname Switch1
#
vlan batch 200 300
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 200 300
#
interface 10GE1/0/2
port default vlan 200
#
interface 10GE1/0/3
port default vlan 300
#
return
● Configuration file of Switch2
#
sysname Switch2
#
vlan batch 2 to 3
#
traffic classifier name1 type or
if-match vlan 200
#
traffic classifier name2 type or
if-match vlan 300
#
traffic behavior name1
vlan-mapping vlan 2
#
traffic behavior name2
vlan-mapping vlan 3
#
traffic policy name1
classifier name1 behavior name1 precedence 5
classifier name2 behavior name2 precedence 10
#
interface 10GE1/0/1
traffic-policy name1 inbound
#
return
● Configuration file of Switch3
#
sysname Switch3
#
vlan batch 2 to 3
#
traffic classifier name1 type or
if-match vlan 2
#
traffic classifier name2 type or
if-match vlan 3
#
traffic behavior name1
vlan-mapping vlan 200
#
traffic behavior name2
vlan-mapping vlan 300
#
traffic policy name1
classifier name1 behavior name1 precedence 5
classifier name2 behavior name2 precedence 10
#
interface 10GE1/0/2
traffic-policy name1 inbound
#
return
● Configuration file of Switch4
#
sysname Switch4
#
vlan batch 200 300
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 200 300
#
interface 10GE1/0/2
port default vlan 200
#
interface 10GE1/0/3
port default vlan 300
#
return
8 GVRP Configuration
Purpose
To create or delete VLANs on all devices on a network, a network administrator
must manually create or delete the VLANs on each device. When a network is too
complex for a network administrator to know the network topology in a short
time or when many VLANs are configured on the network, the manual
configuration workload is enormous and configuration errors will occur. GVRP can
be configured on the network to implement automatic VLAN registration and
deregistration in this case.
Benefits
Through GVRP, VLAN attributes of one device can be propagated throughout the
entire switching network. GVRP enables network devices to dynamically deliver,
register, and propagate VLAN attributes, reducing workload of the network
administrator and ensuring correct configuration.
GVRP Messages
GVRP participants exchange information by sending GVRP messages. There are
three types of GVRP messages.
Timer
GARP defines four timers.
Join The Join timer controls the After sending the first Join
timer sending of Join messages. Each message, a GARP participant
interface maintains an starts the Join timer. If the
independent Join timer. participant receives a JoinIn
message before the Join timer
expires, it does not send the
second Join message. If the
GARP participant does not
receive any JoinIn message, it
sends the second Join message
when the Join timer expires. This
ensures that the Join message
can be reliably transmitted to
other GARP participants.
Leave The Leave timer controls the A GARP participant starts the
timer sending of Leave messages. Each Leave timer after receiving a
interface maintains an Leave or LeaveAll message. If the
independent Leave timer. GARP participant does not
receive any Join message of the
corresponding attribute before
the Leave timer expires, the
GARP participant deregisters the
attribute.
Registration Modes
A GVRP interface supports three registration modes:
● In normal mode, a GVRP interface can register and deregister VLANs as well
as transmit dynamic and static VLAN registration information.
● In fixed mode, a GVRP interface is disabled from dynamically registering and
deregistering VLANs and can only transmit static VLAN information. If the
registration mode of a trunk interface is set to fixed, the interface allows only
the manually configured VLANs even if it is configured to allow all the VLANs.
● In forbidden mode, a GVRP interface is disabled from dynamically registering
and deregistering VLANs and can transmit only information about VLAN 1. If
the registration mode of a trunk interface is set to forbidden, the interface
allows only VLAN 1, even if the interface is configured to allow all the VLANs.
In Figure 8-1, GVRP is configured on SwitchA and SwitchB. Static VLANs 10 and
20 are configured on SwitchA and SwitchB respectively.
SwitchA SwitchB
1 3 N
Protocol ID Message 1 … Message N End Mark GARP PDU structure
1 2 N
Attribute Type Attribute List Message structure
1 N
Attribute 1 … Attribute N End Mark Attribute List structure
1 2 3 N
Attribute Length Attribute Event Attribute Value Attribute structure
Field Description
Attribute Type Attribute type, which is defined by the GARP application. The
value is 0x01 for GVRP, indicating that the attribute value is a
VLAN ID.
1. After static VLAN 2 is created on SwitchA and 10GE1/0/1 joins static VLAN 2,
10GE1/0/1 automatically starts Join and Hold timers. After the Hold timer
expires, SwitchA sends a JoinEmpty message to SwitchB.
2. When 10GE1/0/2 on SwitchB receives the JoinEmpty message, SwitchB creates
dynamic VLAN 2 and adds 10GE1/0/2 to dynamic VLAN 2. SwitchB requests
10GE1/0/3 to start the Join and Hold timers. When the Hold timer expires,
SwitchB sends a JoinEmpty to SwitchC.
3. When 10GE1/0/4 on SwitchC receives the JoinEmpty message, SwitchC creates
dynamic VLAN 2 and adds 10GE1/0/4 to dynamic VLAN 2.
After one-way registration of VLAN attributes is complete, 10GE1/0/1,
10GE1/0/2, and 10GE1/0/4 are added to VLAN 2 but 10GE1/0/3 is not added
to VLAN 2. VLAN attribute registration from SwitchC to SwitchA is required so
that traffic of VLAN 2 can be bidirectionally transmitted. The process is as
follows:
Static VLAN 2 is created on SwitchC (the dynamic VLAN is replaced by the
static VLAN). 10GE1/0/4 of SwitchC starts Join and Hold timers. When the
Hold timer expires, SwitchC sends a JoinIn message to SwitchB.
4. After 10GE1/0/3 on SwitchB receives the JoinIn message, SwitchB adds
10GE1/0/3 to VLAN 2 and requests 10GE1/0/2 to start Join and Hold timers.
When the Hold timer expires, SwitchB sends a JoinIn message to SwitchA.
During two-way registration, after the Join timer expires, the switch waits for the
period of the Hold timer and sends a JoinEmpty or JoinIn message. (The switch
sends the JoinEmpty or JoinIn message twice at most.) When SwitchA receives the
JoinIn message, it stops sending JoinEmpty messages to SwitchB. Every time the
LeaveAll timer expires or a LeaveAll message is received, the switch restarts the
LeaveAll timer, Join timer, Hold timer, and Leave timer. 10GE1/0/1 on SwitchA
sends a JoinIn message to SwitchB when the Hold timer expires. SwitchB sends a
JoinIn message to SwitchC. After receiving the JoinIn message, SwitchC does not
create dynamic VLAN 2 because static VLAN 2 has been created.
NOTE
To facilitate the description, static VLAN 2 is first created on SwitchA, and then is created
on SwitchC. In practice, static VLANs can be created on devices simultaneously to
implement two-way registration.
NOTE
To facilitate the description, static VLAN 2 is first deleted from SwitchA, and then is deleted
from SwitchC. In practice, static VLANs can be deleted on devices simultaneously to
implement two-way deregistration.
Network
Department A Department B
Licensing Requirements
GVRP 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
CE8860EI V200R001C00
CE8861EI/CE8868EI V200R005C10
CE8850-32CQ-EI V200R002C50
CE8850-64CQ-EI V200R005C00
CE7850EI V200R001C00
CE7855EI V200R001C00
CE6810EI V200R001C00
CE6810-48S4Q-LI/CE6810-48S- V200R001C00
LI
CE6810-32T16S4Q-LI/ V200R001C00
CE6810-24S2Q-LI
CE6850EI V200R001C00
CE6850-48S6Q-HI V200R001C00
CE6850-48T6Q-HI/CE6850U-HI/ V200R001C00
CE6851HI
CE6857EI V200R005C10
CE6860EI V200R002C50
CE6865EI V200R005C00
CE6870-24S6CQ-EI V200R001C00
CE6870-48S6CQ-EI V200R001C00
CE6870-48T6CQ-EI V200R002C50
CE6875-48S4CQ-EI V200R003C00
CE5810EI V200R001C00
CE5850EI V200R001C00
CE5850HI V200R001C00
CE5855EI V200R001C00
NOTE
For details about the mapping between software versions and switch models, see the
Hardware Query Tool.
Feature Limitations
When many dynamic VLANs need to be registered or the network radius is large,
using default values of timers may cause VLAN flapping and high CPU usage. In
this case, increase values of the timers. The following values are recommended
depending on the number of VLANs.
Table 8-5 Relationship between GARP timer values and number of dynamic
VLANs that need to be registered
Number of Dynamic VLANs to Be Registered (N)
Configuration Notes
● GVRP can be configured on the trunk interface only.
● Switches on a network need to use the same settings of GVRP timers;
otherwise, flapping may occur in the dynamic VLAN.
● Global GVRP and VLAN-based Spanning Tree (VBST) cannot be configured
simultaneously, and GVRP and Multichassis Link Aggregation Group (M-LAG)
cannot be configured on an Eth-Trunk simultaneously.
● The blocked port of STP, RSTP, MSTI 0, ERPS, or Smart Link can block GVRP
messages.
Context
To dynamically register or deregister VLAN attributes on a switching network,
configure GVRP on all devices of the switching network. Before enabling GVRP on
an interface, you must enable GVRP globally. GVRP can be enabled only on trunk
interfaces. Ensure that the trunk interfaces allow packets from all dynamically
registered VLANs.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run gvrp
GVRP is enabled globally.
By default, GVRP is disabled globally.
Step 3 Run interface interface-type interface-number
The interface view is displayed.
NOTE
● The VLAN configuration will trigger GVRP messages. If too many VLANs are configured,
you are advised to run the vlan batch command in the system view to configure VLANs
on switches one by one and configure timers. Otherwise, dynamic VLANs may flap.
● If an interface is changed to another type, such as access, hybrid, or dot1q-tunnel, the
system asks you to disable GVRP on the interface first.
● The blocked port of STP, RSTP, MSTI 0, ERPS, or Smart Link can block GVRP messages.
● Global GVRP and VLAN-based Spanning Tree (VBST) cannot be configured
simultaneously, and GVRP and Multichassis Link Aggregation Group (M-LAG) cannot be
configured on an Eth-Trunk simultaneously.
----End
Context
When many dynamic VLANs need to be registered or the network radius is large,
using default values of timers may cause VLAN flapping and high CPU usage. In
this case, increase values of the timers. The following values are recommended
depending on the number of VLANs.
Table 8-6 Relationship between GARP timer values and number of dynamic
VLANs that need to be registered
Number of Dynamic VLANs to Be Registered (N)
Timer N <= 500 500 < N <= 1000 < N <= N > 1500
1000 1500
Procedure
● Configure the LeaveAll timer.
a. Run system-view
The system view is displayed.
b. Run garp timer leaveall timer-value
The value of the LeaveAll timer is set.
By default, the value of the LeaveAll timer is 1000 centiseconds (10
seconds).
The Leave timer value on an interface is restricted by the global LeaveAll
timer value. When configuring the global LeaveAll timer, ensure that all
the interfaces configured with a GARP Leave timer are working properly.
c. Run commit
The configuration is committed.
● Configure Hold, Join, and Leave timers.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
▪ The value range of each timer changes along with the values of
other timers. If the configured value of a timer is not within the
allowed range, you can change the value of the timer that
determines the value range of this timer.
----End
Procedure
● Run the display gvrp status command to check the status of global GVRP.
● Run the display gvrp statistics [ interface interface-type interface-number ]
command to check GVRP statistics on an interface.
● Run the display garp timer [ interface interface-type interface-number ]
command to check values of GARP timers.
● Run the display garp statistics [ interface interface-type interface-number ]
command to check GARP statistics on an interface.
● Run the display gvrp state interface interface-type interface-number vlan
vlan-id command to check GVRP state machine.
● Run the display gvrp vlan-operation interface interface-type interface-
number command to check information about dynamic VLANs on the
specified interface.
----End
Context
NOTICE
The cleared GVRP statistics cannot be restored. Exercise caution when you use this
command.
Procedure
● Run the reset garp statistics [ interface interface-type interface-number ]
command in the user view to clear GARP statistics.
----End
Networking Requirements
In Figure 8-6, Company A's headquarters and its branch are connected through
multiple switches. The headquarters and its branch need to communicate. As
businesses develop, Company A's sales department has business dealings with
Company B's procurement department. GVRP needs to be used to enable
Company B's procurement department (VLAN 100, VLANs 102 to 105) to
communicate with Company A's sales department (VLAN 100, VLANs 102 to 105).
Company B's other departments have no business dealings with Company A, and
they do not need to communicate with Company A.
10GE1/0/1 10GE1/0/1
SwitchC Company A SwitchB
10GE1/0/2 10GE1/0/2
Branch of
Company B
Company A
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Configure SwitchA.
[*SwitchA-10GE1/0/2] commit
[~SwitchA-10GE1/0/2] quit
Run the display gvrp statistics command on SwitchA to check GVRP statistics on
the interface, including the GVRP status, number of GVRP registration failures,
source MAC address of the last GVRP PDU, and registration type of each interface.
[~SwitchA] display gvrp statistics
The display on SwitchB and SwitchC is similar to SwitchA, and is not mentioned
here.
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
gvrp
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
#
return
9 STP/RSTP Configuration
This chapter describes the concepts and configuration procedures for the Spanning
Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP), and provides
configuration examples.
Definition
Generally, redundant links are used on an Ethernet switching network to provide
link backup and enhance network reliability. The use of redundant links, however,
may produce loops, causing broadcast storms and making the MAC address table
unstable. As a result, network communication may encounter quality deterioration
or even interruption. STP solves this problem. STP refers to Spanning Tree Protocol
defined in IEEE 802.1D, which develops into Rapid Spanning Tree Protocol (RSTP)
in IEEE 802.1w and then Multiple Spanning Tree Protocol (MSTP) in IEEE 802.1S.
MSTP is compatible with RSTP and STP, and RSTP is compatible with STP. Figure
9-2 compares the STP, RSTP, and MSTP protocols.
Purpose
After a spanning tree protocol is configured on an Ethernet switching network, the
protocol calculates the network topology to implement the following functions:
● Loop prevention: The spanning tree protocol blocks redundant links to prevent
potential loops on the network.
● Link redundancy: If an active link fails and a redundant link exists, the
spanning tree protocol activates the redundant link to ensure network
connectivity.
Port1 Port1
S1 S2
Port2 Port2
ServerB
Data flow
On the network shown in Figure 9-1, the following situations may occur:
● Broadcast storms cause a breakdown of the network.
If a loop exists on the network, broadcast storms may occur, leading to a
breakdown of the network. In Figure 9-1, STP is not enabled on the switches.
If ServerA sends a broadcast request, both S1 and S2 receive the request on
port 1 and forward the request through their port 2. Then, S1 and S2 receive
the request forwarded by each other on port 2 and forward the request
through port 1. As this process repeats, resources on the entire network are
exhausted, and the network finally breaks down.
● MAC address table flapping causes unstable MAC address entries.
Assume that no broadcast storm has occurred on the network shown in
Figure 9-1. ServerA sends a unicast packet to ServerB. If ServerB is
temporarily removed from the network at this time, the MAC address entry
for ServerB will be deleted on S1 and S2. The unicast packet sent by ServerA
to ServerB is received by port 1 on S1. S1 has no matching MAC address entry,
so the unicast packet is forwarded to port 2. Then port 2 on S2 receives the
unicast packet from port 2 on S1 and sends it out through port 1. In addition,
port 1 on S2 also receives the unicast packet sent by ServerA to ServerB, and
sends it out through port 2. As such transmissions repeat, port 1 and port 2
on S1 and S2 continuously receive unicast packets from ServerA. S1 and S2
modify the MAC address entries continuously, causing the MAC address table
to flap. As a result, MAC address entries are damaged.
Root Bridge
A tree topology must have a root. As defined in STP, the device that functions as
the root of a tree network is called the root bridge.
There is only one root bridge on the entire STP network. Although the root bridge
is not necessarily at the physical center of the network, it functions as its logical
center. The root bridge changes dynamically with the network topology.
After network convergence, the root bridge generates configuration BPDUs and
sends them to other devices at specific intervals. Other devices process and
forward the configuration BPDUs to communicate the topology changes to
downstream devices.
● ID
– Bridge ID (BID)
According to IEEE 802.1D, a BID is composed of a bridge priority
(leftmost 16 bits) and a bridge MAC address (rightmost 48 bits).
On an STP network, the device with the smallest BID is elected as the
root bridge.
– Port ID (PID)
A PID is composed of a port priority (leftmost 4 bits) and a port number
(rightmost 12 bits).
The PID is used to select the designated port.
NOTE
The port priority affects the role of a port in a specified spanning tree instance.
For details, see 9.2.4 STP Topology Calculation.
● Path cost
The path cost is a port variable used for link selection. STP calculates path
costs to select robust links, blocks redundant links, and finally trims the
network into a loop-free tree topology.
On an STP network, a port's path cost to the root bridge is the sum of the
path costs of all ports between the port and the root bridge. This path cost is
the root path cost.
A B
PC=100;RPC=100 PC=99;RPC=199
B A
S3 PC=200;RPC=100 PC=200;RPC=199 S4
● Root bridge
The root bridge is the bridge with the smallest BID, which is discovered by
exchanging configuration BPDUs.
● Root port
The root port on an STP device is the port with the smallest path cost to the
root bridge and is responsible for forwarding data to the root bridge. An STP
device has only one root port, and there is no root port on the root bridge.
● Designated port
Table 9-2 explains the designated bridge and designated port.
In Figure 9-3, AP1 and AP2 are ports of S1; BP1 and BP2 are ports of S2; CP1
and CP2 are ports of S3.
– S1 sends configuration BPDUs to S2 through AP1, so S1 is the designated
bridge for S2, and AP1 is the designated port on S1.
– S2 and S3 are connected to the LAN. If S2 forwards configuration BPDUs
to the LAN, S2 is the designated bridge for the LAN, and BP2 is the
designated port on S2.
AP1 AP2
BP1 CP1
S2 S3
BP2 CP2
LAN
After the root bridge, root ports, and designated ports are selected successfully, a
tree topology is set up on the entire network. When the topology is stable, only
the root port and designated ports forward traffic. The other ports are in Blocking
state; they only receive STP BPDUs and do not forward user traffic.
Comparison Principles
During role election, STP devices compare four fields, which form a BPDU priority
vector {root bridge ID, root path cost, sender BID, PID}.
Table 9-3 describes the four fields carried in a configuration BPDU.
After a device on the STP network receives a configuration BPDU, it compares the
fields listed in Table 9-3 with its own values. The four comparison principles are as
follows:
● Smallest BID: used to select the root bridge. Devices on an STP network select
the device with the smallest BID to become the root bridge. This BID is then
used as the root bridge ID field in Table 9-3.
● Smallest root path cost: used to select the root port on a non-root bridge. The
port with the smallest root path cost is selected as the root port. On the root
bridge, the path cost of each port is 0 and there is no root port.
● Smallest sender BID: used to select the root port among ports with the same
root path cost. The port with the smallest sender BID is selected as the root
port in STP calculation. For example, S2 has a smaller BID than S3 in Figure
9-2. If the BPDUs received on port A and port B of S4 contain the same root
path cost, port B becomes the root port on S4 because the BPDU received on
port B has a smaller sender BID.
● Smallest PID: used to determine which port should be blocked when multiple
ports have the same root path cost. The port with the smallest PID is not
blocked. The PIDs are compared in the scenario shown in Figure 9-4. The
BPDUs received on port A and port B of S1 contain the same root path cost
and sender BID. Port A has a smaller PID than port B. Therefore, port B is
blocked to prevent loops.
S1 S2
A B
Designated port
Blocked port
Port States
Table 9-4 describes the possible states of ports on an STP device.
Forwardi A port in Forwarding state can Only the root port and
ng forward user traffic and process designated port can enter the
BPDUs. Forwarding state.
Listening
5
3
2 4
1
Disabled or 4
Blocking Learning
Down
5
4
3
5
Forwarding
Forwardi A port in Forwarding state can forward user traffic and process
ng BPDUs.
After a Huawei device transitions from the Multiple Spanning Tree Protocol
(MSTP) mode (default mode) to the STP mode, its STP ports support only those
states defined in MSTP, which are Forwarding, Learning, and Discarding. The
Forwarding and Learning states are the same as the corresponding STP states. A
port in Discarding state can only receive BPDUs.
The following parameters affect the STP port states and convergence speed.
● Hello Time
The Hello Time specifies the interval at which an STP device sends
configuration BPDUs to detect link failures.
When the Hello Time is changed, the new value takes effect only after a new
root bridge is elected. The new root bridge adds the new Hello Time value in
BPDUs it sends to non-root bridges. When the network topology changes,
Topology Change Notification (TCN) BPDUs are transmitted immediately,
irrespective of the Hello Time.
● Forward Delay
The Forward Delay timer specifies the length of delay before a port state
transition. When a link fails, STP calculation is triggered and the spanning tree
structure changes. However, because new configuration BPDUs cannot be
immediately spread over the entire network, convergence takes some time. If
the new root port and designated port forward data before convergence,
transient loops may occur. Therefore, STP defines a port state transition delay
mechanism. The newly selected root port and designated port must wait for
two Forward Delay intervals before transitioning to the Forwarding state.
During this time, the new configuration BPDUs can be transmitted over the
network, preventing transient loops during convergence.
The default Forward Delay timer value is 15 seconds. This means that the port
stays in Listening state for 15 seconds and then stays in Learning state for
another 15 seconds before transitioning to the Forwarding state. The port
does not forward user traffic when it is in Listening or Learning state, which is
key to preventing transient loops.
● Max Age
The Max Age specifies the aging time of BPDUs. This parameter is
configurable on the root bridge.
The Max Age is spread to the entire network with configuration BPDUs. After
a non-root bridge receives a configuration BPDU, it either forwards or discards
the configuration BPDU by comparing the Message Age value with the Max
Age value. The details are as follows:
– If the Message Age value is less than or equal to the Max Age value, the
non-root bridge forwards the configuration BPDU.
– If the Message Age value is larger than the Max Age value, the non-root
bridge discards the configuration BPDU. When this happens, the network
size is considered too large and the non-root bridge disconnects from the
root bridge.
If the configuration BPDU is sent from the root bridge, the value of Message
Age is 0. Otherwise, the value of Message Age is the total time spent to
transmit the BPDU from the root bridge to the local bridge, including the
transmission delay. In real-world situations, the Message Age value of a
configuration BPDU increases by 1 each time the configuration BPDU passes
through a bridge.
Table 9-6 provides the timer values defined in IEEE 802.1D.
Configuration BPDU
Configuration BPDUs are used most commonly and are used for exchanging
topology information among STP devices.
Each bridge actively sends configuration BPDUs during initialization. After the
network topology becomes stable, only the root bridge actively sends
configuration BPDUs. Other bridges send configuration BPDUs only after receiving
configuration BPDUs from upstream devices. A configuration BPDU is at least 35
bytes long, and includes the parameters such as the BID, root path cost, and PID. A
bridge processes a received configuration BPDU only when it finds that at least
one of the sender BID and PID is different from that on the local receive port. If
both fields are the same as those on the receive port, the bridge drops the
configuration BPDU. This reduces the number of BPDUs that a bridge needs to
process.
A configuration BPDU is sent in the following scenarios:
● After STP is enabled on ports of a device, the designated port on the device
sends configuration BPDUs at Hello intervals.
● When the root port on a device receives a configuration BPDU, the device
sends a copy of the configuration BPDU to each of its designated ports.
● When a designated port receives a low-priority configuration BPDU, the
designated port immediately sends its own configuration BPDU to the
downstream device.
Root Path Cost 4 Indicates the accumulated path cost from a port to
the root bridge.
Bridge Identifier 8 Indicates the BID of the bridge that sends the BPDU.
Port Identifier 2 Indicates the ID of the port that sends the BPDU.
Message Age 2 Records the time that has elapsed since the original
BPDU was generated on the root bridge.
If the configuration BPDU is sent from the root
bridge, the value of Message Age is 0. Otherwise, the
value of Message Age is the total time spent to
transmit the BPDU from the root bridge to the local
bridge, including the transmission delay. In real-
world situations, the Message Age value of a
configuration BPDU increases by 1 each time the
configuration BPDU passes through a bridge.
Forward Delay 2 Indicates the period during which a port stays in the
Listening and Learning states.
Figure 9-7 shows the Flags field. Only the leftmost and rightmost bits are used in
STP.
Bit7 Bit0
TCN BPDU
A TCN BPDU contains only three fields: Protocol Identifier, Version, and Type, as
described in Table 9-7. The Type field is four bytes long and is fixed at 0x80.
When the network topology changes, TCN BPDUs are transmitted upstream until
they reach the root bridge. A TCN BPDU is sent in the following scenarios:
● A port transitions to the Forwarding state.
● A designated port receives a TCN BPDU and sends a copy to the root bridge.
BPDU Exchange
Figure 9-8 shows the initial information exchange process. The four parameters in
a pair of brackets represent the root bridge ID (S1_MAC and S2_MAC are BIDs of
the two devices), root path cost, sender BID, and PID carried in configuration
BPDUs. Configuration BPDUs are sent at Hello intervals.
A B
S1 {S2_MAC,0,S2_MAC,B_PID} S2
St Process
ep
Table 9-9 Selecting the configuration BPDU with the highest priority
St Process
ep
2 The device compares configuration BPDUs on all the ports and selects
the one with the highest priority.
Pa
st=
th
co
co
th
st=
Pa
10
Port B1 Port C1
Path cost=4
Port B2 Port C2
DeviceB DeviceC
DeviceB DeviceC
Priority=1 Priority=2
Root port
Designated port
Blocked port
As shown in Figure 9-9, DeviceA, DeviceB, and DeviceC are deployed on the
network, with priorities 0, 1, and 2, respectively. The path costs between DeviceA
and DeviceB, DeviceA and DeviceC, and DeviceB and DeviceC are 5, 10, and 4,
respectively.
NOTE
The fields that are compared in a configuration BPDU are {root bridge ID, root path cost,
sender BID, PID}.
Devi ● Port A1 receives the configuration BPDU ● Port A1: {0, 0, 0, Port
ceA {1, 0, 1, Port B1} from Port B1 and finds it A1}
inferior to its own configuration BPDU {0, ● Port A2: {0, 0, 0, Port
0, 0, Port A1}, so Port A1 discards the A2}
received configuration BPDU.
● Port A2 receives the configuration BPDU
{2, 0, 2, Port C1} from Port C1 and finds its
own configuration BPDU {0, 0, 0, Port A2}
with a higher priority, so Port A2 discards
the received configuration BPDU.
● DeviceA finds that the root bridge and
designated bridge specified in the
configuration BPDUs on its ports are both
itself. Therefore, DeviceA considers itself as
the root bridge and periodically sends
configuration BPDUs from each port
without modifying the BPDUs.
Devi ● Port B1 receives the configuration BPDU ● Port B1: {0, 0, 0, Port
ceB {0, 0, 0, Port A1} from Port A1 and finds it A1}
superior to its own configuration BPDU {0, ● Port B2: {1, 0, 1, Port
0, 0, Port B1}, so Port B1 updates its B2}
configuration BPDU.
● Port B2 receives the configuration BPDU
{2, 0, 2, Port C2} from Port C2 and finds it
inferior to its own configuration BPDU {1,
0, 1, Port B2}, so Port B2 discards the
received configuration BPDU.
Devi ● Port C1 receives the configuration BPDU ● Port C1: {0, 0, 0, Port
ceC {0, 0, 0, Port A2} from Port A2 and finds it A2}
superior to its own configuration BPDU {2, ● Port C2: {1, 0, 1, Port
0, 2, Port C1}, so Port C1 updates its B2}
configuration BPDU.
● Port C2 receives the configuration BPDU
{1, 0, 1, Port B2} from Port B2 and finds it
superior to its own configuration BPDU {1,
0, 1, Port B2}, so Port C2 updates its
configuration BPDU.
After the topology becomes stable, the root bridge still sends configuration BPDUs
at intervals specified by the Hello timer. Each non-root bridge forwards the
received configuration BPDUs through its designated port. When a non-root
bridge receives a superior configuration BPDU on a port, the non-root bridge
replaces the configuration BPDU on the port with the received configuration
BPDU.
T
A topology change is generated on
point T. Step 2: The root bridge advertises the
Step 1: A TCN is going up to the TC for Max Age + forward delay.
root.
The following is the process that takes place after a topology change occurs:
1. When the status of the interface at point T changes, a downstream device
continuously sends TCN BPDUs to the upstream device to inform the
upstream device and root bridge of topology changes.
2. The upstream device processes only the TCN BPDUs received on the
designated port and drops TCN BPDUs on other ports.
3. The upstream device sets the TCA bit of the Flags field in the configuration
BPDUs to 1 and returns the configuration BPDUs to instruct the downstream
device to stop sending TCN BPDUs.
4. The upstream device sends a copy of the TCN BPDUs toward the root bridge.
5. Steps 1, 2, 3 and 4 are repeated until the root bridge receives the TCN BPDUs.
6. The root bridge sets the TC and TCA bits of the Flags field in the configuration
BPDUs to 1. The TC bit of 1 informs the downstream device of topology
changes and instructs the downstream device to delete MAC address entries.
In this manner, fast network convergence is achieved. The TCA bit of 1
informs the downstream device that the topology changes are known and
instructs the downstream device to stop sending TCN BPDUs.
Disadvantages of STP
STP ensures a loop-free network but is slow to converge, leading to service quality
deterioration. If the network topology changes frequently, connections on the STP
network are frequently torn down, causing frequent service interruption.
STP has the following disadvantages:
● STP does not differentiate between port roles according to their states,
making it difficult for less experienced administrators to learn about and
deploy this protocol.
– Ports in Listening, Learning, and Blocking states are the same for users
because they are all prevented from forwarding service traffic.
– In terms of port use and configuration, the essential differences between
ports lie in the port roles but not port states.
Both root and designated ports can be in Listening state or Forwarding
state, so the port roles cannot be differentiated according to their states.
● The STP algorithm does not determine topology changes until the timer
expires, delaying network convergence.
● The STP algorithm requires the root bridge to send configuration BPDUs after
the network topology becomes stable, and other devices process and spread
the configuration BPDUs through the entire network. This also delays
convergence.
B A
S2 S3
A A a
S1
root bridge
B A
S2 S3
A B A a
b
Root port
Designated port
Alternate port
Backup port
As shown in Figure 9-11, RSTP defines four port roles: root port, designated
port, alternate port, and backup port.
The functions of the root port and designated port are the same as those
defined in STP. The alternate port and backup port are described as follows:
– During configuration BPDU transmission:
Table 9-12 Comparison between port states defined in STP and RSTP
STP Port State RSTP Port State Port Role
● RSTP changes the configuration BPDU format and uses the Flags field to
describe port roles.
RSTP retains the basic configuration BPDU format defined in STP and makes
the following minor changes:
– The value of the Type field is changed from 0 to 2. Devices running STP
will drop the configuration BPDUs sent from devices running RSTP.
– The Flags field uses the six bits reserved in STP. This configuration BPDU
is called an RST BPDU. Figure 9-12 shows the Flags field in an RST BPDU.
S1
p0 1 Proposal
3 Agreement
p1
S2
p2 E p4
p3
Designated port
Alternate port
E Edge port
NOTE
The Proposal/Agreement mechanism applies only to P2P full-duplex links between two
devices. When Proposal/Agreement fails, a designated port is elected after two Forward
Delay intervals, which is the same as designated port election in STP mode.
Network
Root
bridge
PE1 PE2
STP
CE1 CE2
Server1 Server2
Blocked port
As shown in Figure 9-14, STP is deployed on the devices. The devices exchange
information to discover loops on the network and block a port to trim the ring
topology into a loop-free tree topology. The tree topology prevents infinite looping
of packets on the network and ensures packet processing capabilities of the
devices.
Setting RSTP parameters RSTP supports link type 9.9 Setting RSTP
that affect the RSTP and fast transition Parameters That Affect
convergence speed configuration on ports to RSTP Convergence
implement rapid
convergence.
Licensing Requirements
STP or RSTP 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
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
● On networks that run STP/RSTP/MSTP/VBST, configure an optimal core switch
as the root bridge to ensure stability of the STP Layer 2 network. Otherwise,
new access devices may trigger STP root bridge switching, causing short
service interruptions.
● When STP or RSTP is enabled on a ring network, STP or RSTP immediately
starts spanning tree calculation. Parameters such as the device priority and
port priority affect spanning tree calculation, and changing these parameters
may cause network flapping. To ensure fast and stable spanning tree
calculation, perform basic configurations on the switch and interfaces before
enabling STP or RSTP.
● RSTP uses a single spanning tree instance on the entire network. As a result,
performance deterioration cannot be prevented when the network scale
grows. Therefore, the network diameter cannot be larger than 7.
● BPDU protection takes effect only for the manually configured edge port.
● Loop prevention and root protection cannot be configured on the same
interface.
● In versions earlier than V200R001C00, STP cannot be configured on a user-
side interface of a VXLAN tunnel. Starting from V200R001C00, STP can be
configured on a user-side interface of a VXLAN tunnel that accesses the
VXLAN as a VLAN. In V200R002C50 and later versions, STP can be configured
on a user-side interface of a VXLAN tunnel when the device is deployed to
provide VXLAN access through a Layer 2 sub-interface or to provide VLAN
access.
● For CE6870EI, In V200R001C00, the bpdu bridge enable command is not
supported on the VXLAN network. To enable BPDU packets to traverse the
VXLAN network, run the undo mac-address bpdu [ mac-address [ mac-
address-mask ] ] command in the system view. In this command, mac-address
specifies the MAC address of BPDU packets that need to traverse the VXLAN
network.
Procedure
Step 1 Run system-view
----End
NOTE
On networks that run STP/RSTP/MSTP/VBST, configure an optimal core switch as the root
bridge to ensure stability of the STP Layer 2 network. Otherwise, new access devices may
trigger STP root bridge switching, causing short service interruptions.
It is recommended that you specify the root bridge and secondary root bridge when
configuring STP/RSTP.
Procedure
● Configure a device as the root bridge.
a. Run system-view
The system view is displayed.
b. Run stp root primary
The device is configured as the root bridge.
By default, a device does not function as the root bridge. After you run
this command, the priority value of the device is set to 0 and cannot be
changed.
c. Run commit
The configuration is committed.
By default, a device does not function as the secondary root bridge. After
you run this command, the priority value of the device is set to 4096 and
cannot be changed.
c. Run commit
----End
Context
An STP/RSTP network can have only one root bridge, which is the logical center of
the spanning tree. The root bridge should be a high-performance device deployed
at a high network layer. To ensure a certain device is selected as the root bridge,
you can set a high priority for the device.
Set low priorities for devices that are not suitable as the root bridge, such as low-
performance devices at lower network layers.
Procedure
Step 1 Run system-view
If the stp root primary or stp root secondary command has been executed to
configure the device as the root bridge or secondary root bridge, run the undo stp
root command to disable the root bridge or secondary root bridge function and
then run the stp priority priority command to set a priority.
----End
Table 9-16 Recommended path costs for ports with different link rates
10 Gbit/s 2 2 to 20 1 to 200000
If a network has loops, it is recommended that you set a large path cost for ports
with low link rates. STP/RSTP then blocks these ports.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Run stp pathcost-standard { dot1d-1998 | dot1t | legacy }
A path cost calculation method is specified.
By default, the IEEE 802.1t standard (dot1t) is used to calculate the path costs.
All devices on a network must use the same path cost calculation method.
Step 3 Run interface interface-type interface-number
The view of an interface participating in STP calculation is displayed.
Step 4 Run stp cost cost
A path cost is set for the interface.
The following describes the supported cost range for different calculation
methods:
● When the Huawei calculation method is used, cost ranges from 1 to 200000.
● When the IEEE 802.1d standard method is used, cost ranges from 1 to 65535.
● When the IEEE 802.1t standard method is used, cost ranges from 1 to
200000000.
● If an Eth-Trunk interface is specified as the member interface of an M-LAG
configured in V-STP mode, the path cost of the Eth-Trunk interface is fixed at
2000.
Step 5 Run commit
The configuration is committed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of an interface participating in STP calculation is displayed.
Step 3 Run stp port priority priority
A priority is set for the port.
The default priority value of a port on a device is 128.
Step 4 Run commit
The configuration is committed.
----End
Context
NOTICE
Before enabling STP/RSTP, ensure that you have performed all basic
configurations, such as the device priority and port priority, on the device and its
ports. After STP/RSTP is enabled on a ring network, spanning tree calculation
starts immediately on the network. Making changes to configurations will affect
spanning tree calculation and may cause network flapping.
Procedure
Step 1 Run system-view
----End
Follow-up Procedure
When the topology of a spanning tree changes, the forwarding paths for
associated VLANs are changed. Devices need to update the ARP entries
corresponding to those VLANs. Depending on how devices process ARP entries,
STP/RSTP convergence mode can be fast or normal.
Run the stp converge { fast | normal } command in the system view to configure
the STP/RSTP convergence mode.
By default, the normal STP/RSTP convergence mode is used. The normal mode is
recommended. If the fast mode is used, ARP entries will be frequently deleted,
causing a high CPU usage (even 100%). As a result, network flapping will
frequently occur.
Procedure
● Run the display stp [ interface interface-type interface-number | slot slot-id ]
[ brief ] command to check the spanning tree status and statistics.
----End
Pre-configuration Tasks
Before setting STP parameters that affect STP convergence, configure basic STP
functions.
Context
Any two terminals on a switching network are connected through a specific path
along multiple devices. The network diameter is the maximum number of devices
between any two terminals.
An improper network diameter may cause slow network convergence and affect
communication on the network. To speed up convergence, run the stp bridge-
diameter command to set an appropriate network diameter based on the
network scale. Running this command also allows the switch to calculate the
optimal Forward Delay timer value, Hello timer value, and Max Age timer value
based on the configured network diameter.
It is recommended that all devices be configured with the same network diameter.
Procedure
Step 1 Run system-view
NOTE
RSTP uses a single spanning tree instance on the entire network. As a result, performance
deterioration cannot be prevented when the network scale grows. Therefore, the network
diameter cannot be larger than 7.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp timer-factor factor
The Timer Factor value is set.
By default, the timeout period is 9 times the Hello timer value.
Step 3 Run commit
The configuration is committed.
----End
NOTICE
To prevent frequent network flapping, make sure that the Hello Time, Forward
Delay, and Max Age timer values conform to the following formulas:
● 2 x (Forward Delay - 1.0 second) ≥ Max Age
● Max Age ≥ 2 x (Hello Time + 1.0 second)
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Set the Forward Delay, Hello Time, and Max Age timers.
1. Run stp timer forward-delay forward-delay
The Forward Delay timer is set for the device.
By default, the Forward Delay timer is 1500 centiseconds (15 seconds).
2. Run stp timer hello hello-time
The Hello Time is set for the device.
By default, the Hello Time is 200 centiseconds (2 seconds).
3. Run stp timer max-age max-age
The Max Age timer is set for the device.
By default, the Max Age timer is 2000 centiseconds (20 seconds).
Step 3 Run commit
The configuration is committed.
----End
Root bridge
SwitchA SwitchB
After Eth-Trunk1
configuration Eth-Trunk2
Root bridge
Alternate port
Root port
Designated port
The maximum number of connections affects only the path cost of an Eth-Trunk
interface participating in spanning tree calculation, and does not affect the actual
bandwidth of the Eth-Trunk link. The actual bandwidth for an Eth-Trunk link
depends on the number of active member interfaces in the Eth-Trunk.
Procedure
Step 1 Run system-view
The system view is displayed.
----End
Pre-configuration Tasks
Before configuring RSTP parameters that affect RSTP convergence, configure basic
RSTP functions. RSTP supports link type and fast transition configuration on ports
to implement rapid convergence.
It is recommended that all devices be configured with the same network diameter.
Procedure
Step 1 Run system-view
NOTE
RSTP uses a single spanning tree instance on the entire network. As a result, performance
deterioration cannot be prevented when the network scale grows. Therefore, the network
diameter cannot be larger than 7.
----End
Context
If a device does not receive any BPDUs from the upstream device within the
timeout interval, the device considers the upstream device to have failed and
recalculates the spanning tree.
Sometimes, a device cannot receive the BPDU from the upstream device within
the timeout interval because the upstream device is temporarily busy. In this case,
recalculating the spanning tree will waste network resources. This can be avoided
by increasing the timeout interval. However, only set a long timeout interval if the
network is relatively stable.
Procedure
Step 1 Run system-view
----End
NOTICE
To prevent frequent network flapping, make sure that the Hello Time, Forward
Delay, and Max Age timer values conform to the following formulas:
● 2 x (Forward Delay - 1.0 second) ≥ Max Age
● Max Age ≥ 2 x (Hello Time + 1.0 second)
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Set the Forward Delay, Hello Time, and Max Age timers.
1. Run stp timer forward-delay forward-delay
The Forward Delay timer is set for the device.
By default, the Forward Delay timer is 1500 centiseconds (15 seconds).
----End
Root bridge
SwitchA SwitchB
After Eth-Trunk1
configuration Eth-Trunk2
Root bridge
Alternate port
Root port
Designated port
The maximum number of connections affects only the path cost of an Eth-Trunk
interface participating in spanning tree calculation, and does not affect the actual
bandwidth of the Eth-Trunk link. The actual bandwidth for an Eth-Trunk link
depends on the number of active member interfaces in the Eth-Trunk.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Step 3 Run max bandwidth-affected-linknumber link-number
The maximum number of connections affecting the Eth-Trunk bandwidth is set.
By default, the upper threshold for the number of interfaces that determine the
bandwidth of an Eth-Trunk is 8 on the CE5810EI, 64 on CE6880EI and CE5880EI,
and 16 on other models (excluding the CE6870EI and CE6875EI). For the CE6870EI
and CE6875EI, the upper threshold for the number of interfaces that determine
the bandwidth of an Eth-Trunk depends on the maximum number of configured
LAGs. In an SVF system, the maximum number of connections affecting the
bandwidth of an Eth-Trunk is 8.
Step 4 Run commit
The configuration is committed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of an Ethernet interface participating in STP calculation is displayed.
Step 3 Run stp point-to-point { auto | force-false | force-true }
The link type is set for the interface.
The following describes the link type that should be set for different interface
working modes:
Step 4 Run commit
The configuration is committed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of an Ethernet interface participating in STP calculation is displayed.
Step 3 Run stp transmit-limit packet-number
The maximum transmission rate of BPDUs (BPDUs per second) is set for the
interface.
By default, the maximum transmission rate of BPDUs on an interface is the value
configured by the stp transmit-limit (system view) command. If the stp
transmit-limit (system view) command is not configured, an interface sends a
maximum of six BPDUs per Hello Time interval.
NOTE
If the same maximum transmission rate of BPDUs needs to be set for each interface on a
device, run the stp transmit-limit (system view) command. The stp transmit-limit
(interface view) command takes precedence over the stp transmit-limit (system view)
command. If the stp transmit-limit (interface view) command is configured on an
interface, the stp transmit-limit (system view) command does not take effect on that
interface.
----End
Procedure
● Switching to the RSTP mode in the interface view
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The view of an interface participating in spanning tree calculation is
displayed.
c. Run stp mcheck
The interface is switched to the RSTP mode.
d. Run commit
The configuration is committed.
● Switching to the RSTP mode in the system view
a. Run system-view
The system view is displayed.
b. Run stp mcheck
----End
Context
RSTP defines a port that is located at the edge of a network and directly
connected to a terminal device as an edge port.
Edge ports can still send BPDUs. If the BPDUs are sent to another network, this
network may encounter network flapping. To prevent this problem, configure the
BPDU filter function on edge ports so that the edge ports do not process or send
BPDUs.
NOTICE
After a specified port is configured as an edge port and BPDU filter port in the
interface view, the port does not process or send BPDUs and cannot negotiate the
STP state with the directly connected port on the peer device. In addition, if this
command is run in the system view, all ports will go into the Forwarding state.
This may cause loops on the network, leading to broadcast storms. Exercise
caution when deciding to perform this configuration.
Procedure
● Configuring all ports as edge ports and BPDU filter ports
a. Run system-view
a. Run system-view
----End
Procedure
● Run the display stp [ interface interface-type interface-number | slot slot-id ]
[ brief ] command to check the spanning tree status and statistics.
----End
Context
Typically, edge ports are directly connected to user terminals and will not receive
BPDUs. However, if an edge port receives pseudo BPDUs from a malicious attacker,
the device sets the edge port as a non-edge port and triggers spanning tree
recalculation, which results in network flapping. BPDU protection can be
configured to mitigate such attacks.
NOTE
Perform the following procedure on all devices that have edge ports.
BPDU protection is only valid for the edge port manually configured by the stp edged-port
or stp edged-port default command, and is invalid for the edge port configured by the
automatic detection function.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp bpdu-protection
BPDU protection is enabled on the device.
By default, BPDU protection is disabled on a device.
Step 3 Run commit
The configuration is committed.
----End
Follow-up Procedure
After BPDU protection is configured, the edge port that receives BPDUs will enter
the Error-Down state and keeps its attributes. The device records the status of an
interface as Error-Down when it detects that a fault occurs. The interface in Error-
Down state cannot receive or send packets and the interface indicator is off. You
can run the display error-down recovery command to check information about
all interfaces in Error-Down state on the device.
When the interface is in Error-Down state, check the cause. You can use the
following modes to restore the interface status:
● Manual (after interfaces enter the Error-Down state)
When there are few interfaces in Error-Down state, run the shutdown and
undo shutdown commands in the interface view or run the restart command
to restore the interface.
● Auto (before interfaces enter the Error-Down state)
If there are many interfaces in Error-Down state, the manual mode brings in
heavy workload and the configuration of some interfaces may be ignored. To
prevent this problem, run the error-down auto-recovery cause bpdu-
protection interval interval-value command in the system view to enable an
interface in Error-Down state to go Up and set a recovery delay. You can run
the display error-down recovery command to view automatic recovery
information about the interface.
NOTE
This mode is invalid for the interface that has entered the Error-Down state, and is valid
only for the interface that enters the Error-Down state after the error-down auto-recovery
cause bpdu-protection interval interval-value command is run.
MAC address entries and ARP entries. This increases the load on the switch and
threatens network stability.
After enabling TC BPDU protection on a switch, you can set a limit for the number
of times the device processes TC BPDUs within a given time. If this number is
exceeded, the switch processes only the specified number of TC BPDUs. Any excess
TC BPDUs are processed in one go by the switch after the specified period expires.
This function prevents the switch from frequently deleting its MAC address entries
and ARP entries, reducing the load on the switch and guaranteeing network
stability.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp tc-protection
TC protection is enabled for the device.
By default, TC protection is disabled on a device.
Step 3 Run either or both of the following commands to configure TC protection
parameters.
● To set the time period during which the device processes the maximum
number of TC BPDUs, run stp tc-protection interval interval-value.
By default, the time period is the Hello Time.
● To set the maximum number of TC BPDUs that the device processes within a
specified period, run stp tc-protection threshold threshold.
By default, a device processes one TC BPDU within a specified period.
NOTE
● There are two TC protection parameters: time period during which the device processes
the maximum number of TC BPDUs and the maximum number of TC BPDUs processed
within the time period. For example, if the time period is set to 10 seconds and the
maximum number of TC BPDUs is set to 5, the device processes only the first five TC
BPDUs within 10 seconds and processes the other TC BPDUs together 10 seconds later.
● The device processes only the maximum number of TC BPDUs configured by the stp tc-
protection threshold command within the time period configured by the stp tc-
protection interval command. Other packets are processed after a delay, so spanning
tree convergence speed may slow down.
----End
result, traffic may be switched from high-speed links to low-speed links, leading to
network congestion. You can configure root protection on a designated port,
which prevents the port role from being changed.
Perform the following steps on the root bridge in an MST region.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of an interface participating in STP calculation is displayed.
Step 3 Run stp root-protection
Root protection is enabled on the interface.
By default, root protection is disabled on an interface. Root protection takes effect
only on designated ports. Root protection and loop protection cannot be
configured on the same interface.
Step 4 Run commit
The configuration is committed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of the root port or alternate port is displayed.
NOTE
An alternate port is a backup for a root port. If a device has an alternate port, configure
loop prevention on both the root port and the alternate port.
Root protection and loop prevention cannot be configured on the same port.
----End
Procedure
● Run the display stp [ interface interface-type interface-number | slot slot-id ]
[ brief ] command to check the spanning tree status and statistics.
----End
Context
To implement interoperability between Huawei and non-Huawei devices, select
the fast transition mode based on the Proposal/Agreement mechanism of the
non-Huawei device. A device supports the following fast transition modes:
● Enhanced mode: The device determines the root port when it calculates the
synchronization flag bit. The following describes the process:
a. An upstream device sends a Proposal message to a downstream device to
request fast state transition. After receiving the message, the downstream
device sets the port connected to the upstream device as the root port
and blocks all non-edge ports.
b. The upstream device sends an Agreement message to the downstream
device. After the downstream device receives the message, the root port
transitions to the Forwarding state.
c. The downstream device responds with an Agreement message. After
receiving the message, the upstream device sets the port connected to
the downstream device as the designated port, and then the designated
port transitions to the Forwarding state.
● Common mode: The device ignores the root port when it calculates the
synchronization flag bit. The following describes the process:
Pre-configuration Tasks
Before setting parameters for interoperation between Huawei and non-Huawei
devices, configure basic STP/RSTP functions.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of an interface participating in spanning tree calculation is displayed.
Step 3 Run stp no-agreement-check
The common fast transition mode is specified.
By default, the enhanced fast transition mode is used on a port.
Step 4 Run commit
The configuration is committed.
----End
NOTICE
Procedure
● Run the reset stp [ interface interface-type interface-number ] statistics
command to clear spanning tree statistics.
----End
Procedure
● Run the display stp [ process process-id ] [ instance instance-id ] topology-
change command to check statistics about STP/RSTP topology changes.
● Run the display stp [ process process-id ] [ instance instance-id ] [ interface
interface-type interface-number | slot slot-id ] tc-bpdu statistics command
to check statistics about sent and received TC/TCN packets.
----End
Network
10GE1/0/3 10GE1/0/3
10GE1/0/1
SwitchD SwitchA
10GE1/0/1
10GE1/0/2 Root 10GE1/0/2
bridge
STP
10GE1/0/3 10GE1/0/3
10GE1/0/1
SwitchC SwitchB
10GE1/0/1
10GE1/0/2 10GE1/0/2
Server1 Server2
Blocked port
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the STP mode for the devices on the ring network.
2. Configure the root bridge and secondary root bridge.
3. Set a path cost for the ports to be blocked.
4. Enable STP to eliminate loops.
NOTE
The ports connected to servers do not participate in STP calculation. Disable STP on
these ports.
5. Verify the configuration.
Procedure
Step 1 Configure the STP mode for the devices on the ring network. The configurations
on SwitchB, SwitchC, and SwitchD are similar to the configurations on SwitchA,
and are not mentioned here.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] stp mode stp
[*SwitchA] commit
# On SwitchB, set the path cost calculation method to the Huawei proprietary
method.
[~SwitchB] stp pathcost-standard legacy
[*SwitchB] commit
# On SwitchD, set the path cost calculation method to the Huawei proprietary
method.
[~SwitchD] stp pathcost-standard legacy
[*SwitchD] commit
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
stp mode stp
stp instance 0 root primary
stp pathcost-standard legacy
#
return
#
return
Network
10GE1/0/3 10GE1/0/3
10GE1/0/1
SwitchD SwitchA
10GE1/0/1
10GE1/0/2 Root 10GE1/0/2
bridge
RSTP
10GE1/0/3 10GE1/0/3
10GE1/0/1
SwitchC SwitchB
10GE1/0/1
10GE1/0/2 10GE1/0/2
Server1 Server2
Blocked port
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the RSTP mode for the devices on the ring network.
2. Configure the root bridge and secondary root bridge.
3. Set a path cost for the ports to be blocked.
4. Enable RSTP to eliminate loops.
NOTE
The ports connected to servers do not participate in RSTP calculation. Disable RSTP on
these ports.
5. Configure protection functions to protect devices or links.
6. Verify the configuration.
Procedure
Step 1 Configure the RSTP mode for the devices on the ring network. The configurations
on SwitchB, SwitchC, and SwitchD are similar to the configurations on SwitchA,
and are not mentioned here.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
# On SwitchB, set the path cost calculation method to the Huawei proprietary
method.
[~SwitchB] stp pathcost-standard legacy
[*SwitchB] commit
# On SwitchD, set the path cost calculation method to the Huawei proprietary
method.
[~SwitchD] stp pathcost-standard legacy
[*SwitchD] commit
Step 5 Configure root protection on the designated ports of the root bridge.
# Configure root protection on 10GE1/0/1 and 10GE1/0/2 of SwitchA.
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] stp root-protection
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] stp root-protection
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
stp mode rstp
stp instance 0 root primary
stp pathcost-standard legacy
#
interface 10GE1/0/1
stp root-protection
#
interface 10GE1/0/2
stp root-protection
#
return
10 MSTP Configuration
This chapter describes the concepts and configuration procedure of the Multiple
Spanning Tree Protocol (MSTP), and provides configuration examples.
STP refers to STP defined in IEEE 802.1D, the Rapid Spanning Tree Protocol (RSTP)
defined in IEEE 802.1w, and the Multiple Spanning Tree Protocol (MSTP) defined
in IEEE 802.1s.
MSTP is compatible with RSTP and STP, and RSTP is compatible with STP. STP,
RSTP, and MSTP all prevent broadcast storms and achieve redundancy. Table 10-1
compares STP, RSTP, and MSTP.
Purpose
After a spanning tree protocol is configured on an Ethernet switching network, it
calculates the network topology and implements the following functions to
remove network loops:
● Loop cut-off: The potential loops on the network are cut off by blocking
redundant links.
● Link redundancy: If an active path becomes faulty, a redundant link can be
activated to ensure network connectivity.
In addition to the above functions, MSTP also ensures faster convergence than STP
and can load balance among multiple VLANs.
ServerC ServerA
(VLAN 3) VLAN 3 VLAN 2 (VLAN 2)
VLAN 2 VLAN 3
S2 S5
S3 S6
Spanning tree (root bridge: S6)
On the LAN shown in Figure 10-1, STP or RSTP is enabled. The broken line
represents the spanning tree. S6 is the root bridge. The links between S1 and S4
and between S2 and S5 are blocked. VLAN packets are transmitted using the
corresponding links marked with "VLAN 2" or "VLAN 3."
Server A and Server B belong to VLAN 2 but they cannot communicate with each
other because the link between S2 and S5 is blocked and the link between S3 and
S6 denies packets from VLAN 2.
To overcome this issue that is present in STP and RSTP, the IEEE released 802.1s in
2002, defining the Multiple Spanning Tree Protocol (MSTP). In addition to
implementing fast convergence, MSTP also provides multiple paths to load
balance VLAN traffic.
MSTP divides a switching network into multiple regions, known as Multiple
Spanning Tree (MST) regions. Each MST region has multiple spanning trees,
known as Multiple Spanning Tree Instances (MSTIs), that are independent of each
other.
NOTE
ServerC ServerA
(VLAN 3) VLAN 3 VLAN 2 (VLAN 2)
VLAN 2 VLAN 3
S2 S5
S3 S6
Spanning tree (root bridge: S4)
Spanning tree (root bridge: S6)
On the network shown in Figure 10-2, MSTP maps VLANs to MSTIs in the VLAN
mapping table. Each VLAN can be mapped to only one MSTI. This means that
traffic of a VLAN can be transmitted in only one MSTI. An MSTI, however, can
correspond to multiple VLANs.
In this manner, devices within the same VLAN can communicate with each other;
packets of different VLANs are load balanced along different paths.
MSTP Network
MSTI
MSTI1
1
MSTI2 MSTI0 MSTI2 MSTI0
MST Region MST Region
MSTI1
MSTI2 MSTI0
MST Region
MST Region
An MST region contains multiple switching devices and network segments
between these devices. The switching devices in one MST region have the
following characteristics:
● MSTP-enabled
● Same region name
● Same VLAN-MSTI mappings
● Same MSTP revision level
A LAN can comprise several MST regions that are directly or indirectly connected.
Multiple switching devices can be grouped into an MST region by using MSTP
configuration commands.
On the network shown in Figure 10-4, the MST region D0 contains the switching
devices S1, S2, S3, and S4, and has three MSTIs.
D0
MSTI1
AP1 Master Bridge Root switch: S3
S1
MSTI2
Root switch: S2
S2 S3 MSTI0 (IST)
Root switch: S1
Mapping table:
S4 VLAN 1 MSTI 1
VLAN 2, VLAN 3 MSTI 2
Other VLANs MSTI 0
Regional Root
Regional roots are classified into Internal Spanning Tree (IST) and MSTI regional
roots.
In the regions B0, C0, and D0 on the network shown in Figure 10-6, the switching
devices closest to the Common and Internal Spanning Tree (CIST) root are IST
regional roots.
An MST region can contain multiple spanning trees, each called an MSTI. An MSTI
regional root is the root of the MSTI. On the network shown in Figure 10-5, each
MSTI has its own regional root.
MST Region
VLAN VLA
N10
10&20&30 &20
VLAN 20&30
30
VLAN VLAN VLAN
10&30 VLAN 10&30
20
VLAN 10
Root
Root
MSTIs are independent of each other. An MSTI can correspond to one or more
VLANs, but a VLAN can be mapped to only one MSTI.
Master Bridge
The master bridge is the IST master, which is the switching device closest to the
CIST root in a region, for example, S1 shown in Figure 10-4.
If an MST region contains the CIST root, the CIST root is the master bridge of the
region.
CIST Root
A0
CIST Root
D0
Region Root B0
Region Root
C0
Region Root
IST
CST
On the network shown in Figure 10-6, the CIST root is the root bridge of the CIST.
The CIST root is a device in A0.
CST
A Common Spanning Tree (CST) connects all the MST regions on a switching
network.
If each MST region is considered a node, the CST is calculated by STP or RSTP
based on all the nodes.
On the network shown in Figure 10-6, the MST regions are connected to form a
CST.
IST
An IST resides within an MST region and has the MSTI ID of 0. An IST is a segment
of the CIST in an MST region.
On the network shown in Figure 10-6, the switching devices in an MST region are
connected to form an IST.
CIST
A CIST, calculated by STP or RSTP, connects all the switching devices on a
switching network.
On the network shown in Figure 10-6, the ISTs and the CST form a complete
spanning tree, the CIST.
SST
A Single Spanning Tree (SST) is formed in either of the following situations:
● A switching device running STP or RSTP belongs to only one spanning tree.
● An MST region has only one switching device.
On the network shown in Figure 10-6, the switching device in B0 forms an SST.
Port Role
In addition to the port types in RSTP (root ports, designated ports, alternate ports,
backup ports, and edge ports), MSTP has two other port types: master ports and
regional edge ports.
The functions of root ports, designated ports, alternate ports, backup ports, and
edge ports have been defined in RSTP. Table 10-2 lists all port roles in MSTP.
NOTE
Root A root port is the non-root bridge port closest to the root bridge.
port Root bridges do not have root ports.
Root ports are responsible for sending data to root bridges.
On the network shown in Figure 10-7, S1 is the root; CP1 is the root
port on S3; BP1 is the root port on S2.
Port Description
Role
Master A master port provides the shortest path from an MST region to the
port CIST root.
BPDUs of an MST region are sent to the CIST root through the
master port.
Master ports are special regional edge ports, functioning as root
ports on ISTs or CISTs and functioning as master ports in MSTIs.
On the network shown in Figure 10-8, S1, S2, S3, and S4 form an
MST region. AP1 on S1, being the nearest port in the region to the
CIST root, is the master port.
Regional A regional edge port is located at the edge of an MST region and
edge connects to another MST region or an SST.
port During MSTP calculation, the roles of a regional edge port in the
MSTI and the CIST instance are the same. As such, if the regional
edge port is the master port in the CIST instance, it is the master
port in all the MSTIs in the region.
On the network shown in Figure 10-8, AP1, DP1, and DP2 in an MST
region are directly connected to other regions, and therefore they are
all regional edge ports of the MST region.
AP1 is a master port in the CIST. Therefore, AP1 is the master port in
every MSTI in the MST region.
Edge An edge port is located at the edge of an MST region and does not
port connect to any switching device.
Generally, edge ports are directly connected to terminals.
After MSTP is enabled on a port, edge port detection is started
automatically. If the port fails to receive BPDU packets within (2 x
Hello Timer + 1) seconds, the port is set to an edge port. Otherwise,
the port is set to a non-edge port.
Figure 10-7 Root port, designated port, alternate port, and backup port
S1
Root
AP2 AP3
CP1 BP1
S3 S2
Root port
Designated port
Alternate port
Backup port
AP1
Master
S1
S2 S3
S4
Blocked
Port Description
State
Forwardi A port in the Forwarding state can send and receive BPDUs as well
ng as forward user traffic.
Learning A port in the Learning state learns MAC addresses from user traffic
to build a MAC address table.
In the Learning state, the port can send and receive BPDUs, but not
forward user traffic.
There is no direct link between the port state and the port role. Table 10-4 lists
the supported port states for each port role.
Table 10-5 shows differences in the protocol version and type between TCN
BPDUs, configuration BPDUs (defined by STP), RST BPDUs (defined by RSTP), and
MST BPDUs (defined by MSTP).
The first 36 bytes of an intra-region or inter-region MST BPDU are the same as
those of an RST BPDU.
Fields from the 37th byte of an MST BPDU are MSTP-specific. The field MSTI
Configuration Messages consists of configuration messages of multiple MSTIs.
Table 10-6 lists the major information carried in an MST BPDU.
CIST External 4 Indicates the total path cost from the MST
Path Cost region where the switching device resides to the
MST region where the CIST root switching device
resides. This value is calculated based on link
bandwidth.
CIST Internal 4 Indicates the total path cost from the local port
Root Path to the IST master. This value is calculated based
Cost on link bandwidth.
After a switching device becomes the root, it sends BPDUs at Hello intervals. Non-
root switching devices adopt the Hello Time value set for the root.
Huawei network devices allow the maximum number of BPDUs sent by a port at a
Hello interval to be configured as needed.
The greater the Hello Time value, the more BPDUs sent at a Hello interval. Setting
the Hello Time to a proper value limits the number of BPDUs sent by a port at a
Hello interval. This helps prevent network topology flapping and avoid excessive
use of bandwidth resources by BPDUs.
MSTP Principle
MSTP can divide the entire Layer 2 network into multiple MST regions and
calculate the CST. In an MST region, multiple spanning trees are calculated, each
of which is called an MSTI. Of these MSTIs, MSTI 0 is also known as the internal
spanning tree (IST). Like STP, MSTP uses configuration messages to calculate
spanning trees, but the configuration messages are MSTP-specific.
Vectors
Both MSTIs and the CIST are calculated based on vectors, which are carried in
MST BPDUs. Therefore, switching devices exchange MST BPDUs to calculate MSTIs
and the CIST.
Root ID Identifies the root switching device for the CIST. The root
ID consists of the priority value (16 bits) and MAC
address (48 bits).
The priority value is the priority of MSTI 0.
External root Indicates the path cost from a CIST regional root to the
path cost root. ERPCs saved on all switching devices in an MST
(ERPC) region are the same. If the CIST root is in an MST region,
ERPCs saved on all switching devices in the MST region
are 0s.
Regional root Identifies the MSTI regional root. The regional root ID
ID consists of the priority value (16 bits) and MAC address
(48 bits).
The priority value is the priority of MSTI 0.
Internal root Indicates the path cost from the local bridge to the
path cost regional root. The IRPC saved on a regional edge port is
(IRPC) greater than the IRPC saved on a non-regional edge port.
Receiving port Identifies the port receiving the BPDU. The port ID
ID consists of the priority value (4 bits) and port number (12
bits). The priority value must be a multiple of 16.
CIST Calculation
After completing the configuration message comparison, the switching device with
the highest priority on the entire network is selected as the CIST root. MSTP
calculates an IST for each MST region, and calculates a CST to interconnect MST
regions. On the CST, each MST region is considered a switching device. The CST
and ISTs constitute a CIST for the entire network.
MSTI Calculation
In an MST region, MSTP calculates an MSTI for each VLAN based on mappings
between VLANs and MSTIs. Each MSTI is calculated independently. The calculation
process is similar to the process in which STP calculates a spanning tree. For
details, see 9.2.4 STP Topology Calculation.
MSTIs have the following characteristics:
● The spanning tree is calculated independently for each MSTI, and spanning
trees of MSTIs are independent of each other.
● Spanning trees of MSTIs can have different roots and topologies.
● Each MSTI sends BPDUs in its spanning tree.
● The topology of each MSTI is configured by commands.
● A port can be configured with different parameters for different MSTIs.
● A port can play different roles or have different states in different MSTIs.
On an MSTP-aware network, a VLAN packet is forwarded along the following
paths:
● Along an MSTI (in an MST region)
● Along a CST (between MST regions)
Sends a proposal so
that the port can
rapidly enter the
Forwarding state The root port blocks all
the other non-edge ports
Sends an agreement
The root port enters
The designated Sends an agreement the Forwarding state
port enters the
Forwarding state
Root port
Designated port
Background
The following describes the network shown in Figure 10-11:
● UPEs are deployed at the aggregation layer and are running MSTP.
● UPE1 and UPE2 are connected by a Layer 2 link.
● Multiple rings are connected to UPE1 and UPE2 through different ports.
● Switching devices on the rings reside at the access layer and are running STP
or RSTP. In addition, UPE1 and UPE2 work for different carriers, so they need
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
STP/RSTP
S1
Access
S4
S2 S3
On the network shown in Figure 10-11, switching devices and UPEs construct
multiple Layer 2 rings. STP must be enabled on these rings to prevent loops. UPE1
and UPE2 are connected to multiple access rings that are independent of each
other. The spanning tree protocol cannot calculate a single spanning tree for all
switching devices. Instead, the spanning tree protocol must be enabled on each
ring to calculate a separate spanning tree.
MSTP supports MSTIs, but these MSTIs must belong to one MST region in which
devices must have the same configurations. If the devices belong to different
regions, MSTP calculates the spanning tree based on only one instance. Assume
that devices on the network belong to different regions, and only one spanning
tree is calculated in one instance. In this case, the status change of any device on
the network affects the stability of the entire network. On the network shown in
Figure 10-11, the switching devices connected to UPEs support only STP or RSTP
but not MSTP. When MSTP-enabled UPEs receive RST BPDUs from the switching
devices, the UPEs consider that they and switching devices belong to different
regions. As a result, only one spanning tree is calculated for the rings composed of
UPEs and switching devices, and the rings affect each other.
NOTE
In addition to applying to MSTP, MSTP multi-process also applies to RSTP and STP.
Purpose
On the network shown in Figure 10-11, MSTP multi-process is configured to
implement the following:
● Allows STP to work under far more networking conditions.
To help a network running different spanning tree protocols run properly, you
can bind different spanning tree protocols to different processes. In this
manner, every process calculates a separate spanning tree.
● Improves the networking reliability. For a network composed of many Layer 2
access devices, using MSTP multi-process reduces the adverse effect of a
single node failure on the entire network.
The topology is calculated for each process. If a device fails, only the topology
corresponding to the process to which the device belongs changes.
● Reduces the network administrator workload during network expansion,
facilitating operations and maintenance (O&M).
To expand a network, all you need to do is configure new processes, connect
the processes to the existing network, and keep the existing MSTP processes
unchanged. If device expansion is performed in a process, only this process
needs to be modified.
● Implements separate Layer 2 port management
An MSTP process manages parts of ports on a device. Layer 2 ports on a
device are separately managed by multiple MSTP processes.
Implementation
● Public link status
On the network shown in Figure 10-11, the public link between UPE1 and
UPE2 is a Layer 2 link running MSTP and is different from the links
connecting switching devices to UPEs. This difference lies in the fact that ports
on the links connecting switching devices to UPEs only participate in the
calculation for a single access ring and a single MSTP process. The ports on
the public link, on the other hand, need to participate in the calculation for
multiple access rings and MSTP processes. Therefore, the UPEs must identify
the process from which MST BPDUs are sent.
A port on the public link participates in the calculation for multiple MSTP
processes, and obtains different states. As a result, the port cannot determine
its state.
To prevent these problems from occurring, it is defined that a port on a public
link always adopts its state in MSTP process 0 when participating in the
calculation for multiple MSTP processes.
NOTE
After a device starts, MSTP process 0 exists by default, and MSTP configurations in the
system view and interface view belong to this process.
The device is incompatible with non-standard STP, RSTP, and MSTP, for example, PVST
+. It transparently forwards PVST+ packets in a VLAN as common data packets.
● Reliability
On the network shown in Figure 10-12, after the topology of a ring changes,
the MSTP multi-process mechanism helps UPEs flood a topology change (TC)
packet to all devices on the ring and prevent the TC packet from being
flooded to devices on the other ring. UPE1 and UPE2 update MAC address
and ARP entries on the ports corresponding to the changed spanning tree.
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
STP/RSTP
Access
S1 S4
S2 S3
Topology change
On the network shown in Figure 10-13, if the public link between UPE1 and
UPE2 fails, multiple switching devices that are connected to the UPEs will
unblock their blocked ports.
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
STP/RSTP
S1
Access
S4
S2 S3
Assume that UPE1 is configured with the highest priority, UPE2 with the
second highest priority, and switching devices with default or lower priorities.
After the link between UPE1 and UPE2 fails, the blocked ports on switching
devices no longer receive packets of higher priorities. For this reason, these
ports re-perform state machine calculation. If the calculation changes the
blocked ports to designated ports, a permanent loop occurs, as shown in
Figure 10-14.
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
STP/RSTP
Access
S1 S4
S2 S3
Topology change
● Solutions
To prevent a loop between access rings, use either of the following solutions:
– Configure an Eth-Trunk between UPE1 and UPE2.
An Eth-Trunk is used as the public link between UPE1 and UPE2 to
improve link reliability, as shown in Figure 10-15.
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
Eth-Trunk
STP/RSTP
S1
Access
S4
S2 S3
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
Root
protection
S1
Access
S4
STP/RSTP
S2 S3
On the light blue ring shown in Figure 10-16, UPE1 is configured with
the highest priority, UPE2 with the second highest priority, and switching
devices with default or lower priorities. In addition, root protection is
enabled on UPE2.
Assume that a port on S1 is blocked. When the public link between UPE1
and UPE2 fails, the blocked port on S1 begins to calculate the state
machine because it no longer receives BPDUs of higher priorities. After
the calculation, the blocked port becomes the designated port and
performs P/A negotiation with the downstream device.
After S1, which is directly connected to UPE2, sends BPDUs of higher
priorities to the UPE2 port enabled with root protection, the port is
blocked. From then on, the port remains blocked because it continues
receiving BPDUs of higher priorities. In this manner, no loop will occur.
MST Region
S1 S2
All VLANs
VLANs
S3 20 & 40 S4
In Figure 10-17, S1 and S2 are devices at the aggregation layer; S3 and S4 are
devices at the access layer. Traffic from VLAN 10 and VLAN 30 is terminated by
aggregation devices, and traffic from VLAN 40 is terminated by access devices.
Therefore, S1 and S2 can be configured as the roots of MSTI 1 and MSTI 3, and S3
can be configured as the root of MSTI 4.
Core
MPLS/IP Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
STP/RSTP
S1 S4
Access
S2 S3
Licensing Requirements
MSTP 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
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
● On networks that run STP, RSTP, MSTP, or VLAN-based Spanning Tree (VBST),
configure an optimal core switch as the root bridge to ensure stability of the
STP Layer 2 network. Otherwise, new access devices may trigger an STP root
bridge change, causing short service interruptions.
● When MSTP is enabled on a ring network, MSTP immediately starts spanning
tree calculation. Parameters such as the device priority and port priority affect
spanning tree calculation, and changing these parameters may cause network
flapping. To ensure fast and stable spanning tree calculation, perform basic
configurations on the switch and interfaces before enabling MSTP.
● When MSTP multi-instance is configured, more MSTIs indicate longer MSTP
BPDUs. MSTP BPDUs are sent independently in each MSTP process. When
MSTP multi-process is configured, the number of outgoing MSTP BPDUs
increases. When MSTP multi-instance and multi-process are configured, the
default CPCAR of STP cannot meet requirements. You need to increase the
default CPCAR of STP. If the default CPCAR of STP is not increased, MSTP
BPDUs may be discarded.
● BPDU protection takes effect for only the manually configured edge ports.
● Loop protection and root protection cannot be configured on the same
interface together.
● In versions earlier than V200R001C00, STP cannot be configured on a user-
side interface of a VXLAN tunnel. Starting from V200R001C00, STP can be
configured on a user-side interface of a VXLAN tunnel that accesses the
VXLAN as a VLAN. In V200R002C50 and later versions, STP can be configured
on a user-side interface of a VXLAN tunnel when the device is deployed to
provide VXLAN access through a Layer 2 sub-interface or to provide VLAN
access.
● For CE6870EI, In V200R001C00, the bpdu bridge enable command is not
supported on the VXLAN network. To enable BPDU packets to traverse the
VXLAN network, run the undo mac-address bpdu [ mac-address [ mac-
address-mask ] ] command in the system view. In this command, mac-address
specifies the MAC address of BPDU packets that need to traverse the VXLAN
network.
For CE switches excluding CE5880EI, CE6875EI, CE6880EI, CE6870EI in versions
earlier than V200R001C00, if the bpdu bridge enable command is configured
on an access-side port on the VXLAN network connected to an STP network,
BPDU packets cannot traverse the VXLAN network. This causes loops on the
STP network. In V200R001C00 and later versions, the bpdu bridge enable
command is not supported on the VXLAN network. If this command is
configured in a version earlier than V200R001C00, it will be deleted from the
device configurations after an upgrade to V200R001C00 or a later version. To
enable BPDU packets to traverse the VXLAN network, run the undo mac-
address bpdu [ mac-address [ mac-address-mask ] ] command in the system
view. In this command, mac-address specifies the MAC address of BPDU
packets that need to traverse the VXLAN network.
Context
Before configuring basic MSTP functions, set the working mode of a switching
device to MSTP. MSTP is compatible with STP and RSTP.
Procedure
Step 1 Run system-view
The working mode of the switching device is set to MSTP. By default, the working
mode is MSTP.
MSTP can recognize RSTP BPDUs and, conversely, RSTP can recognize MSTP
BPDUs. However, MSTP and STP cannot recognize each other's BPDUs. To enable
devices running different spanning tree protocols to interwork with each other,
interfaces of an MSTP-enabled switch connected to devices running STP
automatically transition to STP mode; other interfaces continue to work in MSTP
mode.
----End
NOTE
Two switching devices belong to the same MST region when they have the same:
● MST region name
● VLAN-to-MSTI mapping
● Revision level of the MST region
Perform the following steps on a switching device that needs to join an MST
region.
Procedure
● Configure the name of an MST region.
a. Run system-view
The system view is displayed.
b. Run stp region-configuration
The MST region view is displayed.
c. Run region-name name
The name of an MST region is configured.
By default, the name of an MST region is the MAC address of the
management network interface on the MPU of the switching device.
d. (Optional) Run check region-configuration
The device is configured to check the MST region name.
e. Run commit
The configuration is committed.
● Configure the mapping between MSTIs and VLANs.
You can configure the mapping between MSTIs and VLANs in the MST region
view and VLAN instance view.
Configure the mapping between an MSTI and VLANs in the MST region view.
a. Run system-view
The system view is displayed.
NOTE
A VLAN can be mapped to only one MSTI. If you map a VLAN that has already
been mapped to an MSTI to another MSTI, the original mapping will be deleted.
d. (Optional) Run check region-configuration
The device is configured to check the mapping between the MSTI and
VLANs.
e. Run commit
Configure the mapping between an MSTI and VLANs in the VLAN instance
view.
a. Run system-view
By default, all VLANs in the VLAN instance view are mapped to MSTI 0.
NOTE
NOTE
On networks that run STP/RSTP/MSTP/VBST, configure an optimal core switch as the root
bridge to ensure stability of the STP Layer 2 network. Otherwise, new access devices may
trigger STP root bridge switching, causing short service interruptions.
Procedure
● Perform the following operations on the device to be used as the root bridge.
a. Run system-view
The system view is displayed.
b. Run stp [ instance instance-id ] root primary
The device is configured as the root bridge.
By default, a switching device does not function as the root bridge. After
the configuration is complete, the priority value of the device is 0 and this
value cannot be changed.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp [ instance instance-id ] priority priority
A priority is set for the switching device in an MSTI.
The default priority value of the switching device is 32768.
If instance-id is not specified, a priority is set for the switching device in MSTI 0.
NOTE
If the stp [ instance instance-id ] root primary or stp [ instance instance-id ] root
secondary command has been executed to configure the device as the root bridge or
secondary root bridge, to change the device priority, run the undo stp [ instance instance-
id ] root command to disable the root bridge or secondary root bridge function and run the
stp [ instance instance-id ] priority priority command to set a priority.
----End
Path costs of ports are an important metric used in spanning tree calculation and
determine root port selection in an MSTI. The port with the lowest path cost to
the root bridge is selected as the root port. Load balancing of VLAN traffic can be
achieved by setting different path costs for a port in different MSTIs.
If loops occur on a network, it is recommended that you set a large path cost for
ports with low link rates.
Procedure
Step 1 Run system-view
By default, the IEEE 802.1t standard (dot1t) is used to calculate the path cost.
All switching devices on a network must use the same path cost calculation
method.
● When the Huawei calculation method is used, cost ranges from 1 to 200000.
● When the IEEE 802.1d standard method is used, cost ranges from 1 to 65535.
● When the IEEE 802.1t standard method is used, cost ranges from 1 to
200000000.
● If an Eth-Trunk interface is specified as the member interface of an M-LAG
configured in V-STP mode, the path cost of the Eth-Trunk interface is fixed at
2000.
----End
Context
During spanning tree calculation, port priorities in MSTIs determine which ports
are selected as designated ports and which ports are blocked. To specify a port as
blocked, set the port priority to a value greater than the default value.
Procedure
Step 1 Run system-view
----End
Context
MSTP must be enabled for basic MSTP functions to take effect.
Procedure
Step 1 Run system-view
NOTE
After MSTP is enabled on a port, edge port detection is started automatically. If the port fails to
receive BPDU packets within (2 x Hello Timer + 1) seconds, the port is set to an edge port.
Otherwise, the port is set to a non-edge port.
----End
Follow-up Procedure
If the topology of a spanning tree changes, the forwarding paths to associated
VLANs are changed. On the switching device, therefore, the ARP entries
corresponding to these VLANs need to be updated. MSTP processes ARP entries in
either fast or normal mode.
To specify which mode is used for STP/RSTP convergence, run the stp converge
{ fast | normal } command in the system view.
By default, the normal MSTP convergence mode is used. If fast mode is used, ARP
entries are frequently deleted. This causes high CPU usage on the device (reaching
100%) and results in frequent network flapping. Therefore, using normal mode is
recommended.
Procedure
● Run the display stp [ process process-id ] [ instance instance-id ] [ interface
interface-type interface-number | slot slot-id ] [ brief ] command to view
spanning-tree status and statistics.
● Run the display stp region-configuration command to view configurations
of activated MST regions.
● Run the display stp region-configuration digest command to view the
digest configurations of activated MST regions.
----End
Pre-configuration Tasks
MSTP ensures that spanning trees in rings are calculated independently. After
MSTP multi-process is enabled, each MSTP process can manage certain ports on a
device. Each Layer 2 interface can be managed by multiple MSTP processes.
Before configuring MSTP multi-process, complete and activate the MST region
configuration.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp process process-id
An MSTP process is created and the MSTP process view is displayed.
Step 3 Run stp mode mstp
A working mode is configured for the MSTP process.
The default mode is MSTP.
NOTE
● A default MSTP process with the ID 0 is established when a device starts. MSTP
configurations in the system view and interface view belong to this process. The default
working mode of this process is MSTP.
● To add an interface to an MSTP process whose ID is not 0, run the stp process
command and then the stp binding process command.
----End
● The link shared by multiple access rings is called a shared link. Interfaces on
this shared link participate in MSTP calculation in multiple access rings and
MSTP processes.
Procedure
● Adding an interface on an access link to an MSTP process
a. Run system-view
NOTE
In an MSTP process where there are multiple shared links, run the stp enable
command in the MSTP multi-instance view. On an interface that is added to an
MSTP process in link-share mode, run the stp enable command in the interface
view.
d. Run commit
----End
NOTE
On networks that run STP/RSTP/MSTP/VBST, configure an optimal core switch as the root
bridge to ensure stability of the STP Layer 2 network. Otherwise, new access devices may
trigger STP root bridge switching, causing short service interruptions.
Procedure
● Perform the following operations on the device to be used as the root bridge.
a. Run system-view
By default, a switching device does not function as the root bridge. After
the configuration is complete, the priority value of the device is 0 and this
value cannot be changed.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp process process-id
The MSTP process view is displayed.
Step 3 Run stp [ instance instance-id ] priority priority
A priority is set for the switching device in an MSTI.
The default priority value of the switching device is 32768.
If instance is not specified, a priority is set for the switching device in MSTI 0.
NOTE
● To configure a switching device as the primary root bridge, run the stp [ instance
instance-id ] root primary command directly. The priority value of this switching device
is 0.
● To configure a switching device as the secondary root bridge, run the stp [ instance
instance-id ] root secondary command. The priority value of this switching device is
4096.
In an MSTI, a switching device cannot act as the primary root bridge and secondary root
bridge at the same time.
● If the stp [ instance instance-id ] root primary or stp [ instance instance-id ] root
secondary command has been executed to configure the device as the root bridge or
secondary root bridge, to change the device priority, run the undo stp [ instance
instance-id ] root command to disable the root bridge or secondary root bridge function
and run the stp [ instance instance-id ] priority priority command to set a priority.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp pathcost-standard { dot1d-1998 | dot1t | legacy }
A path cost calculation method is configured.
By default, the IEEE 802.1t standard (dot1t) is used to calculate the path cost.
All switching devices on a network must use the same path cost calculation
method.
Step 3 Run interface interface-type interface-number
The Ethernet interface view is displayed.
Step 4 Run stp binding process process-id
The port is bound to an MSTP process.
● When the Huawei calculation method is used, cost ranges from 1 to 200000.
● When the IEEE 802.1d standard method is used, cost ranges from 1 to 65535.
● When the IEEE 802.1t standard method is used, cost ranges from 1 to
200000000.
● If an Eth-Trunk interface is specified as the member interface of an M-LAG
configured in V-STP mode, the path cost of the Eth-Trunk interface is fixed at
2000.
----End
Context
During spanning tree calculation, port priorities in MSTIs determine which ports
are selected as designated ports and which ports are blocked. To specify a port as
blocked, set the port priority to a value greater than the default value.
Procedure
Step 1 Run system-view
Step 4 Run stp [ process process-id ] instance instance-id port priority priority
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp process process-id
The view of a created MSTP process is displayed.
Step 3 Run stp tc-notify process 0
TC notification is enabled in the MSTP process.
After the stp tc-notify process 0 command is run, the current MSTP process
notifies the MSTIs in MSTP process 0 to update MAC entries and ARP entries after
receiving a TC-BPDU. This prevents services from being interrupted.
Step 4 Run commit
The configuration is committed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp process process-id
The view of a created MSTP process is displayed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Run stp process process-id
The MSTP process view is displayed.
NOTE
● RSTP uses a single spanning tree instance on the entire network. As a result,
performance deterioration cannot be prevented when the network scale
grows. Therefore, the network diameter cannot be larger than 7.
● It is recommended that you run the stp bridge-diameter diameter command
to set the network diameter. The switching device then calculates the optimal
Forward Delay timer value, Hello timer value, and Max Age timer value based
on the configured network diameter.
----End
Context
If a device does not receive any BPDUs from the upstream device within the
timeout interval, the device considers the upstream device to have failed and
recalculates the spanning tree.
Sometimes, a device cannot receive the BPDU from the upstream device within
the timeout interval because the upstream device is temporarily busy. In this case,
recalculating the spanning tree will waste network resources. This can be avoided
by increasing the timeout interval. However, only set a long timeout interval if the
network is relatively stable.
Procedure
Step 1 Run system-view
NOTE
The timeout interval is set, specifying how long the upstream device waits for
BPDUs.
----End
Context
There are three timers used in spanning tree calculation: Forward Delay, Hello
Time, and Max Age. These timers can be configured to affect STP convergence.
However, you are not advised to directly change these timers. Instead, it is
recommended that you set the network diameter so that the spanning tree
protocol automatically adjusts these timers in accordance with the network scale.
Devices on a ring network must use the same values of Forward Delay, Hello
Time, and Max Age.
NOTICE
To prevent frequent network flapping, make sure that the Hello Time, Forward
Delay, and Max Age timer values conform to the following formulas:
● 2 x (Forward Delay - 1.0 second) ≥ Max Age
● Max Age ≥ 2 x (Hello Time + 1.0 second)
Procedure
Step 1 Run system-view
NOTE
----End
Root bridge
SwitchA SwitchB
After Eth-Trunk1
configuration Eth-Trunk2
Root bridge
Alternate port
Root port
Designated port
The maximum number of connections affects only the path cost of an Eth-Trunk
interface participating in spanning tree calculation, and does not affect the actual
bandwidth of the Eth-Trunk link. The actual bandwidth for an Eth-Trunk link
depends on the number of active member interfaces in the Eth-Trunk.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Step 3 Run max bandwidth-affected-linknumber link-number
The maximum number of connections affecting the Eth-Trunk bandwidth is set.
By default, the upper threshold for the number of interfaces that determine the
bandwidth of an Eth-Trunk is 8 on the CE5810EI, 64 on CE6880EI and CE5880EI,
and 16 on other models (excluding the CE6870EI and CE6875EI). For the CE6870EI
and CE6875EI, the upper threshold for the number of interfaces that determine
the bandwidth of an Eth-Trunk depends on the maximum number of configured
LAGs. In an SVF system, the maximum number of connections affecting the
bandwidth of an Eth-Trunk is 8.
Step 4 Run commit
The configuration is committed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of the Ethernet interface participating in STP calculation is displayed.
Step 3 Run stp point-to-point { auto | force-false | force-true }
The link type is configured for the interface.
By default, an interface automatically determines whether to connect to a P2P
link. The P2P link supports rapid network convergence.
Step 4 Run commit
The configuration is committed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of the Ethernet interface that participates in spanning tree calculation is
displayed.
Step 3 Run stp transmit-limit packet-number
The maximum number of BPDUs sent by a port in a specified period is set.
By default, the maximum transmission rate of BPDUs on an interface is the value
configured by the stp transmit-limit (system view) command. If the stp
If the same maximum transmission rate of BPDUs needs to be set for each interface on a
device, run the stp transmit-limit (system view) command. The stp transmit-limit
(interface view) command takes precedence over the stp transmit-limit (system view)
command. If the stp transmit-limit (interface view) command is configured on an
interface, the stp transmit-limit (system view) command does not take effect on that
interface.
----End
Procedure
● Changing to the MSTP mode in the interface view
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The view of the Ethernet interface that participates in spanning tree
calculation is displayed.
c. Run stp mcheck
The device is changed to the MSTP mode.
d. Run commit
The configuration is committed.
● Changing to the MSTP mode in the system view
a. Run system-view
The system view is displayed.
b. (Optional) Run stp process process-id
The MSTP process view is displayed.
NOTE
NOTICE
After all ports are configured as edge ports and BPDU filter ports in the system
view, the ports do not send BPDUs or negotiate the STP status with directly
connected ports on the peer device. All ports are in Forwarding state, which may
cause loops on the network and lead to broadcast storms. Exercise caution when
you configure a port as an edge port and BPDU filter port.
After a port is configured as an edge port and BPDU filter port in the interface
view, the port does not process or send BPDUs. The port cannot negotiate the STP
status with the directly connected port on the peer device. Exercise caution when
you configure a port as an edge port and BPDU filter port.
Procedure
● Configuring all ports as edge ports and BPDU filter ports in the system view
a. Run system-view
The system view is displayed.
b. Run stp edged-port default
All ports are configured as edge ports.
By default, all ports are non-edge ports.
c. Run stp bpdu-filter default
All ports are configured as BPDU filter ports.
----End
Context
To communicate with each other on a Layer 2 network running MSTP, switching
devices exchange MST BPDUs, each of which has a field that indicates the number
of remaining hops. The number of remaining hops differs depending on the role of
the switching device, as outlined below:
● The number of remaining hops in a BPDU sent by the root bridge equals the
maximum number of hops.
● The number of remaining hops in a BPDU sent by a non-root bridge equals
the maximum number of hops minus the number of hops from the non-root
bridge to the root bridge.
From the above information, it can be seen that the maximum number of hops of
a spanning tree in an MST region determines the network scale. The stp max-
hops command can be used to set the maximum number of hops in an MST
region so that the network scale of a spanning tree can be controlled.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Run stp process process-id
The MSTP process view is displayed.
NOTE
----End
NOTE
BPDU protection is only valid for the edge port manually configured by the stp edged-port
or stp edged-port default command, and is invalid for the edge port configured by the
automatic detection function.
Procedure
Step 1 Run system-view
NOTE
----End
Follow-up Procedure
After BPDU protection is configured, the edge port that receives BPDUs will enter
the Error-Down state and keeps its attributes. The device records the status of an
interface as Error-Down when it detects that a fault occurs. The interface in Error-
Down state cannot receive or send packets and the interface indicator is off. You
can run the display error-down recovery command to check information about
all interfaces in Error-Down state on the device.
When the interface is in Error-Down state, check the cause. You can use the
following modes to restore the interface status:
● Manual (after interfaces enter the Error-Down state)
When there are few interfaces in Error-Down state, run the shutdown and
undo shutdown commands in the interface view or run the restart command
to restore the interface.
● Auto (before interfaces enter the Error-Down state)
If there are many interfaces in Error-Down state, the manual mode brings in
heavy workload and the configuration of some interfaces may be ignored. To
prevent this problem, run the error-down auto-recovery cause bpdu-
protection interval interval-value command in the system view to enable an
interface in Error-Down state to go Up and set a recovery delay. You can run
the display error-down recovery command to view automatic recovery
information about the interface.
NOTE
This mode is invalid for the interface that has entered the Error-Down state, and is valid
only for the interface that enters the Error-Down state after the error-down auto-recovery
cause bpdu-protection interval interval-value command is run.
Context
If attackers forge TC BPDUs to attack a switching device, the switching device
receives a large number of TC BPDUs within a short period. If MAC address entries
and ARP entries are deleted frequently, the switching device is heavily burdened,
causing potential risks to the network.
Procedure
Step 1 Run system-view
NOTE
NOTE
● There are two TC protection parameters: time period during which the device processes
the maximum number of TC BPDUs and the maximum number of TC BPDUs processed
within the time period. For example, if the time period is set to 10 seconds and the
maximum number of TC BPDUs is set to 5, the device processes only the first five TC
BPDUs within 10 seconds and processes the other TC BPDUs together 10 seconds later.
● The device processes only the maximum number of TC BPDUs configured by the stp tc-
protection threshold command within the time period configured by the stp tc-
protection interval command. Other packets are processed after a delay, so spanning
tree convergence speed may slow down.
----End
NOTE
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of the Ethernet interface that participates in spanning tree calculation is
displayed.
Step 3 (Optional) Run stp binding process process-id
The port is bound to an MSTP process.
NOTE
----End
NOTE
An alternate port is a backup port for a root port. If a switching device has an alternate
port, configure loop protection on both the root port and the alternate port.
Perform the following steps on the root port and alternate port on a switching
device in an MST region.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The Ethernet interface view is displayed.
Step 3 (Optional) Run stp binding process process-id
The port is bound to an MSTP process.
NOTE
----End
Context
Share-link protection is used in scenarios where a switching device is dual-homed
to a network.
When a shared link fails, share-link protection forcibly changes the working mode
of a local switching device to RSTP. This function can be used together with root
protection to avoid network loops.
Procedure
Step 1 Run system-view
----End
Procedure
● Run the display stp [ process process-id ] [ instance instance-id ] [ interface
interface-type interface-number | slot slot-id ] [ brief ] command to view
spanning-tree status and statistics.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The Ethernet interface view is displayed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The Ethernet interface view is displayed.
Step 3 Run stp compliance { auto | dot1s | legacy }
The MSTP protocol packet format is configured on the interface.
The auto mode is used by default.
Step 4 Run commit
The configuration is committed.
----End
Procedure
Step 1 Run system-view
----End
Procedure
● Run the display stp [ process process-id ] [ instance instance-id ] [ interface
interface-type interface-number | slot slot-id ] [ brief ] command to view
spanning-tree status and statistics.
----End
Context
NOTICE
Procedure
● Run the reset stp [ interface interface-type interface-number ] statistics
command to clear spanning-tree statistics.
----End
Procedure
● Run the display stp [ process process-id ] [ instance instance-id ] topology-
change command to view the statistics about MSTP topology changes.
In the case of a non-zero process, the stp process process-id command must
be used to create a process before the display stp [ process process-id ]
[ instance instance-id ] topology-change command is used.
● Run the display stp [ process process-id ] [ instance instance-id ] [ interface
interface-type interface-number | slot slot-id ] tc-bpdu statistics command
to view the statistics about Topology Change/Topology Change Notification
(TC/TCN) packets.
In the case of a non-zero process, the stp process process-id command must
be used to create a process before the display stp [ process process-id ]
[ instance instance-id ] [ interface interface-type interface-number | slot
slot-id ] tc-bpdu statistics command is used.
----End
Network
RG1
10GE1/0/2
SwitchA SwitchB
10GE1/0/2
10GE1/0/1 10GE1/0/1
10GE1/0/3 10GE1/0/3
10GE1/0/2
SwitchC SwitchD
10GE1/0/2
10GE1/0/1 10GE1/0/1
Server1 Server2
VLAN2~10 MSTI1
VLAN11~20 MSTI2
MSTI1:
Root Switch:SwitchA
Blocked port
MSTI2:
Root Switch:SwitchB
Blocked port
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic MSTP functions on the switching device on the ring network.
2. Configure protection functions to protect devices or links. You can configure
root protection on the designated port of the root bridge.
Procedure
Step 1 Configure basic MSTP functions.
1. Configure SwitchA, SwitchB, SwitchC, and SwitchD in the same MST region
named RG1 and create MSTI 1 and MSTI 2.
NOTE
Two switching devices belong to the same MST region when they have the same:
– Name of the MST region
– Mapping between VLANs and MSTIs
A VLAN cannot be mapped to multiple MSTIs. If you map a VLAN that has
already been mapped to an MSTI to another MSTI, the original mapping will be
deleted.
– Revision level of the MST region
# Configure an MST region on SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] stp region-configuration
[~SwitchA-mst-region] region-name RG1
[*SwitchA-mst-region] instance 1 vlan 2 to 10
[*SwitchA-mst-region] instance 2 vlan 11 to 20
[*SwitchA-mst-region] commit
[~SwitchA-mst-region] quit
# Configure an MST region on SwitchB.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] stp region-configuration
[~SwitchB-mst-region] region-name RG1
[*SwitchB-mst-region] instance 1 vlan 2 to 10
[*SwitchB-mst-region] instance 2 vlan 11 to 20
[*SwitchB-mst-region] commit
[~SwitchB-mst-region] quit
# Configure an MST region on SwitchC.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchC
[*HUAWEI] commit
[~SwitchC] stp region-configuration
[~SwitchC-mst-region] region-name RG1
[*SwitchC-mst-region] instance 1 vlan 2 to 10
[*SwitchC-mst-region] instance 2 vlan 11 to 20
[*SwitchC-mst-region] commit
[~SwitchC-mst-region] quit
# Configure an MST region on SwitchD.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchD
[*HUAWEI] commit
[~SwitchD] stp region-configuration
[~SwitchD-mst-region] region-name RG1
[*SwitchD-mst-region] instance 1 vlan 2 to 10
[*SwitchD-mst-region] instance 2 vlan 11 to 20
[*SwitchD-mst-region] commit
[~SwitchD-mst-region] quit
2. In the MST region RG1, configure the root bridge and secondary root bridge
in MSTI 1 and MSTI 2.
3. Set the path costs of the ports to be blocked in MSTI 1 and MSTI 2 to be
greater than the default value.
NOTE
– The path cost values depend on path cost calculation methods. This example uses
the Huawei proprietary calculation method as an example to set the path cost to
20000 for the ports to be blocked. If another path cost calculation method is used,
see stp pathcost-standard.
– All switching devices on a network must use the same path cost calculation
method.
# Configure SwitchA to use Huawei proprietary calculation method to
calculate the path cost.
[~SwitchA] stp pathcost-standard legacy
[*SwitchA] commit
Step 2 Configure root protection on the designated port of the root bridge.
# Enable root protection on 10GE1/0/1 of SwitchA.
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] stp root-protection
[*SwitchA-10GE1/0/1] commit
[~SwitchA-10GE1/0/1] quit
After the preceding configurations are complete and the network topology
becomes stable, perform the following operations to verify the configuration.
NOTE
MSTI 1 and MSTI 2 are used as examples. You do not need to check the interface status in
MSTI 0.
# Run the display stp brief command on SwitchA to view the status and
protection mode on the ports. Output similar to the following is displayed:
[~SwitchA] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 DESI forwarding root 2 disable
0 10GE1/0/2 DESI forwarding none 2 disable
1 10GE1/0/1 DESI forwarding root 2 disable
1 10GE1/0/2 DESI forwarding none 2 disable
2 10GE1/0/1 DESI forwarding root 2 disable
2 10GE1/0/2 ROOT forwarding none 2 disable
In MSTI 1, 10GE1/0/1 and 10GE1/0/2 are designated ports because SwitchA is the
root bridge. In MSTI 2, 10GE1/0/1 on SwitchA is the designated port and
10GE1/0/2 is the root port.
# Run the display stp brief command on SwitchB. Output similar to the following
is displayed:
[~SwitchB] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 DESI forwarding root 2 disable
0 10GE1/0/2 ROOT forwarding none 2 disable
1 10GE1/0/1 DESI forwarding root 2 disable
1 10GE1/0/2 ROOT forwarding none 2 disable
2 10GE1/0/1 DESI forwarding root 2 disable
2 10GE1/0/2 DESI forwarding none 2 disable
In MSTI 2, 10GE1/0/1 and 10GE1/0/2 are designated ports because SwitchB is the
root bridge. In MSTI 1, 10GE1/0/1 on SwitchB is the designated port and
10GE1/0/2 is the root port.
# Run the display stp interface brief command on SwitchC. Output similar to the
following is displayed:
[~SwitchC] display stp interface 10ge 1/0/3 brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/3 ROOT forwarding none 2 disable
1 10GE1/0/3 ROOT forwarding none 2 disable
2 10GE1/0/3 ROOT forwarding none 2 disable
[~SwitchC] display stp interface 10ge 1/0/2 brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/2 DESI forwarding none 2 disable
1 10GE1/0/2 DESI forwarding none 2 disable
2 10GE1/0/2 ALTE discarding none 20000 disable
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 2 to 20
#
stp instance 1 root primary
stp instance 2 root secondary
stp pathcost-standard legacy
#
stp region-configuration
region-name RG1
instance 1 vlan 2 to 10
instance 2 vlan 11 to 20
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 20
stp root-protection
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 20
#
return
● SwitchB configuration file
#
sysname SwitchB
#
vlan batch 2 to 20
#
stp instance 1 root secondary
stp instance 2 root primary
stp pathcost-standard legacy
#
stp region-configuration
region-name RG1
instance 1 vlan 2 to 10
instance 2 vlan 11 to 20
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 20
stp root-protection
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 20
#
return
● SwitchC configuration file
#
sysname SwitchC
#
vlan batch 2 to 20
#
stp pathcost-standard legacy
#
stp region-configuration
region-name RG1
instance 1 vlan 2 to 10
instance 2 vlan 11 to 20
#
interface 10GE1/0/1
port default vlan 2
stp disable
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 20
stp instance 2 cost 20000
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 20
#
return
11 VBST Configuration
This chapter describes how to configure VLAN-based Spanning Tree (VBST). VBST
is a spanning tree protocol developed by Huawei. It constructs a spanning tree in
each VLAN to load balance traffic from different VLANs, improving link use
efficiency.
Definition
VBST, a Huawei spanning tree protocol, constructs a spanning tree in each VLAN
so that traffic from different VLANs is forwarded through different spanning trees.
VBST is equivalent to STP or RSTP running in each VLAN. Spanning trees in
different VLANs are independent of each other.
Purpose
Currently, there are three standard spanning tree protocols: Spanning Tree Protocol
(STP), Rapid Spanning Tree Protocol (RSTP), and Multiple Spanning Tree Protocol
(MSTP). STP and RSTP cannot implement VLAN-based load balancing, because all
the VLANs on a LAN share a spanning tree and packets in all VLANs are
forwarded along this spanning tree. In addition, the blocked link does not carry
any traffic, which wastes bandwidth and may cause a failure to forward packets
from some VLANs. In real-world situations, MSTP is preferred because it is
compatible with STP and RSTP, ensures fast convergence, and provides multiple
paths to load balance traffic.
On enterprise networks, enterprise users need functions that are easy to use and
maintain, whereas the configuration of MSTP multi-instance is complex and has
high requirements for engineers' skills.
To address this issue, Huawei develops VBST. VBST constructs a spanning tree in
each VLAN so that traffic from different VLANs is load balanced along different
spanning trees. In addition, VBST is easy to configure and maintain.
Benefits
VBST brings in the following benefits:
● Eliminates loops.
● Implements link multiplexing and load balancing, and therefore improves link
use efficiency.
● Reduces configuration and maintenance costs.
Spannin Difference
g Tree
Similarity Convergen Traffic Usage Complex
Protoco
l ce Speed Forwarding Scenario ity
Figure 11-1 Comparisons between the formats of the STP/RSTP BPDU and
VBST BPDU
6 bytes 6 bytes 2 bytes 38-1492 bytes 4 bytes
STP/RSTP BPDU
encapsulation DMAC SMAC Length LLC Data CRC
format
The DMAC identifies the destination MAC address of packets. The DMAC in a
VBST BPDU is 0100-0CCC-CCCD; the Data field in a standard RSTP/STP BPDU
is used as the Data field in a VBST BPDU. By default, the Data field in a
standard RSTP BPDU is used as the Data field in a VBST BPDU.
VBST implements VLAN-based spanning tree calculation, topology
convergence, and interworking with spanning tree protocols of other vendors.
HostC HostA
(VLAN3) VLAN3 VLAN2 (VLAN2)
VLAN2
SwitchB SwitchE
SwitchC SwitchF
SwitchA SwitchD
VLAN3 VLAN 2, 3 VLAN2
HostC HostA
(VLAN3) VLAN3 VLAN2 (VLAN2)
VLAN2
SwitchB SwitchE
SwitchC SwitchF
In Figure 11-2:
● Through topology calculation, STP/RSTP generates a spanning tree with the
root bridge as SwitchF. The links between SwitchB and SwitchE and between
SwitchA and SwitchD are blocked. HostA and HostB belong to VLAN2. The
link between SwitchB and SwitchE does not permit packets of VLAN2 to pass
through because the link between SwitchB and SwitchE is blocked. Therefore,
HostA fails to communicate with HostB.
● Through topology calculation, VBST generates spanning trees VLAN2 and
VLAN3 with root bridges as SwitchD and SwitchF respectively. Traffic in
VLAN2 and VLAN3 is forwarded through their respective spanning trees so
VLAN1, 10
VBST VBST
Trunk
SwitchC SwitchD
Root bridge
Unblocked link
Blocked link
Blocked port
An STP/RSTP-enabled device can only send and receive STP/RSTP BPDUs, and
transparently transmit VBST BPDUs, so a spanning tree is formed in VLAN1 as
defined by STP/RSTP.
Assume that the congestion point of the spanning tree in VLAN1 is on
SwitchD. Because VBST runs on SwitchD, so the congestion point exists in
VLAN1. SwitchD can still receive and forward VBST BPDUs in VLAN10. Loops
occur in VLAN10, so spanning tree calculation in VLAN10 is triggered. SwitchA
and SwitchB transparently transmit VBST BPDUs in VLAN10, so only four
interfaces on SwitchC and SwitchD participate in spanning tree calculation in
VLAN10. Then the spanning trees in VLAN1 and VLAN10 are formed, as
shown in Figure 11-3.
Assume that the blocking point of the spanning tree in VLAN1 is on SwitchB.
STP/RSTP runs on SwitchB, so the blocking port exists on SwitchB. SwitchB
cannot forward VBST BPDUs from VLAN10 and no loop occurs in VLAN10, so
spanning tree calculation in VLAN10 is not triggered. VBST BPDUs from
VLAN10 can be forwarded along the spanning tree in VLAN1, that is, VLAN10
and VLAN1 share the spanning tree, as shown in Figure 11-3.
● On an access interface, a VBST-enabled device uses standard STP or RSTP
BPDUs to exchange with the remote end according to the VLAN that the
access interface belongs to. Topology calculation is performed as defined by
STP/RSTP. Because STP/RSTP does not differentiate VLANs, a spanning tree
shared by VLANs is formed.
Core Network
SwitchA SwitchB
Aggregation
VLAN 10, 20, 30 switch
As shown in Figure 11-4, SwitchC and SwitchD are access switches; SwitchA and
SwitchB are aggregation switches. SwitchC and SwitchD are dual-homed to
SwitchA and SwitchB. To eliminate loops and load balance traffic from different
VLANs, deploy VBST on SwitchA, SwitchB, SwitchC, and SwitchD. Configure
SwitchA as the root bridge of VLAN 10 and VLAN 20 and SwitchB as the root
bridge of VLAN 30.
Loops are eliminated based on VLANs. Figure 11-4 shows the formed spanning
trees and forwarding paths. In Figure 11-4, traffic from VLAN 10, VLAN 20, and
VLAN 30 is forwarded through their respective spanning trees. In this manner,
traffic from VLAN 10, VLAN 20, and VLAN 30 is load balanced on paths SwitchC<-
>SwitchA, SwitchD<->SwitchA, and SwitchD<->SwitchB.
Licensing Requirements
VBST is a basic software function of the switch. The license for basic software
functions has been loaded and activated before delivery. You do not need to
manually activate it.
Version Requirements
CE8860EI V100R006C00
CE8861EI/CE8868EI V200R005C10
CE8850-32CQ-EI V200R002C50
CE8850-64CQ-EI V200R005C00
CE7850EI V100R006C00
CE7855EI V200R001C00
CE6810EI V100R006C00
CE6810LI V100R006C00
CE6850EI V100R006C00
CE6850HI V100R006C00
CE6855HI V200R001C00
CE6856HI V200R002C50
CE6857EI V200R005C10
CE6860EI V200R002C50
CE6865EI V200R005C00
CE6863/CE6881/CE6820 V200R005C20
CE6881K V200R019C10
CE6881E V200R019C10
CE6863K V200R019C10
CE6870-24S6CQ-EI V200R001C00
CE6870-48S6CQ-EI V200R001C00
CE6870-48T6CQ-EI V200R002C50
CE6875-48S4CQ-EI V200R003C00
CE5810EI V100R006C00
CE5850EI V100R006C00
CE5850HI V100R006C00
CE5855EI V100R006C00
NOTE
For details about the mapping between software versions and switch models, see the
Hardware Query Tool.
Feature Limitations
● Table 11-4 describes the specifications of VBST.
Item Specification
● If 1:N (where N>1) mapping between MSTIs and VLANs has been configured
on the switch, you must delete the mapping before changing the STP working
mode to VBST.
● Instance 4094 is reserved in VBST mode to prevent temporary loops. You
cannot use the instance instance-id vlan vlan-id command to configure the
mapping between instance 4094 and a VLAN. Before switching the VBST
mode, delete the configuration of instance 4094 or use an available instance
to replace instance 4094.
● If the device has been configured as the root bridge or secondary root bridge,
run the undo stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9>
root command to disable the root bridge or secondary root bridge function
and run the stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9>
priority priority command to change the device priority.
● To prevent frequent network flapping, ensure that the values of Hello time,
Forward Delay, and Max Age conform to the following formulas:
– 2 x (Forward Delay -1.0 second) ≥ Max Age
– Max Age >= 2 × (Hello Time + 1.0 second)
● After all ports are configured as edge ports and BPDU filter ports in the
system view, no ports on the switch send BPDUs or negotiate the VBST status
with directly connected ports on the remote device. All ports are in forwarding
state. This may cause loops on the network, leading to broadcast storms.
Exercise caution when you configure a port as an edge port and BPDU filter
port.
● After a port is configured as an edge port and BPDU filter port in the
interface view, the port does not process or send BPDUs. The port cannot
negotiate the VBST status with the directly connected port on the peer device.
The interface directly connected to a terminal needs to be configured as the
edge port and BPDU filter port.
● Root protection takes effect only on designated ports.
● An alternate port is the backup of the root port. If a switch has an alternate
port, you need to configure loop protection on both the root port and
alternate port.
● Loop protection and root protection cannot be configured on the same
interface simultaneously.
● VBST and VPLS cannot be configured together on a switch.
Pre-configuration Tasks
Before configuring basic VBST functions, complete the following task:
● Connecting ports and setting the physical parameters of each interface to
make the physical layer in Up state (see Basic Configuration for Interfaces
and Ethernet Interface Configuration in CloudEngine 8800, 7800, 6800, and
5800 Series Switches Configuration Guide - Interface Management)
NOTE
On networks that run STP/RSTP/MSTP/VBST, configure an optimal core switch as the root
bridge to ensure stability of the STP Layer 2 network. Otherwise, new access devices may
trigger STP root bridge switching, causing short service interruptions.
It is recommended that you specify the root bridge and secondary root bridge when
configuring VBST.
Procedure
● Perform the following operations on the device you want to use as the root
bridge.
a. Run system-view
By default, a switching device does not function as the root bridge. After
you run this command, the priority value of the device is set to 0 and
cannot be changed.
c. Run commit
----End
Context
The device priority is used in spanning tree calculation, and determines whether
the device can be configured as a root bridge of a spanning tree. A smaller value
indicates a higher priority.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> priority priority
The priority of the switch in a specified VLAN is set.
By default, the priority of the device is 32768.
NOTE
If the device has been configured as the root bridge or secondary root bridge, to change the
device priority, run the undo stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9>
root command to disable the root bridge or secondary root bridge function and run the stp
vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> priority priority command to set
the device priority.
----End
Context
A path cost is port-specific and is used by VBST to select a link. A port in different
VLANs may have different path costs on a network running VBST. Traffic from
different VLANs is forwarded through different physical links by setting a proper
path cost enable, therefore implementing VLAN-based load balancing.
The path cost value range is determined by the calculation method. The following
calculation methods are used:
● dot1d-1998: IEEE 802.1d standard is used to calculate the path cost.
● dot1t: IEEE 802.1T standard is used to calculate the path cost.
● legacy: Huawei calculation method is used to calculate the path cost.
After the calculation method is determined, the path cost of a port can be set.
Generally, a higher path cost indicates higher probability of a port to be blocked. If
the link rate of a port is small, you are advised to set a large path cost so that the
port is selected as the blocking port during spanning tree calculation and its link is
blocked.
The default path cost varies according to the interface rate. Huawei calculation
method is used as an example. Table 11-5 shows the mapping between link rates
and path costs.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp pathcost-standard { dot1d-1998 | dot1t | legacy }
A path cost calculation method is configured.
By default, IEEE 802.1T standard is used to calculate the path cost.
All switches on the same network must use the same path cost calculation
method.
Step 3 Run interface interface-type interface-number
The view of the Ethernet interface that participates in spanning tree calculation is
displayed.
Step 4 Run stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> cost cost
The path cost of the port in each VLAN is set.
● If Huawei calculation method is used, the path cost ranges from 1 to 200000.
● If IEEE 802.1D standard is used, the path cost ranges from 1 to 65535.
● If IEEE 802.1T standard is used, the path cost ranges from 1 to 200000000.
Step 5 Run commit
The configuration is committed.
----End
Context
In VBST spanning tree calculation, the port path cost, bridge ID of the sending
switch, and port priority determine whether the port can be selected as the
designated port. A smaller priority value indicates higher probability of becoming
the designated port, and a larger priority value indicates higher probability of
becoming the blocking port.
Procedure
Step 1 Run system-view
The view of the Ethernet interface that participates in spanning tree calculation is
displayed.
Step 3 Run stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> port priority
priority
----End
Context
Based on the mappings between MSTIs and VLANs of MSTP, VBST maps each
MSTI to a VLAN to establish 1:1 mapping. The 1:1 mapping between MSTIs and
VLANs is used only by the switch to determine the VBST forwarding status. This
does not mean that VBST supports multi-instance.
NOTE
When the number of VBST instances exceeds the capability supported by the device,
the VBST function does not take effect in a new VLAN by default, and an alarm is
generated. To enable VBST for the VLAN, run the undo vlan command to release
resources used by other VLANs. When the number of VLANs that support VBST
decreases to less than 95% of the upper limit, the alarm is cleared and the system
automatically reallocates resources.
The number of VBST instances supported by a device is calculated according to the
following formula: Number of VBST instances supported by a device = Number of
static instances + Number of dynamic instances
● The CE6875EI, CE6870EI, CE6810EI, and CE5810EI support a maximum of 240 VBST
instances, among which a maximum of 63 static instances can be configured.
● Other models support a maximum of 500 VBST instances, among which a
maximum of 63 static instances can be configured.
The following steps are performed to manually configure the mapping between
MSTIs and VLANs.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp region-configuration
The MST region view is displayed.
Step 3 Run instance instance-id vlan vlan-id
1:1 mapping between MSTIs and VLANs is configured.
By default, all VLANs in an MST region are mapped to MSTI 0.
NOTE
● After this step is performed, the dynamic mapping between MSTIs and VLANs cannot be
canceled even if VLANs are deleted or STP is disabled globally.
● The 1:1 mapping between instances and VLANs is configured in the system. When the
mapping between multiple VLANs and static instances is configured at one time, the
system may display the message "Error: Can not map more than one VLAN to an
instance." This is because the mapping between multiple VLANs and instances is
submitted at one time. Actually, the mapping between multiple VLANs and instances
should be submitted one by one. In this case, resource allocation remains unchanged,
and multiple VLANs are mapped to one instance. You are advised to run the display stp
vlan instance command to check the mapping between VLANs and instances first.
● Instance 4094 are reserved in VBST mode to prevent temporary loops. You cannot use
the instance instance-id vlan vlan-id command to configure the mapping between
instance 4094 and a VLAN. Before switching the VBST mode, delete the configuration of
instance 4094 or use an available instance to replace instance 4094.
● When excess VLANs are configured and static instances are deleted, the system may
automatically allocate resources. In this case, the VLANs to which dynamic instances are
not allocated preferentially occupy idle instances. If the rollback configuration { to
{ commit-id commit-id | label label | file file-name } | last number-of-commits }
command is executed to perform rollback to reallocate resources. The configuration
rollback may fail because resource allocation has been complete. Before configuration
rollback, run the display configuration commit changes command to check the
configuration change in the configuration rollback point to determine whether the
configuration can be rolled back to the expected historical state. If some configurations
fail to be rolled back, run the display configuration rollback result command to check
these configurations and the messages generated during configuration execution. Then
manually restore the configuration.
----End
Context
The VBST configuration takes effect only when VBST is enabled.
NOTICE
When VBST is enabled on a ring network, VBST immediately starts spanning tree
calculation. Parameters such as the switch priority and port priority affect
spanning tree calculation, and change of these parameters may cause network
flapping. To ensure fast and stable spanning tree calculation, perform basic
configurations on the switch and ports before enabling VBST.
The PV quantity is the number of VBST-enabled interfaces multiplied by the
number of VLANs. If the PV quantity exceeds the specifications, the CPU usage
may exceed the threshold. As a result, the switch cannot process tasks in a timely
manner, protocol calculation is affected, and even the device cannot be managed
by the NMS. The PV quantity supported by the device is as follows:
● The CPU usage of VBST is in direct proportion to the PV quantity.
● The device supports a maximum of 16000 PV values. The CE5810EI and
CE5855EI support a maximum of 4000 PV values.
● The number of PV values on a switch is the sum of PV values of cards installed
on the switch.
● The number of PV values of a stack is the sum of PV values of member
switches.
Procedure
Step 1 Run system-view
NOTE
Step 4 Run undo stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> disable
NOTE
VBST cannot be enabled in the control VLAN used by ERPS or Smart Link.
If VLAN mapping, MUX VLAN, or VLAN stacking is configured on an interface
corresponding to the VLAN, VBST negotiation for this VLAN will fail.
----End
Procedure
● Run the display stp vlan [ vlan-id ] information [ brief | global ] command
to check the status of, statistics on, and global brief information about the
spanning tree.
● Run the display stp vlan [ vlan-id ] bridge { root | local } command to check
the spanning tree status of the local bridge and root bridge.
● Run the display stp vlan instance command to check the mapping between
instances and VLANs.
----End
Background
All steps in this configuration task are optional. You can perform the steps as
needed.
Pre-configuration Tasks
Before configuring VBST parameters that affect VBST convergence, complete the
following task:
● Configuring Basic VBST Functions
Context
Any two terminals on a switching network are connected through a specific path
along which multiple devices are located. The network diameter is the maximum
number of devices between any two terminals. A larger network diameter
indicates a larger network scale.
An improper network diameter may cause slow network convergence and affect
communication. Setting a proper network diameter according to the network scale
helps speed up network convergence.
The switch calculates the Forward Delay, Hello Time, and Max-Age based on the
configured network diameter. It is recommended that you set the network
diameter to configure timers.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> bridge-
diameter diameter
A network diameter is set.
By default, the network diameter is 7.
● Rapid Spanning Tree Protocol (RSTP) uses a single spanning tree instance on
the entire network. As a result, performance deteriorates when the network
scale grows. Therefore, the network diameter cannot be larger than 7.
● It is recommended that all devices on a ring network use the same network
diameter.
Step 3 Run commit
The configuration is committed.
----End
Context
VBST uses the following parameters in spanning tree calculation:
● Forward Delay: determines the interval for port status transition. On a
network where a spanning tree algorithm is used, when the network topology
changes, new BPDUs are transmitted throughout the network after a given
period of time. During the period, the port that should enter the blocking
state may be not blocked and the originally blocked port may be unblocked,
causing temporary loops. To address this problem, set the Forward Delay
during which all ports are blocked temporarily.
● Hello Time: is the interval at which Hello packets are sent. The switch sends
BPDUs to neighboring devices at an interval of the Hello Time to check
whether links are faulty. If the switch does not receive any BPDU at an
interval of Hello Time, the switch recalculates the spanning tree due to BPDU
timeout.
● Max Age: determines whether BPDUs expire. The switch determines whether
the received BPDU expires based on this value. If the received BPDU expires,
the spanning tree needs to be recalculated.
Devices on a ring network must use the same values of Forward Delay, Hello
Time, and Max Age.
Generally, you are not advised to adjust values of the three parameters. This is
because the three parameters are relevant to the network scale. It is
recommended that the network diameter be adjusted so that the spanning tree
protocol automatically adjusts the three parameters. When the default network
diameter is used, the default values of the three parameters are used.
NOTICE
To prevent frequent network flapping, ensure that the values of Hello Time,
Forward Delay, and Max Age conform to the following formulas:
● 2 x (Forward Delay - 1.0 second) >= Max Age
● Max Age >= 2 x (Hello Time + 1.0 second)
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Set values of Hello Time, Forward Delay, and Max Age.
● Run stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> timer
forward-delay forward-delay
The value of Forward Delay is set.
By default, the value of Forward Delay is 1500 centiseconds.
● Run stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> timer
hello hello-time
The value of Hello Time is set.
By default, the value of Hello Time is 200 centiseconds.
● Run stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> timer
max-age max-age
The value of Max Age is set.
By default, the value of Max Age is 2000 centiseconds.
Step 3 Run commit
The configuration is committed.
----End
Context
The timeout interval of the switch is calculated through the following formula:
● Timeout interval = Hello Time x 3 x Timer factor
On a network running VBST, when the network topology becomes stable, the non-
root-bridge switch forwards BPDUs sent by the root bridge to neighboring
switches at an interval of Hello Time to check whether links are faulty. If the
switch does not receive any BPDU from the upstream device within the timeout
interval, the switch considers that the upstream device fails and recalculates the
spanning tree.
Sometimes, the switch may not receive BPDUs in a long time from the upstream
device because the upstream device is very busy. In this case, the device should not
recalculate its spanning tree. Therefore, you can set a long timeout interval for the
device on a stable network to reduce waste of network resources.
Procedure
Step 1 Run system-view
The timeout interval for the switch to wait for BPDUs from the upstream device is
set.
----End
Context
Implementing fast convergence on a P2P link is easy. If the two ports connected to
a P2P link are root or designated ports, the ports can transit to the forwarding
state quickly by sending Proposal and Agreement packets. This reduces the
forwarding delay.
Procedure
Step 1 Run system-view
----End
Context
The maximum transmission rate of a port indicates the maximum number of
BPDUs sent per second. A larger value of the maximum transmission rate of a port
indicates more BPDUs sent at an interval of Hello Time and therefore more system
resources are occupied.
Setting the proper value of this parameter prevents excess bandwidth usage when
route flapping occurs. If network flapping occurs frequently, and the switch needs
to detect topology change in a timely manner and has sufficient bandwidth
resources, set a large value for this parameter.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of the interface that participates in spanning tree calculation is
displayed.
Step 3 Run stp transmit-limit packet-number
The maximum number of BPDUs that the port can send at an interval of Hello
Time is set.
By default, a port sends a maximum of 6 BPDUs per second.
NOTE
If the maximum number of BPDUs needs to be set on all ports of the switch, run the stp
transmit-limit (system view) command.
----End
Context
If a designated port is located at the edge of a network and is directly connected
to terminals, this port is called edge port. The switch does not learn whether a
port is directly connected to terminals, the port needs to be manually configured
as an edge port.
An edge port does not receive or process configuration BPDUs, or participate in
VBST calculation. It can transit from Disable to Forwarding without any delay to
implement fast convergence.
After a designated port is configured as an edge port, the port can still send
BPDUs. Then BPDUs are sent to other networks, causing flapping on other
networks. You can configure a port as an edge port and BPDU filter port so that
the port does not process or send BPDUs.
NOTICE
● After all ports are configured as edge ports and BPDU filter ports in the system
view, none of ports on the switch send BPDUs or negotiate the VBST status
with directly connected ports on the peer device. All ports are in forwarding
state. This may cause loops on the network, leading to broadcast storms.
Exercise caution when you configure a port as an edge port and BPDU filter
port.
● After a port is configured as an edge port and BPDU filter port in the interface
view, the port does not process or send BPDUs. The port cannot negotiate the
VBST status with the directly connected port on the peer device. Exercise
caution when you configure a port as an edge port and BPDU filter port.
Procedure
● Configuring all ports as edge ports and BPDU filter ports in the system view
a. Run system-view
The system view is displayed.
b. Run stp edged-port default
All ports are configured as edge ports.
By default, a port is a non-edge port.
c. Run stp bpdu-filter default
All ports are configured as BPDU filter ports.
By default, a port is a non-BPDU-filter port.
d. Run commit
The configuration is committed.
● Configuring a port as an edge port and BPDU filter port in the interface view
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The view of the Ethernet interface that participates in spanning tree
calculation is displayed.
c. Run stp edged-port enable
The port is configured as an edge port.
By default, a port is a non-edge port.
d. Run stp bpdu-filter enable
The port is configured as a BPDU filter port.
By default, a port is a non-BPDU-filter port.
e. Run commit
The configuration is committed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp max-hops hop
The maximum number of hops of VBST is set.
----End
Procedure
● Run the display stp vlan [ vlan-id ] information [ brief | global ] command
to check the status of, statistics on, and global brief information about the
spanning tree.
● Run the display stp vlan [ vlan-id ] bridge { root | local } command to check
the spanning tree status of the local bridge and root bridge.
● Run the display stp vlan instance command to check the mapping between
instances and VLANs.
----End
Pre-configuration Tasks
Before configuring protection functions of VBST, complete the following task:
● Configuring Basic VBST Functions
● (Optional) Perform the operation of Configuring an Edge Port before
configuring BPDU protection.
NOTE
Perform the following procedure on all switching devices that have edge ports.
BPDU protection is only valid for the edge port manually configured by the stp edged-port
or stp edged-port default command, and is invalid for the edge port configured by the
automatic detection function.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp bpdu-protection
BPDU protection is enabled on the switching device.
By default, BPDU protection is disabled on a switching device.
Step 3 Run commit
The configuration is committed.
----End
Follow-up Procedure
After BPDU protection is configured, the edge port that receives BPDUs will enter
the Error-Down state and keeps its attributes. The device records the status of an
interface as Error-Down when it detects that a fault occurs. The interface in Error-
Down state cannot receive or send packets and the interface indicator is off. You
can run the display error-down recovery command to check information about
all interfaces in Error-Down state on the device.
When the interface is in Error-Down state, check the cause. You can use the
following modes to restore the interface status:
● Manual (after the interface enters the Error-Down state)
When there are few interfaces in Error-Down state, you can run the
shutdown and undo shutdown commands in the interface view or run the
restart command to restore the interface.
● Auto (before the interface enters the Error-Down state)
If there are many interfaces in Error-Down state, the manual mode brings in
heavy workload and the configuration of some interfaces may be ignored. To
prevent this problem, run the error-down auto-recovery cause bpdu-
protection interval interval-value command in the system view to enable an
interface in error-down state to go Up and set a recovery delay. You can run
the display error-down recovery command to view automatic recovery
information about the interface.
NOTE
This mode is invalid for the interface that has entered the Error-Down state, and is only
valid for the interface that enters the Error-Down state after the error-down auto-
recovery cause bpdu-protection interval interval-value command is used.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp tc-protection
TC protection is enabled for the switching device.
By default, TC protection is disabled on the switching device.
Step 3 Run either or both of the following commands to configure TC protection
parameters.
● To set the time period during which the device processes the maximum
number of TC BPDUs, run stp tc-protection interval interval-value command.
By default, the time period is the Hello Time.
● To set the maximum number of TC BPDUs that the device processes within a
specified period, run stp tc-protection threshold threshold.
By default, a device processes one TC BPDU within a specified period.
NOTE
● There are two TC protection parameters: time period during which the device processes
the maximum number of TC BPDUs and the maximum number of TC BPDUs processed
within the time period. For example, if the time period is set to 10 seconds and the
maximum number of TC BPDUs is set to 5, the device processes only the first five TC
BPDUs within 10 seconds and processes the other TC BPDUs together 10 seconds later.
● The device processes only the maximum number of TC BPDUs configured by the stp tc-
protection threshold command within the time period configured by the stp tc-
protection interval command. Other packets are processed after a delay, so spanning
tree convergence speed may slow down.
----End
Context
Due to incorrect configurations or malicious attacks on a network, a valid root
bridge may receive BPDUs with a higher priority. Consequently, the valid root
bridge is no longer able to serve as the root bridge and the network topology is
NOTE
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The Ethernet interface view is displayed.
Step 3 Run stp root-protection
Root protection is enabled on the switch.
By default, root protection is disabled on a switch port.
Step 4 Run commit
The configuration is committed.
----End
Context
On a network running VBST, the switch maintains the root port status and status
of blocked ports by receiving BPDUs from an upstream switch. If the switch cannot
receive any BPDU from the upstream switch because of link congestion or
unidirectional link failures, the switch selects a new root port. The original root
port becomes a designated port and the original blocked ports change to the
Forwarding state. This switching may cause network loops, which can be
mitigated by configuring loop protection.
If the root port or alternate port does not receive BPDUs from the upstream device
for a long time, the switch enabled with loop protection sends a notification. If the
root port is used, the root port enters the Discarding state and becomes the
designated port. If the alternate port is used, the alternate port keeps blocked and
becomes the designated port. In this case, loops will not occur. After the link is not
congested or unidirectional link failures are rectified, the port receives BPDUs for
negotiation and restores its original role and status.
NOTE
An alternate port is the backup of the root port. If a switch has an alternate port, you need
to configure loop protection on both the root port and alternate port.
Perform the following operations on the root port and alternate port of the switch.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of the root port or alternate port is displayed.
Step 3 Run stp loop-protection
Loop protection is enabled.
By default, loop protection is disabled on a switch port.
Step 4 Run commit
The configuration is committed.
----End
Procedure
● Run the display stp vlan [ vlan-id ] information [ brief | global ] command
to check the status of, statistics on, and global brief information about the
spanning tree.
● Run the display stp vlan [ vlan-id ] bridge { root | local } command to check
the spanning tree status of the local bridge and root bridge.
● Run the display stp vlan instance command to check the mapping between
instances and VLANs.
----End
Context
To implement interworking between a Huawei datacom device and a non-Huawei
device, configure the fast transition mode according to the Proposal/Agreement
mechanism of the non-Huawei device. The switch supports the following modes
on the Proposal/Agreement mechanism:
● Enhanced mode: The port participates in calculation of the root port when
calculating the synchronization flag bit.
a. An upstream device sends a Proposal message to a downstream device,
requesting fast transition. After receiving the message, the downstream
device sets the port connected to the upstream device as a root port and
blocks all non-edge ports.
Pre-configuration Tasks
Before setting parameters for interworking between a Huawei datacom device and
a non-Huawei device, complete the following task:
Procedure
Step 1 Run system-view
----End
Context
You can view the VBST running information and statistics on VBST BPDUs. If the
number of topology change times increases, network flapping occurs.
Procedure
● Run the display stp vlan [ vlan-id ] information [ brief | global ] command
to check the status of, statistics on, and global brief information about the
spanning tree.
● Run the display stp vlan [ vlan-id ] bridge { root | local } command to check
the spanning tree status of the local bridge and root bridge.
● Run the display stp vlan instance command to check the mapping between
instances and VLANs.
● Run the display stp vlan [ vlan-id ] bpdu statistics command to check
statistics on BPDUs on the VBST-enabled port.
● Run the display stp vlan [ vlan-id ] tc-bpdu statistics command to check
statistics on TC or TCN BPDUs on the VBST-enabled port.
● Run the display stp vlan [ vlan-id ] topology-change command to check
VBST topology change statistics.
----End
Context
Before recollecting statistics on VBST BPDUs in a certain period, clear existing
statistics on VBST BPDUs.
NOTICE
Cleared statistics on VBST BPDUs cannot be restored. Exercise caution when you
run the commands.
Procedure
● Run the reset stp vlan [ vlan-id | all ] tc-bpdu statistics command in the
user view to clear statistics on VBST TC BPDUs.
● Run the reset stp vlan [ vlan-id | all ] bpdu statistics command in the user
view to clear statistics on VBST BPDUs.
----End
Networking Requirements
As shown in Figure 11-5, SwitchC and SwitchD (access switches) are dual-homed
to SwitchA and SwitchB (aggregation switches) respectively. SwitchC transmits
traffic from VLAN 10 and VLAN 20, and SwitchD transmits traffic from VLAN 20
and VLAN 30. A ring network is formed between the access layer and aggregation
layer. The enterprise requires that service traffic in each VLAN be correctly
forwarded and service traffic from different VLANs be load balanced to improve
link use efficiency.
Core Network
SwitchA SwitchB
10GE1/0/1 10GE1/0/1
VLAN 10, 20, 30
10GE1/0/3 10GE1/0/2 10GE1/0/2 10GE1/0/3
Root bridge
Unblocked link
Blocked link
Blocked port
Configuration Roadmap
VBST can be used to eliminate loops between the access layer and aggregation
layer and ensures that service traffic in each VLAN is correctly forwarded. In
addition, traffic from different VLANs can be load balanced. The configuration
roadmap is as follows:
1. Configure Layer 2 forwarding on access and aggregation switches.
2. Configure basic VBST functions on SwitchA, SwitchB, SwitchC, and SwitchD.
Perform the following operations so that a spanning tree shown in Figure
11-5 is formed through calculation:
– Configure SwitchA and SwitchB as the root bridge and secondary root
bridge of VLAN 10 respectively, SwitchA and SwitchB as the root bridge
Procedure
Step 1 Configure Layer 2 forwarding on switches of the ring network.
● Create VLAN 10, VLAN 20, and VLAN 30 on SwitchA, SwitchB, SwitchC, and
SwitchD.
# Create VLAN 10, VLAN 20, and VLAN 30 on SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10 20 30
[*SwitchA] commit
# Create VLAN 10, VLAN 20, and VLAN 30 on SwitchB.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] vlan batch 10 20 30
[*SwitchB] commit
# Create VLAN 10 and VLAN 20 on SwitchC.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchC
[*HUAWEI] commit
[~SwitchC] vlan batch 10 20
[*SwitchC] commit
# Create VLAN 20 and VLAN 30 on SwitchD.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchD
[*HUAWEI] commit
[~SwitchD] vlan batch 20 30
[*SwitchD] commit
● Add ports connected to the ring to VLANs.
# Add 10GE1/0/1 on SwitchA to VLAN 10, VLAN 20, and VLAN 30.
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10 20 30
[~SwitchA-10GE1/0/1] undo port trunk allow-pass vlan 1
[*SwitchA-10GE1/0/1] quit
[*SwitchA] commit
# Add 10GE1/0/2 on SwitchA to VLAN 20 and VLAN 30.
[~SwitchA] interface 10ge 1/0/2
[~SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20 30
[*SwitchA-10GE1/0/2] undo port trunk allow-pass vlan 1
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit
# Add 10GE1/0/3 on SwitchA to VLAN 10 and VLAN 20.
[~SwitchA] interface 10ge 1/0/3
[~SwitchA-10GE1/0/3] port link-type trunk
[*SwitchD-10GE1/0/3] quit
[*SwitchD] commit
– Configure the root bridge and secondary root bridge in VLAN 20.
# Configure SwitchA as the root bridge in VLAN 20.
[~SwitchA] stp vlan 20 root primary
[*SwitchA] commit
– Configure the root bridge and secondary root bridge in VLAN 30.
# Configure SwitchB as the root bridge in VLAN 30.
[~SwitchB] stp vlan 30 root primary
[*SwitchB] commit
3. Configure the path cost for a port in each VLAN so that the port can be
blocked.
NOTE
– The path cost range depends on the algorithm. IEEE 802.1t standard is used as an
example. Set the path costs of the ports to be blocked to 2000000.
– All switches on the same network must use the same path cost calculation
method.
# Set the path cost of GE1/0/2 on SwitchC to 2000000 in VLAN 10 and VLAN
20.
[~SwitchC] interface 10ge 1/0/2
[~SwitchC-10GE1/0/2] stp vlan 10 cost 2000000
[*SwitchC-10GE1/0/2] stp vlan 20 cost 2000000
[*SwitchC-10GE1/0/2] quit
[*SwitchC] commit
# Set the path cost of GE1/0/2 on SwitchD to 2000000 in VLAN 20 and VLAN
30.
[~SwitchD] interface 10ge 1/0/2
[~SwitchD-10GE1/0/2] stp vlan 20 cost 2000000
[*SwitchD-10GE1/0/2] stp vlan 30 cost 2000000
[*SwitchD-10GE1/0/2] quit
[*SwitchD] commit
4. Enable VBST to eliminate loops.
– Enable VBST globally.
By default, VBST is enabled globally.
Run the display stp vlan vlan-id information command to check the
VBST status. If VBST is disabled, run the undo stp vlan vlan-id disable
command in the system view to enable VBST globally.
– Enable VBST in a VLAN.
By default, VBST is enabled in a VLAN.
Run the display stp vlan vlan-id information command to check the
VBST status. If the message "The protocol is disabled" is displayed, VBST
is disabled in the VLAN. Run the undo stp vlan vlan-id disable command
in the system view to enable VBST in the VLAN.
– Enable VBST on a port.
By default, VBST is enabled on a Layer 2 Ethernet port.
Run the display stp interface interface-type interface-number command
to check the VBST status on a port. If the message "The protocol is
disabled" is displayed, VBST is disabled on the port. Run the undo stp
vlan disable command in the interface view to enable VBST on the port.
Step 3 Verify the configuration.
After the configuration is complete and the network topology becomes stable,
perform the following operations to verify the configuration.
# Run the display stp vlan bridge local command on SwitchA to check the STP
working mode.
[~SwitchA] display stp vlan bridge local
------------------------------------------------------------------
VLANID BridgeID HelloTime MaxAge ForwardDelay Protocol
------------------------------------------------------------------
10 32869.ac94-8400-df01 2 20 15 VBST
20 32970.ac94-8400-df01 2 20 15 VBST
30 33071.ac94-8400-df01 2 20 15 VBST
------------------------------------------------------------------
Bridge ID : 10.ac94-8400-df01
Config Times : Hello 2s MaxAge 20s FwDly 15s MaxHop
20
Active Times : Hello 2s MaxAge 20s FwDly 15s MaxHop
20
Root ID/RPC : 10.ac94-8400-df01 / 0
RootPortId(InterfaceName) : 0.0 (This bridge is the root)
Root Type : Primary
Port information:
Port ID : 5
Interface : 10GE1/0/1
STP State : Forwarding
Port Role : Designated Port
Port Priority : 128
Path Cost Standard : Dot1T
Port Cost(Config/Active) : 0 / 20000
Desg. Bridge/Port : 10.ac94-8400-df01 / 128.5
Port Edged(Config/Active) : Default / Disabled
Point-to-point(Config/Active) : Auto / True
The preceding information shows that SwitchA is selected as the root bridge in
VLAN 10 and 10GE1/0/1 and 10GE1/0/3 are selected as designated ports in
Forwarding state.
# Run the display stp vlan information brief command on SwitchB, SwitchC, and
SwitchD to check the port status.
[~SwitchB] display stp vlan information brief
------------------------------------------------------------------------------
VLANID Interface Role STPState Protection Cost Edged
------------------------------------------------------------------------------
10 10GE1/0/1 ALTE discarding none 20000 disable
10 10GE1/0/2 ROOT forwarding none 2000
disable
20 10GE1/0/1 ALTE discarding none 20000 disable
20 10GE1/0/2 ROOT forwarding none 2000
disable
20 10GE1/0/3 DESI forwarding none 2000 disable
30 10GE1/0/1 DESI forwarding none 20000
disable
30 10GE1/0/3 DESI forwarding none 2000 disable
------------------------------------------------------------------------------
[~SwitchC] display stp vlan information brief
------------------------------------------------------------------------------
VLANID Interface Role STPState Protection Cost Edged
------------------------------------------------------------------------------
10 10GE1/0/2 ROOT forwarding none 2000
disable
10 10GE1/0/3 DESI forwarding none 2000000
disable
10 10GE1/0/4 DESI forwarding none 2000 disable
20 10GE1/0/2 ROOT forwarding none 2000
disable
20 10GE1/0/3 DESI forwarding none 2000000
disable
20 10GE1/0/5 DESI forwarding none 2000 disable
------------------------------------------------------------------------------
[~SwitchD] display stp vlan information brief
------------------------------------------------------------------------------
VLANID Interface Role STPState Protection Cost Edged
------------------------------------------------------------------------------
20 10GE1/0/2 ALTE discarding none 2000000
disable
20 10GE1/0/3 ROOT forwarding none 2000
disable
20 10GE1/0/4 DESI forwarding none 2000 disable
30 10GE1/0/2 DESI forwarding none 2000000
disable
30 10GE1/0/3 ROOT forwarding none 2000
disable
30 10GE1/0/5 DESI forwarding none 2000 disable
------------------------------------------------------------------------------
----End
Configuration Files
● Configuration file of SwitchA
#
sysname SwitchA
#
stp vlan 30 root secondary
stp vlan 10 20 root primary
#
vlan batch 10 20 30
#
stp mode vbst
#
interface 10GE1/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20 30
#
interface 10GE1/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 30
#
interface 10GE1/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
#
return
● Configuration file of SwitchB
#
sysname SwitchB
#
stp vlan 10 20 root secondary
stp vlan 30 root primary
#
vlan batch 10 20 30
#
stp mode vbst
#
interface 10GE1/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20 30
#
interface 10GE1/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
#
interface 10GE1/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
Definition
ERPS is a protocol defined by the International Telecommunication Union -
Telecommunication Standardization Sector (ITU-T) to eliminate loops at Layer 2.
Because the standard number is ITU-T G.8032/Y1344, ERPS is also called G.8032.
ERPS defines Ring Auto Protection Switching (RAPS) Protocol Data Units (PDUs)
and protection switching mechanisms.
ERPS has two versions: ERPSv1 released by ITU-T in June 2008 and ERPSv2
released in August 2010. EPRSv2, fully compatible with ERPSv1, provides the
following enhanced functions:
Purpose
Generally, redundant links are used on an Ethernet switching network such as a
ring network to provide link backup and enhance network reliability. The use of
redundant links, however, may produce loops, causing broadcast storms and
rendering the MAC address table unstable. As a result, communication quality
deteriorates, and communication services may even be interrupted. Table 12-1
describes ring network protocols supported by devices.
Ethernet networks demand faster protection switching. STP does not meet the
requirement for fast convergence.
Benefits
● Prevents broadcast storms and implements fast traffic switchover on a
network where there are loops.
On the network shown in Figure 12-1, SwitchA through SwitchD constitute a ring
and are dual-homed to the upstream network. This access mode will cause a loop
on the entire network. To eliminate redundant links and ensure link connectivity,
ERPS is used to prevent loops.
Network
Router1 Router2
SwitchA SwitchD
ERPS
RPL
SwitchB SwitchC
User
network
RPL owner
RPL neighbour
ERPS Ring
An ERPS ring consists of interconnected Layer 2 switching devices configured with
the same control VLAN.
An ERPS ring can be a major ring or a sub-ring. By default, an ERPS ring is a major
ring. The major ring is a closed ring, whereas a sub-ring is a non-closed ring. The
major ring and sub-ring are configured using commands. On the network shown
in Figure 12-2, SwitchA through SwitchD constitute a major ring, and SwitchC
through SwitchF constitute a sub-ring.
Only ERPSv2 supports sub-rings.
SwitchB SwitchF
SwitchD
Node
A node refers to a Layer 2 switching device added to an ERPS ring. A maximum of
two ports on each node can be added to the same ERPS ring. SwitchA through
SwitchD in Figure 12-2 are nodes in an ERPS major ring.
Port Role
ERPS defines three port roles: RPL owner port, RPL neighbor port (only in ERPSv2),
and common port.
● RPL owner port
An RPL owner port is responsible for blocking traffic over the Ring Protection
Link (RPL) to prevent loops. An ERPS ring has only one RPL owner port.
When the node on which the RPL owner port resides receives an RAPS PDU
indicating a link or node fault in an ERPS ring, the node unblocks the RPL
owner port. Then the RPL owner port can send and receive traffic to ensure
nonstop traffic forwarding.
The link where the RPL owner port resides is the RPL.
● RPL neighbor port
An RPL neighbor port is directly connected to an RPL owner port.
Both the RPL owner port and RPL neighbor ports are blocked in normal
situations to prevent loops.
If an ERPS ring fails, both the RPL owner and neighbor ports are unblocked.
The RPL neighbor port helps reduce the number of FDB entry updates on the
device where the RPL neighbor port resides.
● Common port
Common ports are ring ports other than the RPL owner and neighbor ports.
A common port monitors the status of the directly connected ERPS link and
sends RAPS PDUs to notify the other ports of its link status changes.
Port Status
On an ERPS ring, an ERPS-enabled port has two statuses:
● Forwarding: forwards user traffic and sends and receives RAPS PDUs.
● Discarding: only sends and receives RAPS PDUs.
Control VLAN
A control VLAN is configured in an ERPS ring to transmit RAPS PDUs.
Each ERPS ring must be configured with a control VLAN. After a port is added to
an ERPS ring configured with a control VLAN, the port is added to the control
VLAN automatically.
Different ERPS rings must use different control VLANs.
Data VLAN
Unlike control VLANs, data VLANs are used to transmit data packets.
ERP Instance
On a Layer 2 device running ERPS, the VLAN in which RAPS PDUs and data
packets are transmitted must be mapped to an Ethernet Ring Protection (ERP)
instance so that ERPS forwards or blocks the packets based on configured rules. If
the mapping is not configured, the preceding packets may cause broadcast storms
on the ring network. As a result, the network becomes unavailable.
Timer
ERPS defines four timers: Guard timer, WTR timer, Holdoff timer, and WTB timer
(only in ERPSv2).
● Guard timer
After a faulty link or node recovers or a clear operation is executed, the device
sends RAPS No Request (NR) messages to inform the other nodes of the link
or node recovery and starts the Guard timer. Before the Guard timer expires,
the device does not process any RAPS (NR) messages to avoid receiving out-
of-date RAPS (NR) messages. After the Guard timer expires, if the device still
receives an RAPS (NR) message, the local port enters the Forwarding state.
● WTR timer
If an RPL owner port is unblocked due to a link or node fault, the involved
port may not go Up immediately after the link or node recovers. Blocking the
RPL owner port may cause network flapping. To prevent this problem, the
node where the RPL owner port resides starts the wait to restore (WTR) timer
after receiving an RAPS (NR) message. If the node receives an RAPS Signal
Fail (SF) message before the timer expires, it terminates the WTR timer. If the
node does not receive any RAPS (SF) message before the timer expires, it
blocks the RPL owner port when the timer expires and sends an RAPS (no
request, root blocked) message. After receiving this RAPS (NR, RB) message,
the nodes set their recovered ports on the ring to the Forwarding state.
● Holdoff timer
On Layer 2 networks running EPRS, there may be different requirements for
protection switching. For example, on a network where multi-layer services
are provided, after a server fails, users may require a period of time to rectify
the server fault so that clients do not detect the fault. You can set the Holdoff
timer. If the fault occurs, the fault is not immediately sent to ERPS until the
Holdoff timer expires.
● WTB timer
The wait to block (WTB) timer starts when Forced Switch (FS) or Manual
Switch (MS) is performed. Because multiple nodes on an ERPS ring may be in
FS or MS state, the clear operation takes effect only after the WTB timer
expires. This prevents the RPL owner port from being blocked immediately.
The WTB timer value cannot be configured. Its value is the Guard timer value
plus 5. The default WTB timer value is 7s.
Major Ring
Sub-Ring Sub-Ring
with virtual without virtual
channel channel
Interconnection Node
By default, sub-rings use NVCs to transmit RAPS PDUs, except for the scenario
shown in Figure 12-4.
NOTE
On the network shown in Figure 12-4, links b and d belong to major rings 1 and 2
respectively; links a and c belong to the sub-ring. As links a and c are
incontiguous, they cannot detect the status change between each other, so VCs
must be used for RAPS PDU transmission.
Sub-Ring
with virtual
channel
b d
Major Major
Ring1 Ring2
c
Interconnection Node
Table 12-2 lists the advantages and disadvantages of RAPS PDU transmission
modes in sub-rings with VCs or NVCs.
Table 12-2 Comparison between RAPS PDU transmission modes in a sub-ring with
VCs or NVCs
RAPS Advantage Disadvantage
PDU
Transmis
sion
Mode in
a Sub-
ring
ERPS protocol packets are called Ring Auto Protection Switching (RAPS) Protocol
Data Units (PDUs), which are transmitted in ERPS rings to convey ERPS ring
information. Figure 12-5 shows the RAPS PDU format.
...
37
[optional TLV starts here;otherwise End TLV]
last End TLV(0)
OpCode 8 bits Indicates an RAPS PDU. The value of this field is 0x28.
Flags 8 bits Is ignored upon RAPS PDU receiving. The value of this
field is 0x00.
TLV Offset 8 bits Indicates that the TLV starts after an offset of 32
bytes. The value of this field is 0x20.
R-APS Specific 32x8 Is the core field in an RAPS PDU and carries ERPS ring
Information bits information. There are differences between sub-fields
in ERPSv1 and ERPSv2. Figure 12-6 shows the R-APS
Specific Information field format in ERPSv1. Figure
12-7 shows the R-APS Specific Information field
format in ERPSv2.
(Node ID)
(Node ID)
Request/ 4 bits Indicates that this RAPS PDU is a request or state PDU.
State The value can be:
● 1101: forced switch (FS)
● 1110: Event
● 1011: signal failed (SF)
● 0111: manual switch (MS)
● 0000: no request (NR)
● Others: reserved
Reserved 24 x 8 bits Is reserved and ignored upon RAPS PDU receiving. The
2 value is all 0 during RAPS PDU transmission.
Network
Router1 Router2
SwitchA SwitchE
ERPS
User
network
Blocked Interface
Data Flow
A Link Fails
As shown in Figure 12-9, if the link between SwitchD and SwitchE fails, the ERPS
protection switching mechanism is triggered. The ports on both ends of the faulty
link are blocked, and the RPL owner port and RPL neighbor port are unblocked to
send and receive traffic. This mechanism ensures nonstop traffic transmission. The
process is as follows:
1. After SwitchD and SwitchE detect the link fault, they block their ports on the
faulty link and update Filtering Database (FDB) entries.
2. SwitchD and SwitchE send three consecutive RAPS Signal Fail (SF) messages
to the other LSWs and send one RAPS (SF) message at an interval of 5s
afterwards.
3. After receiving an RAPS (SF) message, the other LSWs update their FDB
entries. SwitchC on which the RPL owner port resides and SwitchB on which
the RPL neighbor port resides unblock the respective RPL owner port and RPL
neighbor port, and update FDB entries.
Figure 12-9 ERPS single-ring networking (unblocking the RPL owner port and RPL
neighbor port if a link fails)
Network
Router1 Router2
SwitchA SwitchE
ERPS
User
network
Failed Link
Blocked Interface
Data Flow
3. After receiving an RAPS (NR, RB) message, SwitchD and SwitchE unblock the
ports at the two ends of the link that has recovered, stop sending RAPS (NR)
messages, and update FDB entries. The other LSWs also update FDB entries
after receiving an RAPS (NR, RB) message.
Protection Switching
● Forced switch
On the network shown in Figure 12-10, SwitchA through SwitchE in the ERPS
ring can communicate with each other. A forced switch (FS) operation is
performed on the SwitchE's port that connects to SwitchD, and the SwitchE's
port is blocked. Then the RPL owner port and RPL neighbor port are
unblocked to send and receive traffic. This mechanism ensures nonstop traffic
transmission. The process is as follows:
a. After the SwitchD's port that connects to SwitchE is forcibly blocked,
SwitchE update FDB entries.
b. SwitchE sends three consecutive RAPS (SF) messages to the other LSWs
and sends one RAPS (SF) message at an interval of 5s afterwards.
c. After receiving an RAPS (SF) message, the other LSWs update their FDB
entries. SwitchC on which the RPL owner port resides and SwitchB on
which the RPL neighbor port resides unblock the respective RPL owner
port and RPL neighbor port, and update FDB entries.
Network
Router1 Router2
SwitchA SwitchE
ERPS
User
network
Blocked Interface
Data Flow
● Clear
After a clear operation is performed on SwitchE, the port that is forcibly
blocked by FS sends RAPS (NR) messages to all other ports in the ERPS ring.
– If the ERPS ring uses revertive switching, the RPL owner port starts the
WTB timer after receiving an RAPS (NR) message. After the WTB timer
expires, the FS operation is cleared. Then the RPL owner port is blocked,
and the blocked port on SwitchE is unblocked. If you perform a clear
operation on SwitchC on which the RPL owner port resides before the
WTB timer expires, the RPL owner port is immediately blocked, and the
blocked port on SwitchE is unblocked.
– If the ERPS ring uses non-revertive switching and you want to block the
RPL owner port, perform a clear operation on SwitchC on which the RPL
owner port resides.
● Manual switch
The MS process in an ERPS ring is similar to the FS process. The difference is
that the MS operation does not take effect when the ERPS ring is not idle or
pending.
Figure 12-11 ERPS multi-ring networking with sub-rings that do not have VCs
(links are normal)
Network
Router1 Router2
SwitchA SwitchE
Major Ring
SwitchB SwitchD
L
RP
Sub-Ring1 Sub-Ring2
RP
L SwitchC L
RP
SwitchF SwitchG
PC1
PC2
RPL owner
Data Flow
A Link Fails
As shown in Figure 12-12, if the link between SwitchD and SwitchG fails, the ERPS
protection switching mechanism is triggered. The ports on both ends of the faulty
link are blocked, and the RPL owner port in sub-ring 2 is unblocked to send and
receive traffic. In this situation, traffic from PC1 still travels along the original
path. SwitchC and SwitchD inform the other nodes in the major ring of the
topology change so that traffic from PC2 is also not interrupted. Traffic between
PC2 and the upper-layer network travels along the path PC2 -> SwitchG ->
SwitchC -> SwitchB -> SwitchA -> SwitchE -> Router2. The process is as follows:
1. After SwitchD and SwitchG detect the link fault, they block their ports on the
faulty link and update Filtering Database (FDB) entries.
2. SwitchG sends three consecutive RAPS (SF) messages to the other LSWs and
sends one RAPS (SF) message at an interval of 5s afterwards.
3. SwitchG then unblocks the RPL owner port and updates FDB entries.
4. After the interconnected node SwitchC receives an RAPS (SF) message, it
updates FDB entries. SwitchC and SwitchD then send RAPS Event messages
within the major ring to notify the topology change in sub-ring 2.
5. After receiving an RAPS Event message, the other LSWs in the major ring
update FDB entries.
Then traffic from PC2 is switched to a normal link.
Figure 12-12 ERPS multi-ring networking (unblocking the RPL owner port if a link
fails)
Network
Router1 Router2
SwitchA SwitchE
Major Ring
SwitchB SwitchD
RPL
Sub-Ring2
Sub-Ring1 RP
L L
RP SwitchC
SwitchF SwitchG
PC1
PC2
Blocked Interface
Data Flow
● If the ERPS ring uses non-revertive switching, the RPL remains unblocked, and
the link that has recovered is still blocked.
The following example uses revertive switching to illustrate the process after the
link recovers.
1. After the link between SwitchD and SwitchG recovers, SwitchD and SwitchG
start the Guard timer to avoid receiving out-of-date RAPS PDUs. The two
devices do not receive any RAPS PDUs before the timer expires. Then SwitchD
and SwitchG send RAPS (NR) messages within sub-ring 2.
2. SwitchG on which the RPL owner port resides starts the WTR timer. After the
WTR timer expires, SwitchG blocks the RPL owner port and unblocks its port
on the link that has recovered and then sends RAPS (NR, RB) messages within
sub-ring 2.
3. After receiving an RAPS (NR, RB) message from SwitchG, SwitchD unblocks its
port on the recovered link, stops sending RAPS (NR) messages, and updates
FDB entries. SwitchC also updates FDB entries.
4. SwitchC and SwitchD (interconnected nodes) send RAPS Event messages
within the major ring to notify the link recovery of sub-ring 2.
5. After receiving an RAPS Event message, the other LSWs in the major ring
update FDB entries.
Then traffic changes to the normal state, as shown in Figure 12-11.
Figure 12-13 ERPS multi-ring networking with a sub-ring that has VCs (links are
normal)
SwitchE SwitchF
RPL SwitchA RPL SwitchD RPL
PC1 PC2
Ma
jor g2
Rin Rin
g1 jor
Ma
Sub- Ring
SwitchB SwitchC
RPL owner
Data Flow
A Link Fails
As shown in Figure 12-14, if the link between Switch B and Switch C fails, ERPS is
triggered. Specifically, the ports on both ends of the faulty link are blocked, and
the RPL owner port on the sub-ring is unblocked to send and receive user traffic.
Switch B and Switch C inform the other nodes on the major rings of the topology
change so that traffic between PCs is not interrupted. Traffic between PC1 and
PC2 then travels along the path PC1 <-> Switch E <-> Switch B <-> Switch A <->
Switch D <-> Switch C <-> Switch F <-> PC2. The detailed process is as follows:
1. After Switch B and Switch C detect the link fault, they both block their ports
on the faulty link and perform an FDB flush.
2. Switch B sends three consecutive R-APS (SF) messages to the other devices on
the sub-ring and then sends one R-APS (SF) message at an interval of 5s
afterwards. The R-APS (SF) messages then arrive at major ring 1.
3. After receiving an R-APS (SF) message, Switch A on major ring 1 unblocks its
RPL owner port and performs an FDB flush.
4. The other major ring nodes also perform an FDB flush. Traffic between PCs is
then rapidly switched to a normal link.
Figure 12-14 ERPS multi-ring networking with a sub-ring that has VCs (a link
fails)
SwitchE SwitchF
RPL SwitchA RPL SwitchD RPL
PC1 PC2
Ma
jor g2
Rin Rin
g1 jor
Ma
Sub- Ring
SwitchB SwitchC
Blocked Interface
Data Flow
Network
Router1 Router2
SwitchE
SwitchA
ERPS Ring2
ERPS Ring1
SwitchB SwitchD
Interface2 Interface1
SwitchC
To improve link use efficiency, only two logical rings can be configured in the
same physical ring in the ERPS multi-instance. A port may have different roles in
different ERPS rings and different ERPS rings use different control VLANs. A
physical ring can have two blocked ports accordingly. Each blocked port
independently monitors the physical ring status and is blocked or unblocked. An
ERPS ring must be configured with an ERP instance, and each ERP instance
specifies a range of VLANs. The topology calculated for a specific ERPS ring only
takes effect in the ERPS ring. Different VLANs can use separate paths,
implementing traffic load balancing and link backup.
As shown in Figure 12-15, you can configure ERPS Ring1 and ERPS Ring2 in the
physical ring consisting of SwitchA through SwitchE. Interface1 is the blocked port
in ERPS Ring1. The VLANs mapping to the ERP instance is VLANs 100 to 200.
Interface2 is the blocked port in ERPS Ring2. The VLANs mapping to the ERP
instance is VLANs 300 to 400. After the configuration is completed, data from
VLANs 100 to 200 is forwarded through Data Flow1, and data from VLANs 300 to
400 is forwarded through Data Flow2. In this manner, load balancing is
implemented and link use efficiency is improved.
Network
Router1 Router2
SwitchA SwitchE
ERPS
SwitchB SwitchD
RPL
RPL Owner
SwitchC
User User
network1 network3
User
network2
Blocked Port
Data Flow1
Data Flow2
Data Flow3
As shown in Figure 12-16, SwitchA through SwitchE constitute a ring. The ring
runs ERPS to provide protection switching for Layer 2 redundant links and prevent
loops that cause broadcast storms and render the MAC address table unstable.
Generally, the RPL owner port is blocked and does not forward service packets,
preventing loops. If a fault occurs on the link between SwitchA and SwitchB, ERPS
will unblock the blocked RPL owner port and traffic from User network1 and User
network2 is forwarded through the path SwitchC ->SwitchD ->SwitchE.
Licensing Requirements
ERPS 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
CE5850EI V100R003C10
CE5810EI V100R003C10
CE5850HI V100R003C10
CE5855EI V100R005C10
CE6850EI V100R003C10
CE6850HI V100R005C00
CE6850U-HI V100R005C10
CE6851HI V100R005C10
CE6810EI V100R003C10
CE6810LI V100R003C10
CE6855HI V200R001C00
CE6856HI V200R002C50
CE6857EI V200R005C10
CE6870-24S6CQ-EI V200R001C00
CE6870-48S6CQ-EI V200R001C00
CE6870-48T6CQ-EI V200R002C50
CE6860-48S8CQ-EI V200R002C50
CE6865EI V200R005C00
CE6875-48S4CQ-EI V200R003C00
CE7850EI V100R003C10
CE7855EI V200R001C00
CE8860EI V100R006C00
CE8861EI/CE8868EI V200R005C10
CE8850-32CQ-EI V200R002C50
CE8850-64CQ-EI V200R005C00
CE9860EI V200R020C00
NOTE
For details about the mapping between software versions and switch models, see the
Hardware Query Tool.
Feature Limitations
● In ERPSv2, sub-rings can interlock in multi-ring topologies. The sub-rings
attached to other sub-rings must use non-virtual channels.
● A VLAN cannot be mapped to multiple MSTIs. If you map a VLAN that has
already been mapped to an MSTI to another MSTI, the original mapping will
be deleted.
● To configure the mapping between an ERP instance and a MUX VLAN, please
configure the principal VLAN, subordinate group VLANs, and subordinate
separate VLANs of the MUX VLAN in the same ERP instance. Otherwise, loops
may occur.
● A port can be added to a maximum of two ERPS rings.
● An ERPS-enabled port needs to allow packets of control VLANs and data
VLANs to pass through, so the link type of the port must be configured as
trunk or hybrid.
● Flush-FDB packets for updating MAC addresses cannot be separately sent, so
do not configure a direct link between two upstream nodes as the RPL.
● If the virtual-channel enable command is used to set the VC mode for RAPS
PDU transmission in a sub-ring, ensure that the control VLAN of the major
ring is used to transmit only the RAPS PDUs of the sub-ring. Otherwise,
attacks may use bogus RAPS PDUs of the sub-ring to form loops or even fault
in the major ring.
● ERPS cannot be applied simultaneously with Selective QinQ, VLAN mapping,
or Port Security on a port.
● Before adding a port to an ERPS ring, ensure that the STP/RSTP/MSTP/VBST
or Smart Link is not enabled on the port.
● ERPS packets may be discarded by the interface with multicast traffic
suppression enabled using the storm suppression multicast command.
Context
ERPS works for ERPS rings. An ERPS ring consists of interconnected Layer 2
switching devices configured with the same control VLAN and data VLAN. Before
configuring other ERPS functions, you must configure an ERPS ring.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run erps ring ring-id
An ERPS ring is created and the ERPS ring view is displayed.
Step 3 (Optional) Run description
The description of the device is configured. The description can contain the ERPS
ring ID, which facilitates device maintenance in an ERPS ring.
By default, the description of an ERPS ring is the ERPS ring name, for example,
Ring 1.
Step 4 Run commit
The configuration is committed.
----End
Context
In an ERPS ring, the control VLAN is used only to forward RAPS PDUs but not
service packets, so the security of ERPS is improved. All the devices in an ERPS ring
must be configured with the same control VLAN, and different ERPS rings must
use different control VLANs.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run erps ring ring-id
The ERPS ring view is displayed.
Step 3 Run control-vlan vlan-id
The control VLAN of the ERPS ring is configured.
● The control VLAN specified by vlan-id must be a VLAN that has not been
created or used.
● If you run the control-vlan command multiple times, only the latest
configuration takes effect.
● If the ERPS ring contains ports, the control VLAN cannot be changed. To
delete the configured control VLAN, run the undo erps ring command in the
interface view or the undo port command in the ERPS ring view to delete
ports from the ERPS ring, and run the undo control-vlan command to delete
the control VLAN.
● After a control VLAN is created, the vlan batch vlan-id1 [ to vlan-id2 ]
&<1-10> command used to create common VLANs is displayed in the
configuration file.
● After a port is added to an ERPS ring configured with a control VLAN, the port
is added to the control VLAN.
– If the port is a trunk port, the port trunk allow-pass vlan vlan-id
command is displayed in the record of the port that has been added to
the ERPS ring in the configuration file.
– If the port is a hybrid port, the port hybrid tagged vlan vlan-id
command is displayed in the record of the port that has been added to
the ERPS ring in the configuration file.
Step 4 Run commit
The configuration is committed.
----End
Context
On a Layer 2 device running ERPS, the VLAN in which RAPS PDUs and data
packets are transmitted must be mapped to an ERP instance so that ERPS
forwards or blocks the packets based on configured rules. If the mapping is not
configured, the preceding packets may cause broadcast storms on the ring
network. As a result, the network becomes unavailable.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run erps ring ring-id
The ERPS ring view is displayed.
Step 3 Run protected-instance { all | { instance-id1 [ to instance-id2 ] &<1-10> } }
An ERP instance is created for the ERPS ring.
By default, no ERP instance is configured in an ERPS ring.
NOTE
● If you run the protected-instance command multiple times in the same ERPS ring,
multiple ERP instances are configured.
● If the ERPS ring contains ports, the ERP instance cannot be changed. To delete the
configured ERP instance, run the undo erps ring command in the interface view or the
undo port command in the ERPS ring view to delete ports from the ERPS ring, and run
the undo protected instance command to delete the ERP instance.
– A VLAN cannot be mapped to multiple MSTIs. If you map a VLAN that has already
been mapped to an MSTI to another MSTI, the original mapping will be deleted.
– The vlan-mapping modulo modulo command configures the mapping between
MSTIs and VLANs based on the default algorithm. However, the mapping
configured using this command cannot always meet the actual demand. Therefore,
running this command is not recommended.
– To configure the mapping between an ERP instance and a MUX VLAN, you are
advised to configure the principal VLAN, subordinate group VLANs, and
subordinate separate VLANs of the MUX VLAN in the same ERP instance.
Otherwise, loops may occur.
3. Run commit
The configuration is committed.
----End
12.7.1.4 Adding a Layer 2 Port to an ERPS Ring and Configuring the Port
Role
Context
After ERPS is configured, add Layer 2 ports to an ERPS ring and configure port
roles so that ERPS can work properly.
You can add a Layer 2 port to an ERPS ring in either of the following ways:
● In the ERPS ring view, add a specified port to the ERPS ring and configure the
port role.
● In the interface view, add the current port to the ERPS ring and configure the
port role.
NOTE
Prerequisites
● The port is not a Layer 3 port. If the port is a Layer 3 port, run the portswitch
command to switch the port to the Layer 2 mode.
● Spanning Tree Protocol (STP) or Smart Link is not enabled on the port.
– If the port has STP enabled, run the stp disable command in the
interface view to disable STP.
– If the port has Smart Link enabled, run the undo port command in the
Smart Link group view to disable Smart Link.
● The control-vlan command has been executed to configure a control VLAN
and the protected-instance command has been executed to configure an
ERP instance.
Procedure
Step 1 Run system-view
Step 2 Add a Layer 2 port to an ERPS ring and configure the port role in either of the
following ways.
● In the ERPS ring view, add a specified port to the ERPS ring and configure the
port role.
a. Run interface interface-type interface-number
The interface view is displayed.
----End
Context
After a link or node failure in an ERPS ring recovers, the device starts timers in the
ERPS ring to reduce traffic interruptions. This prevents network flapping.
Procedure
Step 1 Run system-view
Step 3 Configure the WTR timer, Guard timer, and Holdoff timer in the ERPS ring
according to actual networking.
● Run wtr-timer time-value
The WTR timer is set.
By default, the WTR timer is 5 minutes in an ERPS ring.
● Run guard-timer time-value
The Guard timer is set.
By default, the Guard timer is 200 centiseconds in an ERPS ring.
● Run holdoff-timer time-value
The Holdoff timer is set.
By default, the Holdoff timer is 0 deciseconds in an ERPS ring.
----End
Context
On a Layer 2 network running ERPS, if another fault detection protocol (for
example, CFM) is enabled, the MEL field in RAPS PDUs determines whether the
RAPS PDUs can be forwarded. If the MEL value in an ERPS ring is smaller than the
MEL value of the fault detection protocol, the RAPS PDUs have a lower priority
and are discarded. If the MEL value in an ERPS ring is larger than the MEL value of
the fault detection protocol, the RAPS PDUs can be forwarded. In addition, the
MEL value can also be used for interworking with other vendors' devices in an
ERPS ring. The same MEL value ensures smooth communication between devices.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run erps ring ring-id
The ERPS ring view is displayed.
Step 3 Run raps-mel level-id
The MEL value in the ERPS ring is set.
By default, the MEL value in RAPS PDUs is 7.
Step 4 Run commit
The configuration is committed.
----End
Procedure
● Run the display erps [ ring ring-id ] [ verbose ] command to check the
device ports added to an ERPS ring and ERPS ring configurations.
● Run the display erps interface interface-type interface-number [ ring ring-
id ] command to check physical configurations of the port added to an ERPS
ring.
----End
Context
ERPS works for ERPS rings. An ERPS ring consists of interconnected Layer 2
switching devices configured with the same control VLAN and data VLAN. Before
configuring other ERPS functions, configure an ERPS ring.
Procedure
Step 1 Run system-view
The system view is displayed.
By default, an ERPS ring configured using the erps ring ring-id command is a
major ring.
ERPSv2 is specified.
By default, an ERPS ring is a major ring. Major rings are closed, and sub-rings are
open. This step is performed only when an existing ERPS ring needs to be used as
a sub-ring.
NOTE
If the virtual-channel enable command is used to set the VC mode for RAPS PDU
transmission in a sub-ring, it is recommended that the control VLAN of the major ring be
used to transmit only the RAPS PDUs of the sub-ring. Otherwise, attacks may use bogus
RAPS PDUs of the sub-ring to form loops or even fault in the major ring.
By default, the description of an ERPS ring is the ERPS ring name, for example,
Ring 1.
----End
Context
In an ERPS ring, the control VLAN is used only to forward RAPS PDUs but not
service packets, so the security of ERPS is improved. All the devices in an ERPS ring
must be configured with the same control VLAN, and different ERPS rings must
use different control VLANs.
Procedure
Step 1 Run system-view
● The control VLAN specified by vlan-id must be a VLAN that has not been
created or used.
● If you run the control-vlan command multiple times, only the latest
configuration takes effect.
● If the ERPS ring contains ports, the control VLAN cannot be changed. To
delete the configured control VLAN, run the undo erps ring command in the
interface view or the undo port command in the ERPS ring view to delete
ports from the ERPS ring, and run the undo control-vlan command to delete
the control VLAN.
● After a control VLAN is created, the vlan batch vlan-id1 [ to vlan-id2 ]
&<1-10> command used to create common VLANs is displayed in the
configuration file.
● After a port is added to an ERPS ring configured with a control VLAN, the port
is added to the control VLAN.
– If the port is a trunk port, the port trunk allow-pass vlan vlan-id
command is displayed in the record of the port that has been added to
the ERPS ring in the configuration file.
– If the port is a hybrid port, the port hybrid tagged vlan vlan-id
command is displayed in the record of the port that has been added to
the ERPS ring in the configuration file.
----End
Context
On a Layer 2 device running ERPS, the VLAN in which RAPS PDUs and data
packets are transmitted must be mapped to an ERP instance so that ERPS
forwards or blocks the packets based on configured rules. If the mapping is not
configured, the preceding packets may cause broadcast storms on the ring
network. As a result, the network becomes unavailable.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run erps ring ring-id
The ERPS ring view is displayed.
Step 3 Run protected-instance { all | { instance-id1 [ to instance-id2 ] &<1-10> } }
An ERP instance is created for the ERPS ring.
By default, no ERP instance is configured in an ERPS ring.
NOTE
● If you run the protected-instance command multiple times in the same ERPS ring,
multiple ERP instances are configured.
● If the ERPS ring contains ports, the ERP instance cannot be changed. To delete the
configured ERP instance, run the undo erps ring command in the interface view or the
undo port command in the ERPS ring view to delete ports from the ERPS ring, and run
the undo protected instance command to delete the ERP instance.
NOTE
– A VLAN cannot be mapped to multiple MSTIs. If you map a VLAN that has already
been mapped to an MSTI to another MSTI, the original mapping will be deleted.
– The vlan-mapping modulo modulo command configures the mapping between
MSTIs and VLANs based on the default algorithm. However, the mapping
configured using this command cannot always meet the actual demand. Therefore,
running this command is not recommended.
– To configure the mapping between an ERP instance and a MUX VLAN, you are
advised to configure the principal VLAN, subordinate group VLANs, and
subordinate separate VLANs of the MUX VLAN in the same ERP instance.
Otherwise, loops may occur.
3. Run commit
The configuration is committed.
----End
12.7.2.4 Adding a Layer 2 Port to an ERPS Ring and Configuring the Port
Role
Context
After ERPS is configured, add Layer 2 ports to an ERPS ring and configure port
roles so that ERPS can work properly.
You can add a Layer 2 port to an ERPS ring in either of the following ways:
● In the ERPS ring view, add a specified port to the ERPS ring and configure the
port role.
● In the interface view, add the current port to the ERPS ring and configure the
port role.
NOTE
Prerequisites
● The port is not a Layer 3 port. If the port is a Layer 3 port, run the portswitch
command to switch the port to the Layer 2 mode.
● Spanning Tree Protocol (STP) or Smart Link is not enabled on the port.
– If the port has STP enabled, run the stp disable command in the
interface view to disable STP.
– If the port has Smart Link enabled, run the undo port command in the
Smart Link group view to disable Smart Link.
Procedure
Step 1 Run system-view
Step 2 Add a Layer 2 port to an ERPS ring and configure the port role in either of the
following ways.
● In the ERPS ring view, add a specified port to the ERPS ring and configure the
port role.
a. Run interface interface-type interface-number
The interface view is displayed.
b. Run stp disable
STP is disabled on the ERPS-enabled port.
c. Run port link-type trunk
The link type of the ERPS-enabled port is configured as trunk.
d. Run port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> |
all }
The VLANs allowed by the ERPS-enabled port are specified.
After the control-vlan command is used in the ERPS ring view to
configure a control VLAN and the port interface-type interface-number
[ rpl { owner | neighbour } ] command is configured, the ports in the
ERPS ring allow packets of the control VLAN to pass through. Therefore,
you need to specify only the IDs of data VLANs in this step.
e. Run quit
The system view is displayed.
f. Run erps ring ring-id
The ERPS ring view is displayed.
g. Run port interface-type interface-number [ rpl { owner | neighbour } ]
The port is added to the ERPS ring and its role is configured.
● In the interface view, add the current port to the ERPS ring and configure the
port role.
a. Run interface interface-type interface-number
The specified interface view is displayed.
b. Run stp disable
STP is disabled on the ERPS-enabled port.
c. Run port link-type trunk
The link type of the ERPS-enabled port is configured as trunk.
d. Run port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> |
all }
The VLANs allowed by the ERPS-enabled port are specified.
----End
Context
If an upper-layer Layer 2 network is not notified of the topology change in an
ERPS ring, the MAC address entries remain unchanged on the upper-layer network
and therefore user traffic is interrupted. To ensure nonstop traffic transmission,
configure the topology change notification function and specify the ERPS rings
that will be notified of the topology change.
Procedure
Step 1 Run system-view
The ERPS ring is configured to notify other ERPS rings of its topology change.
ring-id1 [ to ring-id2 ] specifies the start and end ring IDs of the ERPS rings that
will be notified of the topology change. Ensure that the ERPS rings specified by
ring-id1 and ring-id2 exist. If the specified rings do not exist, the topology change
notification function does not take effect.
After the ERPS rings receive the topology change notification from an ERPS ring,
they send Flush-FDB messages on their separate rings to instruct their nodes to
update MAC addresses so that user traffic is not interrupted.
----End
Context
To ensure that ERPS rings function normally when a node or link fails, configure
revertive/non-revertive switching, port blocking mode, and timers.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run erps ring ring-id
The ERPS ring view is displayed.
Step 3 Run revertive { enable | disable }
The protection switching mode is specified.
By default, ERPS rings use revertive switching.
Step 4 Run quit
Return to the system view.
Step 5 Perform either of the following operations to configure a port blocking mode.
● To configure a port blocking mode for a port in the ERPS ring view, perform
the following steps:
a. Run the erps ring ring-id command to enter the ERPS ring view.
b. Run the port interface-type interface-number protect-switch { force |
manual } command to configure a port blocking mode for an ERPS port.
● To configure a port blocking mode in the interface view, perform the
following steps:
a. Run the interface interface-type interface-number command to enter the
interface view.
To delete the specified port blocking mode, run the clear command in the ERPS
ring view.
----End
Context
After a link or node failure in an ERPS ring recovers, the device starts timers in the
ERPS ring to reduce traffic interruptions. This prevents network flapping.
Procedure
Step 1 Run system-view
Step 3 Configure the WTR timer, Guard timer, and Holdoff timer in the ERPS ring
according to actual networking.
● Run wtr-timer time-value
The WTR timer is set.
By default, the WTR timer is 5 minutes in an ERPS ring.
● Run guard-timer time-value
The Guard timer is set.
By default, the Guard timer is 200 centiseconds in an ERPS ring.
● Run holdoff-timer time-value
The Holdoff timer is set.
By default, the Holdoff timer is 0 deciseconds in an ERPS ring.
----End
Procedure
● Run the display erps [ ring ring-id ] [ verbose ] command to check the
device ports added to an ERPS ring and ERPS ring configurations.
● Run the display erps interface interface-type interface-number [ ring ring-
id ] command to check physical configurations of the port added to an ERPS
ring.
----End
Context
Before recollecting ERPS statistics, run the reset erps command to clear existing
ERPS statistics.
NOTICE
The cleared ERPS statistics cannot be restored. Exercise caution when you run this
command.
Procedure
Step 1 Run the reset erps [ ring ring-id ] statistics command to clear packet statistics in
an ERPS ring.
----End
Networking Requirements
Generally, redundant links are used on an Ethernet switching network to provide
link backup and enhance network reliability. The use of redundant links, however,
may produce loops, causing broadcast storms and rendering the MAC address
table unstable. As a result, communication quality deteriorates, and
communication services may even be interrupted.
To prevent loops caused by redundant links, enable ERPS on the nodes of the ring
network. ERPS is a Layer 2 loop-breaking protocol defined by the ITU-T, and
provides fast convergence of carrier-class reliability standards.
Figure 12-17 shows a network on which a multi-instance ERPS ring is used.
SwitchA through SwitchD constitute a ring network at the aggregation layer to
implement service aggregation at Layer 2 and process Layer 3 services. ERPS is
used on the ring network to provide protection switching for Layer 2 redundant
links. ERPS ring 1 and ERPS ring 2 are configured on SwitchA through SwitchD. P1
on SwitchB is a blocked port in ERPS ring 1, and P2 on SwitchA is a blocked port in
ERPS ring 2, implementing load balancing and link backup.
Network
Router1 Router2
10GE1/0/2
10GE1/0/1 10GE1/0/2
ERPS
10GE1/0/2 10GE1/0/1
P2
SwitchA 10GE1/0/2
P1 SwitchB
10GE1/0/1
VLAN: VLAN:
100~200 300~400
ERPS ring1
ERPS ring2
Blocked Port1
Blocked Port2
Data Flow1
Data Flow2
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the link type of all ports to be added to ERPS rings as trunk.
2. Create ERPS rings and configure control VLANs and Ethernet Ring Protection
(ERP) instances in the ERPS rings.
3. Add Layer 2 ports to ERPS rings and specify port roles.
4. Configure the Guard timers and WTR timers in the ERPS rings.
5. Configure Layer 2 forwarding on SwitchA through SwitchD.
Procedure
Step 1 Configure the link type of all ports to be added to an ERPS ring as trunk.
# Configure SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] commit
[~SwitchA-10GE1/0/1] quit
[~SwitchA] interface 10ge 1/0/2
[~SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] commit
[~SwitchA-10GE1/0/2] quit
# Configure SwitchB.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] interface 10ge 1/0/1
[~SwitchB-10GE1/0/1] port link-type trunk
[*SwitchB-10GE1/0/1] commit
[~SwitchB-10GE1/0/1] quit
[~SwitchB] interface 10ge 1/0/2
[~SwitchB-10GE1/0/2] port link-type trunk
[*SwitchB-10GE1/0/2] commit
[~SwitchB-10GE1/0/2] quit
# Configure SwitchC.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchC
[*HUAWEI] commit
[~SwitchC] interface 10ge 1/0/1
[~SwitchC-10GE1/0/1] port link-type trunk
[*SwitchC-10GE1/0/1] commit
[~SwitchC-10GE1/0/1] quit
[~SwitchC] interface 10ge 1/0/2
[~SwitchC-10GE1/0/2] port link-type trunk
[*SwitchC-10GE1/0/2] commit
[~SwitchC-10GE1/0/2] quit
# Configure SwitchD.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchD
[*HUAWEI] commit
[~SwitchD] interface 10ge 1/0/1
[~SwitchD-10GE1/0/1] port link-type trunk
[*SwitchD-10GE1/0/1] commit
[~SwitchD-10GE1/0/1] quit
[~SwitchD] interface 10ge 1/0/2
[~SwitchD-10GE1/0/2] port link-type trunk
[*SwitchD-10GE1/0/2] commit
[~SwitchD-10GE1/0/2] quit
Step 2 Create ERPS ring 1 and ERPS ring 2 and configure ERP instances in the two rings.
Set the control VLAN ID of ERPS ring 1 to 10 and the control VLAN ID of ERPS ring
2 to 20. Enable ERPS ring 1 to transmit data packets from VLANs 100 to 200 and
enable ERPS ring 2 to transmit data packets from VLANs 300 to 400.
# Configure SwitchA.
[~SwitchA] erps ring 1
[*SwitchA-erps-ring1] control-vlan 10
[*SwitchA-erps-ring1] protected-instance 1
[*SwitchA-erps-ring1] commit
[~SwitchA-erps-ring1] quit
[~SwitchA] stp region-configuration
[~SwitchA-mst-region] instance 1 vlan 10 100 to 200
[*SwitchA-mst-region] commit
[~SwitchA-mst-region] quit
[~SwitchA] erps ring 2
[*SwitchA-erps-ring2] control-vlan 20
[*SwitchA-erps-ring2] protected-instance 2
[*SwitchA-erps-ring2] commit
[~SwitchA-erps-ring2] quit
[~SwitchA] stp region-configuration
[~SwitchA-mst-region] instance 2 vlan 20 300 to 400
[*SwitchA-mst-region] commit
[~SwitchA-mst-region] quit
# Configure SwitchB.
[~SwitchB] erps ring 1
[*SwitchB-erps-ring1] control-vlan 10
[*SwitchB-erps-ring1] protected-instance 1
[*SwitchB-erps-ring1] commit
[~SwitchB-erps-ring1] quit
[~SwitchB] stp region-configuration
[~SwitchB-mst-region] instance 1 vlan 10 100 to 200
[*SwitchB-mst-region] commit
[~SwitchB-mst-region] quit
[~SwitchB] erps ring 2
[*SwitchB-erps-ring2] control-vlan 20
[*SwitchB-erps-ring2] protected-instance 2
[*SwitchB-erps-ring2] commit
[~SwitchB-erps-ring2] quit
[~SwitchB] stp region-configuration
[~SwitchB-mst-region] instance 2 vlan 20 300 to 400
[*SwitchB-mst-region] commit
[~SwitchB-mst-region] quit
# Configure SwitchC.
[~SwitchC] erps ring 1
[*SwitchC-erps-ring1] control-vlan 10
[*SwitchC-erps-ring1] protected-instance 1
[*SwitchC-erps-ring1] commit
[~SwitchC-erps-ring1] quit
[~SwitchC] stp region-configuration
[~SwitchC-mst-region] instance 1 vlan 10 100 to 200
[*SwitchC-mst-region] commit
[~SwitchC-mst-region] quit
[~SwitchC] erps ring 2
[*SwitchC-erps-ring2] control-vlan 20
[*SwitchC-erps-ring2] protected-instance 2
[*SwitchC-erps-ring2] commit
[~SwitchC-erps-ring2] quit
[~SwitchC] stp region-configuration
[~SwitchC-mst-region] instance 2 vlan 20 300 to 400
[*SwitchC-mst-region] commit
[~SwitchC-mst-region] quit
# Configure SwitchD.
[~SwitchD] erps ring 1
[*SwitchD-erps-ring1] control-vlan 10
[*SwitchD-erps-ring1] protected-instance 1
[*SwitchD-erps-ring1] commit
[~SwitchD-erps-ring1] quit
[~SwitchD] stp region-configuration
[~SwitchD-mst-region] instance 1 vlan 10 100 to 200
[*SwitchD-mst-region] commit
[~SwitchD-mst-region] quit
[~SwitchD] erps ring 2
[*SwitchD-erps-ring2] control-vlan 20
[*SwitchD-erps-ring2] protected-instance 2
[*SwitchD-erps-ring2] commit
[~SwitchD-erps-ring2] quit
[~SwitchD] stp region-configuration
[~SwitchD-mst-region] instance 2 vlan 20 300 to 400
[*SwitchD-mst-region] commit
[~SwitchD-mst-region] quit
Step 3 Add Layer 2 ports to ERPS rings and specify port roles. Configure 10GE 1/0/1 on
SwitchA and 10GE 1/0/2 on SwitchB as their respective RPL owner ports.
# Configure SwitchA.
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] stp disable
[*SwitchA-10GE1/0/1] erps ring 1
[*SwitchA-10GE1/0/1] erps ring 2 rpl owner
[*SwitchA-10GE1/0/1] commit
[~SwitchA-10GE1/0/1] quit
[~SwitchA] interface 10ge 1/0/2
[~SwitchA-10GE1/0/2] stp disable
[*SwitchA-10GE1/0/2] erps ring 1
[*SwitchA-10GE1/0/2] erps ring 2
[*SwitchA-10GE1/0/2] commit
[~SwitchA-10GE1/0/2] quit
# Configure SwitchB.
[~SwitchB] interface 10ge 1/0/1
[~SwitchB-10GE1/0/1] stp disable
[*SwitchB-10GE1/0/1] erps ring 1
[*SwitchB-10GE1/0/1] erps ring 2
[*SwitchB-10GE1/0/1] commit
[~SwitchB-10GE1/0/1] quit
[~SwitchB] interface 10ge 1/0/2
[~SwitchB-10GE1/0/2] stp disable
[*SwitchB-10GE1/0/2] erps ring 1 rpl owner
[*SwitchB-10GE1/0/2] erps ring 2
[*SwitchB-10GE1/0/2] commit
[~SwitchB-10GE1/0/2] quit
# Configure SwitchC.
[~SwitchC] interface 10ge 1/0/1
[~SwitchC-10GE1/0/1] stp disable
[*SwitchC-10GE1/0/1] erps ring 1
[*SwitchC-10GE1/0/1] erps ring 2
[*SwitchC-10GE1/0/1] commit
[~SwitchC-10GE1/0/1] quit
[~SwitchC] interface 10ge 1/0/2
[~SwitchC-10GE1/0/2] stp disable
# Configure SwitchD.
[~SwitchD] interface 10ge 1/0/1
[~SwitchD-10GE1/0/1] stp disable
[*SwitchD-10GE1/0/1] erps ring 1
[*SwitchD-10GE1/0/1] erps ring 2
[*SwitchD-10GE1/0/1] commit
[~SwitchD-10GE1/0/1] quit
[~SwitchD] interface 10ge 1/0/2
[~SwitchD-10GE1/0/2] stp disable
[*SwitchD-10GE1/0/2] erps ring 1
[*SwitchD-10GE1/0/2] erps ring 2
[*SwitchD-10GE1/0/2] commit
[~SwitchD-10GE1/0/2] quit
Step 4 Configure the Guard timers and WTR timers in the ERPS rings.
# Configure SwitchA.
[~SwitchA] erps ring 1
[~SwitchA-erps-ring1] wtr-timer 6
[*SwitchA-erps-ring1] guard-timer 100
[*SwitchA-erps-ring1] commit
[~SwitchA-erps-ring1] quit
[~SwitchA] erps ring 2
[~SwitchA-erps-ring2] wtr-timer 6
[*SwitchA-erps-ring2] guard-timer 100
[*SwitchA-erps-ring2] commit
[~SwitchA-erps-ring2] quit
# Configure SwitchB.
[~SwitchB] erps ring 1
[~SwitchB-erps-ring1] wtr-timer 6
[*SwitchB-erps-ring1] guard-timer 100
[*SwitchB-erps-ring1] commit
[~SwitchB-erps-ring1] quit
[~SwitchB] erps ring 2
[~SwitchB-erps-ring2] wtr-timer 6
[*SwitchB-erps-ring2] guard-timer 100
[*SwitchB-erps-ring2] commit
[~SwitchB-erps-ring2] quit
# Configure SwitchC.
[~SwitchC] erps ring 1
[~SwitchC-erps-ring1] wtr-timer 6
[*SwitchC-erps-ring1] guard-timer 100
[*SwitchC-erps-ring1] commit
[~SwitchC-erps-ring1] quit
[~SwitchC] erps ring 2
[~SwitchC-erps-ring2] wtr-timer 6
[*SwitchC-erps-ring2] guard-timer 100
[*SwitchC-erps-ring2] commit
[~SwitchC-erps-ring2] quit
# Configure SwitchD.
[~SwitchD] erps ring 1
[~SwitchD-erps-ring1] wtr-timer 6
[*SwitchD-erps-ring1] guard-timer 100
[*SwitchD-erps-ring1] commit
[~SwitchD-erps-ring1] quit
[~SwitchD] erps ring 2
[~SwitchD-erps-ring2] wtr-timer 6
# Configure SwitchB.
[~SwitchB] vlan batch 100 to 200 300 to 400
[*SwitchB] commit
[~SwitchB] interface 10ge 1/0/1
[~SwitchB-10GE1/0/1] port trunk allow-pass vlan 100 to 200 300 to 400
[*SwitchB-10GE1/0/1] commit
[~SwitchB-10GE1/0/1] quit
[~SwitchB] interface 10ge 1/0/2
[~SwitchB-10GE1/0/2] port trunk allow-pass vlan 100 to 200 300 to 400
[*SwitchB-10GE1/0/2] commit
[~SwitchB-10GE1/0/2] quit
# Configure SwitchC.
[~SwitchC] vlan batch 100 to 200 300 to 400
[*SwitchC] commit
[~SwitchC] interface 10ge 1/0/1
[~SwitchC-10GE1/0/1] port trunk allow-pass vlan 100 to 200 300 to 400
[*SwitchC-10GE1/0/1] commit
[~SwitchC-10GE1/0/1] quit
[~SwitchC] interface 10ge 1/0/2
[~SwitchC-10GE1/0/2] port trunk allow-pass vlan 100 to 200 300 to 400
[*SwitchC-10GE1/0/2] commit
[~SwitchC-10GE1/0/2] quit
# Configure SwitchD.
[~SwitchD] vlan batch 100 to 200 300 to 400
[*SwitchD] commit
[~SwitchD] interface 10ge 1/0/1
[~SwitchD-10GE1/0/1] port trunk allow-pass vlan 100 to 200 300 to 400
[*SwitchD-10GE1/0/1] commit
[~SwitchD-10GE1/0/1] quit
[~SwitchD] interface 10ge 1/0/2
[~SwitchD-10GE1/0/2] port trunk allow-pass vlan 100 to 200 300 to 400
[*SwitchD-10GE1/0/2] commit
[~SwitchD-10GE1/0/2] quit
FS : Forced Switch
MS : Manual Switch
Total number of rings configured = 2
Ring Control WTR Timer Guard Timer Port 1 Port 2
ID VLAN (min) (csec)
--------------------------------------------------------------------------------
1 10 6 100 (F)10GE1/0/1 (D,R)10GE1/0/2
2 20 6 100 (F)10GE1/0/1 (F)10GE1/0/2
--------------------------------------------------------------------------------
# Run the display erps verbose command to check detailed information about
the ERPS ring and ports added to the ERPS ring. SwitchB is used as an example.
[~SwitchB] display erps verbose
Ring ID :1
Description : Ring 1
Control Vlan : 10
Protected Instance :1
Service Vlan : 100 to 200
WTR Timer Setting (min) :6 Running (s) :0
Guard Timer Setting (csec) : 100 Running (csec) :0
Holdoff Timer Setting (deciseconds) : 0 Running (deciseconds) : 0
WTB Timer Running (csec) :0
Ring State : Idle
RAPS_MEL :7
Revertive Mode : Revertive
R-APS Channel Mode :-
Version :1
Sub-ring : No
Forced Switch Port :-
Manual Switch Port :-
TC-Notify :-
Time since last topology change : 0 days 0h:35m:5s
--------------------------------------------------------------------------------
Port Port Role Port Status Signal Status
--------------------------------------------------------------------------------
10GE1/0/1 Common Forwarding Non-failed
10GE1/0/2 RPL Owner Discarding Non-failed
Ring ID :2
Description : Ring 2
Control Vlan : 20
Protected Instance :2
Service Vlan : 300 to 400
WTR Timer Setting (min) :6 Running (s) :0
Guard Timer Setting (csec) : 100 Running (csec) :0
Holdoff Timer Setting (deciseconds) : 0 Running (deciseconds) : 0
WTB Timer Running (csec) :0
Ring State : Idle
RAPS_MEL :7
Revertive Mode : Revertive
R-APS Channel Mode :-
Version :1
Sub-ring : No
Forced Switch Port :-
Manual Switch Port :-
TC-Notify :-
Time since last topology change : 0 days 0h:35m:30s
--------------------------------------------------------------------------------
Port Port Role Port Status Signal Status
--------------------------------------------------------------------------------
10GE1/0/1 Common Forwarding Non-failed
10GE1/0/2 Common Forwarding Non-failed
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 10 20 100 to 200 300 to 400
#
stp region-configuration
instance 1 vlan 10 100 to 200
instance 2 vlan 20 300 to 400
#
erps ring 1
control-vlan 10
protected-instance 1
wtr-timer 6
guard-timer 100
#
erps ring 2
control-vlan 20
protected-instance 2
wtr-timer 6
guard-timer 100
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10 20 100 to 200 300 to 400
stp disable
erps ring 1
erps ring 2 rpl owner
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 10 20 100 to 200 300 to 400
stp disable
erps ring 1
erps ring 2
#
return
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 10 20 100 to 200 300 to 400
stp disable
erps ring 1 rpl owner
erps ring 2
#
return
● SwitchC configuration file
#
sysname SwitchC
#
vlan batch 10 20 100 to 200 300 to 400
#
stp region-configuration
instance 1 vlan 10 100 to 200
instance 2 vlan 20 300 to 400
#
erps ring 1
control-vlan 10
protected-instance 1
wtr-timer 6
guard-timer 100
#
erps ring 2
control-vlan 20
protected-instance 2
wtr-timer 6
guard-timer 100
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10 20 100 to 200 300 to 400
stp disable
erps ring 1
erps ring 2
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 10 20 100 to 200 300 to 400
stp disable
erps ring 1
erps ring 2
#
return
● SwitchD configuration file
#
sysname SwitchD
#
vlan batch 10 20 100 to 200 300 to 400
#
stp region-configuration
instance 1 vlan 10 100 to 200
instance 2 vlan 20 300 to 400
#
erps ring 1
control-vlan 10
protected-instance 1
wtr-timer 6
guard-timer 100
#
erps ring 2
control-vlan 20
protected-instance 2
wtr-timer 6
guard-timer 100
#
interface 10GE1/0/1
Networking Requirements
Generally, redundant links are used on an Ethernet switching network to provide
link backup and enhance network reliability. The use of redundant links, however,
may produce loops, causing broadcast storms and rendering the MAC address
table unstable. As a result, communication quality deteriorates, and
communication services may even be interrupted.
To prevent loops caused by redundant links, enable ERPS on the nodes of the ring
network. ERPS is a Layer 2 loop-breaking protocol defined by the ITU-T, and
provides fast convergence of carrier-class reliability standards.
On the ERPS multi-ring network shown in Figure 12-18, SwitchA, SwitchB, and
SwitchD constitute a major ring, and SwitchA, SwitchC, and SwitchD constitute a
sub-ring.
Network
Router1 Router2
10GE1/0/2
SwitchA SwitchD
10GE1/0/3 10GE1/0/1
10GE1/0/1 10GE1/0/3
10GE1/0/2
10GE1/0/2
10GE1/0/1 10GE1/0/1
SwitchC SwitchB
RPL owner
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the link type of all ports to be added to ERPS rings as trunk.
2. Create ERPS rings and configure control VLANs and Ethernet Ring Protection
(ERP) instances in the ERPS rings.
3. Specify the ERPS version and configure a sub-ring.
4. Add Layer 2 ports to ERPS rings and specify port roles.
5. Configure the topology change notification and TC protection.
6. Configure the Guard timers and WTR timers in the ERPS rings.
7. Configure Layer 2 forwarding on SwitchA through SwitchD.
Procedure
Step 1 Configure the link type of all ports to be added to ERPS rings as trunk.
# Configure SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] commit
[~SwitchA-10GE1/0/1] quit
[~SwitchA] interface 10ge 1/0/2
[~SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] commit
[~SwitchA-10GE1/0/2] quit
[~SwitchA] interface 10ge 1/0/3
[~SwitchA-10GE1/0/3] port link-type trunk
[*SwitchA-10GE1/0/3] commit
[~SwitchA-10GE1/0/3] quit
# Configure SwitchB.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] interface 10ge 1/0/1
[~SwitchB-10GE1/0/1] port link-type trunk
[*SwitchB-10GE1/0/1] commit
[~SwitchB-10GE1/0/1] quit
[~SwitchB] interface 10ge 1/0/2
[~SwitchB-10GE1/0/2] port link-type trunk
[*SwitchB-10GE1/0/2] commit
[~SwitchB-10GE1/0/2] quit
# Configure SwitchC.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchC
[*HUAWEI] commit
[~SwitchC] interface 10ge 1/0/1
[~SwitchC-10GE1/0/1] port link-type trunk
[*SwitchC-10GE1/0/1] commit
[~SwitchC-10GE1/0/1] quit
[~SwitchC] interface 10ge 1/0/2
[~SwitchC-10GE1/0/2] port link-type trunk
[*SwitchC-10GE1/0/2] commit
[~SwitchC-10GE1/0/2] quit
# Configure SwitchD.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchD
[*HUAWEI] commit
[~SwitchD] interface 10ge 1/0/1
[~SwitchD-10GE1/0/1] port link-type trunk
[*SwitchD-10GE1/0/1] commit
[~SwitchD-10GE1/0/1] quit
[~SwitchD] interface 10ge 1/0/2
[~SwitchD-10GE1/0/2] port link-type trunk
[*SwitchD-10GE1/0/2] commit
[~SwitchD-10GE1/0/2] quit
[~SwitchD] interface 10ge 1/0/3
[~SwitchD-10GE1/0/3] port link-type trunk
[*SwitchD-10GE1/0/3] commit
[~SwitchD-10GE1/0/3] quit
Step 2 Create ERPS ring 1 and ERPS ring 2 and configure ERP instances in the two rings.
Set the control VLAN ID of ERPS ring 1 to 10 and the control VLAN ID of ERPS ring
2 to 20. Enable ERPS ring 1 to transmit data packets from VLANs 100 to 200 and
enable ERPS ring 2 to transmit data packets from VLANs 300 to 400.
NOTE
A VLAN cannot be mapped to multiple MSTIs. If you map a VLAN that has already been
mapped to an MSTI to another MSTI, the original mapping will be deleted.
# Configure SwitchA.
[~SwitchA] erps ring 1
[*SwitchA-erps-ring1] control-vlan 10
[*SwitchA-erps-ring1] protected-instance 1
[*SwitchA-erps-ring1] commit
[~SwitchA-erps-ring1] quit
[~SwitchA] stp region-configuration
[~SwitchA-mst-region] instance 1 vlan 10 100 to 200
[*SwitchA-mst-region] commit
[~SwitchA-mst-region] quit
[~SwitchA] erps ring 2
[*SwitchA-erps-ring2] control-vlan 20
[*SwitchA-erps-ring2] protected-instance 2
[*SwitchA-erps-ring2] commit
[~SwitchA-erps-ring2] quit
[~SwitchA] stp region-configuration
[~SwitchA-mst-region] instance 2 vlan 20 300 to 400
[*SwitchA-mst-region] commit
[~SwitchA-mst-region] quit
# Configure SwitchB.
[~SwitchB] erps ring 1
[*SwitchB-erps-ring1] control-vlan 10
[*SwitchB-erps-ring1] protected-instance 1
[*SwitchB-erps-ring1] commit
[~SwitchB-erps-ring1] quit
[~SwitchB] stp region-configuration
[~SwitchB-mst-region] instance 1 vlan 10 100 to 200
[*SwitchB-mst-region] commit
[~SwitchB-mst-region] quit
# Configure SwitchC.
[~SwitchC] erps ring 2
[*SwitchC-erps-ring2] control-vlan 20
[*SwitchC-erps-ring2] protected-instance 2
[*SwitchC-erps-ring2] commit
[~SwitchC-erps-ring2] quit
[~SwitchC] stp region-configuration
[~SwitchC-mst-region] instance 2 vlan 20 300 to 400
[*SwitchC-mst-region] commit
[~SwitchC-mst-region] quit
# Configure SwitchD.
[~SwitchD] erps ring 1
[*SwitchD-erps-ring1] control-vlan 10
[*SwitchD-erps-ring1] protected-instance 1
[*SwitchD-erps-ring1] commit
[~SwitchD-erps-ring1] quit
[~SwitchD] stp region-configuration
[~SwitchD-mst-region] instance 1 vlan 10 100 to 200
[*SwitchD-mst-region] commit
[~SwitchD-mst-region] quit
[~SwitchD] erps ring 2
[*SwitchD-erps-ring2] control-vlan 20
[*SwitchD-erps-ring2] protected-instance 2
[*SwitchD-erps-ring2] commit
[~SwitchD-erps-ring2] quit
[~SwitchD] stp region-configuration
[~SwitchD-mst-region] instance 2 vlan 20 300 to 400
[*SwitchD-mst-region] commit
[~SwitchD-mst-region] quit
# Configure SwitchA.
[~SwitchA] erps ring 1
[~SwitchA-erps-ring1] version v2
[*SwitchA-erps-ring1] commit
[~SwitchA-erps-ring1] quit
[~SwitchA] erps ring 2
[~SwitchA-erps-ring2] version v2
[*SwitchA-erps-ring2] sub-ring
[*SwitchA-erps-ring2] commit
[~SwitchA-erps-ring2] quit
# Configure SwitchB.
[~SwitchB] erps ring 1
[~SwitchB-erps-ring1] version v2
[*SwitchB-erps-ring1] commit
[~SwitchB-erps-ring1] quit
# Configure SwitchC.
[~SwitchC] erps ring 2
[~SwitchC-erps-ring2] version v2
[*SwitchC-erps-ring2] sub-ring
[*SwitchC-erps-ring2] commit
[~SwitchC-erps-ring2] quit
# Configure SwitchD.
[~SwitchD] erps ring 1
[~SwitchD-erps-ring1] version v2
[*SwitchD-erps-ring1] commit
[~SwitchD-erps-ring1] quit
[~SwitchD] erps ring 2
[~SwitchD-erps-ring2] version v2
[*SwitchD-erps-ring2] sub-ring
[*SwitchD-erps-ring2] commit
[~SwitchD-erps-ring2] quit
Step 4 Add the ports to ERPS rings and specify port roles. Configure 10GE 1/0/1 on
SwitchB and 10GE 1/0/1 on SwitchC as their respective RPL owner ports.
# Configure SwitchA.
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] stp disable
[*SwitchA-10GE1/0/1] erps ring 1
[*SwitchA-10GE1/0/1] commit
[~SwitchA-10GE1/0/1] quit
[~SwitchA] interface 10ge 1/0/2
[~SwitchA-10GE1/0/2] stp disable
[*SwitchA-10GE1/0/2] erps ring 1
[*SwitchA-10GE1/0/2] erps ring 2
[*SwitchA-10GE1/0/2] commit
[~SwitchA-10GE1/0/2] quit
[~SwitchA] interface 10ge 1/0/3
[~SwitchA-10GE1/0/3] stp disable
[*SwitchA-10GE1/0/3] erps ring 2
[*SwitchA-10GE1/0/3] commit
[~SwitchA-10GE1/0/3] quit
# Configure SwitchB.
[~SwitchB] interface 10ge 1/0/1
[~SwitchB-10GE1/0/1] stp disable
[*SwitchB-10GE1/0/1] erps ring 1 rpl owner
[*SwitchB-10GE1/0/1] commit
[~SwitchB-10GE1/0/1] quit
[~SwitchB] interface 10ge 1/0/2
[~SwitchB-10GE1/0/2] stp disable
[*SwitchB-10GE1/0/2] erps ring 1
[*SwitchB-10GE1/0/2] commit
[~SwitchB-10GE1/0/2] quit
# Configure SwitchC.
[~SwitchC] interface 10ge 1/0/1
[~SwitchC-10GE1/0/1] stp disable
[*SwitchC-10GE1/0/1] erps ring 2 rpl owner
[*SwitchC-10GE1/0/1] commit
[~SwitchC-10GE1/0/1] quit
[~SwitchC] interface 10ge 1/0/2
[~SwitchC-10GE1/0/2] stp disable
[*SwitchC-10GE1/0/2] erps ring 2
[*SwitchC-10GE1/0/2] commit
[~SwitchC-10GE1/0/2] quit
# Configure SwitchD.
[~SwitchD] interface 10ge 1/0/1
[~SwitchD-10GE1/0/1] stp disable
[*SwitchD-10GE1/0/1] erps ring 1
[*SwitchD-10GE1/0/1] commit
[~SwitchD-10GE1/0/1] quit
[~SwitchD] interface 10ge 1/0/2
[~SwitchD-10GE1/0/2] stp disable
[*SwitchD-10GE1/0/2] erps ring 1
[*SwitchD-10GE1/0/2] erps ring 2
[*SwitchD-10GE1/0/2] commit
[~SwitchD-10GE1/0/2] quit
[~SwitchD] interface 10ge 1/0/3
[~SwitchD-10GE1/0/3] stp disable
[*SwitchD-10GE1/0/3] erps ring 2
[*SwitchD-10GE1/0/3] commit
[~SwitchD-10GE1/0/3] quit
Step 5 Configure the topology change notification function and TC protection on SwitchA
and SwitchD (interconnecting nodes).
# Configure SwitchA.
[~SwitchA] erps ring 1
[~SwitchA-erps-ring1] tc-protection interval 200
[*SwitchA-erps-ring1] tc-protection threshold 60
[*SwitchA-erps-ring1] commit
[~SwitchA-erps-ring1] quit
[~SwitchA] erps ring 2
[~SwitchA-erps-ring2] tc-notify erps ring 1
[*SwitchA-erps-ring2] commit
[~SwitchA-erps-ring2] quit
# Configure SwitchD.
[~SwitchD] erps ring 1
[~SwitchD-erps-ring1] tc-protection interval 200
[*SwitchD-erps-ring1] tc-protection threshold 60
[*SwitchD-erps-ring1] commit
[~SwitchD-erps-ring1] quit
[~SwitchD] erps ring 2
[~SwitchD-erps-ring2] tc-notify erps ring 1
[*SwitchD-erps-ring2] commit
[~SwitchD-erps-ring2] quit
Step 6 Configure the Guard timers and WTR timers in the ERPS rings.
# Configure SwitchA.
[~SwitchA] erps ring 1
[~SwitchA-erps-ring1] wtr-timer 6
[*SwitchA-erps-ring1] guard-timer 100
[*SwitchA-erps-ring1] commit
[~SwitchA-erps-ring1] quit
[~SwitchA] erps ring 2
[~SwitchA-erps-ring2] wtr-timer 6
[*SwitchA-erps-ring2] guard-timer 100
[*SwitchA-erps-ring2] commit
[~SwitchA-erps-ring2] quit
# Configure SwitchB.
[~SwitchB] erps ring 1
[~SwitchB-erps-ring1] wtr-timer 6
[*SwitchB-erps-ring1] guard-timer 100
[*SwitchB-erps-ring1] commit
[~SwitchB-erps-ring1] quit
# Configure SwitchC.
[~SwitchC] erps ring 2
[~SwitchC-erps-ring2] wtr-timer 6
[*SwitchC-erps-ring2] guard-timer 100
[*SwitchC-erps-ring2] commit
[~SwitchC-erps-ring2] quit
# Configure SwitchD.
[~SwitchD] erps ring 1
[~SwitchD-erps-ring1] wtr-timer 6
[*SwitchD-erps-ring1] guard-timer 100
[*SwitchD-erps-ring1] commit
[~SwitchD-erps-ring1] quit
[~SwitchD] erps ring 2
[~SwitchD-erps-ring2] wtr-timer 6
[*SwitchD-erps-ring2] guard-timer 100
[*SwitchD-erps-ring2] commit
[~SwitchD-erps-ring2] quit
# Configure SwitchA.
[~SwitchA] vlan batch 100 to 200 300 to 400
[*SwitchA] commit
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] port trunk allow-pass vlan 100 to 200
[*SwitchA-10GE1/0/1] commit
[~SwitchA-10GE1/0/1] quit
[~SwitchA] interface 10ge 1/0/2
[~SwitchA-10GE1/0/2] port trunk allow-pass vlan 100 to 200 300 to 400
[*SwitchA-10GE1/0/2] commit
[~SwitchA-10GE1/0/2] quit
[~SwitchA] interface 10ge 1/0/3
[~SwitchA-10GE1/0/3] port trunk allow-pass vlan 300 to 400
[*SwitchA-10GE1/0/3] commit
[~SwitchA-10GE1/0/3] quit
# Configure SwitchB.
[~SwitchB] vlan batch 100 to 200
[*SwitchB] commit
[~SwitchB] interface 10ge 1/0/1
[~SwitchB-10GE1/0/1] port trunk allow-pass vlan 100 to 200
[*SwitchB-10GE1/0/1] commit
[~SwitchB-10GE1/0/1] quit
[~SwitchB] interface 10ge 1/0/2
[~SwitchB-10GE1/0/2] port trunk allow-pass vlan 100 to 200
[*SwitchB-10GE1/0/2] commit
[~SwitchB-10GE1/0/2] quit
# Configure SwitchC.
[~SwitchC] vlan batch 300 to 400
[*SwitchC] commit
[~SwitchC] interface 10ge 1/0/1
[~SwitchC-10GE1/0/1] port trunk allow-pass vlan 300 to 400
[*SwitchC-10GE1/0/1] commit
[~SwitchC-10GE1/0/1] quit
[~SwitchC] interface 10ge 1/0/2
[~SwitchC-10GE1/0/2] port trunk allow-pass vlan 300 to 400
[*SwitchC-10GE1/0/2] commit
[~SwitchC-10GE1/0/2] quit
# Configure SwitchD.
[~SwitchD] vlan batch 100 to 200 300 to 400
[*SwitchD] commit
[~SwitchD] interface 10ge 1/0/1
[~SwitchD-10GE1/0/1] port trunk allow-pass vlan 100 to 200
[*SwitchD-10GE1/0/1] commit
[~SwitchD-10GE1/0/1] quit
[~SwitchD] interface 10ge 1/0/2
[~SwitchD-10GE1/0/2] port trunk allow-pass vlan 100 to 200 300 to 400
[*SwitchD-10GE1/0/2] commit
[~SwitchD-10GE1/0/2] quit
[~SwitchD] interface 10ge 1/0/3
[~SwitchD-10GE1/0/3] port trunk allow-pass vlan 300 to 400
[*SwitchD-10GE1/0/3] commit
[~SwitchD-10GE1/0/3] quit
R : RPL Owner
N : RPL Neighbour
FS : Forced Switch
MS : Manual Switch
Total number of rings configured = 1
Ring Control WTR Timer Guard Timer Port 1 Port 2
ID VLAN (min) (csec)
--------------------------------------------------------------------------------
1 10 6 100 (D,R)10GE1/0/1 (F)10GE1/0/2
--------------------------------------------------------------------------------
# Run the display erps verbose command to check detailed information about
the ERPS ring and ports added to the ERPS ring. SwitchB is used as an example.
[~SwitchB] display erps verbose
Ring ID :1
Description : Ring 1
Control Vlan : 10
Protected Instance :1
Service Vlan : 100 to 200
WTR Timer Setting (min) :6 Running (s) :0
Guard Timer Setting (csec) : 100 Running (csec) :0
Holdoff Timer Setting (deciseconds) : 0 Running (deciseconds) : 0
WTB Timer Running (csec) :0
Ring State : Idle
RAPS_MEL :7
Revertive Mode : Revertive
R-APS Channel Mode :-
Version :2
Sub-ring : No
Forced Switch Port :-
Manual Switch Port :-
TC-Notify :-
Time since last topology change : 0 days 4h:12m:20s
--------------------------------------------------------------------------------
Port Port Role Port Status Signal Status
--------------------------------------------------------------------------------
10GE1/0/1 RPL Owner Discarding Non-failed
10GE1/0/2 Common Forwarding Non-failed
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 10 20 100 to 200 300 to 400
#
stp region-configuration
instance 1 vlan 10 100 to 200
instance 2 vlan 20 300 to 400
#
erps ring 1
control-vlan 10
protected-instance 1
wtr-timer 6
guard-timer 100
version v2
tc-protection interval 200
tc-protection threshold 60
#
erps ring 2
control-vlan 20
protected-instance 2
wtr-timer 6
guard-timer 100
version v2
sub-ring
tc-notify erps ring 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10 100 to 200
stp disable
erps ring 1
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 10 20 100 to 200 300 to 400
stp disable
erps ring 1
erps ring 2
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 20 300 to 400
stp disable
erps ring 2
#
return
● SwitchB configuration file
#
sysname SwitchB
#
vlan batch 10 100 to 200
#
stp region-configuration
instance 1 vlan 10 100 to 200
#
erps ring 1
control-vlan 10
protected-instance 1
wtr-timer 6
guard-timer 100
version v2
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10 100 to 200
stp disable
erps ring 1 rpl owner
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 10 100 to 200
stp disable
erps ring 1
#
return
● SwitchC configuration file
#
sysname SwitchC
#
vlan batch 20 300 to 400
#
stp region-configuration
instance 2 vlan 20 300 to 400
#
erps ring 2
control-vlan 20
protected-instance 2
wtr-timer 6
guard-timer 100
version v2
sub-ring
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20 300 to 400
stp disable
erps ring 2 rpl owner
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20 300 to 400
stp disable
erps ring 2
#
return
Fault Description
After ERPS is configured, user traffic cannot be properly forwarded due to
abnormal ERPS ring status.
Procedure
Step 1 Check the port roles in the ERPS ring and status of each device in the ring.
In an ERPS ring, there should be only one RPL owner port. Other ports are
common ports or RPL neighbor ports.
Run the display erps [ ring ring-id ] verbose command in any view to check
whether the value of Ring State is Idle. (Perform this operation on each device in
the ERPS ring.)
If the ERPS ring is incomplete or its status is abnormal, perform the following
operations:
1. Verify that all nodes in the ERPS ring are added to the ERPS ring.
2. Check whether the ERPS ring configuration including the ERPS version
number and major ring/sub-ring on devices in the ERPS ring are the same.
3. Verify that port roles, control VLANs, and protected instances are correctly
configured on all nodes in the ERPS ring.
4. Verify that ports can allow packets of the specified VLANs to pass.
----End
Loopback detection can detect loops on the network connected to the device and
reduce impacts on the network.
TX RX
Switch
You can configure loopback detection on the interface of the Switch in the
preceding scenarios. When a loopback is detected on the interface, the system
sends an alarm. You can set the action to perform on an interface to error-down
when a loopback is detected on the interface or set the time after which the
interface in error-down state automatically recovers. Only users connected to the
interface on which a loopback is detected and is in error-down state are affected,
and other users connected to the Switch can still communicate.
NOTE
● Loopback detection cannot prevent loops on the entire network. It only detects loops on
a single node.
● A large number of packets are sent during loopback detection, occupying CPU resources;
therefore, disable loopback detection if it is not required.
● Loopback detection cannot be used with ring network technologies including ERPS,
Smart Link, STP, RSTP, MSTP, and VBST. Do not configure ring network technologies on
an interface of the LBDT-enabled VLAN. If LBDT has been enabled globally and a ring
network technology need to be configured on an interface, disable LBDT on that
interface first.
Licensing Requirements
Loopback detection 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
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
CE6881/CE6863/CE6820 V200R020C00
CE6881K/CE6881E/CE6863K V200R020C00
CE5810EI V100R002C00
CE5850EI V100R001C00
CE5850HI V100R003C00
CE5855EI V100R005C10
CE5881 V200R020C00
NOTE
For details about the mapping between software versions and switch models, see the
Hardware Query Tool.
Feature Limitations
● LBDT needs to send a large number of detection packets to detect loops,
occupying system resources. Therefore, disable LBDT if loops do not need to
be detected.
● LBDT is a ring network protocol that conflicts with ring network functions
such as Smart Link, ERPS, and STP/RSTP/MSTP/VBST. You are advised not to
configure these ring network functions on an LBDT-enabled interface. In
contrary, if these ring network functions are configured, disable LBDT on the
interface.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 Run loopback-detect enable
LBDT is enabled on the interface.
By default, LBDT is disabled on an interface.
Step 4 Run the following commands as required.
To use LBDT to detect loopbacks on an interface, skip this step.
To use LBDT to detect loops on the downstream network, perform this step.
1. Run the following commands as required.
– Add the access interface to the VLAN where loops need to be detected.
i. Run port link-type access
The interface is configured as the access interface.
ii. Run port default vlan vlan-id
The access interface is added to the VLAN where loops need to be
detected.
– Add the hybrid interface to the VLAN where loops need to be detected.
i. Run port link-type hybrid
The interface is configured as the hybrid interface.
ii. Run port hybrid tagged vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> |
all }
The hybrid interface is added to the VLAN where loops need to be
detected.
– Add the trunk interface to the VLAN where loops need to be detected.
i. Run port link-type trunk
The interface is configured as the trunk interface.
ii. Run port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] }&<1-40>
| all }
The trunk interface is added to the VLAN where loops need to be
detected.
2. Run loopback-detect vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>
LBDT is configured to detect loops in the specified VLAN.
By default, LBDT is not configured to detect loops in the specified VLAN.
NOTE
An interface can send LBDT packets with the specified VLAN tag only when the
specified VLAN has been created.
----End
Context
After loopback detection is enabled on an interface, the interface periodically
sends detection packets and checks whether loopback packets are received. When
a loopback is detected on an interface, the system sets the interface status to
loopback, minimizing impact on the system and the entire network.
Procedure
● Configuring an action to perform after a loopback is detected in the system
view
a. Run system-view
The system view is displayed.
b. Run loopback-detect action error-down
The action to perform on the interface is set to error-down when a
loopback is detected on the interface.
The default action is alarm.
When the system detects a loopback on an interface, the interface enters
the Error-Down state and the system sends an alarm to the NMS.
NOTE
If the action to perform on the interface is alarm, inter-device loopback may suppress
loopback detection on other interfaces on the local device. In this situation, set the
action to error-down or use STP to prevent loopback.
c. Run commit
The configuration is committed.
● Configuring an action to perform after a loopback is detected in the interface
view
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run loopback-detect action { error-down | alarm }
The action to perform on the interface is set when a loopback is detected
on the interface.
By default, when a loopback is detected on an interface, the action is as
follows:
Follow-up Procedure
When the action is set to error-down, if a loopback occurs on the interface, the
interface enters the Error-Down state. The device records the status of an interface
as Error-Down when it detects that a fault occurs. The interface in Error-Down
state cannot receive or send packets and the interface indicator is off. You can run
the display error-down recovery command to check information about all
interfaces in Error-Down state on the device.
When the interface is in Error-Down state, check the cause. You can use the
following modes to restore the interface status:
● Manual (after the interface enters the Error-Down state)
When there are few interfaces in Error-Down state, you can run the
shutdown and undo shutdown commands in the interface view or run the
restart command to restore the interface.
● Auto (before the interface enters the Error-Down state)
If there are many interfaces in Error-Down state, the manual mode brings in
heavy workload and the configuration of some interfaces may be ignored. To
prevent this problem, run the error-down auto-recovery cause loopback-
detect interval interval-value command in the system view to enable an
interface in error-down state to go Up and set a recovery delay. You can run
the display error-down recovery command to view automatic recovery
information about the interface.
NOTE
This mode is invalid for the interface that has entered the Error-Down state, and is only
valid for the interface that enters the Error-Down state after the error-down auto-
recovery cause loopback-detect interval interval-value command is used.
Context
An interface sends loopback detection packets at intervals.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run loopback-detect transmit interval packet-interval-time
The interval between sending loopback detection packets is set.
By default, the interval between sending loopback detection packets is 5 seconds.
Step 3 Run commit
The configuration is committed.
----End
Procedure
● Run the display loopback-detect command to check the loopback detection
configuration and status of loopback detection enabled interfaces.
----End
Networking Requirements
As shown in Figure 13-3, if there is a loop on the network connected to the
10GE1/0/1 interface, broadcast storms will occur on the Switch or even the entire
network.
To detect loops on the network connected to the switch and disabled downlink
interfaces to reduce impacts on the switch and other networks, enable loopback
detection on the Switch.
Switch
10GE1/0/1
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Enable loopback detection on the interface.
<HUAWEI> system-view
[~HUAWEI] sysname Switch
[*HUAWEI] commit
[~Switch] interface 10ge 1/0/1
[~Switch-10GE1/0/1] loopback-detect enable
[*Switch-10GE1/0/1] commit
[~Switch-10GE1/0/1] quit
----End
Configuration Files
Configuration file of the Switch
#
sysname Switch
#
loopback-detect transmit interval 10
loopback-detect action error-down
#
vlan batch 100
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 100
loopback-detect enable
loopback-detect vlan 100
#
return
Definition
Layer 2 protocol tunneling is a Layer 2 tunneling technology that transparently
transmits BPDUs between private networks at different locations over a specified
tunnel on a public Internet Service Provider (ISP) network.
Purpose
Leased lines of ISPs are often used to establish Layer 2 networks. As a result,
private networks of a user can be located at two sides of the ISP network. As
shown in Figure 14-1, User A has two networks: network1 and network2. The two
networks are connected through the ISP network. When network1 and network2
run the same Layer 2 protocol (such as MSTP), Layer 2 protocol packets from
network1 and network2 must be transmitted through the ISP network to perform
Layer 2 protocol calculation (for example, calculating a spanning tree). Generally,
the destination MAC addresses in Layer 2 protocol packets of the same Layer 2
protocol are the same. For example, the MSTP PDUs are BPDUs with the
destination MAC address 0180-C200-0000. Therefore, when a Layer 2 protocol
packet reaches an edge device on the ISP network, the edge device cannot identify
whether the Layer 2 protocol packet comes from a user network or the ISP
network and sends the Layer 2 protocol packets to the CPU to calculate a
spanning tree.
In Figure 14-1, devices on user network1 build a spanning tree together with PE1
but not with devices on user network2. As a result, the Layer 2 protocol packets
on user network1 cannot traverse the ISP network to reach user network2.
User A User A
Network1 network2
You can use Layer 2 protocol tunneling to transparently transmit Layer 2 protocol
packets from the user network for the ISP network. This addresses the network
identity issue. The procedure is as follows:
1. After receiving Layer 2 protocol packets sent from CE1, PE1 replaces the
destination MAC address with a specified multicast MAC address. Then PE1
forwards the packets on the ISP network.
2. The Layer 2 protocol packets are forwarded to PE2. PE2 restores the original
destination MAC address of the packets, and sends the packets to CE2.
NOTE
A Huawei device can transparently transmit packets of the following Layer 2 protocols:
● Spanning Tree Protocol (STP)
● Link Aggregation Control Protocol (LACP)
● Ethernet Operation, Administration, and Maintenance 802.3ah (EOAM3ah)
● Link Layer Discovery Protocol (LLDP)
● GARP VLAN Registration Protocol (GVRP)
● GARP Multicast Registration Protocol (GMRP)
● HUAWEI Group Management Protocol (HGMP)
● VLAN Trunking Protocol (VTP)
● Unidirectional Link Detection (UDLD)
● Port Aggregation Protocol (PAGP)
● Cisco Discovery Protocol (CDP)
● Per VLAN Spanning Tree Plus (PVST+)
● Dynamic Trunking Protocol (DTP)
● Device Link Detection Protocol (DLDP)
● User-defined protocols
ISP
Network
PE1 BPDU Tunnel PE2
1. On the device of the ISP network, add the interfaces that connect to the same
user network to the same VLAN. After receiving and identifying the Layer 2
protocol packet (such as a BPDU of the STP protocol) from the user network,
the device on the ISP network adds the default VLAN ID of the interface to
the Layer 2 protocol packet.
2. Based on the mapping between the specified destination multicast MAC
address and the Layer 2 protocol, the ingress PE on the ISP network replaces
the standard destination multicast MAC address of the Layer 2 protocol
packet with the specified destination multicast MAC address.
3. Internal nodes on the ISP network forward the packet through the ISP
network as a common Layer 2 packet.
4. The egress PE on the ISP network restores the original standard destination
MAC address of the packet based on the mapping between the specified
destination multicast MAC address and the Layer 2 protocol and forwards the
packet to the CE.
1. On the device of the ISP network, add the interfaces that connect to the same
user network to the same VLAN. After receiving and identifying the Layer 2
protocol packet (such as a BPDU of the STP protocol) from the user network,
the device on the ISP network adds the default VLAN ID of the interface to
the Layer 2 protocol packet.
LAN-B LAN-B
MSTP MSTP
BPDU Tunnel
LAN-A LAN-A
MSTP MSTP
NOTE
When STP BPDUs are sent from the user network to the backbone network, run the
stp bpdu vlan command to enable the CE to encapsulate the specified VLAN ID in
outgoing STP BPDUs.
2. Enable the devices on the ISP network to identify Layer 2 protocol packets
with the specified VLAN IDs and allow these packets to pass.
3. Based on the mapping between the specified destination multicast MAC
address and the Layer 2 protocol, the ingress PE on the ISP network replaces
the standard destination multicast MAC address of the Layer 2 protocol
packet with the specified destination multicast MAC address.
4. Internal nodes on the ISP network forward the packets through the ISP
network as common Layer 2 packets.
5. The egress PE on the ISP network restores the original standard destination
MAC address of the packet based on the mapping between the specified
destination multicast MAC address and the Layer 2 protocol and forwards the
packet to the CE.
LAN-B LAN-B
MSTP MSTP
PE-VLAN20:CE-VLAN 100~199
PE-VLAN30:CE-VLAN 200~299
LAN-A LAN-A
MSTP MSTP
User A User A
Network1 network2
License Requirements
Layer 2 protocol tunneling 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 14-2 Products and minimum version supporting Layer 2 protocol tunneling
Product Minimum Version Required
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 V100R002C00
CE6850-48S6Q-HI V100R005C00
CE6850-48T6Q-HI/CE6850U-HI/ V100R005C10
CE6851HI
CE6855HI V200R001C00
CE6856HI V200R002C50
CE6857EI V200R005C10
CE6860EI V200R002C50
CE6865EI V200R005C00
CE6865SI V200R019C10
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 V100R002C00
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
● The CE6850HI, CE6851HI, CE6850U-HI, CE5810EI, CE5850HI, CE5855EI and
CE6810LI transparently transmit a maximum of 256 Layer 2 protocol packets
per second, and other models transparently transmit a maximum of 512 Layer
2 protocol packets per second. Excess packets are discarded.
● Do not replace the destination MAC addresses of STP, GVRP, and GMRP
packets with the same multicast MAC address.
● Do not replace the destination MAC addresses of EOAM3ah, LACP, and DLDP
packets with the same multicast MAC address.
● When configuring Layer 2 protocol tunneling, do not use the following
multicast MAC addresses to replace the destination MAC address of Layer 2
protocol packets:
– Destination MAC addresses of BPDUs: 0180-C200-0000 to 0180-
C200-002F
– Destination MAC address of Smart Link packets: 010F-E200-0004
– Special multicast MAC addresses: 0100-0CCC-CCCC and 0100-0CCC-CCCD
– Common multicast MAC addresses that have been used on the device
● CE6881, CE6820, CE6863, CE5880EI, and CE6880EI only support configuring
the device to transparently transmit BPDUs.
Pre-configuration Tasks
Before configuring interface-based Layer 2 protocol tunneling, complete the
following task:
● Setting link layer protocol parameters and IP addresses for interfaces to
ensure that the link layer protocol on the interfaces is Up
Context
When non-standard Layer 2 protocol packets with a specified multicast
destination MAC address need to be transparently transmitted on the backbone
network, define characteristic information about the Layer 2 protocol on the PE.
The characteristics of the Layer 2 protocol include the protocol name, Ethernet
encapsulation format, destination MAC address, and MAC address that replaces
the destination MAC address of Layer 2 protocol packets.
When defining characteristic information about a Layer 2 protocol, do not use the
following multicast MAC addresses to replace the destination MAC address of
Layer 2 protocol packets:
Procedure
Step 1 Run system-view
----End
Context
To prevent a backbone network edge device from sending the received Layer 2
protocol packets to its CPU for processing and ensure that the Layer 2 protocol
packets are tunneled across the backbone network, configure the edge device to
replace the multicast destination MAC address in Layer 2 protocol packets with a
specified multicast MAC address.
Perform the following operations on PEs.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run l2protocol-tunnel protocol-type group-mac { group-mac | default-group-
mac }
The original multicast destination MAC address of Layer 2 protocol packets is
replaced with a specified multicast MAC address.
Most Layer 2 protocols can be identified by protocol type. You can configure a
group MAC address for this type of protocol to reduce configuration workload. The
default group MAC address is 0100-0ccd-cdd0.
NOTE
Do not replace the destination MAC addresses of STP, GVRP, and GMRP packets with the
same multicast MAC address.
Do not replace the destination MAC addresses of EOAM3ah, LACP, and DLDP packets with
the same multicast MAC address.
When configuring Layer 2 protocol tunneling, do not use the following multicast MAC
addresses to replace the destination MAC address of Layer 2 protocol packets:
● Destination MAC addresses of BPDUs: 0180-C200-0000 to 0180-C200-002F
● Destination MAC address of Smart Link packets: 010F-E200-0004
● Special multicast MAC addresses: 0100-0CCC-CCCC and 0100-0CCC-CCCD
● Common multicast MAC addresses that have been used on the device
----End
Context
Perform the following operations on PEs based on the required Layer 2 protocol
tunneling mode.
NOTE
The l2protocol-tunnel and l2protocol-tunnel vlan commands cannot specify the same
protocol type on the same interface. Otherwise, the configurations conflict.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The user-side interface view is displayed.
Step 3 Run port link-type hybrid
The link type of the interface is set to hybrid.
Step 4 Run port hybrid pvid vlan vlan-id
The default VLAN of the interface is configured.
Step 5 Run port hybrid untagged vlan vlan-id
The interface is added to the default VLAN in untagged mode.
NOTE
The VLAN tag specified in step 5 must be the same as that specified in step 4.
----End
Procedure
● Run the display l2protocol-tunnel group-mac { all | protocol-type | user-
defined-protocol protocol-name } command to check information about
transparent transmission of specified or all Layer 2 protocol packets.
----End
Pre-configuration Tasks
Before configuring interface-based Layer 2 protocol tunneling, complete the
following task:
● Setting link layer protocol parameters and IP addresses for interfaces to
ensure that the link layer protocol on the interfaces is Up
Context
When non-standard Layer 2 protocol packets with a specified multicast
destination MAC address need to be transparently transmitted on the backbone
network, define characteristic information about the Layer 2 protocol on the PE.
The characteristics of the Layer 2 protocol include the protocol name, Ethernet
encapsulation format, destination MAC address, and MAC address that replaces
the destination MAC address of Layer 2 protocol packets.
When defining characteristic information about a Layer 2 protocol, do not use the
following multicast MAC addresses to replace the destination MAC address of
Layer 2 protocol packets:
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run l2protocol-tunnel user-defined-protocol protocol-name protocol-mac
protocol-mac [ encap-type { { ethernetii | snap } protocol-type protocol-type-
value | llc dsap dsap-value ssap ssap-value } ] group-mac { group-mac | default-
group-mac }
Characteristic information about a Layer 2 protocol is defined.
Step 3 Run commit
The configuration is committed.
----End
Context
To prevent a backbone network edge device from sending the received Layer 2
protocol packets to its CPU for processing and ensure that the Layer 2 protocol
packets are tunneled across the backbone network, configure the edge device to
replace the multicast destination MAC address in Layer 2 protocol packets with a
specified multicast MAC address.
Perform the following operations on PEs.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run l2protocol-tunnel protocol-type group-mac { group-mac | default-group-
mac }
The original multicast destination MAC address of Layer 2 protocol packets is
replaced with a specified multicast MAC address.
Most Layer 2 protocols can be identified by protocol type. You can configure a
group MAC address for this type of protocol to reduce configuration workload. The
default group MAC address is 0100-0ccd-cdd0.
NOTE
Do not replace the destination MAC addresses of STP, GVRP, and GMRP packets with the
same multicast MAC address.
Do not replace the destination MAC addresses of EOAM3ah, LACP, and DLDP packets with
the same multicast MAC address.
When configuring Layer 2 protocol tunneling, do not use the following multicast MAC
addresses to replace the destination MAC address of Layer 2 protocol packets:
● Destination MAC addresses of BPDUs: 0180-C200-0000 to 0180-C200-002F
● Destination MAC address of Smart Link packets: 010F-E200-0004
● Special multicast MAC addresses: 0100-0CCC-CCCC and 0100-0CCC-CCCD
● Common multicast MAC addresses that have been used on the device
----End
Context
Perform the following operations on PEs according to the type of Layer 2 protocol
packets to be transparently transmitted.
NOTE
The l2protocol-tunnel vlan and l2protocol-tunnel commands cannot specify the same
protocol type on the same interface. Otherwise, the configurations conflict.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The user-side interface view is displayed.
Step 3 Configure the link type of the interface as trunk or hybrid.
● Set the link type of the interface to trunk.
a. Run port link-type trunk
The link type of the interface is set to trunk.
b. Run port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } &<1-40> |
all }
The interface is added to a VLAN.
● Set the link type of the interface to hybrid.
a. Run port link-type hybrid
The range of VLAN IDs specified in this step must include VLAN IDs of Layer 2 protocol
packets from user networks.
----End
Pre-configuration Tasks
Before configuring interface-based Layer 2 protocol tunneling, complete the
following task:
Context
When non-standard Layer 2 protocol packets with a specified multicast
destination MAC address need to be transparently transmitted on the backbone
network, define characteristic information about the Layer 2 protocol on the PE.
The characteristics of the Layer 2 protocol include the protocol name, Ethernet
encapsulation format, destination MAC address, and MAC address that replaces
the destination MAC address of Layer 2 protocol packets.
When defining characteristic information about a Layer 2 protocol, do not use the
following multicast MAC addresses to replace the destination MAC address of
Layer 2 protocol packets:
● Destination MAC addresses of BPDUs: 0180-C200-0000 to 0180-C200-002F
● Destination MAC address of Smart Link packets: 010F-E200-0004
● Special multicast MAC addresses: 0100-0CCC-CCCC and 0100-0CCC-CCCD
● Common multicast MAC addresses that have been used on the device
Perform the following operations on PEs.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run l2protocol-tunnel user-defined-protocol protocol-name protocol-mac
protocol-mac [ encap-type { { ethernetii | snap } protocol-type protocol-type-
value | llc dsap dsap-value ssap ssap-value } ] group-mac { group-mac | default-
group-mac }
Characteristic information about a Layer 2 protocol is defined.
Step 3 Run commit
The configuration is committed.
----End
Context
To prevent a backbone network edge device from sending the received Layer 2
protocol packets to its CPU for processing and ensure that the Layer 2 protocol
packets are tunneled across the backbone network, configure the edge device to
replace the multicast destination MAC address in Layer 2 protocol packets with a
specified multicast MAC address.
Procedure
Step 1 Run system-view
Most Layer 2 protocols can be identified by protocol type. You can configure a
group MAC address for this type of protocol to reduce configuration workload. The
default group MAC address is 0100-0ccd-cdd0.
NOTE
Do not replace the destination MAC addresses of STP, GVRP, and GMRP packets with the
same multicast MAC address.
Do not replace the destination MAC addresses of EOAM3ah, LACP, and DLDP packets with
the same multicast MAC address.
When configuring Layer 2 protocol tunneling, do not use the following multicast MAC
addresses to replace the destination MAC address of Layer 2 protocol packets:
● Destination MAC addresses of BPDUs: 0180-C200-0000 to 0180-C200-002F
● Destination MAC address of Smart Link packets: 010F-E200-0004
● Special multicast MAC addresses: 0100-0CCC-CCCC and 0100-0CCC-CCCD
● Common multicast MAC addresses that have been used on the device
----End
Context
Perform the following operations on PEs based on the required Layer 2 protocol
tunneling mode.
NOTE
The l2protocol-tunnel vlan and l2protocol-tunnel commands cannot specify the same
protocol type on the same interface. Otherwise, the configurations conflict.
Procedure
Step 1 Run system-view
The Dot1q tunnel interface is enabled to add an outer VLAN tag to Layer 2
protocol packets from user networks.
NOTE
The outer VLAN tag specified in step 4 must be included in the VLAN range specified in
step 5.
By default, the drop threshold is 0, meaning that interfaces enabled with Layer 2
protocol tunneling do not limit the volume of received Layer 2 protocol packets.
----End
Procedure
● Run the display l2protocol-tunnel group-mac { all | protocol-type | user-
defined-protocol protocol-name } command to check information about
transparent transmission of specified or all Layer 2 protocol packets.
----End
Context
When the backbone edge device connects to many user edge devices, to improve
efficiency in forwarding BPDUs, the backbone edge device forwards BPDUs
through the hardware. By default, a Layer 2 interface is not allowed to forward
BPDUs when the device forwards BPDUs through the hardware. User edge devices
connected to the backbone edge device cannot communicate. A Layer 2 interface
can be enabled to forward BPDUs when the device forwards BPDUs through the
hardware.
To ensure that tagged BPDUs are forwarded by a Layer 2 interface and untagged
BPDUs are sent to the CPU for processing, enable the device to forward only
tagged BPDUs through the hardware.
Procedure
● Configure the device to transparently transmit all BPDUs.
a. Run system-view
To use the hardware to forward BPDUs of a protocol such as STP, disable this
protocol before running the bpdu bridge enable command.
d. Run commit
----End
Context
You can run the display l2protocol-tunnel statistics command in any view to
check the statistics about Layer 2 protocol packets that are transparently
transmitted on an interface, which helps you locate faults.
Procedure
● Run the display l2protocol-tunnel statistics command in any view to check
the statistics about Layer 2 protocol packets that are transparently
transmitted on an interface.
----End
Context
Before recollecting statistics about Layer 2 protocol packets transparently
transmitted on an interface in a certain period, clear existing statistics on the
interface.
NOTICE
The cleared statistics cannot be restored. Exercise caution when you run this
command.
Procedure
● Run the reset l2protocol-tunnel statistics command in any view to clear the
statistics about Layer 2 protocol packets that are transparently transmitted on
an interface.
----End
Networking Requirements
As shown in Figure 14-6, CEs are edge devices on two private networks of an
enterprise located in different areas, and PE1 and PE2 are edge devices on the ISP
network. The two private networks of the enterprise are Layer 2 networks and
they are connected through the ISP network. STP is run on the Layer 2 networks
to prevent loops. Enterprise users require that STP run only on the private
networks so that spanning trees can be generated correctly.
ISP
network
10GE1/0/1 10GE1/0/1
PE1 PE2
10GE1/0/1 CE1 CE2 10GE1/0/1
User A User A
network1 network2
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure STP on CEs to prevent loops on Layer 2 networks.
2. Add PE interfaces connected to CEs to specified VLANs so that PEs forward
packets from the VLANs.
Procedure
Step 1 Enable STP on CEs.
# Configure CE1.
<HUAWEI> system-view
[~HUAWEI] sysname CE1
[*HUAWEI] commit [~CE1] vlan 100
[*CE1-vlan100] quit
[*CE1] stp enable
[*CE1] interface 10ge 1/0/1
[*CE1-10GE1/0/1] port link-type access [*CE1-10GE1/0/1] port default vlan 100 [*CE1-10GE1/0/1] quit
[*CE1] commit
# Configure CE2.
<HUAWEI> system-view
[~HUAWEI] sysname CE2
[*HUAWEI] commit
[~CE2] vlan 100
[*CE2-vlan100] quit
[*CE2] stp enable
[*CE2] interface 10ge 1/0/1
[*CE2-10GE1/0/1] port link-type access
[*CE2-10GE1/0/1] port default vlan 100
[*CE2-10GE1/0/1] quit
[*CE2] commit
Step 2 Add 10GE1/0/1 on PE1 and PE2 to VLAN 100 and enable Layer 2 protocol
tunneling on PEs.
# Configure PE1.
<HUAWEI> system-view
[~HUAWEI] sysname PE1
[*HUAWEI] commit
[~PE1] stp enable
[*PE1] commit
[~PE1] vlan 100
[*PE1-vlan100] quit
[*PE1] interface 10ge 1/0/1
[*PE1-10GE1/0/1] port link-type access
[*PE1-10GE1/0/1] port default vlan 100
[*PE1-10GE1/0/1] stp disable
[*PE1-10GE1/0/1] l2protocol-tunnel stp enable
[*PE1-10GE1/0/1] quit
[*PE1] commit
# Configure PE2.
<HUAWEI> system-view
[~HUAWEI] sysname PE2
[*HUAWEI] commit
[~PE2] stp enable
[*PE2] commit
[~PE2] vlan 100
[*PE2-vlan100] quit
[*PE2] interface 10ge 1/0/1
[*PE2-10GE1/0/1] port link-type access
[*PE2-10GE1/0/1] port default vlan 100
[*PE2-10GE1/0/1] stp disable
[*PE2-10GE1/0/1] l2protocol-tunnel stp enable
[*PE2-10GE1/0/1] quit
[*PE2] commit
NOTE
If the remote device sends packets of non-standard protocols, first run the l2protocol-
tunnel user-defined-protocol protocol-name protocol-mac protocol-mac [ encap-type
{ { ethernetii | snap } protocol-type protocol-type-value | llc dsap dsap-value ssap ssap-
value } ] group-mac { group-mac | default-group-mac } command to define characteristics
information about the Layer 2 transparent transmission protocol. Then run the l2protocol-
tunnel user-defined-protocol protocol-name enable command to enable Layer 2 protocol
tunneling.
Step 3 Configure PEs to replace the destination MAC address of STP packets received
from CEs.
# Configure PE1.
[~PE1] l2protocol-tunnel stp group-mac 0100-5e00-0011
[*PE1] commit
# Configure PE2.
[~PE2] l2protocol-tunnel stp group-mac 0100-5e00-0011
[*PE2] commit
# After 30s, Run the display stp brief command on CE1 and CE2 to view the root
in the MSTP region. You can find that a spanning tree is calculated between CE1
and CE2. 10GE1/0/1 on CE1 is the root port and 10GE1/0/1 on CE2 is the
designated port.
[~CE1] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 ROOT forwarding none 2000 disable
[~CE2] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 DESI forwarding none 2000 disable
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 100
#
interface 10GE1/0/1
port default vlan 100
#
return
Networking Requirements
As shown in Figure 14-7, CEs are edge devices on two private networks of an
enterprise located in different areas, and PE1 and PE2 are edge devices on the ISP
network. VLAN 100 and VLAN 200 are Layer 2 networks for different users and
are connected through the ISP network. STP is run on the Layer 2 networks to
prevent loops. Enterprise users require that STP run only on the private networks
so that spanning trees can be generated correctly.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure STP on CEs to prevent loops on Layer 2 networks.
2. Configure CEs to send STP packets with specified VLAN tags to PEs so that
calculation of a spanning tree is complete independently in VLAN 100 and
VLAN 200.
3. Configure VLAN-based Layer 2 protocol tunneling on PEs so that STP packets
are not sent to the CPUs of PEs for processing.
Procedure
Step 1 Enable STP on CEs.
# Configure CE1.
<HUAWEI> system-view
[~HUAWEI] sysname CE1
[*HUAWEI] commit [~CE1] stp enable
[*CE1] commit
# Configure CE2.
<HUAWEI> system-view
[~HUAWEI] sysname CE2
[*HUAWEI] commit
[~CE2] stp enable
[*CE2] commit
# Configure CE3.
<HUAWEI> system-view
[~HUAWEI] sysname CE3
[*HUAWEI] commit
[~CE3] stp enable
[*CE3] commit
# Configure CE4.
<HUAWEI> system-view
[~HUAWEI] sysname CE4
[*HUAWEI] commit
[~CE4] stp enable
[*CE4] commit
Step 2 Configure CE1 and CE2 to send STP packets with VLAN tag 100 to PEs, and
configure CE3 and CE4 to send STP packets with VLAN tag 200 to PEs.
# Configure CE1.
[~CE1] vlan 100
[*CE1-vlan100] quit
[*CE1] interface 10ge 1/0/1
[*CE1-10GE1/0/1] port link-type trunk
[*CE1-10GE1/0/1] port trunk allow-pass vlan 100
[*CE1-10GE1/0/1] stp bpdu vlan 100
[*CE1-10GE1/0/1] quit
[*CE1] commit
# Configure CE2.
[~CE2] vlan 100
[*CE2-vlan100] quit
[*CE2] interface 10ge 1/0/1
[*CE2-10GE1/0/1] port link-type trunk
[*CE2-10GE1/0/1] port trunk allow-pass vlan 100
[*CE2-10GE1/0/1] stp bpdu vlan 100
[*CE2-10GE1/0/1] quit
[*CE2] commit
# Configure CE3.
[~CE3] vlan 200
[*CE3-vlan200] quit
[*CE3] interface 10ge 1/0/1
[*CE3-10GE1/0/1] port link-type trunk
[*CE3-10GE1/0/1] port trunk allow-pass vlan 200
[*CE3-10GE1/0/1] stp bpdu vlan 200
[*CE3-10GE1/0/1] quit
[*CE3] commit
# Configure CE4.
[~CE4] vlan 200
[*CE4-vlan200] quit
[*CE4] interface 10ge 1/0/1
[*CE4-10GE1/0/1] port link-type trunk
[*CE4-10GE1/0/1] port trunk allow-pass vlan 200
[*CE4-10GE1/0/1] stp bpdu vlan 200
[*CE4-10GE1/0/1] quit
[*CE4] commit
Step 3 Configure PE interfaces to transparently transmit STP packets of CEs to the peer
ends.
# Configure PE1.
<HUAWEI> system-view
[~HUAWEI] sysname PE1
[~PE1] vlan 100
[*PE1-vlan100] quit
[*PE1] vlan 200
[*PE1-vlan200] quit
[*PE1] interface 10ge 1/0/2
[*PE1-10GE1/0/2] port link-type trunk
[*PE1-10GE1/0/2] port trunk allow-pass vlan 100
[*PE1-10GE1/0/2] l2protocol-tunnel stp vlan 100
[*PE1-10GE1/0/2] quit
[*PE1] interface 10ge 1/0/3
[*PE1-10GE1/0/3] port link-type trunk
[*PE1] commit
# Configure PE2.
<HUAWEI> system-view
[~HUAWEI] sysname PE2
[~PE2] vlan 100
[*PE2-vlan100] quit
[*PE2] vlan 200
[*PE2-vlan200] quit
[*PE2] interface 10ge 1/0/2
[*PE2-10GE1/0/2] port link-type trunk
[*PE2-10GE1/0/2] port trunk allow-pass vlan 100
[*PE2-10GE1/0/2] l2protocol-tunnel stp vlan 100
[*PE2-10GE1/0/2] quit
[*PE2] interface 10ge 1/0/3
[*PE2-10GE1/0/3] port link-type trunk
[*PE2-10GE1/0/3] port trunk allow-pass vlan 200
[*PE2-10GE1/0/3] l2protocol-tunnel stp vlan 200
[*PE2-10GE1/0/3] quit
[*PE2] commit
NOTE
If the remote device sends packets of non-standard protocols, first run the l2protocol-
tunnel user-defined-protocol protocol-name protocol-mac protocol-mac [ encap-type
{ { ethernetii | snap } protocol-type protocol-type-value | llc dsap dsap-value ssap ssap-
value } ] group-mac { group-mac | default-group-mac } command to define characteristics
information about the Layer 2 transparent transmission protocol. Then run the l2protocol-
tunnel user-defined-protocol protocol-name vlan { low-id [ to high-id ] } &<1-10>
command to enable VLAN-based Layer 2 protocol tunneling.
Step 4 Configure PEs to replace the destination MAC address of STP packets received
from CEs.
# Configure PE1.
[~PE1] l2protocol-tunnel stp group-mac 0100-5e00-0011
[*PE1] commit
# Configure PE2.
[~PE2] l2protocol-tunnel stp group-mac 0100-5e00-0011
[*PE2] commit
Step 5 Configure CE2 and CE4 to the priority of a switching device is 4096.
# Configure CE2.
[~CE2] stp priority 4096
[*CE2] commit
# Configure CE4.
[~CE4] stp priority 4096
[*CE4] commit
# After 30s, run the display stp brief command on CE1 and CE2 to view the root
in the MSTP region. You can find that a spanning tree is calculated between CE1
and CE2. 10GE1/0/1 on CE1 is the root port and 10GE1/0/1 on CE2 is the
designated port.
[~CE1] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 ROOT forwarding none 2000 disable
[~CE2] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 DESI forwarding none 2000 disable
# After 30s, run the display stp brief command on CE3 and CE4 to view the root
in the MSTP region. You can find that a spanning tree is calculated between CE3
and CE4. 10GE1/0/1 on CE3 is the root port and 10GE1/0/1 on CE4 is the
designated port.
[~CE3] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 ROOT forwarding none 2000 disable
[~CE4] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 DESI forwarding none 2000 disable
----End
Configuration Files
● Configuration file of CE1
#
sysname CE1
#
vlan batch 100
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 100
stp bpdu vlan 100
#
return
● Configuration file of CE2
#
sysname CE2
#
vlan batch 100
#
stp instance 0 priority 4096
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 100
stp bpdu vlan 100
#
return
● Configuration file of CE3
#
sysname CE3
#
vlan batch 200
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 200
stp bpdu vlan 200
#
return
Networking Requirements
As shown in Figure 14-8, CEs are edge devices on two private networks of an
enterprise located in different areas, and PE1 and PE2 are edge devices on the
enterprise backbone network. VLAN 100 and VLAN 200 are Layer 2 networks for
different users and are connected through the ISP network. STP is run on the
Layer 2 networks to prevent loops. Enterprise users require that STP run only on
the private networks so that spanning trees can be generated correctly.
● All the devices in VLAN 100 participate in calculation of a spanning tree.
● All the devices in VLAN 200 participate in calculation of a spanning tree.
Because of shortage of public VLAN resources, VLAN IDs on carrier networks must
be saved.
User A User A
VLAN100 VLAN100
10GE1/0/1 10GE1/0/1
10GE1/0/2 10GE1/0/2
CE1 CE2
ISP
PE1 PE2
network
CE3 CE4
10GE1/0/3 10GE1/0/3
10GE1/0/1 10GE1/0/1
User B User B
VLAN200 VLAN200
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure STP on CEs to prevent loops on Layer 2 networks.
2. Configure CEs to send STP packets with specified VLAN tags to PEs so that
calculation of a spanning tree is complete independently in VLAN 100 and
VLAN 200.
3. Configure VLAN-based Layer 2 protocol tunneling on PEs so that STP packets
are not sent to the CPUs of PEs for processing.
4. Configure basic QinQ on PEs so that PEs add outer VLAN tag 10 to STP
packets sent from CEs, saving public network VLAN IDs.
Procedure
Step 1 Enable STP on CEs.
# Configure CE1.
<HUAWEI> system-view
[~HUAWEI] sysname CE1
[*HUAWEI] commit
[~CE1] stp enable
[*CE1] commit
# Configure CE2.
<HUAWEI> system-view
[~HUAWEI] sysname CE2
[*HUAWEI] commit
[~CE2] stp enable
[*CE2] commit
# Configure CE3.
<HUAWEI> system-view
[~HUAWEI] sysname CE3
[*HUAWEI] commit
[~CE3] stp enable
[*CE3] commit
# Configure CE4.
<HUAWEI> system-view
[~HUAWEI] sysname CE4
[*HUAWEI] commit
[~CE4] stp enable
[*CE4] commit
Step 2 Configure CE1 and CE2 to send STP packets with VLAN tag 100 to PEs, and
configure CE3 and CE4 to send STP packets with VLAN tag 200 to PEs.
# Configure CE1.
[~CE1] vlan 100
[*CE1-vlan100] quit
[*CE1] interface 10ge 1/0/1
[*CE1-10GE1/0/1] port link-type trunk
[*CE1-10GE1/0/1] port trunk allow-pass vlan 100
[*CE1-10GE1/0/1] stp bpdu vlan 100
[*CE1-10GE1/0/1] quit
[*CE1] commit
# Configure CE2.
[~CE2] vlan 100
[*CE2-vlan100] quit
[*CE2] interface 10ge 1/0/1
[*CE2-10GE1/0/1] port link-type trunk
[*CE2-10GE1/0/1] port trunk allow-pass vlan 100
[*CE2-10GE1/0/1] stp bpdu vlan 100
[*CE2-10GE1/0/1] quit
[*CE2] commit
# Configure CE3.
[~CE3] vlan 200
[*CE3-vlan200] quit
[*CE3] interface 10ge 1/0/1
[*CE3-10GE1/0/1] port link-type trunk
[*CE3-10GE1/0/1] port trunk allow-pass vlan 200
[*CE3-10GE1/0/1] stp bpdu vlan 200
[*CE3-10GE1/0/1] quit
[*CE3] commit
# Configure CE4.
[~CE4] vlan 200
[*CE4-vlan200] quit
[*CE4] interface 10ge 1/0/1
[*CE4-10GE1/0/1] port link-type trunk
Step 3 Configure basic QinQ-based Layer 2 protocol tunneling on PEs so that STP packets
with VLAN tags 100 and 200 are tagged with outer VLAN 10 by PEs and can be
transmitted on the ISP network.
# Configure PE1.
[~PE1] vlan 10
[*PE1-vlan10] quit
[*PE1] interface 10ge 1/0/2
[*PE1-10GE1/0/2] port link-type dot1q-tunnel
[*PE1-10GE1/0/2] port default vlan 10
[*PE1-10GE1/0/2] l2protocol-tunnel stp vlan 10
[*PE1-10GE1/0/2] quit
[*PE1] interface 10ge 1/0/3
[*PE1-10GE1/0/3] port link-type dot1q-tunnel
[*PE1-10GE1/0/3] port default vlan 10
[*PE1-10GE1/0/3] l2protocol-tunnel stp vlan 10
[*PE1-10GE] quit
[*PE1] commit
# Configure PE2.
[~PE2] vlan 10
[*PE2-vlan10] quit
[*PE2] interface 10ge 1/0/2
[*PE2-10GE1/0/2] port link-type dot1q-tunnel
[*PE2-10GE1/0/2] port default vlan 10
[*PE2-10GE1/0/2] l2protocol-tunnel stp vlan 10
[*PE2-10GE1/0/2] quit
[*PE2] interface 10ge 1/0/3
[*PE2-10GE1/0/3] port link-type dot1q-tunnel
[*PE2-10GE1/0/3] port default vlan 10
[*PE2-10GE1/0/3] l2protocol-tunnel stp vlan 10
[*PE2-10GE1/0/3] quit
[*PE2] commit
NOTE
If the remote device sends packets of non-standard protocols, first run the l2protocol-
tunnel user-defined-protocol protocol-name protocol-mac protocol-mac [ encap-type
{ { ethernetii | snap } protocol-type protocol-type-value | llc dsap dsap-value ssap ssap-
value } ] group-mac { group-mac | default-group-mac } command to define characteristics
information about the Layer 2 transparent transmission protocol. Then run the l2protocol-
tunnel user-defined-protocol protocol-name vlan { low-id [ to high-id ] } &<1-10>
command to enable basic QinQ-based Layer 2 protocol tunneling.
Step 4 Configure PEs to replace the destination MAC address of STP packets received
from CEs.
# Configure PE1.
[~PE1] l2protocol-tunnel stp group-mac 0100-5e00-0011
[*PE1] commit
# Configure PE2.
[~PE2] l2protocol-tunnel stp group-mac 0100-5e00-0011
[*PE2] commit
destination MAC address, group MAC address, and priority of Layer 2 protocol
packets to be transparently transmitted.
Run the display stp brief command on CE1 and CE2 to view the root in the MSTP
region. You can find that a spanning tree is calculated between CE1 and CE2.
10GE1/0/1 on CE1 is the root port and 10GE1/0/1 on CE2 is the designated port.
[~CE1] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 ROOT forwarding none 2000 disable
[~CE2] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 DESI forwarding none 2000 disable
Run the display stp brief command on CE3 and CE4 to view the root in the MSTP
region. You can find that a spanning tree is calculated between CE3 and CE4.
10GE1/0/1 on CE3 is the root port and 10GE1/0/1 on CE4 is the designated port.
[~CE3] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 ROOT forwarding none 2000 disable
[~CE4] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 DESI forwarding none 2000 disable
Run the display vlan command on PEs to view the QinQ configuration.
----End
Configuration Files
● Configuration file of CE1
#
sysname CE1
#
vlan batch 100
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 100
stp bpdu vlan 100
#
return
● Configuration file of CE2
#
sysname CE2
#
vlan batch 100
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 100
stp bpdu vlan 100
#
return
● Configuration file of CE3
#
sysname CE3
#
vlan batch 200
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 200
stp bpdu vlan 200
#
return
● Configuration file of CE4
#
sysname CE4
#
vlan batch 200
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 200
stp bpdu vlan 200
#
return
● Configuration file of PE1
#
sysname PE1
#
vlan batch 10
#
l2protocol-tunnel stp group-mac 0100-5e00-0011
#
interface 10GE1/0/2
port link-type dot1q-tunnel
port default vlan 10
l2protocol-tunnel stp vlan 10
#
interface 10GE1/0/3
port link-type dot1q-tunnel
port default vlan 10
l2protocol-tunnel stp vlan 10
#
return