S1720, S2700, S5700, and S6720 V200R011C10 Configuration Guide - Ethernet Switching
S1720, S2700, S5700, and S6720 V200R011C10 Configuration Guide - Ethernet Switching
Switches
V200R011C10
Issue 13
Date 2021-10-20
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 switch
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
Convention Description
Security Conventions
● Password setting
– To ensure device security, use ciphertext when configuring a password
and change the password periodically.
– The switch considers all passwords starting and ending with %^%#, %#
%#, %@%@ or @%@% as ciphertext and attempts to decrypt them. If
you configure a plaintext password that starts and ends with %^%#, %#
%#, %@%@ or @%@%, the switch decrypts it and records it into the
configuration file (plaintext passwords are not recorded for the sake of
security). Therefore, do not set a password starting and ending with %^
%#, %#%#, %@%@ or @%@%.
– When you configure passwords in ciphertext, different features must use
different ciphertext passwords. For example, the ciphertext password set
for the AAA feature cannot be used for other features.
● Encryption algorithms
The switch currently supports the 3DES, AES, RSA, SHA1, SHA2, and MD5.
3DES, RSA, and AES are reversible, whereas SHA1, SHA2, and MD5 are
irreversible. Using the encryption algorithms DES, 3DES, RSA (RSA-1024 or
lower), MD5 (in digital signature scenarios and password encryption), or
SHA1 (in digital signature scenarios) is a security risk. If protocols allow, use
more secure encryption algorithms, such as AES, RSA (RSA-2048 or higher),
SHA2, or HMAC-SHA2.
An irreversible encryption algorithm must be used for the administrator
password. SHA2 is recommended for this purpose.
● Personal data
Some personal data (such as MAC or IP addresses of terminals) may be
obtained or used during operation or fault location of your purchased
products, services, features, so you have an obligation to make privacy policies
and take measures according to the applicable law of the country to protect
personal data.
● Mirroring
The terms mirrored port, port mirroring, traffic mirroring, and mirroring in this
document are mentioned only to describe the product's function of
communication error or failure detection, and do not involve collection or
processing of any personal information or communication data of users.
● Reliability design declaration
Network planning and site design must comply with reliability design
principles and provide device- and solution-level protection. Device-level
protection includes planning principles of dual-network and inter-board dual-
link to avoid single point or single link of failure. Solution-level protection
refers to a fast convergence mechanism, such as FRR and VRRP. If solution-
level protection is used, ensure that the primary and backup paths do not
share links or transmission devices. Otherwise, solution-level protection may
fail to take effect.
Disclaimer
● This document is designed as a reference for you to configure your devices. Its
contents, including web pages, command line input and output, are based on
laboratory conditions. It provides instructions for general scenarios, but does
not cover all use cases of all product models. The examples given may differ
from your use case due to differences in software versions, models, and
configuration files. When configuring your device, alter the configuration
depending on your use case.
● The specifications provided in this document are tested in lab environment
(for example, a certain type of cards have been installed on the tested device
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
3.3.3 Configuring MAC Address-Triggered ARP Entry Update to Improve VRRP Switchover Performance
............................................................................................................................................................................................................ 43
3.4 Summary of MAC Address Table Configuration Tasks.............................................................................................44
3.5 Licensing Requirements and Limitations for MAC Address Tables...................................................................... 48
3.6 Default Settings for MAC Address Tables.....................................................................................................................50
3.7 Configuring MAC Address Tables.................................................................................................................................... 51
3.7.1 Configuring a Static MAC Address Entry................................................................................................................... 51
3.7.2 Configuring a Blackhole MAC Address Entry...........................................................................................................52
3.7.3 Setting the Aging Time of Dynamic MAC Address Entries................................................................................. 53
3.7.4 Disabling MAC Address Learning.................................................................................................................................53
3.7.5 Configuring the MAC Address Limiting Function................................................................................................... 62
3.7.6 Enabling MAC Address Trap Functions...................................................................................................................... 63
3.7.7 Configuring a MAC Hash Algorithm........................................................................................................................... 65
3.7.8 Configuring the Extended MAC Entry Resource Mode.........................................................................................67
3.8 Configuring MAC Address Flapping Prevention......................................................................................................... 67
3.8.1 Configuring a MAC Address Learning Priority for an Interface.........................................................................68
3.8.2 Preventing MAC Address Flapping Between Interfaces with the Same Priority..........................................69
3.9 Configuring MAC Address Flapping Detection........................................................................................................... 70
3.10 Configuring the Switch to Discard Packets with an All-0 MAC Address......................................................... 72
3.11 Enabling MAC Address-triggered ARP Entry Update............................................................................................. 73
3.12 Enabling Port Bridge..........................................................................................................................................................74
3.13 Configuring Re-marking of Destination MAC Addresses......................................................................................75
3.14 Maintaining MAC Address Tables................................................................................................................................. 82
3.14.1 Displaying MAC Address Entries................................................................................................................................ 82
3.14.2 Deleting MAC Address Entries.................................................................................................................................... 83
3.14.3 Displaying MAC Address Flapping Information....................................................................................................83
3.15 Configuration Examples for MAC Address Tables................................................................................................... 83
3.15.1 Example for Configuring Static MAC Address Entries........................................................................................ 83
3.15.2 Example for Configuring Blackhole MAC Address Entries................................................................................ 85
3.15.3 Example for Configuring MAC Address Limiting on an Interface.................................................................. 87
3.15.4 Example for Configuring MAC Address Limiting in a VLAN............................................................................ 88
3.15.5 Example for Configuring MAC Address Flapping Prevention.......................................................................... 90
3.15.6 Example for Configuring MAC Address Flapping Detection............................................................................ 92
3.16 Troubleshooting MAC Address Tables......................................................................................................................... 94
3.16.1 MAC Address Entries Failed to Be Learned on an Interface............................................................................ 94
3.17 FAQ About MAC Address Tables................................................................................................................................... 98
3.17.1 How Do I Enable and Disable MAC Address Flapping Detection?................................................................ 98
3.17.2 How Do I Check MAC Address Flapping Information?...................................................................................... 98
3.17.3 What Should I Do When Finding a MAC Address Flapping Alarm?..............................................................98
3.17.4 How Do I Rapidly Determine a Loop?..................................................................................................................... 99
3.17.5 How Do I Configure VLAN-based Blackhole MAC Address Entries?............................................................. 99
4.9 Associating the Secondary Member Interface of an Eth-Trunk Interface in LACP Mode with Its Primary
Member Interface...................................................................................................................................................................... 151
4.10 Configuring Preferential Forwarding of Local Traffic in a Stack..................................................................... 152
4.11 Creating an Eth-Trunk Sub-interface......................................................................................................................... 153
4.12 Configuring an E-Trunk.................................................................................................................................................. 155
4.12.1 Setting the LACP System ID and LACP Priority of an E-Trunk...................................................................... 155
4.12.2 Creating an E-Trunk and Setting the E-Trunk Priority......................................................................................156
4.12.3 Configuring Local and Remote IP Addresses of an E-Trunk.......................................................................... 156
4.12.4 Binding an E-Trunk to a BFD Session.....................................................................................................................157
4.12.5 Adding an Eth-Trunk to an E-Trunk........................................................................................................................ 158
4.12.6 (Optional) Configuring the Working Mode of an Eth-Trunk in an E-Trunk............................................. 158
4.12.7 (Optional) Setting the Password for Encrypting Packets............................................................................... 159
4.12.8 (Optional) Setting the Timeout Interval of Hello Packets............................................................................. 160
4.12.9 (Optional) Setting the Revertive Switching Delay............................................................................................ 161
4.12.10 (Optional) Disabling Revertive Switching on an E-Trunk.............................................................................161
4.12.11 (Optional) Configuring the E-Trunk Sequence Number Check Function............................................... 162
4.12.12 Verifying the E-Trunk Configuration.................................................................................................................... 162
4.13 Maintaining Link Aggregation..................................................................................................................................... 162
4.14 Configuration Examples for Link Aggregation.......................................................................................................163
4.14.1 Example for Configuring Link Aggregation in Manual Mode....................................................................... 163
4.14.2 Example for Configuring Link Aggregation in LACP Mode............................................................................ 166
4.14.3 Example for Configuring an Inter-Chassis Eth-Trunk to Forward Traffic Preferentially Through Local
Member Interfaces (Stack).....................................................................................................................................................170
4.15 Troubleshooting Link Aggregation............................................................................................................................. 174
4.15.1 Traffic Is Unevenly Load Balanced Among Eth-Trunk Member Interfaces Because the Load
Balancing Mode Is Incorrect.................................................................................................................................................. 174
4.15.2 Eth-Trunk at Both Ends Cannot Be Up Because the Lower Threshold for the Number of Active
Interfaces Is Incorrect............................................................................................................................................................... 175
4.16 FAQ About Link Aggregation....................................................................................................................................... 175
4.16.1 Can an Eth-Trunk Be Configured with an IP Address?.....................................................................................175
4.16.2 How Do I Add Member Interfaces to an Eth-Trunk?........................................................................................175
4.16.3 How Do I Delete Member Interfaces from an Eth-Trunk?............................................................................. 176
4.16.4 What Is the Function of the Delay for LACP Preemption?.............................................................................176
4.16.5 Which Switches Are Recommended for Link Aggregation in FTTx Scenarios of MAN?...................... 176
5.9.8 Example for Configuring VLANIF Interfaces to Implement Communication of Hosts on Different
Network Segments in the Same VLAN.............................................................................................................................. 262
5.9.9 Example for Configuring a Traffic Policy to Implement Inter-VLAN Layer 3 Isolation...........................265
5.9.10 Example for Configuring an mVLAN to Implement Remote Management.............................................271
5.9.11 Example for Configuring Transparent Transmission of Protocol Packets in a VLAN.............................274
5.10 Troubleshooting VLANs..................................................................................................................................................276
5.10.1 A VLANIF Interface Fails to Be Created................................................................................................................ 277
5.10.2 A VLANIF Interface Goes Down...............................................................................................................................278
5.10.3 Users in a VLAN Cannot Communicate................................................................................................................ 279
5.10.4 IP Addresses of the Connected Interfaces Between Switches Cannot Be Pinged.................................. 280
5.11 FAQ About VLANs............................................................................................................................................................ 282
5.11.1 How Do I Create VLANs in a Batch?...................................................................................................................... 282
5.11.2 How Do I Add Interfaces to a VLAN in a Batch?............................................................................................... 282
5.11.3 How Do I Restore the Default VLAN Configuration of an Interface?........................................................ 283
5.11.4 How Do I Change the Link Type of an Interface?............................................................................................. 283
5.11.5 How Do I Rapidly Query the Link Types and Default VLANs of All Interfaces?..................................... 285
5.11.6 How Do I Delete a Single VLAN or VLANs in a Batch?................................................................................... 286
5.11.7 Can Multiple Network Segments Be Configured in a VLAN?....................................................................... 286
5.11.8 How Is the Inter-VLAN Communication Fault Rectified?................................................................................287
5.11.9 Do VLANs Need to Be Assigned on the Intermediate Device That Transparently Transmits Packets?
......................................................................................................................................................................................................... 289
5.11.10 Why Are MAC-VLAN Entries Invalid?.................................................................................................................. 289
5.11.11 Can the Switch Collect Statistics on Only Traffic Destined for the VLANIF Interface Enabled with
Traffic Statistics?........................................................................................................................................................................ 290
10.15.7 Which VLAN Does the Interface Enabled with VLAN Mapping or QinQ Obtain Through MAC
Address Learning?..................................................................................................................................................................... 571
13 VCMP Configuration.........................................................................................................635
13.1 Overview of VCMP...........................................................................................................................................................635
16.8.9 Verifying the Configuration of VBST Parameters That Affect VBST Convergence.................................861
16.9 Configuring Protection Functions of VBST.............................................................................................................. 862
16.9.1 Configuring BPDU Protection on the Switch.......................................................................................................862
16.9.2 Configuring TC Protection on the Switch............................................................................................................. 863
16.9.3 Configuring Root Protection on a Port................................................................................................................. 864
16.9.4 Configuring Loop Protection on a Port................................................................................................................. 864
16.9.5 Verifying the Configuration of VBST Protection Functions............................................................................ 865
16.10 Setting Parameters for Interworking Between a Huawei Datacom Device and a Non-Huawei Device
......................................................................................................................................................................................................... 866
16.11 Maintaining VBST.......................................................................................................................................................... 867
16.11.1 Displaying VBST Running Information and Statistics.................................................................................... 867
16.11.2 Clearing VBST Statistics........................................................................................................................................... 868
16.12 Example for Configuring VBST.................................................................................................................................. 868
17.9.2 Reporting Topology Changes in a Lower-Layer Network - Enabling the Devices in a SEP Segment
to Process SmartLink Flush Packets.................................................................................................................................... 925
17.9.3 Reporting Topology Changes in an Upper-Layer Network - Configuring Association Between SEP
and CFM........................................................................................................................................................................................ 926
17.9.4 Verifying the Configuration of the Topology Change Notification Function........................................... 927
17.10 Clearing SEP Statistics.................................................................................................................................................. 927
17.11 Configuration Examples for SEP............................................................................................................................... 927
17.11.1 Example for Configuring SEP on a Closed Ring Network............................................................................ 927
17.11.2 Example for Configuring SEP on a Multi-Ring Network.............................................................................. 934
17.11.3 Example for Configuring a Hybrid SEP+MSTP Ring Network.....................................................................946
17.11.4 Example for Configuring a Hybrid SEP+RRPP Ring Network......................................................................955
17.11.5 Example for Configuring SEP Multi-Instance................................................................................................... 967
18.7.8 (Optional) Setting the Values of the Hello Timer and Fail Timer in an RRPP Domain.................... 1024
18.7.9 (Optional) Setting the Value of the Link-Up Timer....................................................................................... 1025
18.7.10 Verifying the RRPP Configuration...................................................................................................................... 1026
18.8 Configuring RRPP Snooping....................................................................................................................................... 1026
18.8.1 Enabling RRPP Snooping......................................................................................................................................... 1026
18.8.2 Configuring the VSI Associated with RRPP Snooping....................................................................................1027
18.8.3 Verifying the RRPP Snooping Configuration..................................................................................................... 1028
18.9 Clearing RRPP Statistics............................................................................................................................................... 1028
18.10 Configuration Examples for RRPP......................................................................................................................... 1029
18.10.1 Example for Configuring a Single RRPP Ring with a Single Instance....................................................1029
18.10.2 Example for Configuring Intersecting RRPP Rings with a Single Instance...........................................1033
18.10.3 Example for Configuring Tangent RRPP Rings.............................................................................................. 1044
18.10.4 Example for Configuring a Single RRPP Ring with Multiple Instances................................................. 1052
18.10.5 Example for Configuring Intersecting RRPP Rings with Multiple Instances........................................ 1061
18.10.6 Example for Configuring Tangent RRPP Rings with Multiple Instances............................................... 1078
18.11 Troubleshooting RRPP............................................................................................................................................... 1088
18.11.1 A Loop Occurs After the RRPP Configuration is Complete....................................................................... 1088
18.12 FAQ About RRPP.......................................................................................................................................................... 1089
18.12.1 Why Does a Broadcast Storm Occur When the Secondary Port of the Master Node Is Blocked?
....................................................................................................................................................................................................... 1089
18.12.2 Can Data Packets Be Blocked in the Control VLAN of RRPP?.................................................................. 1089
2 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
Advanced Research Projects Agency Network (ARPANET), progenitor of the
Internet. In 1972 also, Robert Metcalfe designed a network to connect computers
in the PARC. That network was based on the Aloha system (a radio network
system) and connected many computers in the PARC, so Metcalfe originally
named the network Alto Aloha network. The Alto Aloha network started
operating in May 1973, and Metcalfe then gave it an official name Ethernet, which
is the prototype of Ethernet. The network operated at a rate of 2.94 Mbit/s and
used thick coaxial cable as transmission medium. In June 1976, Metcalfe and his
assistant David Boggs published a paper Ethernet Distributed Packet Switching for
Local Computer Networks. At the end of 1977, Metcalfe and his three co-workers
were gained a patent on "Multipoint data communication system with collision
detection." Since then, Ethernet was known to the public.
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.
The physical layer and data link layer depend on each other. Therefore, different
working modes of the physical layer must be supported by corresponding data
link layer modes. This hinders Ethernet design and application.
Some organizations and vendors propose to divide the data link layer into two
sub-layers: the Media Access Control (MAC) sub-layer and the Logical Link Control
(LLC) sub-layer. Then different physical layers correspond to different MAC sub-
layers, and the LLC sub-layer becomes totally independent, as shown in Figure
2-1.
The following sections describe concepts involved in the physical layer and data
link layer.
● 10BASE-2
● 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.
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 2-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 2-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
2.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 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 2-2. If the Data field is less than 46 bytes, the
upper layer must pad the field to 46 bytes.
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
interface works in full-duplex mode and the other interface works in half-
duplex mode, the negotiated working mode is half-duplex). The auto-
negotiation function also allows the interfaces to negotiate about the
flow control function.
– If a local interface works in auto-negotiation mode and the remote
interface works in a non-auto-negotiation mode, the negotiated working
mode of the local interface depends on the working mode of the remote
interface.
Collision Domain
On a legacy Ethernet network using thick coaxial cables as a transmission
medium, multiple nodes on a shared medium share the bandwidth on the link and
compete for the right to use the link. A network collision occurs when more than
one node attempts to send a packet on this link at the same time. The Carrier
Sense Multiple Access with Collision Detection (CSMA/CD) mechanism is used to
solve the problem of collisions. Once a collision occurs on a link, the CSMA/CD
mechanism prevents data transmission on this link within a specified time.
Collisions are inevitable on an Ethernet network, and the probability that collision
occurs increases when more nodes are deployed on a shared medium. All nodes
on a shared medium constitute a collision domain. All the nodes in a collision
domain compete for bandwidth. Packets sent from a node, including unicast,
multicast, and broadcast packets, can reach all the other nodes in the collision
domain.
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.
▪ 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.
– Data
The minimum length of the Data field is 46 bytes, which ensures that the
frame is at least 64 bytes in length. The 46-byte Data field is required
even if only 1-byte information needs to be transmitted.
If the payload of the Data field is less than 46 bytes, the Data field must
be padded to 46 bytes.
The maximum length of the Data field is 1500 bytes.
– CRC
The Cyclic Redundancy Check (CRC) field provides an error detection
mechanism.
Each sending device calculates a CRC code containing the DMAC, SMAC,
Type, and Data fields. Then the CRC code is filled into the 4-byte CRC
field.
● Format of an IEEE 802.3 frame
As shown in Figure 2-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.
Field Description
Length The Length field specifies the number of bytes in the Data
field.
Field Description
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.
Port 1 Port 2
MAC
A M
AC C
Port 3 Type
Data
MA
MAC C MAC A Type Data CC
MA
CA
Typ
e
Da
ta PC C
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.
forwarding performance, and small port quantities. New devices capable of high-
speed Layer 3 forwarding are required. Layer 3 switches are such devices.
Switches cannot replace routers in all scenarios because routers provide rich
interface types, good service class control, and powerful routing capabilities that
Layer 3 switches cannot provide.
MAC
MAC Address
Address VLAN
VLAN ID
ID Port
Port IP
IP Address
Address MAC
MAC Address
Address VLAN
VLAN ID
ID Port
Port
MAC
MAC A
A 2
2 IF_1
IF_1 10.1.1.2
10.1.1.2 MAC
MAC A
A 2
2 IF_1
IF_1
MAC
MAC B
B 3
3 IF_2
IF_2 10.2.1.2
10.2.1.2 MAC
MAC B
B 3
3 IF_2
IF_2
Figure 2-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.
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 updates the matching
MAC address entry according to the source MAC address and VLAN ID of the
packet. Then L3 Switch 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.
Network
Aggregation/Core Layer
Access Layer ……
Terminal ……
This chapter describes how to configure the Medium Access Control (MAC)
address table. Each station or server has a unique 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.
3.1 Overview of MAC Address Tables
3.2 Understanding MAC Address Tables
3.3 Application Scenarios for MAC Address Tables
3.4 Summary of MAC Address Table Configuration Tasks
3.5 Licensing Requirements and Limitations for MAC Address Tables
3.6 Default Settings for MAC Address Tables
3.7 Configuring MAC Address Tables
3.8 Configuring MAC Address Flapping Prevention
3.9 Configuring MAC Address Flapping Detection
3.10 Configuring the Switch to Discard Packets with an All-0 MAC Address
3.11 Enabling MAC Address-triggered ARP Entry Update
3.12 Enabling Port Bridge
3.13 Configuring Re-marking of Destination MAC Addresses
3.14 Maintaining MAC Address Tables
3.15 Configuration Examples for MAC Address Tables
3.16 Troubleshooting MAC Address Tables
3.17 FAQ About MAC Address Tables
Static MAC address entry ● Static MAC address When static MAC
entries are manually address entries are
configured. Static MAC configured, authorized
address entries never users can use network
age. resources and other
● The static MAC users are prevented
address entries saved from using the bound
in the system are not MAC addresses to
lost after a system initiate attacks.
restart.
● 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.
0011-0022-0034 10 GE0/0/1
0011-0022-0034 20 GE0/0/2
0011-0022-0035 30 Eth-Trunk20
Functions
A MAC address table is used for unicast forwarding of packets. In Figure 3-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
MAC
1
VLAN
10
Type
Data
PortA
As shown in Figure 3-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.
0 1T 2T 3T 4T
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 3-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 0e0-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.
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.
NOTE
When the interface frequently alternates between Up and Down, MAC address entries may
be not aged within two aging period. At this time, you are advised to check the link quality
or run the port link-flap protection enable command to configure link flapping
protection.
The device provides the following MAC address learning control methods to
address the preceding issue:
GE0/0/2
GE0/0/1
Broadcast to
two interfaces
in the VLAN MAC Address VLAN ID Port
First
First interface
interface that
0011-0022-0034 2 GE0/0/1 learns
learns this
this MAC
that
MAC address.
address.
Interface
Interface that
that learns
learns this
0011-0022-0034 2 GE0/0/2 MAC
MAC address
address later
later
this
MAC: 0011-0022-0034
Network
Port1 SwitchA
MAC:11-22-33
Port2 Access interface
MAC:11-22-33
User
SwitchB
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.
address entry of the bogus device is learned. After the authorized device is
powered on again, its MAC address cannot be learned.
As shown in Figure 3-6, Port1 of the switch is connected to a server. To prevent
unauthorized users from connecting to the switch using the server's MAC address,
you can set a high MAC address learning priority for Port1.
Switch
NOTE
Only the S5720EI, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S5720HI,
S6720EI, and S6720S-EI support this function.
On an Ethernet network, a host sends and receives Ethernet data frames based on
MAC addresses. The Address Resolution Protocol (ARP) maps IP addresses to MAC
addresses. When two devices on different network segments communicate with
each other, they need to map IP addresses to MAC addresses and outbound
interfaces according to ARP entries.
Generally, the outbound interfaces in the matching MAC address entries and ARP
entries are consistent. As shown in Figure 3-7, the outbound interface in both the
MAC address entry and ARP entry is GE0/0/1 at T1. The interface is then changed.
At T2, after a packet is received from the peer device, the outbound interface in
the MAC address entry is immediately changed to GE0/0/2. However, the
outbound interface in the ARP entry is still GE0/0/1. At T3, the aging time of the
ARP entry expires, and the outbound interface in the ARP entry is changed to
GE0/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.
NOTE
The MAC address-triggered ARP entry update function is often used in networking where
devices in a Virtual Router Redundancy Protocol (VRRP) group connect to servers (see 3.3.3
Configuring MAC Address-Triggered ARP Entry Update to Improve VRRP Switchover
Performance), or Layer 3 traffic switching scenarios where STP and Smart Link are used.
the source MAC address, the server's MAC address is learned on another interface
of the switch. Then packets sent by employees to the server are sent to the
unauthorized user. As a result, employees cannot access the server, and important
data may be intercepted by the unauthorized user. To prevent unauthorized users
from using the server's MAC address to attack the switch, set a higher MAC
address learning priority for the interface connected to the server than the
interfaces connected to unauthorized users. In this case, MAC address flapping will
not occur when unauthorized users attack the switch.
Switch
MAC address ● Checks all interfaces and The device only reports alarms
flapping VLANs on a device. after detecting a loop but
detection ● Requires only one cannot eliminate the loop.
command and is
enabled by default.
Port1 Port1
Port1 Port2
Before Switch After
switchover switchover
HostA
A VRRP group may connect to a server but not a switch, as shown in Figure 3-11.
Generally, a server selects only one of network interfaces to send packets. When
the server detects a network failure or traffic transmission failure, it sends packets
through another network interface.
● SwitchA functions as the master device, and the server uses Port2 to send
packets. SwitchA learns the ARP entry and MAC address entry matching the
server on Port2, and SwitchB learns the server MAC address on Port1.
● When the server detects that Port2 is faulty, the server sends packets through
Port1. 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 on the
switches. This function enables a switch to update the corresponding ARP entry
when the outbound interface in a MAC address entry changes.
Port2 Port2
Port1 Port1
Port1 Port2
Server
Aging of dynamic Set the aging time according to 3.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 MAC address You can configure various trap 3.7.6 Enabling MAC
table needs to be functions about MAC addresses to Address Trap
monitored. monitor the usage of MAC Functions
address entries.
● Configure an alarm threshold
for MAC address usage. When
the MAC address usage
exceeds the upper threshold,
the switch generates an alarm.
When the MAC address usage
falls below the lower threshold,
the switch reports a clear
alarm.
● Enable the trap function for
MAC address learning or aging.
When a MAC address entry is
learned or aged out, the switch
sends an alarm.
● Enable the trap function for
MAC address hash conflicts. If
the device cannot learn MAC
address entries while its MAC
address table is not full, the
switch reports an alarm about
a MAC address hash conflict.
The switch needs A faulty host or device may send 3.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.
Licensing Requirements
MAC address configuration commands are available only after the S1720GW,
S1720GWR, and S1720X have the license (WEB management to full management
Electronic RTU License) loaded and activated and the switches are restarted. MAC
address configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S2710SI V100R006(C03&C05)
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● Dynamic MAC address entries can be learned on an interface only after the
interface is added to an existing VLAN.
● Among existing MAC address entries, only MAC addresses of the dynamic
type can be overwritten as MAC addresses of other types.
● Each static MAC address entry can have only one outbound interface.
● When the aging time of dynamic MAC address entries is set to 0, dynamic
MAC address entries do not age. To age MAC address entries, delete the aging
time configuration.
● When MAC address learning is disabled in a VLAN and an interface in the
VLAN on the S5700EI, S5710EI, S5700HI, S5710HI, and S5720EI and the
discard action is configured for the interface, the interface does not discard
packets from this VLAN. For example, MAC address learning is disabled in
VLAN 2 but enabled in VLAN 3; Port1 in VLAN 2 and VLAN 3 has MAC
address learning disabled and the discard action is defined. In this situation,
Port1 discards packets from VLAN 3 but forwards packets from VLAN 2.
● When the interface frequently alternates between Up and Down, MAC
address entries may be not aged within two aging period. At this time, you
are advised to check the link quality or run the port link-flap protection
enable command to configure link flapping protection.
Context
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.
● 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
----End
Context
To protect a device or network against MAC address attacks from hackers,
configure MAC addresses of untrusted users as blackhole MAC addresses. The
device then directly discards the received packets of which the source or
destination MAC addresses match the blackhole MAC address entries.
Procedure
Step 1 Run system-view
----End
Context
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 10 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
Context
The MAC address learning function is enabled by default on the switch. When
receiving a data frame, the switch records the source MAC address of the data
frame and the interface that receives the data frame in a MAC address entry.
When receiving data frames destined for this MAC address, the switch forwards
the data frames through the outbound interface according to the MAC address
entry. The MAC address learning function reduces broadcast packets on a network.
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.
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 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.
● Disable MAC address learning in a VLAN.
a. Run system-view
The system view is displayed.
b. Run vlan vlan-id
The VLAN view is displayed.
c. Run mac-address learning disable
MAC address learning is disabled in the VLAN.
By default, MAC address learning is enabled in a VLAN.
NOTE
When MAC address learning is disabled in a VLAN and an interface in the VLAN on
the S5720EI, and the discard action is configured for the interface, the interface does
not discard packets from this VLAN. For example, MAC address learning is disabled in
VLAN 2 but enabled in VLAN 3; Port1 in VLAN 2 and VLAN has MAC address learning
disabled and performs the discard action. In this situation, Port1 discards packets from
VLAN 3 but forwards packets from VLAN 2.
● Disable MAC address learning for a specified flow.
a. Configure a traffic classifier.
i. Run system-view
The system view is displayed.
ii. Run traffic classifier classifier-name [ operator { and | or } ]
A traffic classifier is created and the traffic classifier view is displayed,
or an existing traffic classifier view is displayed.
and is the logical operator between the rules in the traffic classifier,
which means that:
○ If the traffic classifier contains ACL rules, packets match the
traffic classifier only when they match one ACL rule and all the
non-ACL rules.
○ If the traffic classifier does not contain any ACL rules, packets
match the traffic classifier only when they match all the rules in
the classifier.
The logical operator or means that packets match the traffic
classifier if they match one of the rules in the classifier.
By default, the relationship between rules in a traffic classifier is OR.
iii. Configure matching rules according to the following table.
NOTE
Only the S5720EI, S6720EI, and S6720S-EI support traffic classifiers with
advanced ACLs containing the ttl-expired field.
When a traffic classifier contains if-match ipv6 acl { acl-number | acl-
name }, the S5720HI does not support remark 8021p [ 8021p-value |
inner-8021p ], remark cvlan-id cvlan-id, remark vlan-id vlan-id, or mac-
address learning disable.
iii. Run the quit command to exit from the traffic behavior view.
iv. Run the quit command to exit from the system view.
c. Configure a traffic policy.
i. Run traffic policy policy-name [ match-order { auto | config } ]
A traffic policy is created and the traffic policy view is displayed, or
the view of an existing traffic policy is displayed. If you do not specify
a matching order for traffic classifiers in the traffic policy, the default
matching order config is used.
After a traffic policy is applied, you cannot use the traffic policy
command to modify the matching order of traffic classifiers in the
traffic policy. To modify the matching order, delete the traffic policy,
create a traffic policy, and specify the matching order.
When creating a traffic policy, you can specify the matching order of
its matching rules. The matching order can be either automatic order
or configuration order:
○ Automatic order: Traffic classifiers are matched based on the
priorities of their types. Traffic classifiers based on the following
information are in descending order of priority: Layer 2 and IPv4
Layer 3 information, advanced ACL6 information, basic ACL6
information, Layer 2 information, IPv4 Layer 3 information, and
user-defined ACL information. If data traffic matches multiple
traffic classifiers, and the traffic behaviors conflict with each
other, the traffic behavior corresponding to the highest priority
rule takes effect.
○ Configuration order: Traffic classifiers are matched based on the
sequence in which traffic classifiers were bound to traffic
behaviors.
NOTE
If more than 128 ACL rules defining CAR are configured, a traffic policy
must be applied to an interface, a VLAN, and the system in sequence in the
outbound direction. In the preceding situation, if you need to update ACL
rules, delete the traffic policy from the interface, VLAN, and system and
reconfigure it in sequence.
ii. Run classifier classifier-name behavior behavior-name
A traffic behavior is bound to a traffic classifier in the traffic policy.
iii. Run quit
Exit from the traffic policy view.
iv. Run quit
Exit from the system view.
d. Apply the traffic policy.
Context
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 action to take when the number of learned MAC address entries
reaches the limit is configured.
By default, the switch discards packets with new MAC addresses when
the number of learned MAC address entries reaches the limit.
e. Run mac-limit alarm { disable | enable }
The maximum number of MAC address entries learned in the VLAN is set.
----End
Context
The switch enabled with trap functions sends an alarm when the MAC address
usage exceeds the threshold, a MAC address changes, or a MAC address hash
conflict occurs. The alarms enable you to know the running status of the MAC
address table in real time. MAC address entry resources are key resources for the
switch. Monitoring the use of the MAC address table ensures normal system
operations. The switch provides three trap functions for MAC address entries.
Procedure
● Enable the trap function for MAC address usage out of the specified range.
a. Run system-view
The system view is displayed.
b. Run mac-address threshold-alarm upper-limit upper-limit-value lower-
limit lower-limit-value
The upper and lower alarm thresholds for the MAC address usage are set.
By default, the upper and lower alarm thresholds for the MAC address usage
are 80% and 70% respectively. An alarm is generated when the MAC address
usage is higher than 80%, and a clear alarm is generated when the MAC
address usage is lower than 70%.
● Enable the trap function for MAC address learning or aging.
a. Run system-view
The system view is displayed.
b. (Optional) Run mac-address trap notification interval interval-time
The interval at which the switch checks MAC address learning or aging is
set.
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
● The device uses the hash bucket to store MAC addresses. The device that uses the hash
bucket performs hash calculation for VLAN IDs and MAC addresses in MAC address
entries to be stored and obtains hash bucket indexes. The MAC addresses with the same
hash bucket index are stored in the same hash bucket. If a hash bucket with the
maximum storage space cannot accommodate learned MAC addresses of the hash
bucket, a hash conflict occurs and MAC addresses cannot be stored. The maximum
number of MAC addresses learned by the device through the hash bucket may be not
reached.
● The S5720HI does not support this configuration.
● 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 Configure a hash algorithm.
● Run the mac-address hash-mode { xor | crc } slot slot-id command on the
S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E,
S1720X-E, S2750EI, S2720EI, S5720LI, S5720S-LI, S6720LI, S6720S-LI, S5700LI,
S5700S-LI, S5710-X-LI, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S5720SI, and
S5720S-SI.
● Run the mac-address hash-mode { crc16-lower | crc16-upper | crc32-lower
| crc32-upper | lsb } slot slot-id command on other models except the
S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E,
S1720X-E, S2750EI, S2720EI, S5720LI, S5720S-LI, S6720LI, S6720S-LI, S5700LI,
S5700S-LI, S5710-X-LI, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S5720SI, and
S5720S-SI.
By default, the hash algorithm is crc on the S1720GFR, S1720GW, S1720GWR,
S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2750EI, S2720EI, S5720LI, S5720S-
LI, S6720LI, S6720S-LI, S5700LI, S5700S-LI, S5710-X-LI, S5730SI, S5730S-EI,
S6720SI, S6720S-SI, S5720SI, and S5720S-SI and crc32-lower on other models.
Step 3 Run mac-address hash-bucket-mode { size4 | size8 | size12 | size16 }
The hash bucket size is configured for the MAC address table.
This function is supported only by the S1720GFR, S1720GW, S1720GWR, S1720X,
S1720GW-E, S1720GWR-E, S1720X-E, S2750EI, S5700LI, S5700S-LI, S5720LI,
S5720S-LI, S5720SI, and S5720S-SI.
By default, the hash bucket size of a MAC address table is 4.
NOTE
----End
Context
You can set the MAC entry resource mode to big-mac to increase the MAC
address table size. When the switch transmits heavy traffic, MAC address entries
increase accordingly. If the current MAC address table size cannot meet service
requirements, service running efficiency is reduced. The switch provides the
extended entry space register. You can configure an extended MAC entry resource
mode to increase the MAC address table size.
NOTE
Procedure
Step 1 (Optional) Run display resource-mode configuration
The extended entry resource mode is displayed.
Step 2 Run system-view
The system view is displayed.
Step 3 Run assign resource-mode enhanced-mac slot slot-id
The extended MAC entry resource mode is configured.
NOTE
After the extended MAC entry resource mode is configured, you must restart the switch to make
the configuration take effect.
----End
Context
To prevent MAC address flapping, set different MAC address learning priorities for
interfaces. When two interfaces learn the same MAC address entries, the MAC
address entries learned by the interface with a higher priority override the MAC
address entries learned by the other interface.
Procedure
Perform the following operations on the S5720HI, S5720EI, S6720EI, and S6720S-
EI.
1. Run system-view
The system view is displayed.
2. Run interface interface-type interface-number
The interface view is displayed.
3. Run mac-learning priority priority-id
The MAC address learning priority of the interface is set.
By default, the MAC address learning priority of an interface is 0. A larger
priority value indicates a higher MAC address learning priority.
4. Run mac-learning priority flapping-defend action discard
The switch is configured to discard packets when the switch is configured to
prohibit MAC address flapping.
By default, the action is forward when the switch is configured to prohibit
MAC address flapping.
1. Run system-view
The system view is displayed.
2. Run mac-spoofing-defend enable
Global MAC spoofing defense is enabled.
By default, global MAC spoofing defense is disabled.
3. Run interface interface-type interface-number
The interface view is displayed.
4. Run mac-spoofing-defend enable
MAC spoofing defense is enabled on the interface so that the interface
becomes a trusted interface.
By default, MAC spoofing defense is disabled on an interface.
Context
Preventing MAC address flapping between interfaces with the same priority can
improve network security.
After the switch is configured to prevent MAC address flapping between interfaces
with the same priority, the following problem may occur: If the network device
(such as a server) connected to an interface of switch is powered off and the same
MAC address is learned on another interface, the switch cannot learn the correct
MAC address on the original interface after the network device is powered on.
NOTE
Only the S5720HI, S5720EI, S6720EI, and S6720S-EI support this configuration.
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.
By default, the action is forward when the switch is configured to prohibit MAC
address flapping.
----End
NOTE
● Configuring an action to take for MAC address flapping on an uplink interface may
cause interruption of important uplink traffic, and such configuration is not
recommended.
● The device enabled with MAC address flapping detection can detect loops on a single
point, but cannot obtain the entire network topology. If the network connected to the
device supports loop prevention protocols, use the loop prevention protocols instead of
MAC address flapping detection to eliminate loops.
● If only a few VLANs on the user network encounter loops, it is recommended that you
set the loop prevention action to quit-vlan.
● If a large number of VLANs on the user network encounter loops, it is recommended
that you set the loop prevention action to error-down. This action improves system
performance. Additionally, the remote device can detect the error-down event so that it
can quickly switch traffic to a backup link (if any).
Procedure
Step 1 Run system-view
By default, MAC address flapping detection is enabled. The device detects MAC
address flapping in all VLANs.
One or more VLANs are excluded from MAC address flapping detection.
By default, the system performs MAC address flapping detection in all VLANs. In
special scenarios, for example, when a switch is connected to a server with two
network adapters in active-active mode, the server's MAC address may be learned
on two interfaces of the switch. Such a MAC address flapping event does not need
to be handled. You can exclude the VLAN where the server resides from MAC
address flapping detection.
The security level of MAC address flapping detection is configured in one or more
specified VLANs.
By default, the security level of MAC address flapping detection is middle. That is,
the system considers that MAC address flapping occurs when a MAC address flaps
10 times.
Step 5 (Optional) Run mac-address flapping aging-time aging-time
The aging time of flapping MAC addresses is set.
By default, the aging time of flapping MAC addresses is 300 seconds. If the aging
time of dynamic MAC addresses is long, a MAC address flapping event may be
detected after a long time. To ensure that the system detects MAC address
flapping quickly, shorten the aging time of flapping MAC addresses.
Step 6 (Optional) Configure an action to take after MAC address flapping is detected on
an interface and the priority of the action.
1. Run interface interface-type interface-number
The interface view is displayed.
2. Run mac-address flapping action { quit-vlan | error-down }
An action is specified for the interface if MAC address flapping occurs on the
interface.
By default, no action is configured. If an interface is connected to a user
network that does not support loop prevention protocols, MAC address
flapping may occur when there is a loop on the user network. Use this
command to configure an action on the interface. When MAC address
flapping is detected on the interface, the device takes the configured action. If
the action is set to error-down, the device shuts down the interface. If the
action is set to quit-vlan, the device removes the interface from the VLAN
where MAC address flapping occurs. Only one interface can be shut down
during one aging time of flapping MAC addresses.
NOTE
– Do not use the quit-vlan action together with dynamic VLAN functions such as
GVRP.
– When a MAC address flaps between an interface configured with the error-down
action and an interface configured with the quit-vlan action, the former interface
is shut down and the latter interface is removed from the VLAN. If a loop may be
generated between some interfaces, configure the same action for all the
interfaces.
3. Run mac-address flapping action priority priority
The priority of the action against MAC address flapping is set.
----End
times, a loop may exist on the network. To remove the loop, run the shutdown
command to shut down the interface specified in the MAC address flapping alarm.
Alternatively, configure an action against MAC address flapping on the interface to
remove the loop.
Context
You can configure the switch to discard packets with an all-0 source or destination
MAC address.
Procedure
Step 1 Run system-view
By default, the switch does not discard packets with an all-0 MAC address.
The switch is configured to send an alarm to the NMS when receiving packets
with an all-0 MAC address.
By default, the switch does not send an alarm when receiving packets with an
all-0 MAC address.
NOTE
The drop illegal-mac alarm command allows the switch to generate one alarm. You must
reconfigure the drop illegal-mac alarm command if more than one alarm is required.
----End
Context
Each network device uses an IP address to communicate with other devices. On an
Ethernet network, a host, switching device, or routing device sends and receives
Ethernet data frames based on MAC addresses. The ARP protocol maps IP
addresses to MAC addresses. When two devices on different network segments
communicate with each other, they need to map IP addresses to MAC addresses
and outbound interfaces according to ARP entries.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run mac-address update arp
The MAC address-triggered ARP entry update function is enabled.
By default, the MAC address-triggered ARP entry update function is disabled.
NOTE
● Only the S5720EI, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S5720HI,
S6720EI, and S6720S-EI support this command.
● 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-triggered ARP entry update function does not take effect after ARP
entry fixing is enabled using the arp anti-attack entry-check enable command.
● After the MAC address-triggered ARP entry update function is enabled, the switch
updates an ARP entry only when the outbound interface in the corresponding MAC
address entry changes.
----End
Context
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 switch connects to devices that do not support Layer 2 forwarding. When
users connected to the devices need to communicate, the devices send
packets of the users to the switch for packet forwarding. Because source and
destination MAC addresses of the packets are learned on the same interface,
the port bridge function needs to be enabled on the interface so that the
interface can forward such packets.
● The switch 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 servers perform data
switching for virtual machines, the data switching speed and server
performance are reduced. To improve the data transmission rate and server
performance, enable the port bridge function on the interfaces connected to
the servers so that the switch forwards data packets between the virtual
machines.
Procedure
Step 1 Run system-view
----End
Context
The re-marking function enables the switch to set the specified fields of packets
matching traffic classification rules. After the re-marking action is configured, the
switch still processes outgoing packets based on the original priority but the
downstream device processes the packets based on the re-marked priority. You can
configure action that re-marks the destination MAC address of packets in a traffic
behavior so that the downstream device can identify packets and provide
differentiated services.
NOTE
Procedure
1. Configure a traffic classifier.
a. Run system-view
The system view is displayed.
b. Run traffic classifier classifier-name [ operator { and | or } ]
A traffic classifier is created and the traffic classifier view is displayed, or
an existing traffic classifier view is displayed.
and is the logical operator between the rules in the traffic classifier,
which means that:
▪ If the traffic classifier contains ACL rules, packets match the traffic
classifier only when they match one ACL rule and all the non-ACL
rules.
▪ If the traffic classifier does not contain any ACL rules, packets match
the traffic classifier only when they match all the rules in the
classifier.
The logical operator or means that packets match the traffic classifier if
they match one of the rules in the classifier.
By default, the relationship between rules in a traffic classifier is OR.
c. Configure matching rules according to the following table.
NOTE
Only the S5720EI, S6720EI, and S6720S-EI support traffic classifiers with
advanced ACLs containing the ttl-expired field.
When a traffic classifier contains if-match ipv6 acl { acl-number | acl-name },
the S5720HI does not support remark 8021p [ 8021p-value | inner-8021p ],
remark cvlan-id cvlan-id, remark vlan-id vlan-id, or mac-address learning
disable.
d. Run quit
Exit from the traffic classifier view.
2. Configure a traffic behavior.
a. Run the traffic behavior behavior-name command to create a traffic
behavior and enter the traffic behavior view.
b. Run the remark destination-mac mac-address command to configure
the action that re-marks destination MAC addresses of packets. The
destination MAC address to be re-marked must be a unicast MAC
address.
c. Run the quit command to exit from the traffic behavior view.
d. Run the quit command to exit from the system view.
3. Configure a traffic policy.
If more than 128 ACL rules defining CAR are configured, a traffic policy must be
applied to an interface, a VLAN, and the system in sequence in the outbound
direction. In the preceding situation, if you need to update ACL rules, delete the
traffic policy from the interface, VLAN, and system and reconfigure it in
sequence.
b. Run classifier classifier-name behavior behavior-name
A traffic behavior is bound to a traffic classifier in the traffic policy.
c. Run quit
Exit from the traffic policy view.
d. Run quit
Exit from the system view.
4. Apply the traffic policy.
– Applying a traffic policy to an interface
i. Run system-view
The system view is displayed.
ii. Run interface interface-type interface-number
The interface view is displayed.
iii. Run traffic-policy policy-name { inbound }
A traffic policy is applied to the interface.
– Applying a traffic policy to a VLAN
i. Run system-view
The system view is displayed.
ii. Run vlan vlan-id
The VLAN view is displayed.
iii. Run traffic-policy policy-name { inbound }
A traffic policy is applied to the VLAN.
– Applying a traffic policy to the system
i. Run system-view
The system view is displayed.
ii. Run traffic-policy policy-name global { inbound | outbound } [ slot
slot-id ]
A traffic policy is applied to the system.
Only one traffic policy can be applied to the system or slot in one
direction. A traffic policy cannot be applied to the same direction in
the system and slot simultaneously.
○ In a stack, a traffic policy that is applied to the system takes
effect on all the interfaces and VLANs of all the member
switches in the stack. The system then performs traffic policing
for all the incoming and outgoing packets that match traffic
classification rules on all the member switches. A traffic policy
that is applied to a specified slot takes effect on all the
interfaces and VLANs of the member switch with the specified
stack ID. The system then performs traffic policing for all the
incoming and outgoing packets that match traffic classification
rules on this member switch.
○ On a standalone switch, a traffic policy that is applied to the
system takes effect on all the interfaces and VLANs of the local
switch. The system then performs traffic policing for all the
incoming and outgoing packets that match traffic classification
rules on the local switch. Traffic policies applied to the slot and
system have the same functions.
Display static MAC address entries in a display mac-address static vlan vlan-
specified VLAN. id
Display MAC address entries learned in display mac-address dynamic vlan
a VLAN. vlan-id
Display MAC address entries learned display mac-address dynamic
on an interface. interface-type interface-number
Display a specified MAC address. display mac-address mac-address
Action Command
Action Command
Display alarms about MAC address Run the display trapbuffer command
flapping. to check whether the following alarms
exist:
● OID 1.3.6.1.4.1.2011.5.25.160.3.7
Networking Requirements
As shown in Figure 3-12, the user PC with MAC address 0002-0002-0002 connects
to the GE0/0/1 of the Switch, and the server with MAC address 0004-0004-0004
connects to GE0/0/2 of the Switch. The user PC and server communicate in VLAN
2.
● To prevent unauthorized users from using the user PC's MAC address to
initiate attacks, configure a static MAC address entry for the user PC on the
Switch.
This example applies to scenarios with a small number of users. When there are many
users, use dynamic MAC address entries. For details, see Example for Configuring Port
Security in "Port Security Configuration" in the S1720, S2700, S5700, and S6720
V200R011C10 Configuration Guide - Security.
Network
Switch
GE0/0/1 GE0/0/2
VLAN 2
PC:2-2-2 Server:4-4-4
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLAN 2 and add the interfaces connected to the PC and server to the
VLAN to implement Layer 2 forwarding.
2. Configure static MAC address entries to prevent attacks from unauthorized
users.
Procedure
Step 1 Create static MAC address entries.
# Create VLAN 2 and add GigabitEthernet0/0/1 and GigabitEthernet0/0/2 to VLAN
2.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan 2
[Switch-vlan2] quit
[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] port link-type access
[Switch-GigabitEthernet0/0/1] port default vlan 2
[Switch-GigabitEthernet0/0/1] quit
[Switch] interface gigabitethernet 0/0/2
[Switch-GigabitEthernet0/0/2] port link-type access
# Run the display mac-address static vlan 2 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
-------------------------------------------------------------------------------
MAC Address VLAN/VSI/BD Learned-From Type
-------------------------------------------------------------------------------
0002-0002-0002 2/-/- GE0/0/1 static
0004-0004-0004 2/-/- GE0/0/2 static
-------------------------------------------------------------------------------
Total items displayed = 2
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 2
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 2
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 2
#
mac-address static 0002-0002-0002 GigabitEthernet0/0/1 vlan 2
mac-address static 0004-0004-0004 GigabitEthernet0/0/2 vlan 2
#
return
Networking Requirements
In Figure 3-13, the Switch receives packets from an unauthorized PC that has the
MAC address of 0005-0005-0005 and belongs to VLAN 3. This MAC address entry
can be configured as a blackhole MAC address entry so that the Switch filters out
packets from the unauthorized PC.
Unauthorized
MAC Address VLAN ID
5-5-5 3 user
Switch
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Configure a blackhole MAC address entry.
# Create VLAN 3.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan 3
[Switch-vlan3] quit
-------------------------------------------------------------------------------
Total items displayed = 1
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 3
#
mac-address blackhole 0005-0005-0005 vlan 3
#
return
Networking Requirements
In Figure 3-14, user network 1 and user network 2 connect to the Switch through
the LSW, and the LSW connects to the Switch through GE0/0/1. User network 1
and user network 2 belong to VLAN 10 and VLAN 20 respectively. On the Switch,
MAC address limiting can be configured on GE0/0/1 to control the number of
access users.
Network
Switch
GE0/0/1
LSW
User User
network 1 network 2
VLAN 10 VLAN 20
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and add the downlink interface to the VLANs to implement
Layer 2 forwarding.
Procedure
Step 1 Configure MAC address limiting.
# Create VLAN 10 and VLAN 20, and add the GigabitEthernet0/0/1 to VLAN 10
and VLAN 20.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 10 20
[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] port link-type hybrid
[Switch-GigabitEthernet0/0/1] port hybrid tagged vlan 10 20
# Run the display mac-limit command in any view to check whether the MAC
address limiting rule is successfully configured.
<Switch> display mac-limit
MAC limit is enabled
Total MAC limit rule count : 1
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 10 20
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10 20
mac-limit maximum 100
#
return
Networking Requirements
In Figure 3-15, user network 1 is connected to GE0/0/1 of the Switch through
LSW1, and user network 2 is connected to GE0/0/2 of the Switch through LSW2.
GE0/0/1 and GE0/0/2 belong to VLAN 2. To control the number of access users,
configure MAC address limiting in VLAN 2.
Network
Switch
GE0/0/1 GE0/0/2
LSW1 LSW2
User User
network 1 VLAN 2 network 2
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Configure MAC address limiting.
# Run the display mac-limit command in any view to check whether the MAC
address limiting rule is successfully configured.
<Switch> display mac-limit
MAC limit is enabled
Total MAC limit rule count : 1
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 2
#
vlan 2
mac-limit maximum 100
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 2
port hybrid untagged vlan 2
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 2
port hybrid untagged vlan 2
#
return
Networking Requirements
In Figure 3-16, employees of an enterprise need to access the server connected to
a switch interface. If an unauthorized user uses the server's MAC address as the
source MAC address to send packets to another interface, the server's MAC
address is learned on the interface. Then packets sent from employees to the
server are forwarded to the unauthorized user. As a result, employees cannot
access the server, and important data may be intercepted by the unauthorized
user.
MAC address flapping prevention can be configured to protect the server against
attacks from unauthorized users.
Server
MAC:11-22-33
GE0/0/1 VLAN 10
Switch
GE0/0/2 PC4
MAC:11-22-33
LSW
VLAN10
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 GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 10
port hybrid untagged vlan 10
mac-learning priority 2
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10
#
return
Networking Requirements
In Figure 3-17, a loop occurs on a user network because two LSWs are incorrectly
connected using a network cable. The loop causes MAC address flapping in the
MAC address table of the Switch.
To detect loops in a timely manner, configure MAC address flapping detection on
the Switch. This function enables the Switch to detect loops by checking whether a
MAC address flaps between interfaces. To remove loops on the network, configure
an action against MAC address flapping on the interfaces.
Network
Switch
GE0/0/1 GE0/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
[Switch] mac-address flapping detection
Step 3 Configure the action against MAC address flapping to shutdown on the GE0/0/1
and GE0/0/2.
[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] mac-address flapping action error-down
[Switch-GigabitEthernet0/0/1] quit
[Switch] interface gigabitethernet 0/0/2
[Switch-GigabitEthernet0/0/2] mac-address flapping action error-down
[Switch-GigabitEthernet0/0/2] quit
When the MAC address learned on the GE moves to GE0/0/2, GE0/0/2 is shut
down automatically. You can run the display mac-address flapping record
command to view MAC address flapping records.
[Switch] display mac-address flapping record
S : start time
E : end time
(Q) : quit vlan
(D) : error down
-------------------------------------------------------------------------------
Move-Time VLAN MAC-Address Original-Port Move-Ports MoveNum
-------------------------------------------------------------------------------
S:2012-04-01 17:22:36 1 0000-0000-0007 GE0/0/1 GE0/0/2(D) 83
E:2012-04-01 17:22:44
-------------------------------------------------------------------------------
Total items on slot 0: 1
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
error-down auto-recovery cause mac-address-flapping interval 500
#
mac-address flapping aging-time 500
#
interface GigabitEthernet0/0/1
mac-address flapping action error-down
#
interface GigabitEthernet0/0/2
mac-address flapping action error-down
#
return
Fault Symptom
MAC address entries cannot be learned on an interface, causing Layer 2
forwarding failures.
Procedure
Step 1 Check the configuration on the device.
Whether the Run the display vlan Run the vlan vlan-id command in
VLAN that the vlan-id command in any the system view to create the
interface view. If the system VLAN.
belongs to has displays the message
been created "Error: The VLAN does
not exist", the VLAN is
not created.
Whether the Run the display vlan Run one of the following
interface vlan-id command in any commands in the interface view
transparently view to check whether to add the interface to the VLAN.
transmits the interface name ● Run the port trunk allow-pass
packets from exists. If not, the vlan command if the interface
the VLAN interface does not is a trunk interface.
transparently transmit
packets from the VLAN. ● Run the port hybrid tagged
vlan or port hybrid untagged
vlan command if the interface
is a hybrid interface.
● Run the port default vlan
command if the interface is an
access interface.
Whether MAC Run the display this | Run the undo mac-address
address learning include learning learning disable command in the
is disabled on command in the interface view or VLAN view to
the interface or interface view and VLAN enable MAC address learning.
in the VLAN view to check whether
the mac-address
learning disable
configuration exists. If
so, MAC address
learning is disabled on
the interface or in the
VLAN.
Whether MAC Run the display this | ● Run the mac-limit command
address limiting include mac-limit in the interface view or VLAN
is configured on command in the view to increase the maximum
the interface interface view and VLAN number of learned MAC
and in the VLAN view to check whether address entries.
there is the MAC address ● Run the undo mac-limit
limiting configuration. If command in the interface view
so, the maximum or VLAN view to cancel MAC
number of learned MAC address limiting.
address entries is set.
Whether port Run the display this | ● Run the undo port-security
security is include port-security enable command in the
configured on command in the interface view to disable port
the interface interface view to check security.
whether there is the port ● Run the port-security max-
security configuration. If mac-num command in the
so, port security is interface view to increase the
configured on the maximum number of secure
interface. dynamic MAC address entries
on the interface.
Step 3 Check whether the number of learned MAC address entries has reached the
maximum value. If so, the device cannot learn new MAC address entries.
● If the number of MAC address entries on the interface is less than or equal to
the number of hosts connected to the interface, the device is connected to
more hosts than it supports. Adjust the network deployment.
● If the interface has learned more MAC address entries than the hosts
connected to the interface, the interface may be undergoing a MAC address
attack from the attached network. Locate the attack source in accordance
with the following table.
Scenario Solution
If the number of MAC addresses that have learned by the device does not reach
the maximum number of addresses allowed on the device but MAC addresses still
cannot be learned, go to step 4.
Step 4 Check whether a MAC address hash conflict alarm is generated on the device.
L2IFPPI/4/MACHASHCONFLICTALARM: OID [oid] A hash conflict occurs in MAC addresses.
(IfIndex=[INTEGER], MacAddr=[OPAQUE], VLAN=[GAUGE], VsiName=[OCTET1], InterfaceName=[OCTET2]).
----End
Versions earlier Run the loop-detect eth- Run the undo loop-detect
than V200R001 loop alarm-only in the eth-loop alarm-only in the
support only MAC VLAN view. VLAN view.
address flapping
detection in a
VLAN.
If the alarm is reported multiple times, find the first and second interfaces where
the MAC address is learned. Shut down the second interface to locate the loop.
Then adjust the networking to remove the loop.
Versions earlier Run the loop-detect eth- Run the undo loop-detect
than V200R001 loop alarm-only in the eth-loop alarm-only in the
support only MAC VLAN view. VLAN view.
address flapping
detection in a
VLAN.
Check whether MAC address flapping occurs according to the following table.
Version Command
# Add a blackhole MAC address entry to the MAC address table. For example, in
the blackhole MAC address entry, the MAC address is 0004-0004-0004 and the
VLAN ID is VLAN 10.
<HUAWEI> system-view
[HUAWEI] vlan 10
[HUAWEI-vlan10] quit
[HUAWEI] mac-address blackhole 0004-0004-0004 vlan 10
# Configure an ACL-based simplified traffic policy to discard the packet with MAC
address 0004-0004-0004 and VLAN 10.
<HUAWEI> system-view
[HUAWEI] vlan 10
[HUAWEI-vlan10] quit
[HUAWEI] acl number 4000
[HUAWEI-acl-L2-4000] rule 5 deny source-mac 0004-0004-0004 vlan-id 10
[HUAWEI-acl-L2-4000] rule 10 deny destination-mac 0004-0004-0004 vlan-id 10
[HUAWEI-acl-L2-4000] quit
[HUAWEI] traffic-filter inbound acl 4000
Definition
Ethernet link aggregation, also called Eth-Trunk, bundles multiple physical links to
form a logical link to increase link bandwidth. The bundled links back up each
other, increasing reliability.
Purpose
As the network scale expands increasingly, users propose increasingly high
requirements on Ethernet backbone network bandwidth and reliability. Originally,
to increase the bandwidth, users use high-speed devices to replace old devices.
This solution, however, is costly and inflexible.
Link aggregation helps increase bandwidth by bundling a group of physical
interfaces into a single logical interface, without having to upgrade hardware. In
addition, link aggregation provides link backup mechanisms, greatly improving
link reliability.
Link aggregation has the following advantages:
● Increased bandwidth
The bandwidth of the link aggregation interface is the sum of bandwidth of
member interfaces.
● Higher reliability
When an active link fails, traffic on this active link is switched to another
active link, improving reliability of the link aggregation interface.
● Load balancing
In a link aggregation group (LAG), traffic is load balanced among active links
of member interfaces.
Eth-Trunk not
configured
Eth-Trunk
configured
The upper threshold for the number of active interfaces is inapplicable to the manual
load balancing mode.
● Lower threshold for the number of active interfaces
When the number of active interfaces falls below this threshold, an Eth-Trunk
goes Down. This guarantees the Eth-Trunk a minimum available bandwidth.
Fault detection This mode can only This mode can detect
detect member link member link
disconnections, but disconnections and
cannot detect other other faults such as link
faults such as link layer layer faults and
faults and incorrect link incorrect link
connections. connections.
NOTE
For more information, see 4.2.2 Link Aggregation in Manual Mode and 4.2.3 Link
Aggregation in LACP Mode.
● Link aggregation modes supported by the device
– Intra-device: Member interfaces of an Eth-Trunk are located on the same
device.
– Inter-stack-device: Member interfaces of an Eth-Trunk are located on
member devices of a stack. For details, see 4.2.5 Link Aggregation in
Stack Scenarios.
– Inter-device: The inter-device link aggregation refers to E-Trunk. E-Trunk
allows links between multiple devices to be aggregated based on LACP.
For details, see 4.2.6 E-Trunk.
DeviceA DeviceB
D%
E%
Eth-Trunk
D%+E%=100%
Background
An Eth-Trunk in manual mode can increase the bandwidth. However, the manual
mode can only detect member link disconnections, but cannot detect other faults
such as link layer faults and incorrect link connections.
The Link Aggregation Control Protocol (LACP) can improve fault tolerance of the
Eth-Trunk, provide backup, and ensure high reliability of member links.
LACP uses a standard negotiation mechanism for a switching device so that the
switching device can create and start the aggregated link based on its
configuration. After the aggregated link is created, LACP maintains the link status.
If an aggregated link's status changes, LACP adjusts or removes the link.
For example, in Figure 4-3, four interfaces on DeviceA are bundled into an Eth-
Trunk and the Eth-Trunk is connected to the corresponding interfaces on DeviceB.
Because an interface on DeviceA is incorrectly connected to an interface on
DeviceC, DeviceA may incorrectly send data destined for DeviceB to DeviceC.
However, the Eth-Trunk in manual mode cannot detect this fault in a timely
manner.
If LACP is enabled on DeviceA and DeviceB, the Eth-Trunk correctly selects active
links to forward data after negotiation. Data sent by DeviceA can reach DeviceB.
DeviceA DeviceB
Eth-Trunk
DeviceC
Concepts
● LACP system priority
LACP system priorities are set on devices at both ends of an Eth-Trunk. In
LACP mode, active member interfaces selected by both devices must be
consistent; otherwise, an LAG cannot be established. To keep active member
interfaces consistent at both ends, set a higher priority for one end so that the
other end selects active member interfaces based on the selection of the end
with a higher priority. The smaller the LACP system priority value, the higher
the LACP system priority.
● LACP interface priority
Interface LACP priorities are set to prioritize interfaces of an Eth-Trunk.
Interfaces with higher priorities are selected as active interfaces. The smaller
the LACP interface priority value, the higher the LACP interface priority.
● M:N backup of member interfaces
In LACP mode, LACP is used to negotiate parameters to determine active links
in an LAG. This mode is also called the M:N mode, where M refers to the
number of active links and N refers to the number of backup links. This mode
guarantees high reliability and allows traffic to be load balanced among M
active links.
As shown in Figure 4-4, M+N links with the same attributes (in the same
LAG) are set up between two devices. When data is transmitted over the
aggregated link, traffic is load balanced among M active links and no data is
transmitted over N backup links. Therefore, the actual bandwidth of the
aggregated link is the sum of the M links' bandwidth, and the maximum
bandwidth of the aggregated link is the sum of the M+N links' bandwidth.
If one of M links fails, LACP selects a link from N backup links to replace the
faulty link. The actual bandwidth of the aggregated link is still the sum of M
links' bandwidth, but the maximum bandwidth of the aggregated link is the
sum of the (M+N-1) links' bandwidth.
DeviceA DeviceB
Eth-Trunk
Eth-Trunk 1 Eth-Trunk 1
Active link
Backup link
Item Description
LACPDU
Active link
Backup link
Port 3. When LACP preemption is not enabled, the system does not re-
select the active interface even if the priority of a backup interface is
higher than that of the active interface.
● LACP preemption delay
After LACP preemption occurs, a backup link waits for a given period of time
and then switches to the active status. This period is called LACP preemption
delay. The LACP preemption delay is used to prevent unstable data
transmission over an Eth-Trunk link caused by frequent status changes of
member links.
As shown in Figure 4-8, Port 1 becomes inactive due to a link fault. Then the
link of Port 1 recovers. If LACP preemption is enabled and the LACP
preemption delay is set, Port 1 switches to be active after the LACP
preemption delay.
● Switchover between active and inactive links
In LACP mode, a link switchover in an LAG is triggered if a device at one end
detects one of the following events:
– An active link goes Down.
– Ethernet OAM detects a link fault.
– LACP detects a link fault.
– An active interface becomes unavailable.
– When LACP preemption is enabled, a backup interface's priority is
changed to be higher than that of the current active interface.
When any of the preceding events occurs, perform the following operations:
a. Shut down the faulty link.
b. Select the backup link with the highest priority among N backup links to
replace the faulty active link.
c. The highest priority backup link becomes the active link and begins
forwarding data.
Forwarding Principle
As shown in Figure 4-9, the Eth-Trunk is located between the MAC address layer
and the LLC sub-layer, that is, data link layer.
The Eth-Trunk module maintains a forwarding table that consists of the following
entries:
● HASH-KEY value
The HASH-KEY value is calculated through the hash algorithm based on the
MAC address or IP address in a packet.
● Interface number
Eth-Trunk forwarding entries are relevant to the number of member interfaces
in an Eth-Trunk. Different HASH-KEY values map different outbound
interfaces.
For example, an Eth-Trunk supports a maximum of eight member interfaces.
If physical interfaces 1, 2, 3, and 4 are bundled into an Eth-Trunk, the Eth-
Trunk forwarding table contains four entries, as shown in Figure 4-10. In the
Eth-Trunk forwarding table, the HASH-KEY values are 0, 1, 2, 3, 4, 5, 6, and 7,
and the corresponding interface numbers are 1, 2, 3, 4, 1, 2, 3, and 4.
HASH-KEY 0 1 2 3 4 5 6 7
PORT 1 2 3 4 1 2 3 4
1. The Eth-Trunk module receives a packet from the MAC sub-layer, and then
extracts its source/destination MAC address or IP address.
2. The Eth-Trunk module calculates the HASH-KEY value using the hash
algorithm.
3. Based on the HASH-KEY value, the Eth-Trunk module searches the Eth-Trunk
forwarding table for the interface number, and then sends the packet from
the corresponding interface.
You can use the following load balancing modes according to the actual
networking:
When configuring a load balancing mode, pay attention to the following points:
● The load balancing mode is only valid for the outbound interface of traffic. If
traffic of the inbound interface is uneven, change the load balancing mode of
the uplink outbound interface.
● Data flows should be load balanced among all active links as much as
possible. If data flows are transmitted over one link, traffic congestion may
occur and service running is affected.
For example, when data packets have only one destination MAC address and
IP address, use load balancing based on the source MAC address and IP
address of packets. If load balancing based on the destination MAC address
and IP address is used, traffic is transmitted over one link, causing congestion.
For details about how to determine whether Eth-Trunk load balancing is uneven
and how to adjust Eth-Trunk configurations in this scenario, visit Huawei technical
support website to search for How Do I Adjust Eth-Trunk Configurations When
Eth-Trunk Load Balancing Is Uneven.
Concepts
● Stack device
DeviceA DeviceA
Eth-Trunk Eth-Trunk
Stack Stack
different devices. When the stack device forwards traffic, the Eth-Trunk may select
an inter-chassis member interface based on the hash algorithm. This forwarding
mode occupies bandwidth resources between devices and reduces traffic
forwarding efficiency.
As shown in Figure 4-11, DeviceB and DeviceC constitute a stack, and the stack
connects to DeviceA through an Eth-Trunk. After the Eth-Trunk in the stack is
configured to preferentially forward local traffic, the following functions are
implemented:
● Forwarding received traffic by the local device
When DeviceB has member interfaces of the Eth-Trunk and the member
interfaces function properly, the Eth-Trunk forwarding table of DeviceB
contains only local member interfaces. In this manner, the hash algorithm
selects a local member interface, and traffic is only forwarded through
DeviceB.
● Forwarding received traffic by another device
When DeviceB does not have any member interface of the Eth-Trunk or all
member interfaces are faulty, the Eth-Trunk forwarding table of DeviceB
contains all available member interfaces. In this manner, the hash algorithm
selects a member interface on DeviceC, and traffic is forwarded through
DeviceC.
NOTE
● This function is only valid for known unicast packets, and is invalid for unknown unicast
packets, broadcast packets, and multicast packets.
● Before configuring an Eth-Trunk to preferentially forward local traffic, ensure that
member interfaces of the local Eth-Trunk have sufficient bandwidth to forward local
traffic; otherwise, traffic may be discarded.
4.2.6 E-Trunk
Enhanced Trunk (E-Trunk), an extension based on the Link Aggregation Control
Protocol (LACP), controls and implements link aggregation among multiple
devices. E-Trunk implements device-level link reliability, instead of card-level link
reliability implemented by LACP.
E-Trunk is mainly applied to a scenario where a CE is dual-homed to a network. In
this scenario, E-Trunk can be used to protect PEs and links between the CE and
PEs. Without E-Trunk, a CE can be connected to only one PE by using an Eth-Trunk
link. If the Eth-Trunk or PE fails, the CE cannot communicate with the PE. By using
E-Trunk, the CE can be dual-homed to PEs, establishing device-level protection.
Eth-Trunk20
E-Trunk1
CE
Eth-Trunk10
PE2
NOTE
Only the S1720X, S1720X-E, S5720SI, S5720S-SI, S5720EI, S5720HI, S5730SI, S5730S-EI,
S6720LI, S6720S-LI, S6720SI, S6720S-SI, S6720EI, and S6720S-EI support the E-Trunk.
Basic Concepts
● LACP system priority
In LACP, the LACP system priority is used to differentiate priorities of devices
at both ends of an Eth-Trunk link. A smaller value indicates a higher LACP
system priority.
● System ID
In LACP, the system ID is used to determine the priorities of the two devices at
both ends of an Eth-Trunk link if their LACP priorities are the same. The
smaller the system ID, the higher the priority. By default, the system ID is the
MAC address of an Eth-Trunk.
To enable a CE to consider the PEs as a single device, you must configure the
same system LACP priority and system ID for the PEs at both ends of an E-
Trunk link.
● E-Trunk priority
The E-Trunk priority determines the master/backup status of two devices in an
LAG. As shown in Figure 4-12, PE1 has a higher E-Trunk priority than PE2,
and therefore PE1 is the master device and PE2 is the backup device. The
smaller the E-Trunk priority value, the higher the E-Trunk priority.
● E-Trunk ID
An E-Trunk ID is an integer that identifies an E-Trunk.
● Working mode
The working mode depends on the working mode of the Eth-Trunk added to
the E-Trunk. The Eth-Trunk works in one of the following modes:
– Automatic
– Forcible master
– Forcible backup
● Timeout interval
Normally, the master and backup devices in an E-Trunk periodically send Hello
messages to each other. If the backup device does not receive any Hello
message within the timeout interval, it becomes the master device.
In normal situations:
negotiation capability is Up, the local device starts the switchback delay timer.
After the switchback delay timer expires, the local Eth-Trunk becomes the
master. After LACP negotiation, the Eth-Trunk becomes Up.
E-Trunk Constraints
As shown in Figure 4-12, to improve reliability of CE and PE links and ensure that
traffic is switched between these links, comply with the following rules:
● The configurations at both ends of the E-Trunk link must be consistent. The
Eth-Trunk links directly connecting PEs to the CE must be configured with the
same working rate and duplex mode so that both Eth-Trunks have the same
key and join the same E-Trunk. After the Eth-Trunks are added to the E-Trunk,
both PEs must contain the LACP system priorities and IDs. The interfaces
connecting the CE to PE1 and PE2 must be added to the same Eth-Trunk. The
Eth-Trunk on the CE can have a different ID from that of the PEs. For
example, the CE is configured with Eth-Trunk 1, and both PEs are configured
with Eth-Trunk 10.
● The IP address of the local PE must be the same as the local address of the
remote PE and the IP address of the remote PE must be the same as the
remote address of the local PE to ensure Layer 3 connectivity. Here, it is
recommended that the addresses of the PEs are configured as loopback
interface addresses.
● The two PEs must be configured with the same security key if necessary.
Core
Network
PE-AGG
Eth-Trunk 1
UPE
…… ……
VoIP DATA
IPTV
You can determine the working mode for the Eth-Trunk according to the following
situations:
● If devices at both ends of the Eth-Trunk support LACP, the LACP mode is
recommended.
● If the device at either end of the Eth-Trunk does not support LACP, you must
use the manual mode.
QoS can be implemented on an Eth-Trunk as a common interface. At both ends
(UPE and PE-AGG) of Eth-Trunk 1, traffic shaping, congestion management, and
congestion avoidance can be performed for outgoing traffic, ensuring that packets
of high priorities are sent in a timely manner.
Figure 4-14 Switches are connected across a transmission device using link
aggregation
Transmission
device
Core site
Transmission
device
Transmission Transmission
device device
Access site 2
Different types of network adapters use different link aggregation configuration. See the
network adapter operation guide.
Network
Eth-Trunk 1
Network
CSS
VLAN 2 VLAN 3
Only the S1720X, S1720X-E, S5720SI, S5720S-SI, S5720EI, S5720HI, S5730SI, S5730S-EI,
S6720LI, S6720S-LI, S6720SI, S6720S-SI, S6720EI, and S6720S-EI support the E-Trunk.
As shown in Figure 4-18, the Enhanced Trunk (E-Trunk) protects the links between
CE1 and two PEs (PE1 and PE2) on the network. CE1 is connected to PE1 and PE2
using two Eth-Trunks in LACP mode. The two Eth-Trunks form an E-Trunk to
implement backup and enhance the network reliability.
PE1
Eth-Trunk10
Eth-Trunk20
E-Trunk1 Internet
CE1
Eth-Trunk10
PE2
Loopback1
Switches Are Directly Connected Using Perform either of the two operations:
Link Aggregation ● 4.7 Configuring Link Aggregation
in Manual Mode
● 4.8 Configuring Link Aggregation
in LACP Mode
Scenario Task
Licensing Requirements
Configuration commands of Ethernet link aggregation are available only after the
S1720GW, S1720GWR, and S1720X have the license (WEB management to full
management Electronic RTU License) loaded and activated and the switches are
restarted.Configuration commands of Ethernet link aggregation on other models
are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S2710SI V100R006(C03&C05)
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
Configuration Guidelines Before an Eth-Trunk Is Configured
● An Eth-Trunk contains a maximum of 32 member interfaces on the S5720HI,
16 member interfaces on the S1720X, S1720X-E, S5730SI, S5730S-EI, S6720LI,
S6720S-LI, S6720SI, and S6720S-SI, and 8 member interfaces on other models.
● Starting from V200R009, for the S6720EI and S6720S-EI, you can run the
assign trunk { trunk-group group-number | trunk-member member-
number }* command to configure the maximum number of Eth-Trunks and
maximum number of member interfaces in each Eth-Trunk. For details, see
the description of the assign trunk command in "Ethernet Switching
Configuration Commands" in the Command Reference of the corresponding
version. After the configuration, you can run the display trunk configuration
command to check the default specifications of the maximum number of Eth-
Trunks that are supported and maximum number of member interfaces in
each Eth-Trunk, current specifications, and configured specifications.
● Some commands (such as port link-type access) and static MAC address
entries cannot be configured on member interfaces of an Eth-Trunk.
Otherwise, errors will be reported.
● An Eth-Trunk cannot be added to another Eth-Trunk.
● Member interfaces of an Eth-Trunk must use the same Ethernet type. For
example, GE electrical and optical interfaces can join the same Eth-Trunk.
● In earlier versions of V200R011C10, interfaces with different rates cannot join
the same Eth-Trunk. In V200R011C10 and later versions, interfaces with
different rates can join the same Eth-Trunk by running mixed-rate link
enable.
● When an Eth-Trunk performs load balancing calculation, the interface rate
cannot be used as the calculation weight. When interfaces with different rates
are added to the same Eth-Trunk, traffic is evenly load balanced on all the
links. Therefore, the bandwidth of member interfaces is calculated by the
minimum rate of the member interfaces in the Eth-Trunk. For example, when
a GE interface and a 10GE interface are added to the same Eth-Trunk, the rate
of the GE interface is used in calculation and the bandwidth of the Eth-Trunk
is 2G.
● Both devices of the Eth-Trunk must use the same number of physical
interfaces, interface rate, duplex mode, and flow control mode.
● If an interface of the local device is added to an Eth-Trunk, an interface of the
remote device directly connected to the interface of the local device must also
be added to the Eth-Trunk so that the two ends can communicate.
● Devices on both ends of an Eth-Trunk must use the same link aggregation
mode.
● When the number of active interfaces falls below the lower threshold, the
Eth-Trunk goes Down. This ensures that the Eth-Trunk has a minimum
available bandwidth.
● In FTTx scenarios of MANs, PPPoE is often used for Internet access. If switches
use link aggregation, when traffic is aggregated, ensure that PPPoE packets
are load balanced. In such scenarios, the S5700EI, S5710EI, S5720EI, S5700HI,
S5710HI, S5720HI, S5730SI, S5730S-EI, S6700EI, S6720EI, S6720S-EI, S6720SI,
S6720S-SI, S6720LI, S6720S-LI are recommended.
In the following scenarios, there are other configuration guidelines in addition to
the preceding ones.
Switches Are Connected Across a ● The switches at both ends must use
Transmission Device Using Link link aggregation in LACP mode.
Aggregation ● The transmission device between
switches must be configured to
transparently transmit LACPDUs.
● Manual
● LACP
You can use the following load balancing modes based on actual networking:
Parameter Value
Context
Generally, a switch supports a fixed maximum number of LAGs and a fixed
maximum number of member interfaces in each LAG. On the S6720EI and
S6720S-EI, you can run the assign trunk command to set the maximum number
of LAGs and the maximum number of member interfaces in each LAG,
implementing flexible networking and meeting various service requirements.
Procedure
Step 1 Run system-view
The maximum number of LAGs and the maximum number of member interfaces
in each LAG are set.
By default, the device supports a maximum of 128 LAGs and 8 member interfaces
in each LAG. member-number can be 8, 16, 32, or 64, and member-number
multiplied by group-number cannot exceed 2048.
● After the Eth-Trunk specifications are modified, save the configuration and
restart the switch to make the modification take effect.
----End
Context
Each LAG corresponds to a logical interface, that is, Eth-Trunk. Before configuring
link aggregation, create an Eth-Trunk.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
An Eth-Trunk is created and the Eth-Trunk interface view is displayed.
The value of trunk-id is as follows.
● S1720GFR, S2750EI, S5700LI, S5700S-LI, and S5710-X-LI: 0-63
● S1720GW, S1720GWR, S1720GW-E, S1720GWR-E, S2720EI, S5720SI, S5720LI,
S5720S-LI, and S5720S-SI: 0-119
● S5720EI, S5720HI, S6720EI, and S6720S-EI: 0-127
● S1720X, S1720X-E, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S6720LI, S6720S-
LI: 0-249
On the S6720EI, and S6720S-EI, you can run the assign trunk command to set the
value, and run the display trunk configuration command to check the
configuration.
If the specified Eth-Trunk already exists, this command directly displays the Eth-
Trunk interface view.
----End
Context
Link aggregation can work in manual load balancing mode and LACP mode.
In manual load balancing mode, you must manually create an Eth-Trunk and add
member interfaces to the Eth-Trunk. All active links forward data and evenly load
balance traffic. The manual load balancing mode is used when the peer device
does not support LACP.
If an Eth-Trunk interface has member interfaces, you can switch the Eth-Trunk
interface's working mode between manual mode and LACP mode. However, if the
Eth-Trunk interface is added to an E-Trunk, you cannot change its working mode.
To delete existing member interfaces, run the undo eth-trunk command in the
interface view or the undo trunkport interface-type interface-number command
in the Eth-Trunk interface view.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Step 3 Run mode manual load-balance
A working mode of the Eth-Trunk is configured.
By default, an Eth-Trunk works in manual load balancing mode.
Before configuring an Eth-Trunk, ensure that both ends use the same working
mode. If the local end works in manual load balancing mode, the remote end
must use the manual load balancing mode.
----End
Procedure
● Add member interfaces to an Eth-Trunk in the Eth-Trunk interface view.
a. Run system-view
The system view is displayed.
b. Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
c. (Optional) Run mixed-rate link enable
Interfaces with different rates are allowed to be added to the same Eth-
Trunk.
By default, interfaces with different rates are not allowed to be added to
the same Eth-Trunk.
d. Run trunkport interface-type { interface-number1 [ to interface-
number2 ] } &<1-8> [ mode { active | passive } ]
A member interface is added to the Eth-Trunk.
NOTE
----End
Context
The lower threshold for the number of active interfaces affects the status and
bandwidth of an Eth-Trunk. To ensure that the Eth-Trunk functions properly and is
less affected by member link status changes, set the lower threshold for the
number of active interfaces.
When the number of active interfaces falls below the lower threshold, the Eth-
Trunk goes Down. This ensures that the Eth-Trunk has a minimum available
bandwidth.
The upper threshold for the number of active interfaces is inapplicable to the
manual load balancing mode.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Step 3 Run least active-linknumber link-number
The lower threshold for the number of active interfaces is set.
By default, the lower threshold for the number of active interfaces is 1.
The lower threshold for the number of active interfaces on the local switch can be
different from that on the remote switch.
----End
Context
An Eth-Trunk uses flow-based load balancing. Flow-based load balancing ensures
that frames of the same data flow are forwarded on the same physical link.
Different data flows are forwarded on different physical links to implement load
balancing.
You can configure a common load balancing mode in which IP addresses or MAC
addresses of packets are used to load balance packets; you can also configure an
enhanced load balancing mode for Layer 2 packets, IP packets, and MPLS packets.
Load balancing is valid only for outgoing traffic; therefore, the load balancing
modes for the interfaces at both ends of the link can be different and do not
affect each other.
Only the S1720X, S1720X-E, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S5730SI,
S5730S-EI, S5720HI, S5720EI, S6720EI, and S6720S-EI support the enhanced load
balancing mode.
On the S6720EI and S6720S-EI, when more than 16 member interfaces are
configured using the assign trunk { trunk-group group-number | trunk-member
member-number } * command, only the enhanced mode can be used for load
balancing. If the enhanced mode is not used, problems such as packet loss and
uneven load balancing may occur.
If an incorrect load balancing mode is configured, traffic will be unevenly load
balanced among Eth-Trunk member interfaces. The following restrictions apply
when configuring a load balancing mode:
● In practical services, you need to configure a proper load balancing mode
based on traffic characteristics. When a parameter of traffic changes
frequently, you can set the load balancing mode based on this parameter to
ensure that the traffic load is balanced evenly. For example, if IP addresses in
packets change frequently, use the load balancing mode based on dst-ip, src-
ip, or src-dst-ip so that traffic can be properly load balanced among physical
links. If MAC addresses in packets change frequently and IP addresses are
fixed, use the load balancing mode based on dst-mac, src-mac, or src-dst-
mac so that traffic can be properly load balanced among physical links.
● If the majority of service traffic are MPLS packets, you need to set the
enhanced load balancing mode. You can run the mpls field command in the
load balancing profile view to configure the load balancing mode of MPLS
packets.
● On a network where an Eth-Trunk and a stack is configured, if the local-
preference enable command is run to configure an Eth-Trunk interface to
preferentially forward local traffic, traffic arriving at the local device is
preferentially forwarded through Eth-Trunk member interfaces of the local
device. If there is no Eth-Trunk member interface on the local device, traffic is
forwarded through Eth-Trunk member interfaces on another device. This
forwarding mode effectively saves bandwidth resources of member devices in
the stack and improves traffic forwarding efficiency.
Procedure
● Configure a common load balancing mode.
a. Run system-view
NOTE
▪ Run mpls field [ 2nd-label | dip | dmac | sip | smac | sport | top-
label | vlan ] *
A load balancing mode of MPLS packets is set.
By default, load balancing of MPLS packets is based on the two outer
labels (top-label and 2nd-label) of each packet.
d. Run quit
Return to the system view.
e. Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
----End
Procedure
● Run the display eth-trunk [ trunk-id [ interface interface-type interface-
number | verbose ] ] command to check the Eth-Trunk configuration.
● Run the display trunkmembership eth-trunk trunk-id command to check
information about Eth-Trunk member interfaces.
● Run the display eth-trunk [ trunk-id ] load-balance command to check the
load balancing mode of the Eth-Trunk.
● Run the display load-balance-profile [ profile-name ] command to check
the load balancing profile of the Eth-Trunk.
----End
Context
Generally, a switch supports a fixed maximum number of LAGs and a fixed
maximum number of member interfaces in each LAG. On the S6720EI and
S6720S-EI, you can run the assign trunk command to set the maximum number
of LAGs and the maximum number of member interfaces in each LAG,
implementing flexible networking and meeting various service requirements.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run assign trunk { trunk-group group-number | trunk-member member-
number }*
The maximum number of LAGs and the maximum number of member interfaces
in each LAG are set.
By default, the device supports a maximum of 128 LAGs and 8 member interfaces
in each LAG. member-number can be 8, 16, 32, or 64, and member-number
multiplied by group-number cannot exceed 2048.
● When more than 128 Eth-Trunks or 16 member interfaces are configured
using the assign trunk { trunk-group group-number | trunk-member
member-number } * command, the enhanced mode is used for load balance
known unicast packets by default. If the enhanced mode is not used,
problems such as packet loss and uneven load balancing may occur. The
switch load balances non-known unicast packets based on source and
destination MAC addresses by default.
● If you use the assign trunk command to modify Eth-Trunk specifications, the
existing Eth-Trunk configuration will become invalid or be lost. Exercise
caution when you run the assign trunk command.
– When the configured Eth-Trunk specifications are reduced and the Eth-
Trunks that exceed the specifications are configured, the configuration of
excess Eth-Trunks is invalid.
– When the configured value of group-number is larger than 128 or the
configured value of member-number is larger than 16, the switch can
only use the enhanced mode to load balance known unicast packets. The
common mode is invalid for the known unicast packets.
● After the Eth-Trunk specifications are modified, save the configuration and
restart the switch to make the modification take effect.
----End
Context
Each LAG corresponds to a logical interface, that is, Eth-Trunk. Before configuring
link aggregation, create an Eth-Trunk.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
An Eth-Trunk is created and the Eth-Trunk interface view is displayed.
The value of trunk-id is as follows.
● S1720GFR, S2750EI, S5700LI, S5700S-LI, and S5710-X-LI: 0-63
● S1720GW, S1720GWR, S1720GW-E, S1720GWR-E, S2720EI, S5720SI, S5720LI,
S5720S-LI, and S5720S-SI: 0-119
● S5720EI, S5720HI, S6720EI, and S6720S-EI: 0-127
● S1720X, S1720X-E, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S6720LI, S6720S-
LI: 0-249
On the S6720EI, and S6720S-EI, you can run the assign trunk command to set the
value, and run the display trunk configuration command to check the
configuration.
If the specified Eth-Trunk already exists, this command directly displays the Eth-
Trunk interface view.
----End
Context
Link aggregation can work in manual mode or LACP mode depending on whether
LACP is used.
In LACP mode, you must manually create an Eth-Trunk and add interfaces to the
Eth-Trunk. However, LACP determines active interfaces through negotiation.
If an Eth-Trunk interface has member interfaces, you can switch the Eth-Trunk
interface's working mode between manual mode and LACP mode. However, if the
Eth-Trunk interface is added to an E-Trunk, you cannot change its working mode.
To delete existing member interfaces, run the undo eth-trunk command in the
interface view or the undo trunkport interface-type interface-number command
in the Eth-Trunk interface view.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Step 3 Run mode lacp
A working mode of the Eth-Trunk is configured.
By default, an Eth-Trunk works in manual mode.
Before configuring an Eth-Trunk, ensure that both ends use the same working
mode. If the local end works in LACP mode, the remote end must use the LACP
mode.
----End
You can add member interfaces to an Eth-Trunk in the Eth-Trunk interface view or
member interface view.
Procedure
● Add member interfaces to an Eth-Trunk in the Eth-Trunk interface view.
a. Run system-view
Interfaces with different rates are allowed to be added to the same Eth-
Trunk.
NOTE
----End
Context
The number of Up member links affects the status and bandwidth of an Eth-
Trunk. To ensure that the Eth-Trunk functions properly and is less affected by
member link status changes, set the following thresholds.
● Lower threshold for the number of active interfaces: When the number of
active interfaces falls below this threshold, the Eth-Trunk goes Down. This
guarantees the Eth-Trunk a minimum available bandwidth.
● Upper threshold for the number of active interfaces: It is used for improving
network reliability with assured bandwidth. When the number of active
interfaces reaches this threshold, you can add new member interfaces to the
Eth-Trunk, but excess member interfaces enter the Down state.
Procedure
Step 1 Run system-view
The lower threshold for the number of active interfaces on the local device can be
different from that on the remote device. If the two values are different, the larger
one is used.
By default, the upper threshold for the number of active interfaces in an Eth-Trunk
is 32 on the S5720HI, 16 on the S1720X, S1720X-E, S5730SI, S5730S-EI, S6720LI,
S6720S-LI, S6720SI, and S6720S-SI, and 8 on other models.
On the S6720EI, and S6720S-EI, you can run the assign trunk command to set the
value, and run the display trunk configuration command to check the
configuration.
The upper threshold for the number of active interfaces must be greater than or
equal to the lower threshold for the number of active interfaces.
NOTE
----End
Context
An Eth-Trunk uses flow-based load balancing. Flow-based load balancing ensures
that frames of the same data flow are forwarded on the same physical link.
Different data flows are forwarded on different physical links to implement load
balancing.
You can configure a common load balancing mode in which IP addresses or MAC
addresses of packets are used to load balance packets; you can also configure an
enhanced load balancing mode for Layer 2 packets, IP packets, and MPLS packets.
Load balancing is valid only for outgoing traffic; therefore, the load balancing
modes for the interfaces at both ends of the link can be different and do not
affect each other.
Only the S1720X, S1720X-E, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S5730SI,
S5730S-EI, S5720HI, S5720EI, S6720EI, and S6720S-EI support the enhanced load
balancing mode.
On the S6720EI and S6720S-EI, when more than 16 member interfaces are
configured using the assign trunk { trunk-group group-number | trunk-member
member-number } * command, only the enhanced mode can be used for load
balancing. If the enhanced mode is not used, problems such as packet loss and
uneven load balancing may occur.
If an incorrect load balancing mode is configured, traffic will be unevenly load
balanced among Eth-Trunk member interfaces. The following restrictions apply
when configuring a load balancing mode:
● In practical services, you need to configure a proper load balancing mode
based on traffic characteristics. When a parameter of traffic changes
frequently, you can set the load balancing mode based on this parameter to
ensure that the traffic load is balanced evenly. For example, if IP addresses in
packets change frequently, use the load balancing mode based on dst-ip, src-
ip, or src-dst-ip so that traffic can be properly load balanced among physical
links. If MAC addresses in packets change frequently and IP addresses are
fixed, use the load balancing mode based on dst-mac, src-mac, or src-dst-
mac so that traffic can be properly load balanced among physical links.
● If the majority of service traffic are MPLS packets, you need to set the
enhanced load balancing mode. You can run the mpls field command in the
load balancing profile view to configure the load balancing mode of MPLS
packets.
● On a network where an Eth-Trunk and a stack is configured, if the local-
preference enable command is run to configure an Eth-Trunk interface to
preferentially forward local traffic, traffic arriving at the local device is
preferentially forwarded through Eth-Trunk member interfaces of the local
device. If there is no Eth-Trunk member interface on the local device, traffic is
forwarded through Eth-Trunk member interfaces on another device. This
forwarding mode effectively saves bandwidth resources of member devices in
the stack and improves traffic forwarding efficiency.
Procedure
● Configure a common load balancing mode.
a. Run system-view
The system view is displayed.
b. Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
c. Run load-balance { dst-ip | dst-mac | src-ip | src-mac | src-dst-ip | src-
dst-mac }
A load balancing mode of the Eth-Trunk is set.
The default load balancing mode is src-dst-ip.
▪ Run mpls field [ 2nd-label | dip | dmac | sip | smac | sport | top-
label | vlan ] *
A load balancing mode of MPLS packets is set.
By default, load balancing of MPLS packets is based on the two outer
labels (top-label and 2nd-label) of each packet.
d. Run quit
Return to the system view.
e. Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
f. Run load-balance enhanced profile profile-name
The load balancing profile is applied.
NOTE
The preceding load balancing modes apply only to known unicast traffic. To configure
a load balancing mode for unknown unicast traffic, run the unknown-unicast load-
balance { dmac | smac | smacxordmac | enhanced } command in the system view.
Only S5720EI, S5720HI, S6720EI, and S6720S-EI support load balancing for unknown
unicast traffic.
----End
Context
LACP system priority differentiates priorities of devices at both ends. In LACP
mode, active interfaces selected by devices at both ends must be consistent;
otherwise, the LAG cannot be set up. To keep active interfaces consistent at both
ends, you can set the priority of one device to be higher than that of the other
device so that the other device can select active interfaces according to those
selected by the device with a higher priority.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run lacp priority priority
The LACP system priority is set.
A smaller LACP priority value indicates a higher priority. By default, the LACP
system priority is 32768.
The end with a smaller priority value functions as the Actor. If the two ends have
the same priority, the end with a smaller MAC address functions as the Actor.
----End
Context
In LACP mode, LACP interface priorities are set to prioritize interfaces of the same
device. Interfaces with higher priorities are selected as active interfaces.
Procedure
Step 1 Run system-view
By default, the LACP interface priority is 32768. A smaller priority value indicates a
higher LACP priority.
NOTE
If the max active-linknumber link-number command is run in the Eth-Trunk interface view,
you need to run the lacp preempt enable command to enable LACP preemption on the
current Eth-Trunk interface. Otherwise, interfaces with high LACP priorities may fail to be
selected as active interfaces.
----End
Context
The LACP preemption function ensures that the interface with the highest LACP
priority always functions as an active interface. For example, the interface with the
highest priority becomes inactive due to a failure. If LACP preemption is enabled,
the interface becomes active again after it recovers; if LACP preemption is
disabled, the interface cannot become active interface after it recovers.
The LACP preemption delay is the period during which an inactive interface
switches to active. The LACP preemption delay prevents unstable data
transmission on an Eth-Trunk link due to frequent status changes of some links.
Procedure
Step 1 Run system-view
----End
Context
If the Eth-Trunk on the local device cannot detect a self-loop or fault that occurred
on a member interface in the LAG on the remote device, data on the local device
is still load balanced among original active interfaces. As a result, data traffic on
the faulty link is discarded.
After the timeout interval at which LACPDUs are received is set, if a local member
interface does not receive any LACPDUs within the configured timeout interval,
the local member interface becomes Down immediately and no longer forwards
data.
Procedure
Step 1 Run system-view
● After you run the lacp timeout command, the local end notifies the remote
end of the timeout interval by sending LACPDUs. When fast is specified, the
interval for sending LACPDUs is 1 second. When slow is specified, the interval
for sending LACPDUs is 30 seconds.
● The timeout interval for receiving LACPDUs is three times the interval for
sending LACPDUs. When fast is specified, the timeout interval for receiving
LACPDUs is 3 seconds. When slow is specified, the timeout interval for
receiving LACPDUs is 90 seconds.
● You can use different modes of the timeout interval at the two ends.
However, to facilitate maintenance, you are advised to use the same mode at
both ends.
● Each member interface in an Eth-Trunk processes a maximum of 20 LACPDUs
every second; a switch processes a maximum of 100 LACPDUs every second.
Extra LACPDUs are discarded.
----End
Context
Interface2
In Figure 4-19, two interfaces of two network adapters on a server are directly
connected to a switch. The switch is configured with an Eth-Trunk in LACP mode.
The process on the server is as follows:
1. The server configures an IP address for Interface1 based the default
configuration during startup, and sends a request to the remote file server
through Interface1 and downloads the configuration file from the remote file
server.
2. After the configuration file is downloaded successfully, the server aggregates
two interfaces according to the configuration file. The server uses the two
interfaces as Eth-Trunk member interfaces to perform LACP negotiation with
the switch.
Before the server obtains the configuration file, Interface1 is an independent
physical interface and is not configured with LACP. As a result, LACP negotiation
on the switch interface fails. The switch does not forward traffic on the Eth-Trunk,
and the server cannot download the configuration file through Interface1. In this
case, the server cannot communicate with the switch.
To address this issue, run the lacp force-forward command on the Eth-Trunk of
the switch. The Eth-Trunk member interface in Up state can still forward data
packets even though the remote device is not enabled with LACP.
Procedure
Step 1 Run system-view
NOTE
● With this command configured, an Eth-Trunk interface does not support Layer 3 forwarding
and cannot be used to forward packets sent to the CPU. Only member interfaces in the
ForceFwd state can forward Layer 2 traffic through hardware forwarding. The ForceFwd state
is automatically set when LACP negotiation fails, and cannot be changed manually. You can
use the display eth-trunk command to check the value of the Status field.
● This command applies to only the scenario where an Eth-Trunk joins a VLAN as an access,
hybrid, trunk, and dot1q-tunnel interfaces.
● When a spanning tree protocol (for example, STP, RSTP, or MSTP) is used, the member
interface in ForceFwd state cannot be blocked. That is, the member interface in ForceFwd
state can continue to forward data packets. When other loop prevention protocols such as
ERPS and RRPP are used, the member interface in ForceFwd state can be blocked. The
blocked member interface in ForceFwd state cannot forward data packets.
● This command cannot be used with E-Trunk. That is, this command cannot be used on the
Eth-Trunk that joins an E-Trunk.
● This command cannot be used with max active-linknumber or least active-linknumber.
----End
Procedure
● Run the display eth-trunk [ trunk-id [ interface interface-type interface-
number | verbose ] ] command to check the Eth-Trunk configuration.
● Run the display trunkmembership eth-trunk trunk-id command to check
information about Eth-Trunk member interfaces.
● Run the display eth-trunk [ trunk-id ] load-balance command to check the
load balancing mode of the Eth-Trunk.
----End
Prerequisites
NOTE
Context
As shown in Figure 4-20, when no service is bound to the MA, an Eth-Trunk
interface in LACP mode is configured on two devices. interface1 where the MEP
resides is the interface of the Eth-Trunk interface's primary link. Configure
thresholds for the delay and frame loss ratio on interface1. If Y.1731 detects that
the primary link has poor quality, interface1 is triggered to go ETHOAM down. To
ensure that services are not interrupted, associate the secondary member interface
of the Eth-Trunk interface in LACP mode with its primary member interface. The
secondary link then preempts the primary state, implementing an automatic
primary/secondary link switchover.
When the primary link's quality recovers, you can manually enable forcible
switching if no preemption is configured or preemption is enabled but the delay is
not reached.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The primary member interface view of an Eth-Trunk interface's Actor is displayed.
Step 3 Run the following commands to configure an interface based on site
requirements.
1. Run delay-measure two-way { delay-threshold | variation-threshold } test-
id test-id trigger if-down
The interface is triggered to go ETHOAM down when the delay or delay
variation based on a test instance ID exceeds a specified threshold.
2. Run loss-measure single-ended-synthetic { local-ratio-threshold | remote-
ratio-threshold } test-id test-id trigger if-down
The interface is triggered to go ETHOAM down when the near- or far-end
frame loss ratio based on a test instance ID exceeds a specified threshold.
Step 4 Run quit
Return to the system view.
Step 5 Run interface interface-type interface-number
The secondary member interface view of an Eth-Trunk interface's Actor is
displayed.
Step 6 Run lacp track interface interface-type interface-number priority-reduced value
The secondary member interface is associated with the primary member interface,
and the priority of the secondary member interface is dynamically changed.
When the primary link's quality recovers, run the lacp force-switch command in
the Eth-Trunk interface view to enable forcible switching if no preemption is
configured or preemption is enabled but the delay is not reached.
----End
Context
You can configure an Eth-Trunk to preferentially forward local traffic (or not) in
the following scenarios:
● If active interfaces in the local Eth-Trunk have sufficient bandwidth to forward
traffic on the local device, configure the Eth-Trunk to preferentially forward
local traffic, which improves traffic forwarding efficiency and increases
bandwidth use efficiency between stack devices.
Pre-configuration Tasks
Before configuring an Eth-Trunk to preferentially forward local traffic, complete
the following tasks:
Procedure
Step 1 Run system-view
NOTE
This function is only valid for known unicast packets, and is invalid for unknown unicast
packets, broadcast packets, and multicast packets.
----End
Context
If Layer 2 switching devices belong to different VLANs, and hosts in the VLANs
need to communicate with each other, you need to create sub-interfaces on the
Eth-Trunk connecting a Layer 3 device to a Layer 2 switching device, bind a VLAN
to each sub-interface, and configure an IP address for each sub-interface.
After the configuration is complete, hosts in the VLANs can use these sub-
interfaces to communicate with each other. Eth-Trunk sub-interfaces can be
configured to terminate Dot1q and QinQ VLAN tags.
After Layer 2 Eth-Trunk sub-interfaces are configured, the Eth-Trunk provides Layer
2 functions and the sub-interfaces provide Layer 3 functions.
NOTE
Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support the Eth-Trunk sub-interface.
VPLS/MPLS/IP
PE1 PE2
Eth-Trunk
Sub-interface
Eth-Trunk
CE1 CE2
S1 S2 S3 S4
VLAN VLAN
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
An Eth-Trunk is created and the Eth-Trunk interface view is displayed.
Step 3 Run quit
The system view is displayed.
Step 4 Run interface eth-trunk trunk-id.subnumber
An Eth-Trunk sub-interface is created.
subnumber specifies the number of a sub-interface. The value ranges from 1 to
4096.
NOTE
● Only the S6720EI, S6720S-EI, S5720HI, and S5720EI support Ethernet sub-interfaces.
● Only hybrid and trunk interfaces on the preceding switches support Ethernet sub-
interface configuration.
● After you run the undo portswitch command to switch Layer 2 interfaces on the
preceding series of switches into Layer 3 interfaces, you can configure Ethernet sub-
interfaces on the interfaces.
● After an interface is added to an Eth-Trunk, sub-interfaces cannot be configured on the
interface.
● VLAN termination sub-interfaces cannot be created on a VCMP client.
----End
Only the S1720X, S1720X-E, S5720SI, S5720S-SI, S5720EI, S5720HI, S5730SI, S5730S-EI,
S6720LI, S6720S-LI, S6720SI, S6720S-SI, S6720EI, and S6720S-EI support the E-Trunk.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run lacp e-trunk system-id mac-address
The LACP system ID is set for the E-Trunk.
By default, the MAC address of an Ethernet interface is used as the LACP system
ID.
The master and backup devices in an E-Trunk must use the same LACP system ID.
Step 3 Run lacp e-trunk priority priority
The LACP priority of an E-Trunk member is set.
By default, the LACP priority of an E-Trunk member is 32768.
The master and backup devices in an E-Trunk must use the same LACP priority.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run e-trunk e-trunk-id
An E-Trunk is created and the E-Trunk view is displayed or the view of an existing
E-Trunk view is directly displayed.
The member devices in an E-Trunk must be configured with the same E-Trunk ID.
A maximum of 16 E-Trunks can be created on a device.
Step 3 Run priority priority
The E-Trunk priority is set.
The E-Trunk priority is used for master/backup negotiation between two devices.
The device with a higher priority is the master. A smaller priority value indicates a
higher E-Trunk priority.
If the two devices have the same priority, the device with a smaller system ID is
the master.
By default, the E-Trunk priority of a member device is 100.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
The remote IP address of the local device must be the same as the local IP address
of the remote device. For example, when an E-Trunk is created between device A
and device B and the local and remote IP addresses on device A are 10.1.1.1 and
10.2.2.2 respectively, the local and remote IP addresses on device B must be
10.2.2.2 and 10.1.1.1 respectively.
----End
Context
When the local device of an E-Trunk cannot rapidly detect whether the remote
device is faulty by sending E-Trunk packets, it can use the Bidirectional Fast
Detection (BFD) protocol to quickly detect faults on the remote device. You need
to specify the remote IP address on the local device and create a BFD session to
check the reachability of the route to the remote device. The E-Trunk then can
detect faults reported by the BFD session and the device can handle the faults
quickly.
NOTE
Only the S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S5720EI, S5720HI,
S6720EI, and S6720S-EI support this function.
Procedure
Step 1 Run system-view
BFD sessions are used to fast detect faults of link between the two E-Trunk
member devices.
When a BFD session is bound with E-Trunk, the system does not allow the bound
BFD session to be deleted by default. To delete the bound BFD session, run the
bfd session nonexistent-config-check disable command to disable the device
from checking whether the bound BFD session is deleted.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Only Eth-Trunks in LACP mode can be added to an E-Trunk.
Step 3 Run e-trunk e-trunk-id [ remote-eth-trunk eth-trunk-id ]
The Eth-Trunk is added to an E-Trunk.
An Eth-Trunk can be added to only one E-Trunk.
On two E-Trunk member devices, the IDs of the Eth-Trunks added to the E-Trunk
can be different. When adding Eth-Trunks with different IDs in LACP mode on PEs
to an E-Trunk, you must specify remote-eth-trunk so that the E-Trunk can work
normally.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Only Eth-Trunks in LACP mode can be added to an E-Trunk.
Step 3 Run e-trunk mode { auto | force-master | force-backup }
A working mode of the Eth-Trunk in the E-Trunk is configured.
The e-trunk mode command is valid only for the Eth-Trunk in an E-Trunk. When
the Eth-Trunk is deleted from the E-Trunk, the configuration is deleted
automatically.
NOTE
During E-Trunk running, changing the hello packet sending interval or timeout interval will
cause the E-Trunk to alternate between the master and the backup. Before changing the hello
packet sending interval or timeout interval, you are advised to configure member Eth-Trunks to
work in forcible master/backup state. After the new configuration takes effect, restore the
working mode to automatic.
----End
Context
You can set a password for encrypting E-Trunk packets transmitted over an E-Trunk
link to enhance system security. The two member devices of an E-Trunk must use
the same password.
Procedure
Step 1 Run system-view
NOTICE
If simple is specified, the password is saved in plain text in the configuration file.
In this case, lower-level users can obtain the password by querying the
configuration file, which poses a security risk. You are advised to specify cipher so
that the password is saved in cipher text.
To ensure device security, change the password periodically.
----End
NOTE
During E-Trunk running, changing the hello packet sending interval or timeout interval will
cause the E-Trunk to alternate between the master and the backup. Before changing the hello
packet sending interval or timeout interval, you are advised to configure member Eth-Trunks to
work in forcible master/backup state. After the new configuration takes effect, restore the
working mode to automatic.
Procedure
Step 1 Run system-view
By default, the value of hello-times is 10. The unit is 100 ms, so the default
interval is 1s.
The remote device checks the timeout interval in the received hello packet to
check whether the local device times out. If the remote device is the backup and
does not receive hello packets from the local device within the timeout interval,
the remote device becomes the master.
The default time multiplier is 20. It is recommended that you set the time
multiplier to 3 or more.
----End
Context
In a scenario where an E-Trunk works with other services, a member Eth-Trunk
may be restored earlier than other services after the faulty master device recovers.
If traffic is immediately switched back to the master device, service traffic will be
interrupted.
Setting the revertive switching delay prevents this problem. After the revertive
switching delay is set, the local Eth-Trunk becomes Up only after the delay timer
expires. Then the local device becomes the master again.
Procedure
Step 1 Run system-view
----End
Context
On devices of an E-Trunk, disable revertive switching on the E-Trunk when the
faulty master device recovers to prevent loss of traffic that is switched back.
Procedure
Step 1 Run system-view
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run e-trunk e-trunk-id
The E-Trunk view is displayed.
Step 3 Run sequence enable
The E-Trunk sequence number check function is enabled on the E-Trunk.
By default, the E-Trunk sequence number check function is disabled.
The sequence enable command must be run on both the master and backup
devices in an E-Trunk. Otherwise, the E-Trunk sequence number check function
fails, causing dual master devices in the E-Trunk.
----End
Networking Requirements
In Figure 4-22, SwitchA and SwitchB connect to devices in VLAN 10 and VLAN 20
through Ethernet links, and heavy traffic is transmitted between SwitchA and
SwitchB.
SwitchA and SwitchB can provide higher link bandwidth to implement inter-VLAN
communication. Data transmission and link reliability needs to be ensured.
VLAN10 VLAN10
VLAN20 VLAN20
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Create an Eth-Trunk on SwitchA and SwitchB, and add member interfaces to the
Eth-Trunk.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] trunkport gigabitethernet 0/0/1 to 0/0/3
[SwitchA-Eth-Trunk1] quit
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] interface eth-trunk 1
[SwitchB-Eth-Trunk1] trunkport gigabitethernet 0/0/1 to 0/0/3
[SwitchB-Eth-Trunk1] quit
# Create VLAN 10 and VLAN 20, and add interfaces to VLAN 10 and VLAN 20. The
configuration of SwitchB is similar to the configuration of SwitchA, and is not
mentioned here.
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 0/0/4
[SwitchA-GigabitEthernet0/0/4] port link-type trunk
[SwitchA-GigabitEthernet0/0/4] port trunk allow-pass vlan 10
[SwitchA-GigabitEthernet0/0/4] quit
[SwitchA] interface gigabitethernet 0/0/5
[SwitchA-GigabitEthernet0/0/5] port link-type trunk
[SwitchA-GigabitEthernet0/0/5] port trunk allow-pass vlan 20
[SwitchA-GigabitEthernet0/0/5] quit
Step 3 Configure a load balancing mode for Eth-Trunk 1. The configuration of SwitchB is
similar to the configuration of SwitchA, and is not mentioned here.
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] load-balance src-dst-mac
[SwitchA-Eth-Trunk1] quit
The preceding command output shows that Eth-Trunk 1 has three member
interfaces: GigabitEthernet0/0/1, GigabitEthernet0/0/2, and GigabitEthernet0/0/3.
The member interfaces are all in Up state. The Operate status of Eth-Trunk 1 is
Up.
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 10 20
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20
load-balance src-dst-mac
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
eth-trunk 1
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/5
Networking Requirements
In Figure 4-23, SwitchA and SwitchB connect to devices in VLAN 10 and VLAN 20
through Ethernet links, and heavy traffic is transmitted between SwitchA and
SwitchB. The link between SwitchA and SwitchB is required to provide high
bandwidth to implement inter-VLAN communication. Link aggregation in LACP
mode is configured on SwitchA and SwitchB to improve the bandwidth and
reliability. The following requirements must be met:
● Two active links implement load balancing.
● One link functions as the backup link. When a fault occurs on an active link,
the backup link replaces the faulty link to maintain reliable data transmission.
● Devices in the same VLAN can communicate.
Figure 4-23 Networking diagram for configuring link aggregation in LACP mode
VLAN 10 VLAN 10
VLAN 20 VLAN 20
Active link
Backup link
Configuration Roadmap
The configuration roadmap is as follows:
1. Create an Eth-Trunk and configure the Eth-Trunk to work in LACP mode to
implement link aggregation.
2. Add member interfaces to the Eth-Trunk.
3. Set the LACP system priority and determine the Actor so that the Partner
selects active interfaces based on the Actor interface priority.
4. Set the upper threshold for the number of active interfaces to improve
reliability.
5. Set LACP interface priorities and determine active interfaces so that interfaces
with higher priorities are selected as active interfaces.
6. Create VLANs and add interfaces to the VLANs.
Procedure
Step 1 Create Eth-Trunk 1 on SwitchA and configure Eth-Trunk 1 to work in LACP mode.
The configuration of SwitchB is similar to the configuration of SwitchA, and is not
mentioned here.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] mode lacp
[SwitchA-Eth-Trunk1] quit
[SwitchA-GigabitEthernet0/0/3] eth-trunk 1
[SwitchA-GigabitEthernet0/0/3] quit
Step 3 Set the system priority on SwitchA to 100 so that SwitchA becomes the Actor.
[SwitchA] lacp priority 100
Step 4 On SwitchA, set the upper threshold for the number of active interfaces to 2.
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] max active-linknumber 2
[SwitchA-Eth-Trunk1] quit
Step 5 Set the LACP interface priority and determine active links on SwitchA.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] lacp priority 100
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] lacp priority 100
[SwitchA-GigabitEthernet0/0/2] quit
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 32768 00e0-fca6-7f85 32768 6145 2609 11111100
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/1 100 00e0-fca8-0417 100 6145 2865 11111100
GigabitEthernet0/0/2 100 00e0-fca8-0417 100 6146 2865 11111100
GigabitEthernet0/0/3 100 00e0-fca8-0417 32768 6147 2865 11110000
The preceding information shows that the LACP system priority of SwitchA is 100,
which is higher than the LACP system priority of SwitchB. Member interfaces
GigabitEthernet0/0/1 and GigabitEthernet0/0/2 become the active interfaces and
are in Selected state. Interface GigabitEthernet0/0/3 is in Unselect state. Two links
are active and work in load balancing mode, and one link is the backup link.
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 10 20
#
lacp priority 100
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20
mode lacp
max active-linknumber 2
#
interface GigabitEthernet0/0/1
eth-trunk 1
lacp priority 100
#
interface GigabitEthernet0/0/2
eth-trunk 1
lacp priority 100
#
interface GigabitEthernet0/0/3
eth-trunk 1
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 20
#
return
On the network shown in Figure 4-24, Switch3 and Switch4 are connected
through Stack cables to increase the total capacity. The two switches are
considered as one logical switch. To improve reliability, physical interfaces on the
two switches are added to an Eth-Trunk. When the network runs properly, traffic
from VLAN 2 is forwarded through GE1/0/1 and GE1/0/2, and traffic from VLAN 3
is forwarded through GE1/0/1 and GE1/0/2. This increases bandwidth use
efficiency between devices and reduces traffic forwarding efficiency.
To improve traffic forwarding efficiency, traffic from VLAN 2 should be forwarded
through GE1/0/1 and traffic from VLAN 3 should be forwarded through GE1/0/2.
To achieve this goal, configure the Eth-Trunk to preferentially forward local traffic.
Figure 4-24 Preferentially forwarding traffic through the local member interface
Network
PE
GE1/0/1 GE1/0/2
Eth-Trunk 10
GE0/0/2 GE0/0/2
Switch1
Switch2
GE0/0/1 GE0/0/1
Stack cable
VLAN 2 data flow
VLAN 3 data flow
Configuration Roadmap
The configuration roadmap is as follows:
1. Create an Eth-Trunk.
2. Add member interfaces to the Eth-Trunk.
3. Configure the Eth-Trunk to preferentially forward local traffic.
4. Configure the Layer 2 forwarding function.
Procedure
Step 1 Create an Eth-Trunk and configure the Eth-Trunk to allow packets all VLANs to
pass through.
# Configure the stack.
<HUAWEI> system-view
[HUAWEI] sysname Stack
[Stack] interface eth-trunk 10
[Stack-Eth-Trunk10] port link-type trunk
[Stack-Eth-Trunk10] port trunk allow-pass vlan all
[Stack-Eth-Trunk10] quit
Step 3 In the stack view, configure the Eth-Trunk to preferentially forward local traffic.
[Stack] interface eth-trunk 10
[Stack-Eth-Trunk10] local-preference enable
[Stack-Eth-Trunk10] quit
# Configure Switch1.
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] vlan 2
[Switch1-vlan2] quit
[Switch1] interface gigabitethernet 0/0/1
[Switch1-GigabitEthernet0/0/1] port link-type trunk
[Switch1-GigabitEthernet0/0/1] port trunk allow-pass vlan 2
[Switch1-GigabitEthernet0/0/1] quit
[Switch1] interface gigabitethernet 0/0/2
[Switch1-GigabitEthernet0/0/2] port link-type trunk
[Switch1-GigabitEthernet0/0/2] port trunk allow-pass vlan 2
[Switch1-GigabitEthernet0/0/2] quit
# Configure Switch2.
<HUAWEI> system-view
[HUAWEI] sysname Switch2
[Switch2] vlan 3
[Switch2-vlan3] quit
[Switch2] interface gigabitethernet 0/0/1
[Switch2-GigabitEthernet0/0/1] port link-type trunk
[Switch2-GigabitEthernet0/0/1] port trunk allow-pass vlan 3
[Switch2-GigabitEthernet0/0/1] quit
[Switch2] interface gigabitethernet 0/0/2
[Switch2-GigabitEthernet0/0/2] port link-type trunk
[Switch2-GigabitEthernet0/0/2] port trunk allow-pass vlan 3
[Switch2-GigabitEthernet0/0/2] quit
----End
Configuration Files
● Stack configuration file
#
sysname Stack
#
vlan batch 2 3
#
interface Eth-Trunk10
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet1/0/3
port link-type trunk
port trunk allow-pass vlan 2
#
interface GigabitEthernet2/0/3
port link-type trunk
port trunk allow-pass vlan 3
#
interface GigabitEthernet1/0/4
eth-trunk 10
#
interface GigabitEthernet2/0/4
eth-trunk 10
#
return
● PE configuration file
#
sysname PE
#
interface Eth-Trunk10
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet1/0/1
eth-trunk 10
#
interface GigabitEthernet1/0/2
eth-trunk 10
#
return
Fault Description
Traffic is unevenly load balanced among Eth-Trunk member interfaces due to the
incorrect load balancing mode.
Procedure
1. Run the display eth-trunk command to check whether the load balancing
mode of the Eth-Trunk meets networking requirements. For example, source
Procedure
1. Run the display eth-trunk trunk-id command to check whether the lower
threshold for the number of active interfaces of an Eth-Trunk is set.
If the number of Eth-Trunk member interfaces in Up state is lower than the
lower threshold, the Eth-Trunk becomes Down.
2. Run the least active-linknumber link-number command to configure the
lower threshold for the number of active interfaces of an Eth-Trunk to be
smaller than the number of Eth-Trunk member interfaces in Up state.
The local and remote devices can use different lower thresholds for the
number of active interfaces. If the lower thresholds are different, a larger
value is used.
1. Run the shutdown command in the interface view to configure the new
member interface in Down state.
If the new member interface that joins the Eth-Trunk is not configured to be
Down, a temporary loop may occur. As a result, services are affected.
2. Run either of the following commands to add the new member interface to
the Eth-Trunk.
Internet
BRAS
Eth-TrunK
Switch
5 VLAN Configuration
This chapter describes how to configure VLANs. VLANs provide broadcast domain
isolation, security hardening, flexible networking, and high extensibility.
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, collision becomes a serious problem and can
lead to broadcast storms. As a result, network performance deteriorates, or can
even result in a complete breakdown. Using switches to connect LANs can
mitigate collisions, but cannot isolate broadcast packets or improve network
quality.
VLAN technology divides a physical LAN into multiple VLANs to isolate broadcast
domains. Hosts within a VLAN can communicate with each other but cannot
communicate directly with hosts in other VLANs. Consequently, broadcast packets
are confined to within a single VLAN.
VLAN 2
VLAN 3
Figure 5-1 shows a typical VLAN networking environment. Two switches are
deployed in different locations (for example, on different floors of a building).
Each switch is connected to two PCs belonging to different VLANs, which likely
belong to different entities or companies.
Benefits
VLAN technology offers the following benefits:
● Limits broadcast domains. Broadcast domains are limited to conserve
bandwidth and improve network efficiency.
● Enhances LAN security. Packets from different VLANs are transmitted
separately. Hosts in a VLAN cannot communicate directly with hosts in
another VLAN.
● Improves network robustness. A fault in a 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.
A VLAN tag contains four fields. Table 5-1 describes the fields.
PRI 3 bits Priority (PRI), indicating the The value ranges from 0 to 7. A
frame priority. larger value indicates a higher
priority. If congestion occurs, the
switch sends packets with higher
priorities first.
CFI 1 bit Canonical Format Indicator The value 0 indicates that the
(CFI), indicating whether a MAC address is encapsulated in
MAC address is canonical format, and the value 1
encapsulated in canonical indicates that the MAC address is
format over different encapsulated in non-canonical
transmission media. CFI is format. The CFI field has a fixed
used to ensure compatibility value of 0 on Ethernet networks.
between Ethernet and
token ring networks.
The switch identifies the VLAN that a frame belongs to according to the
information contained in the VID field. Broadcast frames are forwarded only in the
local VLAN. That is, a broadcast domain is confined to within a single VLAN.
be able to identify the untagged frames and add or remove VLAN tags from the
frames. Hosts in the same VLAN may be connected to different switches, and
more than one VLAN may span multiple switches. To enable communication
between hosts, interfaces between switches must be able to identify and send
VLAN frames.
To accommodate different connections and networking, Huawei defines four
interface types (access, trunk, hybrid, and QinQ) and two link types (access and
trunk). Figure 5-3 shows access, trunk, and hybrid interfaces. 10 QinQ
Configuration shows the QinQ interface.
Trunk
2
4
Switch Switch
Hub Hub
Access link
Trunk link Untagged frame
Access interface 2 Tagged frame, VID=2
Trunk interface 3 Tagged frame, VID=3
4 Tagged frame, VID=4
Hybrid interface
Link Types
As shown in Figure 5-3, Ethernet links fall into the following types, depending on
the number of allowed VLANs:
● Access link
An access link can transmit data frames of only one VLAN. It connects a
switch to a user terminal, such as a host, server, and simplified Layer 2 switch.
Generally, user terminals do not need to know the VLANs to which they
belong and cannot identify tagged frames; therefore, only untagged frames
are transmitted along an access link.
● Trunk link
A trunk link can transmit data frames from multiple VLANs. It connects a
switch to another switch or a router. Frames on a trunk link must be tagged
so that other network devices can correctly identify VLAN information in the
frames.
Interface Types
As shown in Figure 5-3, Ethernet interfaces are classified into the following types
depending on the objects connected to them and the way they process frames:
● Access interface
An access interface often connects to a user terminal such as a user host or
server that cannot identify VLAN tags, or is used when VLANs do not need to
be differentiated. In most cases, access interfaces can only receive and send
untagged frames, and can add only a unique VLAN tag to untagged frames.
However, if the VID and PVID are the same in tagged frames, access
interfaces can receive and process the tagged frames.
● Trunk interface
A trunk interface often connects to a switch, router, AP, or voice terminal that
can receive and send tagged and untagged frames simultaneously. It allows
tagged frames from multiple VLANs and untagged frames from only one
VLAN.
● Hybrid interface
A hybrid interface can connect to not only a user terminal (such as a user
host or server) or network device (such as a hub or simplified Layer 2 switch)
that cannot identify tags, but also a switch, router, voice terminal, or AP that
can receive and send tagged and untagged frames. It allows tagged frames
from multiple VLANs. Frames sent out from a hybrid interface are tagged or
untagged according to the VLAN configuration.
Hybrid and trunk interfaces can be interchanged in some scenarios, but hybrid
interfaces must be used in specified scenarios, for example, selective QinQ
scenario. Before packets from multiple VLANs provided by a service provider
enter a user network, the outer VLAN tags must be removed. The trunk
interface cannot be used here because the trunk interface allows only
untagged packets from the default VLAN of the interface to pass through. For
details about selective QinQ, see 10.7 Configuring Selective QinQ in "QinQ
Configuration".
● QinQ interface
An 802.1Q-in-802.1Q (QinQ) interface often connects a private network to a
public network. It can add an additional 802.1Q tag to a tagged frame. QinQ
supports up to 4094 x 4094 VLANs, thereby extending VLANs over the
network. The outer tag is often called the public tag and identifies the VLAN
ID of the public network, whereas the inner tag is often called the private tag
and identifies the VLAN ID of the private network.
For details about the QinQ interface and QinQ frame format, see 10.2.1 QinQ
Fundamentals.
of the interface that receives the frame. The PVID is used in the following
scenarios:
● When an interface receives an untagged frame, the interface adds a tag with
the PVID to the frame and sends the frame to the switch for processing. When
an interface receives a tagged frame, the switch does not add a tag with the
PVID to the frame.
● When an interface sends a frame in which the VLAN ID is the same as the
PVID, the switch removes the tag from the frame before sending it out from
the interface.
Each interface has a default VLAN. By default, the default VLAN ID of all
interfaces is VLAN 1. You can change the default VLAN ID as required:
● The default VLAN of an access interface is the VLAN allowed by the access
interface. To change the default VLAN of an access interface, change the
allowed VLAN.
● Trunk and hybrid interfaces allow multiple VLANs but have only one default
VLAN. Changing the allowed VLANs will not change the default VLAN.
NOTE
A QinQ interface adds an additional tag to a tagged frame. For details, see 10 QinQ
Configuration.
Access Interface
Figure 5-4 and Figure 5-5 shows how an access interface adds and removes VLAN
tags.
No
Carry tag?
Yes
No
Same
Discard
VID and PVID?
Yes
Accept it and
add PVID Accept the frame
Further processing
Remove tag
Trunk Interface
Figure 5-6 and Figure 5-7 shows how a trunk interface adds and removes VLAN
tags.
No
Carry tag?
Yes
No
Add the PVID Is VID allowed? Discard
Yes
Further processing
No
Same as PVID?
Yes
Remove tag
Hybrid Interface
Figure 5-8 and Figure 5-9 shows how a hybrid interface adds and removes VLAN
tags.
No
Carry tag?
Yes
No
Add the PVID Is VID allowed? Discard
Yes
Further processing
No Does device
add tag to it?
Yes
Retain tag
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.
5.2.5 LNP
Definition
Link-type Negotiation Protocol (LNP) dynamically negotiates the link type of an
Ethernet interface. The negotiated link type can be access or trunk.
● When the link type on an Ethernet interface is negotiated as access, the
interface joins VLAN 1 by default.
Background
The switch supports the following link types on an Ethernet interface: access,
hybrid, trunk, and QinQ. The four link types are applicable to different network
positions and are manually specified. If the network topology changes, link types
of Ethernet interfaces also need to be reconfigured and the configuration is
complex. To simplify the configuration, LNP supports auto-negotiation of the link
types on Ethernet interfaces and allows Ethernet interfaces to join VLANs after the
auto-negotiation.
Implementation
When Layer 2 devices on the network shown in Figure 5-10 are successfully
connected, the physical status of interfaces becomes Up. After LNP negotiation is
complete, user-side interfaces on Switch4, Switch5, Switch6, and Switch7 join
VLAN 1 as access interfaces, and interfaces between switches become trunk
interfaces and allow all VLANs.
Switch2 Switch3
Trunk
Access
● If the two ends of an Eth-Trunk link have different numbers of member interfaces,
the LNP negotiation may fail.
● If the link type of the Layer 2 Ethernet interface is set to access, hybrid, trunk, or
Dot1q tunnel, LNP negotiation does not take effect on the interface.
● The link type of an interface will be set to access when the negotiation fails.
No
No
No No
Yes
Is
Subnet-based VLAN MAC-VLAN Yes
assignment enabled?
enabled?
No No
Yes Protocol-based
VLAN enabled?
No
No
Is default VLAN Discard frame
ID set?
Yes
Allocate VLAN ID to
frame and forward it at
Layer 2
frame needs to be forwarded by the gateway. The source host obtains the
gateway's MAC address, and uses it as the destination MAC address to send
the frame to the gateway.
● Ethernet switching in a switch
The switch determines whether to forward a received frame at Layer 2 or
Layer 3 based on the information in the destination MAC address, VLAN ID,
and Layer 3 forwarding bit.
– If the destination MAC address and VLAN ID of the frame match a MAC
address entry of the switch and the Layer 3 forwarding bit is set, the
switch searches for a Layer 3 forwarding entry based on the destination
IP address. If no entry is found, the switch sends the frame to the CPU.
The CPU then searches for a route to forward the frame at Layer 3.
– If the destination MAC address and VLAN ID of the frame match a MAC
address entry but the Layer 3 forwarding bit is not set, the switch directly
forwards the frame from the outbound interface specified in the
matching MAC address entry.
– If the destination MAC address and VLAN ID of the frame do not match
any MAC address entry, the switch broadcasts the frame to all the
interfaces allowing the VLAN specified in the VID to obtain the MAC
address of the destination host.
For details about Layer 2 and Layer 3 switching, see 2.3.1 Layer 2 Switching
and 2.3.2 Layer 3 Switching.
● Adding and removing VLAN tags during the exchange between devices (for
example, between a switch and a user host, another switch, or another
network device)
Frames processed in a switch all carry VLAN tags. The switch needs to add or
remove VLAN tags according to the interface setting to communicate with
other network devices. For details on how VLAN tags are added and removed
on different interfaces, see 5.2.4 Adding and Removing VLAN Tags.
After VLANs are assigned, broadcast packets are forwarded at Layer 2 in the same
VLAN. That is, users in the same VLAN can directly communicate at Layer 2. There
are two intra-VLAN communication scenarios depending on whether hosts in the
same VLAN connect to the same or multiple switches.
Host_1 and Host_2 have learned the MAC address of each other, so they directly
fill the destination MAC address fields of packets with the learned MAC addresses
of the packets in subsequent communication.
In the preceding networking, if hosts in the same VLAN are on different network
segments, they encapsulate the gateway's MAC address into packets. If the Switch
is a Layer 2 switch, hosts cannot communicate. If the Switch is a Layer 3 switch,
hosts can communicate through VLANIF interfaces (with primary and secondary IP
addresses configured). The principles are similar to those in Inter-VLAN
Communication Through the Same Switch, and are not mentioned here.
connected using a trunk link over which frames can be identified and sent across
switches.
Host_1 Host_2
MAC: 1-1-1 MAC: 2-2-2
IP: 10.1.1.2 IP: 10.1.1.3
Subnet Mask: 255.255.255.0 Subnet Mask: 255.255.255.0
VLAN aggregation applies to scenarios where multiple VLANs share a gateway. For
details about VLAN aggregation, see 6 VLAN Aggregation Configuration.
MAC address of the packet with the MAC address of VLANIF 2. If they are the
same, the Switch determines that the packet should be forwarded at Layer 3
and searches for a Layer 3 forwarding entry based on the destination IP
address. If no entry is found, the Switch sends the packet to the CPU. The CPU
then searches for a routing entry to forward the packet.
7. The CPU looks up the routing table based on the destination IP address of the
packet and detects that the destination IP address matches a directly
connected network segment (network segment of VLANIF 3). The CPU
continues to look up its ARP table but finds no matching ARP entry. Therefore,
the Switch broadcasts an ARP Request packet with the destination address of
10.2.2.2 to all interfaces in VLAN 3. The ARP Request packet will be send from
IF_2.
8. After receiving the ARP Request packet, Host_2 detects that the IP address is
its own IP address and sends an ARP Reply packet with its own. Additionally,
Host_2 adds the mapping between the MAC address and IP address of
VLANIF 3 to its ARP table.
9. After IF_2 on the Switch receives the ARP Reply packet, IF_2 tags the packet
with VLAN 3 to the packet and adds the binding of the MAC address and IP
address of Host_2 in its ARP table. Before forwarding the packet from Host_1
to Host_2, the Switch removes the tag with VLAN 3 from the packet. The
Switch also adds the binding of Host_2's IP address, MAC address, VLAN ID,
and outbound interface in its Layer 3 forwarding table.
The packet sent from Host_1 then reaches Host_2. The packet transmission
process from Host_2 to Host_1 is similar. Subsequent packets between Host_1 and
Host_2 are first sent to the gateway (Switch), and the Switch forwards the packets
at Layer 3 based on its Layer 3 forwarding table.
Host_1 Host_2
MAC: 1-1-1 MAC: 2-2-2
IP: 10.1.1.2 IP: 10.1.2.2
Gateway address: 10.1.1.1 Gateway address: 10.1.2.1
Port Isolation
Port isolation can isolate interfaces in a VLAN. You can add interfaces to a port
isolation group to disable Layer 2 packet transmission between the interfaces.
Interfaces in different port isolation groups or out of port isolation groups can
exchange packets with other interfaces. In addition, interfaces can be isolated
unidirectionally, providing more secure and flexible networking.
For details about port isolation, see Configuring Port Isolation in "Ethernet
Interface Configuration" in the S1720, S2700, S5700, and S6720 V200R011C10
Configuration Guide - Interface Management.
MUX VLAN
Multiplex VLAN (MUX VLAN) provides a mechanism to control network resources
using VLANs. It can implement inter-VLAN communication and intra-VLAN
isolation.
For example, an enterprise has the following requirements:
● Employees can communicate with each other but customers are isolated.
● Both employees and customers can access enterprise servers.
You can deploy the MUX VLAN to meet the preceding requirements.
For details about the MUX VLAN feature, see 7 MUX VLAN Configuration.
5.2.11 mVLAN
To use a remote network management system (NMS) to manage devices in a
centralized manner, configure a management IP address on the switch. You can
then use the management IP address to log in to the switch using STelnet and
manage the switch. If a user-side interface is added to the VLAN corresponding to
the management IP address, users connected to the interface can also log in to
the switch. This poses security risks to the switch.
To enhance security, you can configure the VLAN as the management VLAN
(mVLAN). Access or Dot1q tunnel interfaces cannot be added to the mVLAN. (The
VLANs not specified as the mVLAN are service VLANs.) Access and Dot1q tunnel
interfaces are often connected to users. When these interfaces are prevented from
joining the mVLAN, users connected to the interfaces cannot log in to the device,
improving device security.
NOTE
Only the S5720HI, S5720EI, S6720EI, and S6720S-EI support this function.
Internet
L3 Switch
L2 Switch
Switch_2 Switch_3
Office Office
area 1 area 2
User_1 User_1
VLAN 10 VLAN 10
To enable employees to access network resources such as servers after they move
from one office area to the other, configure MAC address-based VLAN assignment
on Switch_2 and Switch_3. As long as the MAC address of User_1 remains
unchanged, the user belongs to the same VLAN and can still access the company's
network resources after changing the location.
Server of department 1
Switch_1 VLAN 10
Server of department 2
VLAN 20
Switch_2 Switch_3
Department 1 Department 2
To ensure that employees retain the rights to access network resources after
changing locations, configure IP subnet-based VLAN assignment on the company's
central switch. Different network segments of servers are assigned to different
VLANs to isolate data flows of different application services, improving security.
VLANIF 2 VLANIF 3
Switch_1 Switch_2
(L2) (L2)
Department 1 Department 2
PC_1 PC_2
VLAN 2 VLAN 3
Layer 3 network
VLANIF 2 VLANIF 3
L2 Switch L2 Switch
Department 1 Department 2
PC_1 PC_2
VLAN 2 VLAN 3
Assign VLANs on the Layer 2 switches, and configure the Layer 2 switches to
transparently transmit VLAN packets to Layer 3 switches. Configure a VLANIF
interface for each user VLAN and interconnected VLANs on Switch_1 and
Switch_2, and configure VLANIF interfaces for interconnected VLANs on other
Layer 3 devices. In addition, configure static routes or a dynamic routing protocol
between Switch_1 and Switch_2 (a dynamic routing protocol is recommended
when devices are connected across more than two Layer 3 switches).
Internet
Router
VLANIF 20
After the central switch (Switch) is configured with VLANIF 10, VLANIF 20, VLANIF
30, and VLANIF 100 and a route to the router, employees, visitors, and servers can
access the Internet and communicate with each other. To control access rights of
visitors, configure a traffic policy on the central switch and define the following
rules:
● ACL rule 1: denies the packets sent from the IP network segment of visitors to
the IP segment of employees.
● ACL rule 2: permits the packets from the IP network segment of visitors to the
IP address of Server_1, and denies the packets from the IP network segment
of visitors and to the IP segment of servers.
● ACL rule 3: denies the packets from the IP network segment of employees to
the IP segment of visitors.
● ACL rule 4: denies the packets from the IP network segment of servers to the
IP segment of visitors.
Apply the traffic policy to the inbound and outbound direction of the switch
interface connected to the visitor area. Visitors can then only access Server_1 and
cannot communicate with employees.
Egress
Core switch
router
Enterprise intranet GE0/0/1 ISP
VLANIF10 GE1/0/1.1 network
10.1.1.1/24 10.1.1.2/24
To access the ISP network, the core Layer 3 switch and egress router need to
interwork at Layer 3. Most Layer 3 switches do not support routed interfaces or
support limited routed interfaces. Generally, a VLANIF interface is used as a Layer
3 interface to communicate with the Layer 3 sub-interface of the router, and then
static route or a dynamic routing protocol is configured to implement Layer 3
connectivity between the core switch and egress router.
Assign VLANs
Configure VLANIF
Configure MQC-based Configure protocol
interfaces to implement
intra-VLAN Layer 2 Configure mVLAN packet transparent
inter-VLAN
isolation transmission in a VLAN
communication
Configure MQC to
implement inter-VLAN
isolation
Configuring a Traffic Policy to After VLANs are assigned, users in the same
Implement Intra-VLAN Layer 2 VLAN can directly communicate with each
Isolation other. If some users in the same VLAN need
to be isolated, configure MQC-based intra-
VLAN Layer 2 isolation.
NOTE
Intra-VLAN isolation can also be implemented
using port isolation. For details about port
isolation, see Configuring Port Isolation in
"Ethernet Interface Configuration" in the S1720,
S2700, S5700, and S6720 V200R011C10
Configuration Guide - Interface Management.
Licensing Requirements
VLAN technology configuration commands are available only after the S1720GW,
S1720GWR, and S1720X have the license (WEB management to full management
Electronic RTU License) loaded and activated and the switches are restarted. VLAN
technology configuration commands on other models are not under license
control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S2710SI V100R006(C03&C05)
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● Table 5-7 describes the specifications of VLAN technology.
Maximum number of VLANs in the 4096 (VLAN 0 and VLAN 4095 are
system reserved)
Damping time 0s
for a VLANIF
interface in
Down state
Traffic Disabled
statistics
collection in a
VLAN
Traffic Disabled
statistics
collection on
a VLANIF
interface
network enter a user network, outer VLAN tags need to be removed from the
packets. A trunk interface allows untagged packets from only one VLAN, so
the interface must be configured as hybrid. For details about VLAN stacking,
see QinQ Configuration.
On the S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E,
S1720X-E, S2720EI, S2750, S5700LI, S5700S-LI, S5720LI, S5720S-LI, S5730SI,
S5730S-EI, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S5710-X-LI, S5720SI, and
S5720S-SI, the type of an interface is negotiation-auto by default. The type of an
interface is negotiation-desirable by default on other models.
Procedure
● Configuring the default VLAN for an access interface
a. Run system-view
The system view is displayed.
b. Run vlan vlan-id
A VLAN is created and the VLAN view is displayed, or the view of an
existing VLAN is displayed.
c. Run quit
Return to the system view.
d. Run interface interface-type interface-number
The view of the Ethernet interface to be added to the VLAN is displayed.
e. Run port link-type access
The Ethernet interface is configured as the access interface.
f. Run port default vlan vlan-id
The default VLAN is configured for the interface and the interface is
added to the specified VLAN.
g. (Optional) Run port discard tagged-packet
The interface is configured to discard incoming tagged packets.
● Configuring the default VLAN for a trunk interface
a. Run system-view
The system view is displayed.
b. Run vlan vlan-id
A VLAN is created and the VLAN view is displayed, or the view of an
existing VLAN is displayed.
c. Run quit
Return to the system view.
d. Run interface interface-type interface-number
The view of the Ethernet interface to be added to the VLAN is displayed.
e. Run port link-type trunk
The Ethernet interface is configured as the trunk interface.
f. Run port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> |
all }
The interface is added to the specified VLAN.
NOTE
If the VLAN allowed by an interface is the default VLAN of the interface, packets from
the VLAN are forwarded in untagged mode.
● Configuring the default VLAN for a hybrid interface
a. Run system-view
The system view is displayed.
b. Run vlan vlan-id
A VLAN is created and the VLAN view is displayed, or the view of an
existing VLAN is displayed.
c. Run quit
Return to the system view.
d. Run interface interface-type interface-number
The view of the Ethernet interface to be added to the VLAN is displayed.
e. Run port link-type hybrid
The Ethernet interface is configured as the hybrid interface.
f. Run the following commands as required.
Configuration Tips
Configuring a name for a VLAN
When multiple VLANs are created on the device, you are advised to configure
names for the VLANs to facilitate management. After a name is configured for a
VLAN, you can directly enter the VLAN view using the name.
# Set the name of VLAN 10 to huawei.
<HUAWEI> system-view
[HUAWEI] vlan 10
[HUAWEI-vlan10] name huawei
[HUAWEI-vlan10] quit
# After a name is configured for a VLAN, you can directly enter the VLAN view
using the name.
[HUAWEI] vlan vlan-name huawei
[HUAWEI-vlan10] quit
To perform the same VLAN configuration for multiple Ethernet interfaces, use the
port group, which can reduce the workload. To add access interfaces to a VLAN in
a batch, you can also run the port interface-type { interface-number1 [ to
interface-number2 ] }&<1-10> command in the VLAN view. For details, see Adding
Interfaces to a VLAN in a Batch.
If the VLAN planning of an interface is changed, you need to delete the original
VLAN configuration of the interface. If many noncontiguous VLANs are configured
on the interface, you need to delete the original VLAN configuration multiple
times. To reduce deletion operations, restore the default VLAN configuration of
the interface. For details, see Restoring the Default VLAN Configuration of an
Interface.
When the interface planning changes or the current interface type is different
from the configured one, the interface type needs to be changed. For details, see
Changing the Link Type of an Interface.
Deleting a VLAN
If a VLAN is not in use, you are advised to delete it immediately to save VLAN
resources and reduce packets on a network. For details, see Deleting a VLAN or
VLANs in a Batch.
Context
The switch supports the following link types on an Ethernet interface: access,
hybrid, trunk, and QinQ. The four link types are applicable to different network
positions and are manually specified. If the network topology changes, link types
of Ethernet interfaces also need to be reconfigured and the configuration is
complex. To simplify the configuration, LNP supports auto-negotiation of the link
types on Ethernet interfaces and allows Ethernet interfaces to join VLANs after the
auto-negotiation.
Procedure
Step 1 Run system-view
By default, global LNP is enabled. That is, LNP is enabled on all interfaces.
The view of the Ethernet interface that needs to be enabled with LNP is displayed.
NOTE
When performing this step, ensure that the interface is a Layer 2 interface. If the interface
is not a Layer 2 interface, run the portswitch command to configure the interface as a
Layer 2 interface.
When an LNP-capable device is used with an LNP-incapable device, the LNP-capable device
continuously sends LNP packets, which wastes bandwidth. You can run the port
negotiation disable command in the Layer 2 Ethernet interface view to disable LNP.
To ensure successful negotiation, ensure that LNP is enabled globally and in the interface
view.
There are limitations on the interface where the LNP mode is set to negotiation-
desirable or negotiation-auto:
● The sub-interface cannot be created.
● The MUX VLAN cannot be enabled.
● The voice VLAN in auto mode cannot be configured on the interface.
----End
Procedure
Step 1 Run system-view
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. If VLANs need to be created in a batch, run
the vlan batch { vlan-id1 [ to vlan-id2 ] } &<1-10> command to create VLANs in
a batch, 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 configuration command completes the VLAN configuration when the VLAN is not
created.
NOTE
When the mac-vlan mac-address command with the same MAC address specified is
executed multiple times, MAC-VLAN entries take effect according to the longest match
principle. On the S5720EI, S6720EI, and S6720S-EI, MAC-VLAN entries take effect according
to the longest match principle only when the mask has 47 bits or less than 47 bits, and the
MAC-VLAN entry with the 48-bit mask has the lowest priority.
● The MAC address is in H-H-H format. An H is a hexadecimal number of 1 to 4
digits, such as 00e0 and fc01. If you enter fewer than four digits, 0s are
padded before the input digits. For example, if e0 is entered, 00e0 is
displayed. The MAC address cannot be all Fs, all 0s, or a multicast MAC
address.
● If a MAC-VLAN entry with the mask specified (excluding the 48-bit mask or
mask with all Fs), run the undo mac-vlan mac-address command to delete
the MAC-VLAN entry and then run the mac-vlan mac-address command to
change the priority.
● priority specifies the 802.1p priority of a MAC address-based VLAN. The value
ranges from 0 to 7. A larger value indicates a higher priority. The default
value is 0. After the 802.1p priority of a MAC address-based VLAN is specified,
the switch first forwards high-priority frames in the case of congestion.
Only the S1720X, S1720X-E, S5720EI, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, S6720S-
SI, S5720SI, S5720S-SI, S6720EI, and S6720S-EI support the vlan precedence command.
S1720X, S1720X-E, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI and
S5720S-SI supports the vlan precedence command only in the system view. Other switches
support the vlan precedence command only in the interface view.
On the S5720EI, S6720EI, and S6720S-EI, if both the subnet VLAN and MAC VLAN with a mask
are configured, the MAC VLAN with a mask is first matched regardless of whether the vlan
precedence command is used.
NOTE
MAC address-based VLAN assignment cannot be used with the MUX VLAN and MAC
address authentication on the same interface.
On the S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E,
S2720EI, S5720HI, S2750, S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720SI, S6720S-SI,
S5710-X-LI, S5720LI, S5720S-LI, S6720LI, S6720S-LI, S5700LI, and S5700S-LI, MAC address-
based VLAN assignment is invalid for packets with the VLAN ID of 0, regardless of whether
the mask of the MAC VLAN is specified. On other models, MAC address-based VLAN
assignment is invalid for packets with the VLAN ID of 0 only when the mask of the MAC
VLAN is specified.
----End
Context
Both IP subnet-based and protocol-based VLAN assignment are called network
layer-based VLAN assignment, which reduces manual VLAN configuration
workload and allows users to easily join a VLAN, transfer from one VLAN to
another, and exit from a VLAN. IP subnet-based VLAN assignment applies to
scenarios where there are high requirements for mobility and simplified
management and low requirements for security, for example, scenario where a PC
configured with multiple IP addresses needs to access servers on different network
segments and scenario where the switch adds PCs to other VLANs when the PCs'
IP addresses change.
The switch that has IP subnet-based VLAN assignment enabled processes only
untagged frames, and treats tagged frames in the same manner as interface-
based VLAN assignment.
After receiving untagged frames from an interface, the switch determines the
VLANs to which the frames belong according to source IP addresses or network
segments and transmits the frames in specified VLANs.
Procedure
Step 1 Run system-view
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. If VLANs need to be created in a batch, run
the vlan batch { vlan-id1 [ to vlan-id2 ] } &<1-10> command to create VLANs in
a batch, 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 configuration command completes the VLAN configuration when the VLAN is not
created.
NOTE
Only the S1720X, S1720X-E, S5720EI, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, S6720S-
SI, S5720SI, S5720S-SI, S6720EI, and S6720S-EI support the vlan precedence command.
S1720X, S1720X-E, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI and
S5720S-SI supports the vlan precedence command only in the system view. Other switches
support the vlan precedence command only in the interface view.
On the S5720EI, S6720EI, and S6720S-EI, if both the subnet VLAN and MAC VLAN with a mask
are configured, the MAC VLAN with a mask is first matched regardless of whether the vlan
precedence command is used.
NOTE
IP subnet-based VLAN assignment is invalid for packets with the VLAN ID of 0 on the
S5720HI.
----End
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. If VLANs need to be created in a batch, run
the vlan batch { vlan-id1 [ to vlan-id2 ] } &<1-10> command to create VLANs in
a batch, 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 configuration command completes the VLAN configuration when the VLAN is not
created.
Step 3 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 } }
NOTE
Protocol-based VLAN assignment is invalid for packets with the VLAN ID of 0 on the
S5720HI.
----End
Context
Policy-based VLAN assignment implements plug-and-play of user terminals and
provides secure data isolation for terminal users.
The switch that has policy-based VLAN assignment enabled processes only
untagged frames, and treat tagged frames in the same manner as VLANs
configured based on ports.
When receiving an untagged frame, the switch determines the VLAN according to
the policy matching both MAC and IP addresses of the frame, and transmits the
frame in the VLAN.
Procedure
Step 1 Run system-view
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. If VLANs need to be created in a batch, run
the vlan batch { vlan-id1 [ to vlan-id2 ] } &<1-10> command to create VLANs in
a batch, 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 configuration command completes the VLAN configuration when the VLAN is not
created.
NOTE
----End
Context
After VLANs are assigned, users in the same VLAN can communication with each
other while users in different VLANs cannot. If some users in different VLANs need
to communicate, configure inter-VLAN communication. A VLANIF interface is a
Layer 3 logical interface and can implement inter-VLAN Layer 3 connectivity. It is
simple to configure a VLANIF interface, so the VLANIF interface is the most
commonly used technology. Each VLAN corresponds to a VLANIF interface. After
an IP address is configured for a VLANIF interface, the VLANIF interface is used as
the gateway of the VLAN and forwards packets across network segments at Layer
3 based on IP addresses.
Generally, a VLANIF interface requires only IP address. In some scenarios, you need
to configure multiple IP addresses for the VLANIF interface. For example, a switch
connects to a physical network through an interface, and hosts on this network
belong to multiple network segments (multiple PCs connect to the network
through hubs or simplified Layer 2 switches, or one PC uses dual network adapters
to connect to the network). To enable the switch to communicate with all hosts
on the physical network, configure a primary IP address and multiple secondary IP
addresses for this interface.
If a VLAN goes Down because all interfaces in the VLAN go Down, the system
immediately reports the VLAN Down event to the corresponding VLANIF interface,
instructing the VLANIF interface to go Down. To avoid network flapping caused by
the change of the VLANIF interface status, enable VLAN damping on the VLANIF
interface. After the last interface in Up state in a VLAN goes Down, the device
enabled with VLAN damping starts a delay timer and informs the corresponding
VLANIF interface of the VLAN Down event after the timer expires. If an interface
in the VLAN goes Up during the delay, the VLANIF interface remains Up.
The Maximum Transmission Unit (MTU) determines the maximum number of
bytes each time a sender can send. If the size of packets exceeds the MTU
supported by a receiver or a transit node, the receiver or transit node fragments
the packets or even discards them, aggravating the network transmission load. To
avoid this problem, set the MTU of the VLANIF interface.
After configuring bandwidth for a VLANIF interface, you can use the NMS to query
the bandwidth. This facilitates traffic monitoring.
Pre-configuration Tasks
Before configuring inter-VLAN communication, complete the following tasks:
● Perform the task of assign VLANs.
● Configure the default gateway address of hosts as the IP address of the
VLANIF interface.
Procedure
Step 1 Run system-view
The system view is displayed.
A VLANIF interface goes Up only when at least one physical interface in the
corresponding VLAN is in Up state.
Each VLANIF interface can be configured with one primary IP address and 31
secondary IP addresses.
NOTE
The value ranges from 0 to 20, in seconds. By default, the delay is 0 seconds,
indicating that VLAN damping is disabled.
NOTE
● After using the mtu command to change the MTU of an interface, restart the interface
to make the new MTU take effect. To restart the interface, run the shutdown command
and then the undo shutdown command, or run the restart command in the interface
view.
● The MTU plus the Layer 2 frame header of a VLANIF interface must be smaller than the
maximum frame length of the remote interface by the jumboframe command;
otherwise, some frames may be discarded.
----End
NOTE
Only the VLANIF interface in Up state can forward packets at Layer 3. When the
VLANIF interface goes Down, rectify the fault according to 5.10.2 A VLANIF Interface
Goes Down.
Context
After VLANs are assigned, users in the same VLAN can communication with each
other. If users in a VLAN need to be isolated unidirectionally or bidirectionally,
configure a traffic policy. A traffic policy is configured by binding traffic classifiers
to traffic behaviors. The switch classifies packets according to packet information,
and associates a traffic classifier with a traffic behavior to reject the packets
matching the traffic classifier, implementing intra-VLAN isolation.
The switch provides intra-VLAN Layer 2 isolation based on MQC and based on the
ACL-based simplified traffic policy.
Pre-configuration Tasks
Before configuring a traffic policy to implement intra-VLAN Layer 2 isolation,
perform the task of assign VLANs.
Procedure
● Configure MQC to implement intra-VLAN Layer 2 isolation.
For details about how to configure MQC, see Configuring Packet Filtering in
"Packet Filtering Configuration" in the S1720, S2700, S5700, and S6720
V200R011C10 Configuration Guide - QoS.
● Configure an ACL-based simplified traffic policy to implement intra-VLAN
Layer 2 isolation.
For details about how to configure an ACL-based simplified traffic policy, see
Configuring ACL-based Packet Filtering in "ACL-based Simplified Traffic Policy
Configuration" in the S1720, S2700, S5700, and S6720 V200R011C10
Configuration Guide - QoS.
----End
Context
After inter-VLAN Layer 3 connectivity is configured, if some users in different
VLANs require unidirectional access or need to be isolated, configure inter-VLAN
Layer 3 isolation. Inter-VLAN Layer 3 isolation is implemented using a traffic
policy. A traffic policy is configured by binding traffic classifiers to traffic behaviors.
The switch classifies packets according to IP addresses or other information in
packets, and associates a traffic classifier with a traffic behavior to reject the
packets matching the traffic classifier, implementing inter-VLAN Layer 3 isolation.
The switch provides inter-VLAN Layer 3 isolation based on MQC and based on the
ACL-based simplified traffic policy. You can select one of them according to your
needs.
Pre-configuration Tasks
Before configuring a traffic policy to implement inter-VLAN Layer 3 isolation,
perform the task of 5.7.7 Configuring Inter-VLAN Communication.
Procedure
● Configure MQC to implement inter-VLAN Layer 3 isolation.
Perform the following MQC configurations to implement inter-VLAN Layer 3
isolation:
– Specify permit or deny in the traffic behavior.
– Apply the traffic policy to a VLAN or an interface that allows the VLAN.
For details about how to configure MQC, see Configuring Packet Filtering in
"Packet Filtering Configuration" in the S1720, S2700, S5700, and S6720
V200R011C10 Configuration Guide - QoS.
● Configure an ACL-based simplified traffic policy to implement inter-VLAN
Layer 3 isolation.
For details about how to configure an ACL-based simplified traffic policy, see
Configuring ACL-based Packet Filtering in "ACL-based Simplified Traffic Policy
Configuration" in the S1720, S2700, S5700, and S6720 V200R011C10
Configuration Guide - QoS.
----End
Context
Management VLAN (mVLAN) allows you to use the VLANIF interface of the
mVLAN to log in to the management switch to manage devices in a centralized
manner. To use a remote network management system (NMS) to manage devices
in a centralized manner, configure a management IP address on the switch. You
can then log in to the switch in Telnet mode and manage the switch by using the
management IP address. The management IP address can be configured on a
management interface or VLANIF interface. If a user-side interface is added to the
VLAN, users connected to the interface can also log in to the switch. This brings
security risks to the switch.
Pre-configuration Tasks
Before configuring an mVLAN, perform the task of assign VLANs.
NOTE
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 management-vlan
The VLAN is configured as the mVLAN.
VLAN 1 cannot be configured as the mVLAN.
Step 4 Run quit
Exit from the VLAN view.
Step 5 Run interface vlanif vlan-id
A VLANIF interface is created and its view is displayed.
Step 6 Run ip address ip-address { mask | mask-length } [ sub ]
An IP address is assigned to the VLANIF interface.
----End
Follow-up Procedure
Log in to the switch to implement centralized management through the NMS.
Select either of the following login modes according to your needs:
● To manage local devices, log in to the local switch using Telnet, STelnet,
HTTPS. For details, see Configuring Telnet Login, Configuring STelnet Login, or
Web System Login Configuration in the S1720, S2700, S5700, and S6720
V200R011C10 Configuration Guide - Basic Configurations.
● To manage remote devices, log in to the local device using Telnet or STelnet
and log in to remote devices using Telnet or STelnet from the local device. For
details, see (Optional) Using Telnet to Log In to Another Device From the
Local Device in "Configuring Telnet Login", or (Optional) Logging In to
Another Device From the Local Device Using STelnet in "Configuring STelnet
Login" in the S1720, S2700, S5700, and S6720 V200R011C10 Configuration
Guide - Basic Configurations.
Context
When the device used as the gateway or Layer 2 switches is enabled with
snooping functions such as DHCP/IGMP/MLD snooping, the device needs to parse
and process protocol packets such as ARP, DHCP, and IGMP packets. That is,
protocol packets received by an interface are sent to the CPU for processing. The
interface sends protocol packets without differentiating VLANs. If the preceding
functions are deployed, protocol packets from all VLANs are sent to the CPU for
processing.
NOTE
Only the S5720HI, S5720EI, S6720EI, and S6720S-EI support this function.
Procedure
● Configure transparent transmission of protocol packets in a VLAN.
a. Run system-view
The system view is displayed.
b. 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.
c. Run protocol-transparent
Transparent transmission of protocol packets in a VLAN is configured.
By default, transparent transmission of protocol packets in a VLAN is
disabled.
● Configure transparent transmission of protocol packets in multiple VLANs.
a. Run system-view
The system view is displayed.
b. Run vlan batch { vlan-id1 [ to vlan-id2 ] } &<1-10>
Create one or more VLANs.
c. Run vlan range { vlan-id1 [ to vlan-id2 ] } &<1-10>
A temporary VLAN range is created and its view is displayed. If the VLAN
range has been created, this command directly displays the VLAN-Range
view.
Uncreated VLANs cannot be added to a temporary VLAN range.
d. Run protocol-transparent
Transparent transmission of protocol packets in VLANs is configured.
By default, transparent transmission of protocol packets is disabled in
VLANs of a temporary VLAN range.
NOTE
● The vlan range command configuration is not saved in the configuration file. If services
are configured in the VLAN-Range view, the service configurations of all the VLANs in
the VLAN range will be saved in the configuration file.
● After transparent transmission of protocol packets is configured in a VLAN, the VLAN
cannot be configured as the multicast VLAN or control VLAN.
● Before running this command, ensure that IGMP or MLD snooping has been disabled in
the VLAN. Otherwise, the configuration may fail.
Context
You can enable traffic statistics collection in a VLAN or on a VLANIF interface and
view traffic statistics about the VLAN or VLANIF interface to monitor VLAN traffic.
Procedure
● Check VLAN traffic statistics.
a. (Optional) Run the vlan statistics interval command in the system view
to set the interval for VLAN traffic statistics collection.
b. (Optional) Run the vlan statistics { by-packets | by-bytes } command in
the system view to set the VLAN traffic statistics collection mode. You can
configure the switch to collect VLAN traffic statistics based on packets or
bytes.
NOTE
Only the S5720HI, S5720EI, S6720EI, and S6720S-EI support this command.
b. Run the display interface vlanif [ vlan-id ] command in any view to
check traffic statistics about a VLANIF interface.
----End
Context
Before collecting traffic statistics in a given period of time on an interface, clear
existing statistics on the interface.
NOTICE
The cleared VLAN traffic statistics cannot be restored. Exercise caution when you
use the reset vlan command.
To clear VLAN traffic statistics, run the reset vlan statistics command in the user
view.
Procedure
● Run the reset vlan vlan-id statistics command to clear traffic statistics about
a specified VLAN.
----End
Context
Before collecting the packet statistics on a VLANIF interface within a certain
period, clear existing packet statistics on the VLANIF interface.
NOTICE
The cleared statistics cannot be restored. Exercise caution when you run the reset
command.
Procedure
● Run the reset counters interface [ interface-type [ interface-number ] ]
command to clear the packet statistics on the specified VLANIF interface.
----End
Context
NOTICE
The cleared LNP packet statistics cannot be restored. Exercise caution when you
run the reset lnp statistics command.
Procedure
● Run the reset lnp statistics [ interface interface-type interface-number ]
command in the user view to clear LNP packet statistics.
----End
Context
Similar to IP ping, GMAC ping detects whether a fault occurs on an Ethernet link
or monitors the link quality. GMAC ping efficiently detects and locates Ethernet
faults.
NOTE
The S1720GFR does not support this function.
Procedure
Step 1 Run the system-view command to enter the system view.
Step 2 Run the ping mac enable command to enable GMAC ping globally.
After GMAC ping is enabled on the device, the device can ping the remote device
and respond to received GMAC ping packets.
Step 3 Run the ping mac mac-address vlan vlan-id [ interface interface-type interface-
number | -c count | -s packetsize | -t timeout | -p priority-value ] * command to
perform GMAC ping to check connectivity of the link between the local and
remote devices.
A MEP is not required to initiate GMAC ping. The destination node cannot be a
MEP or MIP. You can perform GMAC ping without configuring the MD, MA, or
MEP on the source device, intermediate device, and destination device.
The two devices must be configured with IEEE 802.1ag of the same version. If the
local device is configured with IEEE 802.1ag Draft 7 and the remote device is
configured with IEEE Standard 802.1ag-2007, the ping mac command does not
take effect. That is, the local device cannot ping the remote device.
----End
Context
Similar to IP traceroute, GMAC ping detects whether a fault occurs on an Ethernet
link or monitors the link quality. GMAC trace efficiently detects and locates
Ethernet faults.
GMAC trace is applicable to the network where no MD, MA, or MEP is configured.
NOTE
The S1720GFR does not support this function.
Procedure
Step 1 Configure the devices on both ends of a link and the intermediate device.
Perform the following operations on the devices at both ends of the link to be
tested and intermediate device.
After GMAC ping is enabled on the device, the device can ping the remote
device and respond to received GMAC ping packets.
Perform the following operations on the device at one end of the link to be tested.
A MEP is not required to initiate GMAC trace. The destination node cannot be
a MEP or MIP. That is, GMAC trace can be implemented without configuring
the MD, MA, or MEP on the source device, intermediate device, and
destination device. All the intermediate devices can respond with an LTR.
The two devices must be configured with IEEE 802.1ag of the same version. If
the local device is configured with IEEE 802.1ag Draft 7 and the remote device
is configured with IEEE Standard 802.1ag-2007, the trace mac command does
not take effect. That is, the connectivity fault cannot be located.
----End
Networking Requirements
As shown in Figure 5-24, multiple user terminals are connected to switches in an
enterprise. Users who use the same service access the enterprise network using
different devices.
To ensure the communication security and avoid broadcast storms, the enterprise
wants to allow users who use the same service to communicate with each other
and isolate users who use different services.
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Create VLAN 2 and VLAN 3 on SwitchA, and add interfaces connected to user
terminals to different VLANs. The configuration of SwitchB is similar to that of
SwitchA, and is not mentioned here.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 2 3
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type access
[SwitchA-GigabitEthernet0/0/1] port default vlan 2
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type access
[SwitchA-GigabitEthernet0/0/2] port default vlan 3
[SwitchA-GigabitEthernet0/0/2] quit
Step 2 Configure the type of the interface connected to SwitchB on SwitchA and VLANs.
The configuration of SwitchB is similar to that of SwitchA, and is not mentioned
here.
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, and only User3's and
User4's terminals can ping each other.
----End
Configuration Files
SwitchA configuration file
#
sysname SwitchA
#
vlan batch 2 to 3
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 2
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 3
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
Related Content
Videos
Networking Requirements
Switching devices and user terminals are deployed on the network shown in
Figure 5-25. To implement Layer 2 connectivity, configure the link type for each
interface and add interfaces to VLANs. If the network scale is large, the
configuration is complex. To simplify configurations, switches are connected
through the trunk link, and switches and user terminals are connected through
access links and added to VLANs.
Network
Switch3
GE0/0/1 GE0/0/2
GE0/0/2 GE0/0/2
Switch1 …… Switch2
GE0/0/1 GE0/0/3 GE0/0/1 GE0/0/3
……
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable LNP in the system view and interface view to implement auto-
negotiation. Because PCs do not support LNP, switch interfaces connected to
terminals are used as access interfaces and interfaces between switches are
used as trunk interfaces through negotiation.
2. Create VLANs and add interfaces to VLANs to implement Layer 2 connectivity.
Procedure
Step 1 Enable global LNP.
By default, global LNP is enabled. If LNP is disabled, run the undo lnp disable
command in the system view to enable LNP.
You can create VLANs on each switch, or create VLANs on Switch3 and use the
VLAN Central Management Protocol (VCMP) to synchronize created VLANs to
other switches. The following describes how to create VLANs. If VCMP is used, you
need to configure Switch3 as the VCMP server and Switch1 and Switch2 as the
VCMP clients. For details, see 13 VCMP Configuration.
Step 3 Enable LNP on interfaces, and add switch interfaces connected to PCs to a VLAN
as access interfaces and interfaces between switches to VLANs as trunk interfaces.
NOTE
● If the interface is not a Layer 2 interface, you need to run the portswitch command to
set the interface to work in Layer 2 mode.
● By default, LNP is enabled. If LNP is disabled, run the undo port negotiation disable
command to enable LNP on the interface.
# Configure Switch3.
[Switch3] interface GigabitEthernet 0/0/1
[Switch3-GigabitEthernet0/0/1] port trunk allow-pass only-vlan 10 20
[Switch3-GigabitEthernet0/0/1] quit
[Switch3] interface GigabitEthernet 0/0/2
[Switch3-GigabitEthernet0/0/2] port trunk allow-pass only-vlan 10 20
[Switch3-GigabitEthernet0/0/2] quit
NOTE
The port trunk allow-pass only-vlan 10 20 command configures the interface to allow
only VLAN 10 and VLAN 20.
Packets statistics
56 packets received
0 packets dropped
bad version: 0, bad TLV(s): 0, bad port link type: 0,
bad negotiation state: 0, other: 0
58 packets output
0 packets dropped
other: 0
----End
Configuration Files
● Switch1 configuration file
#
sysname Switch1
#
vlan batch 10 20
#
interface GigabitEthernet0/0/1
port default vlan 10
#
interface GigabitEthernet0/0/2
port trunk allow-pass only-vlan 10 20
#
interface GigabitEthernet0/0/3
port default vlan 20
#
return
Enterprise
network
GE0/0/1
Switch
GE0/0/2 GE0/0/4
GE0/0/3
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and determine which VLAN the PCs of employees belong to.
2. Add Ethernet interfaces to VLANs so that packets of the VLANs can pass
through the interfaces.
3. Associate MAC addresses of PC1, PC2, and PC3 with the specified VLAN so
that the VLAN of the packets can be determined based on the source MAC
address.
Procedure
Step 1 Configure the Switch.
# Create VLANs.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 10
# Associate MAC addresses of PC1, PC2, and PC3 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
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 10
#
vlan 10
mac-vlan mac-address 0022-0022-0022 priority 0
mac-vlan mac-address 0033-0033-0033 priority 0
mac-vlan mac-address 0044-0044-0044 priority 0
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid untagged vlan 10
mac-vlan enable
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid untagged vlan 10
mac-vlan enable
#
interface GigabitEthernet0/0/4
Router
GE0/0/1
GE0/0/2
Switch
GE0/0/1
Simplified Layer 2
switch
Multimedia
User host Phone
terminal
192.168.1.2/24 192.168.2.2/24 192.168.3.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and add interfaces to VLANs so that the interfaces allow the IP
subnet-based VLANs.
2. Enable IP subnet-based VLAN assignment and associate IP subnets with
VLANs so that the Switch determines VLANs according to IP addresses or
network segments of packets.
NOTE
You do not need to perform any configuration on a simplified Layer 2 switch. To enable the
router to transmit packets with different VLAN IDs to different servers, perform the
following operations:
● Add the router interface connected to the Switch to all service VLANs in tagged mode.
● Add each interface of each service network to a service VLAN and configure a VLANIF
interface.
For details, see the router configuration guide.
Procedure
Step 1 Create VLANs.
# Create VLAN 100, VLAN 200, and VLAN 300 on the Switch.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 100 200 300
# On the Switch, configure GE0/0/1 as the hybrid interface, add GE0/0/1 to VLAN
100, VLAN 200, and VLAN 300 in untagged mode, and enable IP subnet-based
VLAN assignment.
[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] port link-type hybrid
[Switch-GigabitEthernet0/0/1] port hybrid untagged vlan 100 200 300
[Switch-GigabitEthernet0/0/1] ip-subnet-vlan enable
[Switch-GigabitEthernet0/0/1] quit
# On the Switch, configure GE0/0/2 as the trunk interface, add GE0/0/2 to VLAN
100, VLAN 200, and VLAN 300 in tagged mode,
[Switch] interface gigabitethernet 0/0/2
[Switch-GigabitEthernet0/0/2] port link-type trunk
[Switch-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 200 300
[Switch-GigabitEthernet0/0/2] quit
# On the Switch, associate IP subnet 192.168.1.2/24 with VLAN 100 and set the
802.1p priority of VLAN 100 to 2.
[Switch] vlan 100
[Switch-vlan100] ip-subnet-vlan 1 ip 192.168.1.2 24 priority 2
[Switch-vlan100] quit
# On the Switch, associate IP subnet 192.168.2.2/24 with VLAN 200 and set the
802.1p priority of VLAN 200 to 3.
[Switch] vlan 200
[Switch-vlan200] ip-subnet-vlan 1 ip 192.168.2.2 24 priority 3
[Switch-vlan200] quit
# On the Switch, associate IP subnet 192.168.3.2/24 with VLAN 300 and set the
802.1p priority of VLAN 300 to 4.
[Switch] vlan 300
[Switch-vlan300] ip-subnet-vlan 1 ip 192.168.3.2 24 priority 4
[Switch-vlan300] quit
Run the display ip-subnet-vlan vlan all command on the Switch. The following
information is displayed:
[Switch] display ip-subnet-vlan vlan all
----------------------------------------------------------------
Vlan Index IpAddress SubnetMask Priority
----------------------------------------------------------------
100 1 192.168.1.2 255.255.255.0 2
200 1 192.168.2.2 255.255.255.0 3
300 1 192.168.3.2 255.255.255.0 4
----------------------------------------------------------------
ip-subnet-vlan count: 3 total count: 3
----End
Configuration Files
● Switch configuration file
#
sysname Switch
#
vlan batch 100 200 300
#
vlan 100
ip-subnet-vlan 1 ip 192.168.1.2 255.255.255.0 priority 2
vlan 200
ip-subnet-vlan 1 ip 192.168.2.2 255.255.255.0 priority 3
vlan 300
ip-subnet-vlan 1 ip 192.168.3.2 255.255.255.0 priority 4
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid untagged vlan 100 200 300
ip-subnet-vlan enable
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 100 200 300
#
return
Networking Requirements
A company has multiple services, including IPTV, VoIP, and Internet access. Each
service uses a different protocol. To facilitate network management, each service
is added to a different VLAN.
As shown in Figure 5-28, Swithc1 receives packets of multiple services that use
different protocols. Users in VLAN 10 use IPv4 to communicate with remote users,
and users in VLAN 20 use IPv6 to communicate with the servers. Switch1 needs to
assign VLANs to packets of different services and transmit packets with different
VLAN IDs to different servers.
Voice
Network Internet
RouterA RouterB
GE0/0/2 GE0/0/3
Switch
GE0/0/1
GE0/0/1
Switch1
GE0/0/2 GE0/0/3
IPv4 IPv6
VLAN 10 VLAN 20
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and determine which VLAN each service belongs to.
2. Associate protocols with VLANs so that the VLANs that received packets
belong to can be assigned based on protocols.
3. Add interfaces to VLANs so that packets of the protocol-based VLANs can
pass through the interfaces.
4. Associate interfaces with VLANs.
After the Switch receives a frame of a specified protocol, it assigns the VLAN
ID associated with the protocol to the frame.
Procedure
Step 1 Create VLANs.
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] vlan batch 10 20
[Switch1] vlan 10
[Switch1-vlan10] protocol-vlan ipv4
[Switch1-vlan10] quit
# Associate GE0/0/3 with VLAN 20 and set the 802.1p priority of VLAN 20 to 6 on
Switch1.
[Switch1] interface gigabitethernet 0/0/3
[Switch1-GigabitEthernet0/0/3] protocol-vlan vlan 20 all priority 6
[Switch1-GigabitEthernet0/0/3] quit
----End
Configuration Files
● Switch1 configuration file
#
sysname Switch1
#
vlan batch 10 20
#
vlan 10
protocol-vlan 0 ipv4
vlan 20
protocol-vlan 0 ipv6
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid untagged vlan 10
protocol-vlan vlan 10 0 priority 5
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid untagged vlan 20
protocol-vlan vlan 20 0 priority 6
#
return
As shown in Figure 5-29, User1 and User2 use the same service but belong to
different VLANs and are located on different network segments. User1 and User2
need to communicate.
GE0/0/1 GE0/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
The configuration roadmap is as follows:
NOTE
To implement inter-VLAN communication, 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
[Switch] vlan batch 10 20
After the configuration is complete, User1 in VLAN 10 and User2 in VLAN 20 can
communicate.
----End
Configuration Files
Switch configuration file
#
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 GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 20
#
return
Related Content
Videos
Networking Requirements
As shown in Figure 5-30, Switch_1 and Switch_2 are connected to Layer 2
networks that VLAN 10 belongs to. Switch_1 communicates with Switch_2 through
a Layer 3 network where OSPF is enabled.
PCs of the two Layer 2 networks need to be isolated at Layer 2 and interwork at
Layer 3.
Switch_1 Switch_2
GE0/0/2 OSPF GE0/0/2
GE0/0/1 GE0/0/1
GE0/0/1 GE0/0/1
VLAN10 VLAN10
Configuration Roadmap
The configuration roadmap is as follows:
1. Add interfaces to VLANs and configure the interfaces to allow the VLANs.
2. Configure IP addresses for VLANIF interfaces to implement Layer 3
connectivity.
3. Configure basic OSPF functions to implement interworking.
Procedure
Step 1 Configure Switch_1.
# Create VLAN 10, add GE0/0/1 to VLAN 10 in untagged mode and GE0/0/2 to
VLAN 10 in tagged mode. The configuration of Switch_4 is similar to that of
Switch_3, and is not mentioned here.
<HUAWEI> system-view
[HUAWEI] sysname Switch_3
[Switch_3] vlan batch 10
[Switch_3] interface gigabitethernet 0/0/1
[Switch_3-GigabitEthernet0/0/1] port link-type access
[Switch_3-GigabitEthernet0/0/1] port default vlan 10
[Switch_3-GigabitEthernet0/0/1] quit
[Switch_3] interface gigabitethernet 0/0/2
[Switch_3-GigabitEthernet0/0/2] port link-type trunk
[Switch_3-GigabitEthernet0/0/2] port trunk allow-pass vlan 10
[Switch_3-GigabitEthernet0/0/2] quit
----End
Configuration Files
● Switch_1 configuration file
#
sysname Switch_1
#
router id 1.1.1.1
#
vlan batch 10 30
#
interface Vlanif10
ip address 10.10.10.1 255.255.255.0
#
interface Vlanif30
ip address 10.10.30.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
ospf 1
area 0.0.0.0
network 10.10.10.0 0.0.0.255
network 10.10.30.0 0.0.0.255
#
return
vlan batch 10 30
#
interface Vlanif10
ip address 10.10.20.1 255.255.255.0
#
interface Vlanif30
ip address 10.10.30.2 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
ospf 1
area 0.0.0.0
network 10.10.20.0 0.0.0.255
network 10.10.30.0 0.0.0.255
#
return
Related Content
Videos
Networking Requirements
On the enterprise network shown in Figure 5-31, hosts in the same VLAN belong
to network segments of 10.1.1.1/24 and 10.1.2.1/24. Hosts on the two network
segments are required to access the Internet through the Switch and
communicate.
Internet
Router 10.10.10.2/24
VLANIF10
Primary IP: 10.1.1.1/24
GE0/0/3 Secondary IP: 10.1.2.1/24
VLANIF20
Switch 10.10.10.1/24
GE0/0/1 GE0/0/2
VLAN10
Host1 Host2
10.1.1.2/24 10.1.2.2/24
Configuration Roadmap
If only one IP address is configured for the VLANIF interface on the Switch, only
hosts on one network segment can access the Internet through the Switch. To
enable all hosts on the LAN to access the Internet through the Switch, configure a
secondary IP address for the VLANIF interface. To enable hosts on the two
network segments to communicate, the hosts on the two network segments need
to use the primary and secondary IP addresses of the VLANIF interface as default
gateway addresses.
Procedure
Step 1 Create VLANs and add interfaces to the VLANs.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 10 20
NOTE
After the configuration is complete, Host1 and Host2 can ping each other
successfully, and they can ping 10.10.10.2/24, IP address of the router interface
connected to the Switch. That is, they can access the Internet.
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 10 20
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
ip address 10.1.2.1 255.255.255.0 sub
#
interface Vlanif20
ip address 10.10.10.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 20
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.1.2.0 0.0.0.255
network 10.10.10.0 0.0.0.255
#
return
Related Content
Videos
Deploying a Layer 3 Switch on a LAN
Networking Requirements
As shown in Figure 5-32, to ensure communication security, a company assigns
visitors, employees, and servers to VLAN 10, VLAN 20, and VLAN 30 respectively.
The requirements are as follows:
● Employees, visitors, and servers can access the Internet.
● Visitors can access only the Internet, and cannot communicate with
employees in any other VLANs.
● Employee A can access all resources in the server area, and other employees
can access port 21 (FTP service) of server A.
Internet
Router
VLANIF100
GE0/0/4 10.1.100.1/24
GE0/0/1 GE0/0/3
Switch_4 GE0/0/2
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and add interfaces to the VLANs to implement Layer 2 isolation
of visitors, employees, and servers.
2. Configure VLANIF interfaces and assign IP addresses to them to implement
Layer 3 connectivity between employees, servers, and visitors.
3. Configure a routing protocol so that visitors, employees, and servers can
access the Internet through the Switch.
4. Configure and apply a traffic policy so that employee A can access all
resources in the server area, other employees can access only port 21 (FTP
service) of server A, employees can access only servers, and visitors can access
only the Internet.
Procedure
Step 1 Create VLANs and add interfaces to the VLANs to implement Layer 2 isolation of
visitors, employees, and servers.
# Create VLAN 10, VLAN 20, VLAN 30, and VLAN 100 on Switch_4, and add
GE0/0/1-GE0/0/4 to VLAN 10, VLAN 20, VLAN 30, and VLAN 100 in tagged mode.
<HUAWEI> system-view
[HUAWEI] sysname Switch_4
[Switch_4] vlan batch 10 20 30 100
[Switch_4] interface gigabitethernet 0/0/1
[Switch_4-GigabitEthernet0/0/1] port link-type trunk
[Switch_4-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[Switch_4-GigabitEthernet0/0/1] quit
[Switch_4] interface gigabitethernet 0/0/2
[Switch_4-GigabitEthernet0/0/2] port link-type trunk
[Switch_4-GigabitEthernet0/0/2] port trunk allow-pass vlan 20
[Switch_4-GigabitEthernet0/0/2] quit
[Switch_4] interface gigabitethernet 0/0/3
[Switch_4-GigabitEthernet0/0/3] port link-type trunk
[Switch_4-GigabitEthernet0/0/3] port trunk allow-pass vlan 30
[Switch_4-GigabitEthernet0/0/3] quit
[Switch_4] interface gigabitethernet 0/0/4
[Switch_4-GigabitEthernet0/0/4] port link-type trunk
[Switch_4-GigabitEthernet0/0/4] port trunk allow-pass vlan 100
[Switch_4-GigabitEthernet0/0/4] quit
Step 2 Configure VLANIF interfaces and assign IP addresses to them to implement Layer
3 connectivity between employees, servers, and visitors.
# On Switch_4, create VLAN 10, VLAN 20, VLAN 30, and VLAN 100 and assign IP
addresses of 10.1.1.1/24, 10.1.2.1/24, 10.1.3.1/24, and 10.1.100.1/24 to them
respectively.
[Switch_4] interface vlanif 10
[Switch_4-Vlanif10] ip address 10.1.1.1 24
[Switch_4-Vlanif10] quit
[Switch_4] interface vlanif 20
[Switch_4-Vlanif20] ip address 10.1.2.1 24
[Switch_4-Vlanif20] quit
[Switch_4] interface vlanif 30
[Switch_4-Vlanif30] ip address 10.1.3.1 24
[Switch_4-Vlanif30] quit
[Switch_4] interface vlanif 100
[Switch_4-Vlanif100] ip address 10.1.100.1 24
[Switch_4-Vlanif100] quit
Step 3 Configure a routing protocol so that visitors, employees, and servers can access
the Internet through the Switch.
# Configure basic OSPF functions on Switch_4 and configure OSPF to advertise
network segments of hosts and the network segment between Switch_4 and the
router.
[Switch_4] ospf
[Switch_4-ospf-1] area 0
NOTE
Step 4 Configure and apply a traffic policy to control access of employees, visitors, and
servers.
1. Configure ACLs to define flows.
# Configure ACL 3000 on Switch_4 to prevent visitors from accessing
employees' PCs and servers.
[Switch_4] acl 3000
[Switch_4-acl-adv-3000] rule deny ip destination 10.1.2.1 0.0.0.255
[Switch_4-acl-adv-3000] rule deny ip destination 10.1.3.1 0.0.0.255
[Switch_4-acl-adv-3000] quit
4. Configure traffic policies and associate traffic classifiers with the traffic
behavior in the traffic policies.
# Create traffic policies p_custom and p_staff on Switch_4, and associate
traffic classifiers c_custom and c_staff with traffic behavior b1.
[Switch_4] traffic policy p_custom
[Switch_4-trafficpolicy-p_custom] classifier c_custom behavior b1
[Switch_4-trafficpolicy-p_custom] quit
[Switch_4] traffic policy p_staff
----End
Configuration Files
● Switch_1 configuration file
#
sysname Switch_1
#
vlan batch 10
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10
#
return
● Switch_2 configuration file
#
sysname Switch_2
#
vlan batch 20
#
interface GigabitEthernet0/0/1
port link-type access
Networking Requirements
As shown in Figure 5-33, users need to securely log in to the Switch for remote
management. There is no idle management interface on the Switch.
10.1.1.1/24 10.10.10.2/24
IP GE0/0/1
Network
PC Switch
Configuration Roadmap
A management interface or VLANIF interface of an mVLAN can be used to log in
to the device for remote management. The device has no idle management
interface, so the mVLAN is used. STelnet is used to ensure login security. The
configuration roadmap is as follows:
NOTE
● The user PC needs to be configured with the software for logging in to the SSH server,
key pair generation software, and public key conversion software.
● To ensure device security, change the password periodically.
Procedure
Step 1 Configure an mVLAN and add an interface to the mVLAN.
# Create VLAN 10 on the Switch and specify VLAN 10 as the mVLAN, and add
GE0/0/1 to VLAN 10 in tagged mode.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan 10
[Switch-vlan10] management-vlan
[Switch-vlan10] quit
[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] port link-type trunk
[Switch-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[Switch-GigabitEthernet0/0/1] quit
Step 2 Configure a VLANIF interface and assign an IP address to the VLANIF interface.
# Create an SSH user named client001 on the Switch and configure password
authentication.
[Switch] aaa
[Switch-aaa] local-user client001 password irreversible-cipher Huawei@123
[Switch-aaa] local-user client001 privilege level 3
[Switch-aaa] local-user client001 service-type ssh
[Switch-aaa] quit
[Switch] ssh user client001 authentication-type password
NOTE
The PC connects to the switch through the intermediate device. The intermediate device
needs to transparently transmit packets from mVLAN 10 and has a route from 10.1.1.1/24
to 10.10.10.2/24.
# Click Open. On the page that is displayed on the Switch, enter the user name
and password, and press Enter.
login as: client001
SSH server: User Authentication
Using keyboard-interactive authentication.
Password:
Info: The max number of VTY users is 10, and the number
of current VTY users on line is 1.
The current login time is 2014-02-25 05:45:41+00:00.
<Switch>
The user can successfully log in to the Switch for remote management.
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 10
#
vlan 10
management-vlan
#
aaa
local-user client001 password irreversible-cipher $1a$EqZEVTq=/@T2XM0q0W{Ec[Fs2@&4YII@-
=(lbr[K>4Dq76]3#BgqMOAxu^%$$
local-user client001 privilege level 3
local-user client001 service-type ssh
#
interface Vlanif10
ip address 10.10.10.2 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
stelnet server enable
ssh user client001
ssh user client001 authentication-type password
ssh user client001 service-type stelnet
#
user-interface vty 0 14
authentication-mode aaa
#
return
Only the S5720HI, S5720EI, S6720EI, and S6720S-EI support this function.
sending the data to its CPU. This improves the processing efficiency, reduces
communication costs, and minimizes the probability of malicious attacks on the
Switch.
Parent Company
Pac
ket
GE0/0/2
so
f VL
Switch
AN
GE0/0/1 GE0/0/3
2 0
VLAN 10 VLAN 20
SwitchA SwitchB
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs.
2. Enable transparent transmission of protocol packets in a VLAN.
3. Add Ethernet interfaces to VLANs.
Procedure
Step 1 Configure the Switch.
# Create VLANs.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 10 20
Step 2 Configure SwitchA and SwitchB. Add upstream interfaces on SwitchA and SwitchB
to VLAN 10 and VLAN 20 in tagged mode, and add downstream interfaces to
VLAN 10 and VLAN 20 in default mode. The configuration details are not
mentioned here.
# After the configuration is complete, run the display this command in the view
of VLAN 20. The command output shows that transparent transmission of
protocol packets in a VLAN is enabled.
[Switch] vlan 20
[Switch-vlan20] display this
#
vlan 20
protocol-transparent
#
return
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 10 20
#
vlan 20
protocol-transparent
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 10 20
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 20
#
return
Fault Symptom
When a user attempts to create a VLANIF interface, the system displays an error
message. As a result, the VLANIF interface fails to be created.
Procedure
Step 1 Check the error message during VLANIF interface creation.
Rectify the fault according to the error message. See Table 5-9.
Error: Can not create this The number of created Run the undo
interface because the VLANIF interfaces on interface vlanif vlan-
interface number of this the device has reached id command to delete
type has reached its the limit. unnecessary VLANIF
maximum. Run the display interfaces, and then
interface brief create a specified
command to check the VLANIF interface.
number of VLANIF
interfaces, and check
whether the number of
VLANIF interfaces has
reached the limit in
Table 5-7.
Step 2 If the fault persists, collect alarms and logs and contact technical support
personnel.
----End
The physical status of all interfaces Rectify this fault. A VLANIF interface
added to the VLAN is Down. goes Up as long as one interface in the
VLAN is Up.
The VLANIF interface is shut down. Run the undo shutdown command in
the VLANIF interface view to start the
VLANIF interface.
Fault Symptom
Users in a VLAN cannot communicate.
Procedure
Step 1 Check whether the interfaces connected to user terminals are in Up state.
Step 2 Check whether the IP addresses of user terminals are on the same network
segment. If they are on different network segments, change the IP addresses of
the user terminals to be on the same network segment. If the fault persists, go to
Step 3.
Run the display mac-address command on the Switch to check whether 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 in the system view to delete MAC address 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.
Whether the Run the display vlan vlan-id command in any view to check
VLAN has been whether the VLAN has been created. If not, run the vlan
created command in the system view to create the VLAN.
Whether the Run the display vlan vlan-id command in any view to check
interfaces are whether the VLAN contains the interfaces. If not, add the
added to the interfaces to the VLAN.
VLAN NOTE
If the interfaces are located on different switches, add the interfaces
connecting the switches to the VLAN.
The default type of an interface is Negotiation. You can run the port
link-type command to change the link type of an interface.
● Add an access interface to the VLAN by using either of
the following methods. Run the port default vlan
command in the interface view, or 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 by using either of the
following methods. Run the port hybrid tagged vlan
command in the interface view, or 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 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 port isolation is configured on the interface.
● If port isolation is not configured, go to Step 6.
● If 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 correct static Address Resolution Protocol (ARP) entries are
configured on the user terminals. If the static ARP entries are incorrect, modify
them. Otherwise, go to Step 7.
Step 7 Collect logs and alarms and contact technical support personnel.
----End
Fault Symptom
As shown in Figure 5-36, the IP address of VLANIF 10 on Switch_2 cannot be
pinged from Switch_1. Similarly, the IP address of VLANIF 10 on Switch_1 cannot
be pinged from Switch_2.
Procedure
Step 1 Check whether the VLANIF interface is Up.
Run the display interface vlanif vlan-id command on Switch_1 and Switch_2 and
check the current state and Line protocol current state fields.
● If the value of any one of the two fields is DOWN, the VLANIF interface is
Down. Rectify this fault according to 5.10.2 A VLANIF Interface Goes Down.
● If the values of the two fields are UP, the VLANIF interface is Up. Go to Step
2.
Step 2 Check whether the connected Ethernet interfaces between switches join a VLAN.
Run the display vlan vlan-id command on Switch_1 and Switch_2 and check the
Ports field. Check whether the connected Ethernet interfaces exist in the VLAN.
● If the connected Ethernet interfaces do not exist in the VLAN, add the
connected Ethernet interfaces to the VLAN.
● If the connected Ethernet interfaces exist in the VLAN and at least one of
them joins the VLAN in untagged mode (UT displayed before the interface),
change the untagged mode to tagged mode.
● If the connected Ethernet interfaces exist in the VLAN but the interfaces go
Down (D displayed after the interface), rectify the fault according to An
Ethernet Interface Is Physically Down in "Ethernet Interface Configuration" in
the S1720, S2700, S5700, and S6720 V200R011C10 Configuration Guide -
Interface Management.
● If none of the preceding configurations exists, go to Step 3.
Step 3 Check whether the PVID values on the connected Ethernet interface between
switches are the same.
Step 4 Collect logs and alarms and contact technical support personnel.
----End
NOTE
You can create a maximum of 10 noncontiguous VLANs or VLAN range at one time. If
there are more than 10 VLANs, run this command multiple times. For example, the
vlan batch 10 15 to 19 25 28 to 30 command creates four noncontiguous VLAN
ranges.
NOTE
The link type of an interface can be access, trunk, hybrid, or dot1q-tunnel. The
methods used to change the link type of an interface in different versions are
different.
● In V200R005 and later versions, run the port link-type { access | trunk |
hybrid | dot1q-tunnel } command and enter y or n as prompted. When the
interface uses the default VLAN configuration, the system does not display
any message. The link type of the interface is changed directly.
– When you enter y and press Enter, the device automatically deletes the
non-default VLAN configuration of the interface and set the link type of
the interface to the specified one.
– When you enter n and press Enter, the device retains the current link
type and VLAN configuration of the interface.
Change the link type of the interface to hybrid.
<HUAWEI> system-view
[HUAWEI] interface GigabitEthernet0/0/1
[HUAWEI-GigabitEthernet0/0/1] port link-type hybrid
Warning: This command will delete VLANs on this port. Continue?[Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment...done.
● In earlier versions of V200R005, an interface joins VLAN 1 by default, and the
PVID of an interface is VLAN 1. You can run the port link-type { access |
trunk | hybrid | dot1q-tunnel } command to change the link type of the
interface.
– Change the link type of the interface to access.
<HUAWEI> system-view
[HUAWEI] interface GigabitEthernet0/0/1
[HUAWEI-GigabitEthernet0/0/1] port link-type access
[HUAWEI-GigabitEthernet0/0/1] port default vlan 10
– Change the link type of the interface to trunk.
<HUAWEI> system-view
[HUAWEI] interface GigabitEthernet0/0/1
[HUAWEI-GigabitEthernet0/0/1] port link-type trunk
[HUAWEI-GigabitEthernet0/0/1] port trunk pvid vlan 10
[HUAWEI-GigabitEthernet0/0/1] port trunk allow-pass vlan 2 10 20
– Change the link type of the interface to hybrid.
<HUAWEI> system-view
[HUAWEI] interface GigabitEthernet0/0/1
[HUAWEI-GigabitEthernet0/0/1] port link-type hybrid
[HUAWEI-GigabitEthernet0/0/1] port hybrid pvid vlan 10
[HUAWEI-GigabitEthernet0/0/1] port hybrid untagged vlan 2 10
[HUAWEI-GigabitEthernet0/0/1] port hybrid tagged vlan 20
– Change the link type of the interface to dot1q-tunnel.
<HUAWEI> system-view
[HUAWEI] interface GigabitEthernet0/0/1
[HUAWEI-GigabitEthernet0/0/1] port link-type dot1q-tunnel
[HUAWEI-GigabitEthernet0/0/1] port default vlan 10
When you change the link type of an interface that does not use the default
VLAN configuration, the system displays the message "Error: Please renew the
default configurations."
You need to restore the default configuration of the interface, and then
change the link type of the interface.
– Restore the default VLAN configuration of an access or dot1q-tunnel
interface.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo port default vlan
GigabitEthernet0/0/7 hybrid 1 -
GigabitEthernet0/0/8 hybrid 1 -
GigabitEthernet0/0/9 hybrid 1 -
GigabitEthernet0/0/10 hybrid 1 -
GigabitEthernet0/0/11 hybrid 1 -
GigabitEthernet0/0/12 hybrid 1 -
GigabitEthernet0/0/13 hybrid 1 -
GigabitEthernet0/0/15 hybrid 1 -
GigabitEthernet0/0/16 hybrid 1 -
GigabitEthernet0/0/17 hybrid 1 -
GigabitEthernet0/0/18 hybrid 1 -
GigabitEthernet0/0/19 hybrid 1 -
GigabitEthernet0/0/20 hybrid 1 -
GigabitEthernet0/0/21 hybrid 1 -
GigabitEthernet0/0/22 hybrid 1 -
GigabitEthernet0/0/23 hybrid 1 -
GigabitEthernet0/0/24 hybrid 1 -
The Link Type field indicates the link type of an interface, the PVID field indicates
the default VLAN, and the Trunk VLAN List field indicates the list of VLANs
allowed by a trunk interface. If the interface does not join any VLAN, the Trunk
VLAN List field is displayed as -. If the link type of an interface is negotiation-
desirable or negotiation-auto, the Trunk VLAN List field is displayed as 1 to
4094.
NOTE
In the earlier versions of V200R005, before deleting a VLAN where a VLANIF interface has
been configured, run the undo interface vlanif command to delete the VLANIF interface.
Figure 5-37 Communication for hosts on multiple network segments in the same
VLAN
Switch
VLANIF 10
Primary IP: 10.1.1.1/24
Secondary IP: 10.1.2.1/24
GE0/0/1 GE0/0/2
VLAN10
Host_1 Host_2
10.1.1.2/24 10.1.2.2/24
After the preceding configurations are performed, Host_1 and Host_2 can
communicate.
If the value of any one of the two fields is DOWN, the VLANIF interface is
Down. Rectify this fault according to Table 5-11.
Table 5-11 Common causes and solutions to the VLANIF interface Down
event
Common Cause Solution
The physical status of all interfaces Rectify this fault. A VLANIF interface
added to the VLAN is Down. goes Up as long as one interface in
the VLAN is Up.
The VLANIF interface is shut down. Run the undo shutdown command
That is, the value of current state is in the VLANIF interface view to start
Administratively DOWN. the VLANIF interface.
VLANIF 2 VLANIF 3
IP address:10.1.1.1 Switch_1 Switch_2 IP address:10.1.2.1
VLANIF 4 VLAN4 VLANIF 4
IP address:10.1.4.1 IP address:10.1.4.2
VLAN2 VLAN3
PC1 PC2
IP:10.1.1.2 IP:10.1.2.2
网关:10.1.1.1 网关:10.1.2.1
GE0/0/1 GE0/0/1
As shown in Figure 5-39, the switch has been configured to transparently transmit
Layer 2 packets. Do VLANs need to be assigned?
● If Switch1 and Switch2 where VLANs are not assigned use default VLAN
configuration, VLANs do not need to be assigned on the switch.
● If VLANs are assigned on Switch1 and Switch2, VLANs need to be assigned on
the switch.
For example, GE0/0/1 interfaces connecting Switch1 and Switch2 to the
switch transparently transmit packets from VLAN 10 and VLAN 20, so GE0/0/2
and GE0/0/3 on the switch need be configured to transparently transmit
packets from VLAN 10 and VLAN 20. Perform the following configurations.
[HUAWEI] vlan batch 10 20
[HUAWEI] interface gigabitethernet 0/0/2
[HUAWEI-GigabitEthernet0/0/2] port link-type trunk
[HUAWEI-GigabitEthernet0/0/2] port trunk allow-pass vlan 10 20
[HUAWEI-GigabitEthernet0/0/2] quit
[HUAWEI] interface gigabitethernet 0/0/3
[HUAWEI-GigabitEthernet0/0/3] port link-type trunk
[HUAWEI-GigabitEthernet0/0/3] port trunk allow-pass vlan 10 20
MAC-VLAN entries are only valid for untagged packets. If MAC-VLAN entries are
invalid, check whether incoming packets carry VLAN tags.
Context
When the VLANIF interface is enabled with traffic statistics, the switch counts
Layer 3 traffic in the VLAN corresponding to the VLANIF interface. That is,
statistics on all traffic passing the VLANIF interface are collected.
Definition
VLAN aggregation, also called super-VLAN, partitions a broadcast domain into
multiple VLANs (sub-VLANs) on a physical network and aggregates the sub-
VLANs into a single logical VLAN (super-VLAN). The sub-VLANs use the same IP
subnet and default gateway address, so the number of IP addresses used is
reduced.
Purpose
VLAN technology is commonly used on packet switching networks because it can
flexibly control broadcast domains and is easy to deploy. Usually, a Layer 3 switch
uses a Layer 3 logical interface in each VLAN to allow hosts in different broadcast
domains to communicate. This wastes IP addresses. On a subnet corresponding to
a VLAN, the subnet ID, directed broadcast address, and subnet default gateway
address all cannot be used as IP addresses of hosts in the VLAN. In addition, IP
addresses available in a subnet may exceed the number of hosts. These excess IP
addresses cannot be used by other VLANs.
In Figure 6-1, VLAN 2 requires 10 host addresses. The subnet 10.1.1.0/28 with a
28-bit mask is assigned to VLAN 2, where 10.1.1.0 is the subnet ID, 10.1.1.15 is the
directed broadcast address, and 10.1.1.1 is the default gateway address. Hosts
cannot use these three addresses, but the other 13 addresses ranging from
10.1.1.2 to 10.1.1.14 are available to them.
At least three IP addresses are wasted for VLAN 2, and at least nine IP addresses
are wasted for three VLANs. Although VLAN 2 requires only 10 IP addresses, the
remaining 3 IP addresses cannot be used by other VLANs and are wasted. If more
VLANs are added, the problem is exacerbated.
VLANIF 3:10.1.1.17
Sub-VLANs share one gateway address to reduce the number of subnet IDs,
subnet default gateway addresses, and directed broadcast IP addresses used is
reduced. The switch assigns IP addresses to hosts in sub-VLANs according to the
number of hosts. This ensures that each sub-VLAN acts as an independent
broadcast domain, conserves IP addresses, and implements flexible addressing.
Implementation
VLAN aggregation defines the super-VLAN and sub-VLAN. A sub-VLAN is an
independent broadcast domain that contains only physical interfaces. A super-
VLAN contains no physical interface and is used for creating a Layer 3 VLANIF
interface. By mapping a super-VLAN to sub-VLANs, VLAN aggregation associates
the Layer 3 VLANIF interface with physical interfaces so that all sub-VLANs share
one gateway to communicate with an external network. In addition, proxy ARP
can be used to implement Layer 3 connectivity between sub-VLANs. The super-
VLAN and sub-VLAN are different from common VLANs that contain a Layer 3
logical interface and multiple physical interfaces.
● Sub-VLAN: contains only physical interfaces, and is used to isolate broadcast
domains. A sub-VLAN cannot be used to create a Layer 3 VLANIF interface.
Hosts in each sub-VLAN use the VLANIF interface of the associated super-
VLAN to communicate with external devices over Layer 3.
● Super-VLAN: is only used for creating a Layer 3 VLANIF interface and contains
no physical interfaces. Its IP address is used as the subnet gateway. A VLANIF
interface in a super-VLAN is Up as long as a physical interface in any
associated sub-VLAN is Up. This is unlike a VLANIF interface, which is Up as
long as a physical interface is Up.
A super-VLAN can contain one or more sub-VLANs. A sub-VLAN does not occupy
an independent subnet. In a super-VLAN, the IP address of a host is the same
subnet segment as the super-VLAN regardless of which sub-VLAN belongs to.
Therefore, sub-VLANs share the same gateway.
Sub-VLANs share one gateway address to reduce the number of subnet IDs,
subnet default gateway addresses, and directed broadcast IP addresses used. This
allows different broadcast domains to use the same subnet address, allows for
flexible addressing, and conserves IP addresses.
6.1 Overview of VLAN Aggregation shows an example network topology. VLAN
10 is configured as the super-VLAN and assigned the subnet address 10.1.1.0/24.
VLAN 2, VLAN 3, and VLAN 4 are configured as sub-VLANs of super-VLAN 10.
NOTE
For details about proxy ARP, see Proxy ARP in "ARP Configuration" in the S1720, S2700,
S5700, and S6720 V200R011C10 Configuration Guide - IP Services.
Figure 6-3 Using proxy ARP to implement Layer 3 communication between sub-
VLANs
Super-VLAN10
L3 Switch VLANIF10:10.1.1.1/24
Proxy ARP
Host_1 Host_2
Sub-VLAN2 Sub-VLAN3
10.1.1.2/24 10.1.1.12/24
VLANIF 10. Switch_1 determines the outbound interface according to the ARP
entry and MAC address entry, and sends the packet to Switch_2.
5. Switch_2 sends the packet to the server through Layer 3 forwarding.
After receiving the packet from Host_1, the server sends a response packet with
the destination IP address of 10.1.1.2 and the MAC address of VLANIF 20 on
Switch_2 as the destination MAC address. Then the following process occurs:
1. The response packet reaches Switch_1 through Layer 3 forwarding. When the
response packet reaches Switch_1, the destination MAC address is changed to
the MAC address of VLANIF 10 on Switch_1.
2. After receiving the packet, Switch_1 determines that the packet should be
forwarded at Layer 3 according to the destination MAC address. Switch_1
searches its Layer 3 forwarding table for a matching entry, but no entry is
found. Switch_1 sends the packet to the CPU, and the CPU searches its routing
table and obtains the next-hop address of 10.1.1.2 and the outbound interface
of VLANIF 4. Switch_1 searches the mapping between the super-VLAN and
sub-VLANs and determines that the packet should be sent to Host_1 from an
interface in sub-VLAN 2 according to the ARP entry and MAC address entry.
3. The response packet reaches Host_1.
Internet
Switch_2
Trunk IF_1
Allowed VLAN=2,3
IF_3
Super-VLAN4
Switch_1 VLANIF4
10.1.1.1/24
IF_1 IF_2
Host_1 Host_2
Sub-VLAN2 Sub-VLAN3
10.1.1.2/24 10.1.1.12/24
A tag with VLAN 2 is added to packets sent from Host_1 to Switch_1. Although
sub-VLAN 2 belongs to super-VLAN 4, Switch_1 does not change the tag with
VLAN 2 to a tag with VLAN 4 in packets. Therefore, packets sent from IF_3 of
Switch_1 still carry VLAN 2.
Switch_1 does not send packets from VLAN 4. When another device sends packets
from VLAN 4 to Switch_1, Switch_1 discards the packets because there is no
physical interface corresponding to super-VLAN 4 on Switch_1. IF_3 on Switch_1
does not allow packets from super-VLAN 4. For other devices, only sub-VLAN 2
and sub-VLAN 3 are valid.
Internet
Switch
Proxy ARP
Therefore, VLAN aggregation allows all departments to access the Internet access
and conserves IP addresses.
Licensing Requirements
VLAN aggregation, also called super-VLAN, is a basic feature of a switch and is not
under license control.
Version Requirements
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● VLAN 1 cannot be configured as a super-VLAN.
● A physical interface cannot be added to a VLAN configured as a super-VLAN.
● A VLAN that has been configured as a guest VLAN cannot be configured as a
super-VLAN.
● A traffic policy takes effect in a super-VLAN only after the traffic policy is
configured in all sub-VLANs of the super-VLAN.
● When the dot1q termination vid or qinq termination pe-vid ce-vid
command is used to configure a VLAN for the VLAN termination sub-
interface, the VLAN cannot be configured as the super-VLA or sub-VLAN.
Context
In VLAN aggregation, physical interfaces can be added to a sub-VLAN but a
VLANIF interface cannot be created for the sub-VLAN. All the interfaces in a sub-
VLAN use the same IP address of the VLANIF interface associated with the super-
VLAN. VLAN aggregation reduces subnet IDs, subnet default gateway addresses,
and directed broadcast IP addresses, and allows the switch to assign IP addresses
to hosts in sub-VLANs according to the number of hosts.
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.
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 configuration command completes the VLAN configuration when the VLAN is not
created.
----End
Context
A super-VLAN consists of several sub-VLANs. No physical interface can be added
to a super-VLAN, but a VLANIF interface can be configured for the super-VLAN
and an IP address can be assigned to the VLANIF interface.
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.
The VLAN ID of a super-VLAN must be different from each sub-VLAN ID.
Step 3 Run aggregate-vlan
A super-VLAN is created.
A super-VLAN cannot contain any physical interfaces.
VLAN 1 cannot be configured as a super-VLAN.
Step 4 Run access-vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>
A sub-VLAN is added to a super-VLAN.
Before adding any sub-VLANs to a super-VLAN, ensure that they are not
configured with VLANIF interfaces.
----End
Context
The IP address of the VLANIF interface associated with a super-VLAN must contain
the subnets that users in sub-VLANs belong to. All the sub-VLANs will use that IP
address to conserve 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 either of the following commands as needed:
● Run ip address ip-address { mask | mask-length }
An IPv4 address is assigned to the VLANIF interface.
● Run ipv6 address { ipv6-address prefix-length | ipv6-address/prefix-length
An IPv6 address is assigned to the VLANIF interface.
----End
Context
VLAN aggregation allows sub-VLANs to use the same subnet address, but prevents
PCs in different sub-VLANs from communicating with each other over Layer 3.
PCs in common VLANs can communicate with each other over Layer 3 using
different gateway addresses. VLAN aggregation enables PCs in a super-VLAN to
use the same subnet address and gateway address. Because PCs in different sub-
VLANs belong to one subnet, they can only communicate with PCs in their sub-
VLAN. PCs in different sub-VLANs cannot communicate with each other.
Proxy ARP is required to enable PCs in a sub-VLAN to communicate with PCs in
another sub-VLAN or PCs on other networks. After a super-VLAN and its VLANIF
interface are created, proxy ARP must be enabled to allow the super-VLAN to
forward or process ARP Request and Reply packets.
NOTE
After proxy ARP is enabled on the VLANIF interface corresponding to a super-VLAN, PCs in
all sub-VLANs of the super-VLAN can communicate. If PCs in some sub-VLANs of the super-
VLAN need to communicate, see 6.8.1 How Do I Implement Communication Between
Specific Sub-VLANs in a Super-VLAN.
VLAN aggregation simplifies configurations for networks where many VLANs are
configured and PCs in different VLANs need to communicate with each other.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface vlanif vlan-id
The view of the VLANIF interface corresponding to the super-VLAN is displayed.
Step 3 Run arp-proxy inter-sub-vlan-proxy enable
Proxy ARP is enabled between sub-VLANs.
----End
----End
Internet
Router
GE0/0/1
VLAN10
SwitchB Super-VLAN 4
GE0/0/5
GE0/0/5
SwitchA
GE0/0/1 GE0/0/4
GE0/0/2 GE0/0/3
VLAN2 VLAN3
Configuration Roadmap
Configure VLAN aggregation on SwitchB to add VLANs of different departments
to a super-VLAN so that PCs in different departments can access the Internet
using the super-VLAN. Deploy proxy ARP in the super-VLAN so that PCs in
different departments can communicate with each other. The configuration
roadmap is as follows:
1. Configure VLANs and interfaces on SwitchA and SwitchB, add PCs from
different departments to different VLANs, and configure interfaces to
transparently transmit packets from VLANs to SwitchB.
2. Configure a super-VLAN, a VLANIF interface, and a static route on SwitchB so
that PCs in different departments can access the Internet.
Procedure
Step 1 Configure VLANs and interfaces on SwitchA and SwitchB, add PCs from different
departments to different VLANs, and configure interfaces to transparently transmit
packets from VLANs to SwitchB.
1. Configure SwitchA.
# Configure GE0/0/1 as an access interface. The configurations of GE0/0/2,
GE0/0/3, and GE0/0/4 are similar to the configuration of GE0/0/1, and are not
mentioned here.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type access
[SwitchA-GigabitEthernet0/0/1] quit
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
[SwitchB] vlan batch 2 3 4 10
[SwitchB] interface gigabitethernet 0/0/5
[SwitchB-GigabitEthernet0/0/5] port link-type trunk
[SwitchB-GigabitEthernet0/0/5] port trunk allow-pass vlan 2 3
[SwitchB-GigabitEthernet0/0/5] quit
# Create and configure VLANIF 4 so that PCs in different departments can access
the Internet using super-VLAN 4.
# Create and configure VLANIF 10 and specify the IP address of VLANIF 10 as the
IP address for connecting SwitchB and the router (egress gateway).
[SwitchB] interface vlanif 10
[SwitchB-Vlanif10] ip address 10.10.1.1 255.255.255.0
[SwitchB-Vlanif10] quit
# Configure a static route to the router on SwitchB so that PCs can access the
Internet.
[SwitchB] ip route-static 0.0.0.0 0.0.0.0 10.10.1.2
NOTE
Configure the router interface connected to SwitchB and assign the IP address of 10.10.1.2
to the router interface. See the router configuration manual.
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 2 to 3
#
interface GigabitEthernet0/0/1
port link-type access
This chapter describes how to configure the Multiplex VLAN (MUX VLAN). The
MUX VLAN allows communication between some users, and prohibits
communication between other users.
7.1 Overview of MUX VLANs
7.2 Licensing Requirements and Limitations for MUX VLANs
7.3 Default Settings for MUX VLANs
7.4 Configuring MUX VLANs
7.5 Configuration Examples for MUX VLANs
Basic Concepts
A MUX VLAN consists of principal VLANs and subordinate VLANs; subordinate
VLANs are classified into separate VLANs and group VLANs. See Table 7-1 for a
description of these roles.
Enterprise Enterprise
employee customer
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
for servers or user hosts. As shown in Figure 7-2, MUX VLAN is configured on the
aggregation device Switch1 to implement user isolation or interworking.
Internet
Switch2
Switch1 Server
VLAN 2
(Principal VLAN)
Licensing Requirements
MUX VLAN configuration commands are available only after the S1720GW,
S1720GWR, and S1720X have the license (WEB management to full management
Electronic RTU License) loaded and activated and the switches are restarted. MUX
VLAN configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● Table 7-3 describes the specifications of the MUX VLAN.
Item Specification
Context
Interfaces in a principal VLAN can communicate with other interfaces in the same
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 VLAN already exists, the
VLAN view is displayed.
The VLAN ID ranges from 1 to 4094. To create VLANs in a batch, run the vlan
batch { vlan-id1 [ to vlan-id2 ] } &<1-10> command. Then run the vlan vlan-id
command to enter the view of a specified VLAN.
NOTE
If a device is configured with multiple VLANs, configure names for the VLANs to facilitate
VLAN management.
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.
----End
Context
A VLAN associated with a group interface is called a group VLAN. Group interfaces
in a group VLAN can communicate with each other.
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 group { vlan-id1 [ to vlan-id2 ] } &<1-10>
A group VLAN is configured for the subordinate VLAN.
----End
Context
A VLAN associated with separate interfaces is called a separate VLAN. Interfaces in
a separate VLAN cannot communicate with each other.
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 and separate VLANs in one MUX VLAN must use different VLAN IDs.
The VLAN ID assigned to a separate VLAN cannot be used to configure a VLANIF
interface, super-VLAN, or sub-VLAN. Additionally, it is not recommended that this
VLAN ID be used to configure VLAN mapping and VLAN stacking.
----End
Context
You must enable the MUX VLAN function to implement the following functions:
● The principal VLAN and subordinate VLAN can communicate with each other.
● Interfaces in a group VLAN can communicate with each other.
● Interfaces in a separate VLAN cannot communicate with each other.
Pre-configuration Tasks
Before enabling MUX VLAN function, complete the following tasks:
● Add the interface to a principal or subordinate VLAN as an access, hybrid, or
trunk interface.
● Configure the interface to allow multiple common VLANs. The interface can
join only one MUX VLAN.
Procedure
Step 1 Run system-view
After the MUX VLAN function is enabled on an interface, VLAN mapping or VLAN
stacking cannot be configured on the interface.
You cannot create a VLANIF interface for a subordinate group VLAN or separate
VLAN. However, you can create a VLANIF interface for a principal VLAN on the
device excluding the S1720GFR, S2750EI, S5700LI, S5700S-28P-LI-AC, S5700S-28P-
PWR-LI-AC, and S5700S-52P-LI-AC.
NOTE
● Disabling MAC address learning or limiting the number of learned MAC addresses on an
interface will compromise the performance of the MUX VLAN function.
● MUX VLAN and port security cannot be configured on the same interface.
● MUX VLAN and MAC address authentication cannot be configured on the same
interface.
● MUX VLAN and 802.1x authentication cannot be configured on the same interface.
● If a DHCP server is configured in the subordinate VLAN and DHCP clients are configured
in the principal VLAN, the DHCP clients may fail to obtain IP addresses. Therefore, when
the DHCP snooping function is configured, configure the DHCP server in the principal
VLAN.
----End
Procedure
● Run the display mux-vlan command to check information about the MUX
VLAN.
----End
As shown in Figure 7-3, MUX VLAN can be configured on the Switch connecting
to user hosts. MUX VLAN meets the enterprise's requirements, conserves VLAN
resources, and has fewer requirements on network maintenance.
VLAN2
(Principal VLAN)
GE0/0/2 GE0/0/5
GE0/0/3 GE0/0/4
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Configure the MUX VLAN.
# Add interfaces to the VLANs and enable the MUX VLAN function on the
interfaces.
[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] port link-type access
[Switch-GigabitEthernet0/0/1] port default vlan 2
[Switch-GigabitEthernet0/0/1] port mux-vlan enable vlan 2
[Switch-GigabitEthernet0/0/1] quit
[Switch] interface gigabitethernet 0/0/2
[Switch-GigabitEthernet0/0/2] port link-type access
[Switch-GigabitEthernet0/0/2] port default vlan 3
[Switch-GigabitEthernet0/0/2] port mux-vlan enable vlan 3
[Switch-GigabitEthernet0/0/2] quit
[Switch] interface gigabitethernet 0/0/3
[Switch-GigabitEthernet0/0/3] port link-type access
[Switch-GigabitEthernet0/0/3] port default vlan 3
[Switch-GigabitEthernet0/0/3] port mux-vlan enable vlan 3
[Switch-GigabitEthernet0/0/3] quit
[Switch] interface gigabitethernet 0/0/4
[Switch-GigabitEthernet0/0/4] port link-type access
[Switch-GigabitEthernet0/0/4] port default vlan 4
[Switch-GigabitEthernet0/0/4] port mux-vlan enable vlan 4
[Switch-GigabitEthernet0/0/4] quit
[Switch] interface gigabitethernet 0/0/5
[Switch-GigabitEthernet0/0/5] port link-type access
[Switch-GigabitEthernet0/0/5] port default vlan 4
[Switch-GigabitEthernet0/0/5] port mux-vlan enable vlan 4
[Switch-GigabitEthernet0/0/5] quit
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 2 to 4
#
vlan 2
mux-vlan
subordinate separate 4
subordinate group 3
#
interface GigabitEthernet0/0/1
Internet
Switch2
Switch1 GE0/0/2
Server
GE0/0/3 GE0/0/6 VLAN 2
(Principal VLAN)
GE
/4
0/0
0/0
GE
/5
Switch3 Switch4 Switch5 Switch6
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a principal VLAN and a VLANIF interface. The IP address of the
VLANIF interface is used as the gateway IP address of user hosts and server.
2. Configure a group VLAN.
3. Configure a separate VLAN.
4. Add interfaces to the VLANs and enable the MUX VLAN function on the
interfaces.
5. Add interfaces of access switches to VLANs.
Procedure
Step 1 Configure the MUX VLAN.
# Create VLAN 2, VLAN 3, and VLAN 4, and VLANIF 2 on Switch1. The IP address
of VLANIF 2 is used as the gateway IP address for user hosts and server.
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] vlan batch 2 3 4
[Switch1] interface vlanif 2
[Switch1-Vlanif2] ip address 192.168.100.100 24
[Switch1-Vlanif2] quit
# Add interfaces to the VLANs and enable the MUX VLAN function on the
interfaces.
[Switch1] interface gigabitethernet 0/0/2
[Switch1-GigabitEthernet0/0/2] port link-type trunk
[Switch1-GigabitEthernet0/0/2] port trunk allow-pass vlan 2
[Switch1-GigabitEthernet0/0/2] port mux-vlan enable vlan 2
[Switch1-GigabitEthernet0/0/2] quit
[Switch1] interface gigabitethernet 0/0/3
[Switch1-GigabitEthernet0/0/3] port link-type trunk
[Switch1-GigabitEthernet0/0/3] port trunk allow-pass vlan 3
[Switch1-GigabitEthernet0/0/3] port mux-vlan enable vlan 3
[Switch1-GigabitEthernet0/0/3] quit
[Switch1] interface gigabitethernet 0/0/4
[Switch1-GigabitEthernet0/0/4] port link-type trunk
[Switch1-GigabitEthernet0/0/4] port trunk allow-pass vlan 3
[Switch1-GigabitEthernet0/0/4] port mux-vlan enable vlan 3
[Switch1-GigabitEthernet0/0/4] quit
[Switch1] interface gigabitethernet 0/0/5
[Switch1-GigabitEthernet0/0/5] port link-type trunk
[Switch1-GigabitEthernet0/0/5] port trunk allow-pass vlan 4
[Switch1-GigabitEthernet0/0/5] port mux-vlan enable vlan 4
[Switch1-GigabitEthernet0/0/5] quit
[Switch1] interface gigabitethernet 0/0/6
[Switch1-GigabitEthernet0/0/6] port link-type trunk
[Switch1-GigabitEthernet0/0/6] port trunk allow-pass vlan 4
[Switch1-GigabitEthernet0/0/6] port mux-vlan enable vlan 4
[Switch1-GigabitEthernet0/0/6] quit
Step 2 Add interfaces of access switches to VLANs. The configuration details are not
mentioned here.
Step 3 Verify the configuration.
The server can communicate with HostB, HostC, HostD, and HostE at Layer 2.
HostB can communicate with HostC at Layer 2.
HostD cannot communicate with HostE at Layer 2.
HostB and HostC cannot communicate with HostD and HostE at Layer 2.
----End
Configuration Files
Switch1 configuration file
#
sysname Switch1
#
vlan batch 2 to 4
#
vlan 2
mux-vlan
subordinate separate 4
subordinate group 3
#
interface Vlanif2
ip address 192.168.100.100 255.255.255.0
#
interface GigabitEthernet0/0/2
port link-type trunk
This chapter describes how to configure VLAN termination. The VLAN termination
function includes two sub-functions: Dot1q termination and QinQ termination.
Dot1q termination implements inter-VLAN communication. Use the Dot1q
termination and QinQ termination together to implement LAN and WAN
interconnection.
takes other actions. These VLAN tags are only useful before termination, and are
not used in Layer 3 forwarding or other processing.
A device with VLAN termination enabled processes incoming and outgoing
packets as follows:
● Removes VLAN tags from the packets received on interfaces, and then
forwards the packets at Layer 3 or takes other actions.
● Adds VLAN tags to the packets that will be sent out through interfaces.
Classification
Depending on the modes in which VLAN tagged packets are processed, VLAN
termination has the following sub-functions:
● Dot1q termination: removes the outer VLAN tag from the received single-
tagged or double-tagged packets, and adds a VLAN tag to the packets to be
sent by an interface.
● QinQ termination: removes double VLAN tags from the received double-
tagged packets, and adds double VLAN tags to the packets to be sent by an
interface.
Generally, VLAN termination is configured on sub-interfaces. A sub-interface that
terminates single tags in packets is called a Dot1q termination sub-interface, and
a sub-interface that terminates double tags in packets is called a QinQ
termination sub-interface.
NOTE
Dot1q and QinQ VLAN tag termination sub-interfaces do not support transparent
transmission of packets that do not contain a VLAN tag, and discard received packets that
do not contain a VLAN tag.
Purpose
After VLANs are assigned on a network, hosts in the same VLAN can
communicate with each other at Layer 2, whereas hosts in different VLANs
cannot. You can use VLANIF interfaces on a Layer 3 switch to implement inter-
VLAN Layer 3 connectivity. As shown in Figure 8-1, when a Layer 3 switch uses
only one Layer 3 Ethernet interface to connect to users or a network, this interface
needs to transmit packets from multiple VLANs. A VLANIF interface cannot
provide this function. You can virtualize a Layer 3 Ethernet interface into multiple
logical sub-interfaces. The Layer 3 Ethernet interface is the main interface for the
logical sub-interfaces.
Port1.1 Port1.2
VLAN Trunk
Layer 2 switch
Port1.1 Port1.2
VLAN Trunk
SwitchB
After the preceding operations are performed, user hosts in VLAN 2 and VLAN 3
can communicate at Layer 3. When a host in VLAN 2 sends packets to a host in
VLAN 3, the process is as follows:
1. Port1.1 removes the VLAN tag of the packets sent from VLAN 2 through
SwitchB, and forwards the packets to Port1.2 at Layer 3.
2. Before sending the packets out, Port1.2 adds VLAN 3 to the packets so that
the packets can reach user hosts in VLAN 3.
The process is reversed when a host in VLAN 3 sends packets to a host in VLAN 2.
interfaces, and packets sent by CEs to PEs carry one or double VLAN tags. User
hosts in different branches need to communicate with each other.
ISP
PWE3/VLL/VPLS
PE1 PE2
Port1.1 Port1.1
CE1 CE2
Branch1 Branch2
Single-tagged packet
VPN1 VPN1
Branch 1 Branch 2
CE1 CE3
PE1 PE2
Port1.1 ISP Port1.1
MPLS L3VPN
Port1.2 Port1.2
CE2
CE4
Branch 1 Branch 2
VPN2 VPN2
Dot1q termination and L3VPN are configured on sub-interfaces of PE1 and PE2.
When a host in branch 1 of VPN 1 sends packets to a host in branch 2 of VPN 1,
the process is as follows:
1. According to the Dot1q termination configuration on Port1.1, PE1 removes
the outer VLAN tag of the packets sent from CE1.
2. PE1 binds the outer VLAN tag to the VPN instance VPN1, and forwards the
packets to the L3VPN.
3. After the packets reach PE2, PE2 determines that the packets are destined for
CE3 according to the VPN instance.
4. PE2 adds an outer VLAN tag to the packets according to the Dot1q
termination configuration on Port1.1, and then forwards the packets to CE3.
5. CE3 forwards the packets to the destination user host to implement
communication.
The process is reversed when a host in branch 2 of VPN 1 sends packets to branch
1 of VPN 1.
ISP
PWE3/VLL/VPLS
PE1 PE2
Port1.1 Port1.1
CE1 CE2
Branch 1 Branch 2
Double-tagged packet
VPN1 VPN1
Branch 1 Branch 2
CE1 CE3
PE1 PE2
Port1.1 ISP Port1.1
MPLS L3VPN
Port1.2 Port1.2
CE2
CE4
Branch 1 Branch 2
VPN2 VPN2
QinQ termination and L3VPN are configured on sub-interfaces of PE1 and PE2.
When a host in branch 1 of VPN 1 sends packets to a host in branch 2 of VPN 1,
the process is as follows:
1. According to the Dot1q termination configuration on Port1.1, PE1 removes
the inner and outer VLAN tags of the packets sent from CE1.
2. PE1 binds the inner and outer VLAN tags to the VPN instance VPN1, and
forwards the packets to the L3VPN.
3. After the packets reach PE2, PE2 determines that the packets are destined for
CE3 according to the VPN instance.
4. PE2 adds inner and outer VLAN tags to the packets according to the QinQ
termination configuration on Port1.1, and then forwards the packets to CE3.
5. CE3 forwards the packets to the destination user host to implement
communication.
The process is reversed when a host in branch 2 of VPN 1 sends packets to branch
1 of VPN 1.
8.7 A carrier's network provides the L2VPN service for users. PEs
Configuring a function as user access devices and connect to CEs through
Dot1q sub-interfaces to access user networks. The data packets that
Termination CEs send to PEs carry one VLAN tag. Interworking is required
Sub-interface between user networks.
and
Connecting It
to an L2VPN
8.8 A carrier's network provides the L3VPN service for users. PEs
Configuring a function as user access devices and connect to CEs through
Dot1q sub-interfaces to access user networks. The data packets that
Termination CEs send to PEs carry one VLAN tag. Interworking is required
Sub-interface between user networks.
and
Connecting It
to an L3VPN
8.9 A carrier's network provides the L2VPN service for users. PEs
Configuring a function as user access devices and connect to CEs through
QinQ sub-interfaces to access user networks. The data packets that
Termination CEs send to PEs carry double VLAN tags. Interworking is
Sub-interface required between user networks.
and
Connecting It
to an L2VPN
8.10 A carrier's network provides the L3VPN service for users. PEs
Configuring a function as user access devices and connect to CEs through
QinQ sub-interfaces to access user networks. The data packets that
Termination CEs send to PEs carry double VLAN tags. Interworking is
Sub-interface required between user networks.
and
Connecting It
to an L3VPN
Licensing Requirements
VLAN termination, that is, QinQ and Dot1q on a sub-interface, is a basic feature
of a switch and is not under license control.
Software Requirements
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● Termination sub-interfaces cannot be configured on an Eth-Trunk member
interface.
● You are advised to add member interfaces to an Eth-Trunk and configure
termination sub-interfaces on the Eth-Trunk in sequence. Termination sub-
interfaces can be configured successfully on an Eth-Trunk only when the
device where member interfaces reside support termination sub-interfaces.
● The VLAN IDs terminated by a sub-interface cannot be created in the system
view or be displayed using a display command.
● In V200R005 and earlier versions, When VLAN IDs terminated by a sub-
interface are used for Layer 3 forwarding, only the first VLAN takes effect
even if multiple inner VLAN IDs are specified.
● VLAN termination sub-interfaces cannot be created on a VCMP client.
● When the dot1q termination vid or qinq termination pe-vid ce-vid
command is used to configure a VLAN for the VLAN termination sub-
interface, the VLAN cannot be configured as the super-VLA or sub-VLAN.
● If the PW-side interface is a Layer 3 interface switched by the undo
portswitch command, the AC-side interface cannot be a Layer 3 interface or
subinterface belonging to a Layer 3 interface; otherwise, traffic forwarding is
abnormal. This rule applies to S5720EI, S6720EI, and S6720S-EI.
Context
When a Layer 3 switch connects to users on different network segments across
different VLANs, configure Dot1q termination and IP addresses for the sub-
interfaces to implement Layer 3 connectivity.
NOTE
● To implement inter-VLAN communication, hosts in each VLAN must use the IP address
of the corresponding sub-interface as the default gateway address.
Procedure
Step 1 Run system-view
Sub-interfaces of different main interfaces can be associated with the same VLAN,
but sub-interfaces of the same main interface cannot be associated with the same
VLAN.
When you enable or disable ARP broadcast on a sub-interface, the routing status
on the sub-interface alternates between Down and Up. This may result in route
flapping on the entire network, and affects normal operation of services.
----End
Pre-configuration Tasks
Before configuring a Dot1q termination sub-interface and connecting it to an
L2VPN, complete the following tasks:
● Connect devices correctly.
● Configure VLANs to which CEs belong and basic Layer 2 forwarding so that
each packet sent from CEs to PEs carries one VLAN tag.
● Ensure that the device is not a VCMP client.
Context
When a VPN connects to an ISP network through a sub-interface, the sub-
interface needs to remove VLAN tags of the packets that the VPN has sent to the
ISP network. When each packet that CEs send to PEs carries one VLAN tag, the
sub-interface terminates the single VLAN tag. This sub-interface is called Dot1q
termination sub-interface.
Procedure
Step 1 On the PE device, run system-view
NOTE
If the PW-side interface is a Layer 3 interface switched by the undo portswitch command, the
AC-side interface cannot be a Layer 3 interface or subinterface belonging to a Layer 3 interface;
otherwise, traffic forwarding is abnormal. This rule applies to S5720EI, S6720EI, and S6720S-EI.
----End
Context
After a Dot1q termination sub-interface is configured, you need to configure the
virtual private network (VPN) service on the sub-interface so that users at both
ends of the L2VPN can communicate with each other.
For details about L2VPN, see VLL Configuration in the S1720, S2700, S5700, and
S6720 V200R011C10 Configuration Guide - VPN.
NOTE
Procedure
● Run the display dot1q information termination [ interface interface-type
interface-number [.subinterface-number ] ] command to check dot1q
termination sub-interface information.
● Run the display mpls static-l2vc command to check static VC information.
● Run the display mpls l2vc command on the PE to check Martini VLL
information on the local PE.
● Run the display mpls l2vc remote-info command on the PE to check Martini
VLL information on the remote PE.
● Run the display vll ccc [ ccc-name | type { local | remote } ] command to
check CCC connection information.
----End
Pre-configuration Tasks
Before configuring a Dot1q termination sub-interface and connecting it to an
L3VPN, complete the following tasks:
● Connect devices correctly.
● Configure VLANs to which CEs belong and basic Layer 2 forwarding so that
each packet sent from CEs to PEs carries one VLAN tag.
● Ensure that the device is not a VCMP client.
Procedure
● Configure an IPv4 address for a sub-interface.
a. On the PE device, run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run port link-type { hybrid | trunk }
The port link-type is set.
d. Run quit
Return to the system view.
e. Run interface interface-type interface-number.subinterface-number
The view of the sub-interface connecting the PE to the CE is displayed.
f. Run ip address ip-address { mask | mask-length }
An IPV4 address is configured for the sub-interface.
g. Run dot1q termination vid low-pe-vid [ to high-pe-vid ]
Dot1q termination is configured on the sub-interface.
After a VLANIF interface is configured, the corresponding VLAN cannot
be configured as a VLAN for Dot1q termination sub-interfaces or an
outer VLAN for QinQ termination sub-interfaces.
h. Run arp broadcast enable
The sub-interface is enabled to forward ARP broadcast packets.
● Configure an IPv6 address for a sub-interface.
a. On the PE device, run system-view
The system view is displayed.
b. Run ipv6
IPv6 packet forwarding is enabled.
c. Run interface interface-type interface-number
The interface view is displayed.
d. Run port link-type { hybrid | trunk }
The port link-type is set.
e. Run quit
Return to the system view.
Procedure
● Run the display dot1q information termination [ interface interface-type
interface-number [.subinterface-number ] ] command to check dot1q
termination sub-interface information.
● Run the display ip vpn-instance [ verbose ] [ vpn-instance-name ] command
to check VPN instance information.
----End
Pre-configuration Tasks
Before configuring a QinQ termination sub-interface and connecting it to an
L2VPN, complete the following tasks:
● Connect devices correctly.
● Configure VLANs to which CEs belong and basic Layer 2 forwarding so that
packets sent from CEs to PEs carry double VLAN tags.
● Ensure that the device is not a VCMP client.
Configuration Process
Procedure
Step 1 On the PE device, 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 port link-type is set.
Step 4 Run quit
Return to the system view.
Step 5 Run interface interface-type interface-number.subinterface-number
The view of the sub-interface connecting the PE to the CE is displayed.
NOTE
If the PW-side interface is a Layer 3 interface switched by the undo portswitch command, the
AC-side interface cannot be a Layer 3 interface or subinterface belonging to a Layer 3 interface;
otherwise, traffic forwarding is abnormal. This rule applies to S5720EI, S6720EI, and S6720S-EI.
Table 8-4 Packet processing on the inbound interface in the VPLS scenario
Inbound Interface Type Ethernet Encapsulation VLAN Encapsulation
Table 8-5 Packet processing on the outbound interface in the VPLS scenario
Inbound Interface Type Ethernet Encapsulation VLAN Encapsulation
Symmetrical mode Removes the MPLS label Removes the MPLS label
and adds the outer tag and replaces the outer
specified by pe-vid that tag with the tag
is configured on the sub- specified by pe-vid that
interface for QinQ VLAN is configured on the sub-
tag termination. interface for QinQ VLAN
tag termination if
packets carry the inner
tag, or removes the
MPLS label and adds the
outer tag specified by
pe-vid that is configured
on the sub-interface for
QinQ VLAN tag
termination if packets do
not carry the inner tag.
Table 8-6 Packet processing on the inbound interface in the VLL or PWE3 scenario
Inbound Interface Type Raw Encapsulation Tagged Encapsulation
Table 8-7 Packet processing on the outbound interface in the VLL or PWE3
scenario
Inbound Interface Type Raw Encapsulation Tagged Encapsulation
Symmetrical mode Removes the MPLS label Removes the MPLS label
and adds the outer tag and replaces the outer
specified by pe-vid that tag with the tag
is configured on the sub- specified by pe-vid that
interface for QinQ VLAN is configured on the sub-
tag termination. interface for QinQ VLAN
tag termination if
packets carry the inner
tag, or removes the
MPLS label and adds the
outer tag specified by
pe-vid that is configured
on the sub-interface for
QinQ VLAN tag
termination if packets do
not carry the inner tag.
----End
Context
Virtual leased line (VLL) technology emulates leased lines on an IP network to
provide inexpensive, asymmetrical digital data network (DDN) services. As a point-
to-point (P2P) L2VPN technology, VLL can support almost all link layer protocols.
For details about L2VPN, see VLL Configuration in the S1720, S2700, S5700, and
S6720 V200R011C10 Configuration Guide - VPN.
NOTE
Procedure
● Run the display qinq information termination [ interface interface-type
interface-number [.subinterface-number ] ] command to check QinQ
termination sub-interface information.
● Run the display vll ccc [ ccc-name | type { local | remote } ] command to
check CCC connection information.
● Run the display mpls static-l2vc command to check static VC information.
● Run the display mpls l2vc command on the PE to check Martini VLL
information on the local PE.
● Run the display mpls l2vc remote-info command on the PE to check Martini
VLL information on the remote PE.
----End
Pre-configuration Tasks
Before configuring a QinQ termination sub-interface and connecting it to an
L3VPN, complete the following tasks:
● Connect devices correctly.
● Configure VLANs to which CEs belong and basic Layer 2 forwarding so that
packets sent from CEs to PEs carry double VLAN tags.
● Ensure that the device is not a VCMP client.
Configuration Process
Procedure
● Configure an IPv4 address for a sub-interface.
a. On the PE device, run system-view
The system view is displayed.
GE0/0/1.1 GE0/0/2.1
10.10.10.1/24 10.10.20.1/24
GE0/0/2 GE0/0/2
SwitchA SwitchB
GE0/0/1 GE0/0/1
Department 1 Department 2
PC1 PC2
10.10.10.2/24 10.10.20.2/24
VLAN 10 VLAN 20
Configuration Roadmap
The configuration roadmap is as follows.
1. Configure the ID of the VLAN to which each interface belongs.
2. Configure Dot1q termination sub-interfaces.
3. Assign IP addresses to the sub-interfaces.
NOTE
Procedure
Step 1 Add the uplink interface of SwitchA to VLAN 10 in tagged mode and the user-side
interface to VLAN 10 in untagged mode, and add the uplink interface of SwitchB
to VLAN 20 in tagged mode and the user-side interface to VLAN 20 in untagged
mode. Configure VLANs on interfaces of SwitchA and SwitchB.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 10
[SwitchA] interface gigabitethernet0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type access
[SwitchA-GigabitEthernet0/0/1] port default vlan 10
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type trunk
[SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 10
[SwitchA-GigabitEthernet0/0/2] quit
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] vlan batch 20
[SwitchB] interface gigabitethernet0/0/1
[SwitchB-GigabitEthernet0/0/1] port link-type access
[SwitchB-GigabitEthernet0/0/1] port default vlan 20
[SwitchB-GigabitEthernet0/0/1] quit
[SwitchB] interface gigabitethernet0/0/2
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vcmp role silent
#
interface GigabitEthernet0/0/1
port link-type hybrid
#
interface GigabitEthernet0/0/1.1
dot1q termination vid 10
ip address 10.10.10.1 255.255.255.0
arp broadcast enable
#
interface GigabitEthernet0/0/2
port link-type hybrid
#
interface GigabitEthernet0/0/2.1
SwitchA SwitchB
GE0/0/2 GE0/0/1
OSPF
GE0/0/1.1 GE0/0/2.1
VLAN 10 VLAN 20
PC A PC B
10.10.10.2/24 10.10.20.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure VLANs that interfaces belong to.
2. Assign IP addresses to VLANIF interfaces.
3. Set the encapsulation mode of sub-interfaces.
4. Configure VLANs allowed by sub-interfaces.
5. Assign IP addresses to the sub-interfaces.
6. Configure basic OSPF functions.
NOTE
Procedure
Step 1 Configure SwitchA.
# Create a VLAN.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 30
# Create a VLAN.
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] vlan batch 30
On the PCs residing on the Layer 2 network connected to SwitchA, set the default
gateway address to 10.10.10.1/24, which is the IP address of GE0/0/1.1. The switch
connected to SwitchA allows VLAN 10.
On the PCs residing on the Layer 2 network connected to SwitchB, set the default
gateway address to 10.10.20.1/24, which is the IP address of GE0/0/2.1. The switch
connected to SwitchA allows VLAN 20.
After the configuration is complete, PCs on the two Layer 2 networks are isolated
at Layer 2 and interwork at Layer 3.
----End
Configuration Files
SwitchA configuration file
#
sysname SwitchA
#
router id 1.1.1.1
#
vcmp role silent
#
vlan batch 30
#
interface Vlanif30
ip address 10.10.30.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type hybrid
#
interface GigabitEthernet0/0/1.1
dot1q termination vid 10
ip address 10.10.10.1 255.255.255.0
arp broadcast enable
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
ospf 1
area 0.0.0.0
network 10.10.10.0 0.0.0.255
network 10.10.30.0 0.0.0.255
#
return
interface GigabitEthernet0/0/2
port link-type hybrid
#
interface GigabitEthernet0/0/2.1
dot1q termination vid 20
ip address 10.10.20.1 255.255.255.0
arp broadcast enable
#
ospf 1
area 0.0.0.0
network 10.10.20.0 0.0.0.255
network 10.10.30.0 0.0.0.255
#
return
Networking Requirements
On the network shown in Figure 8-9, CE1 and CE2 are respectively connected to
PE1 and PE2 through VLANs.
A Martini VLL is created between CE1 and CE2 so that users residing on the
networks connected to CE1 and CE2 can communicate with each other.
GE0/0/2 GE0/0/1
PE1 PE2
GE0/0/2 GE0/0/1
GE0/0/1 P GE0/0/2
CE1 CE2
- Loopback1 - 1.1.1.1/32
- GigabitEthernet0/0 GigabitEthernet0/0 -
/2 /2.1
- Loopback1 - 3.3.3.3/32
- Loopback1 - 2.2.2.2/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a routing protocol on PE and P of the backbone network to
implement interworking, and enable MPLS.
2. Use the default tunnel policy to create an LSP and configure the LSP to
transmit data.
3. Enable MPLS L2VPN and create VC connections on PEs.
4. Configure Dot1q sub-interfaces on PE interfaces connected to CEs to
implement VLL access.
NOTE
Procedure
Step 1 Configure the VLANs to which interfaces of CEs, PEs, and P belong and assign IP
addresses to VLANIF interfaces according to Figure 8-9.
# Configure CE1 to ensure that each packet that CE1 sends to PE1 carries one
VLAN tag.
<HUAWEI> system-view
[HUAWEI] sysname CE1
# Configure CE2 to ensure that each packet that CE2 sends to PE2 carries one
VLAN tag.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan batch 10
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type trunk
[CE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface vlanif 10
[CE2-Vlanif10] ip address 10.10.10.2 24
[CE2-Vlanif10] quit
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] vlan batch 20
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] port link-type hybrid
[PE1-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[PE1-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[PE1-GigabitEthernet0/0/2] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 10.1.1.1 24
[PE1-Vlanif20] quit
# Configure P.
<HUAWEI> system-view
[HUAWEI] sysname P
[P] vlan batch 20 30
[P] interface gigabitethernet 0/0/1
[P-GigabitEthernet0/0/1] port link-type hybrid
[P-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[P-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[P-GigabitEthernet0/0/1] quit
[P] interface gigabitethernet 0/0/2
[P-GigabitEthernet0/0/2] port link-type hybrid
[P-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[P-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[P-GigabitEthernet0/0/2] quit
[P] interface vlanif 20
[P-Vlanif20] ip address 10.1.1.2 24
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] ip address 10.2.2.2 24
[P-Vlanif30] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] vlan batch 30
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type hybrid
[PE2-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[PE2-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[PE2-GigabitEthernet0/0/1] quit
[PE2] interface vlanif 30
Step 2 Configure an IGP, for example, OSPF, on the MPLS backbone network.
Configure PE1, P, and PE2 to advertise 32-bit loopback interface addresses as the
LSR IDs.
# Configure PE1.
[PE1] router id 1.1.1.1
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] quit
[PE1] ospf 1
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 10.1.1.1 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure P.
[P] router id 2.2.2.2
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.2 32
[P-LoopBack1] quit
[P] ospf 1
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[P-ospf-1-area-0.0.0.0] network 10.1.1.2 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 10.2.2.2 0.0.0.255
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] quit
# Configure PE2.
[PE2] router id 3.3.3.3
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 3.3.3.3 32
[PE2-LoopBack1] quit
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 10.2.2.1 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# After the configuration is complete, PE1, P, and PE2 can establish OSPF neighbor
relationships. Run the display ospf peer command to verify that the OSPF
neighbor relationship status is Full. Run the display ip routing-table command to
verify that the PEs learn the route to the Loopback1 interface of each other. The
following is the display on PE1:
[PE1] display ospf peer
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 8 Routes : 8
Step 3 Configure basic MPLS functions and LDP on the MPLS backbone network.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] mpls
[PE1-Vlanif20] mpls ldp
[PE1-Vlanif20] quit
# Configure P.
[P] mpls lsr-id 2.2.2.2
[P] mpls
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 20
[P-Vlanif20] mpls
[P-Vlanif20] mpls ldp
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] mpls ldp
[P-Vlanif30] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] mpls
[PE2-Vlanif30] mpls ldp
[PE2-Vlanif30] quit
# Configure PE2.
[PE2] mpls ldp remote-peer 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] remote-ip 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] quit
After the configuration is complete, run the display mpls ldp session command
on PE1 to view the LDP session setup. An LDP session is set up between PE1 and
PE2 as shown in the following display:
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
3.3.3.3:0 Operational DU Passive 0000:00:00 2/2
------------------------------------------------------------------------------
TOTAL: 2 session(s) Found.
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.10.10.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
● PE1 configuration file
#
sysname PE1
#
router id 1.1.1.1
#
vcmp role silent
#
vlan batch 20
#
mpls lsr-id 1.1.1.1
mpls
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 3.3.3.3
remote-ip 3.3.3.3
#
interface Vlanif20
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
#
interface GigabitEthernet0/0/1.1
dot1q termination vid 10
mpls l2vc 3.3.3.3 101
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.255
#
return
● P configuration file
#
sysname P
#
router id 2.2.2.2
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
interface Vlanif20
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.2.2.0 0.0.0.255
#
return
GE0/0/2 GE0/0/1
PE1 PE2
GE0/0/2 GE0/0/1
GE0/0/1 P GE0/0/2
GE0/0/2 GE0/0/2
Switch1 Switch2
GE0/0/1 GE0/0/1
GE0/0/1 GE0/0/1
CE1 CE2
- Loopback1 - 1.1.1.1/32
- GigabitEthernet0/0 GigabitEthernet0/0 -
/2 /2.1
- Loopback1 - 3.3.3.3/32
- Loopback1 - 2.2.2.2/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a routing protocol on PE and P of the backbone network to
implement interworking, and enable MPLS.
2. Use the default tunnel policy to create an LSP and configure the LSP to
transmit data.
3. Enable MPLS L2VPN and create VC connections on PEs.
4. Configure QinQ sub-interfaces on PE interfaces connected to the switches to
implement VLL access.
5. Configure selective QinQ on the switch interfaces connected to CEs.
NOTE
Procedure
Step 1 Configure the VLANs to which interfaces of CEs, PEs, and P belong and assign IP
addresses to VLANIF interfaces according to Figure 8-10.
# Configure CE1 to ensure that each packet sent from CE1 to Switch1 carries one
VLAN tag.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] vlan batch 10
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type trunk
[CE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface vlanif 10
[CE1-Vlanif10] ip address 10.10.10.1 24
[CE1-Vlanif10] quit
# Configure CE2 to ensure that each packet sent from CE2 to Switch2 carries one
VLAN tag.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan batch 10
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type trunk
[CE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface vlanif 10
[CE2-Vlanif10] ip address 10.10.10.2 24
[CE2-Vlanif10] quit
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] vlan batch 20
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] port link-type hybrid
[PE1-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[PE1-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[PE1-GigabitEthernet0/0/2] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 10.1.1.1 24
[PE1-Vlanif20] quit
# Configure P.
<HUAWEI> system-view
[HUAWEI] sysname P
[P] vlan batch 20 30
[P] interface gigabitethernet 0/0/1
[P-GigabitEthernet0/0/1] port link-type hybrid
[P-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[P-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[P-GigabitEthernet0/0/1] quit
[P] interface gigabitethernet 0/0/2
[P-GigabitEthernet0/0/2] port link-type hybrid
[P-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[P-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[P-GigabitEthernet0/0/2] quit
[P] interface vlanif 20
[P-Vlanif20] ip address 10.1.1.2 24
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] ip address 10.2.2.2 24
[P-Vlanif30] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] vlan batch 30
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type hybrid
[PE2-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[PE2-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[PE2-GigabitEthernet0/0/1] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] ip address 10.2.2.1 24
[PE2-Vlanif30] quit
Step 2 Configure selective QinQ on interfaces of the Switch and specify the VLANs
allowed by the interfaces.
# Configure Switch1.
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] vlan 100
[Switch1-vlan100] quit
[Switch1] interface gigabitethernet0/0/2
[Switch1-GigabitEthernet0/0/2] port link-type hybrid
[Switch1-GigabitEthernet0/0/2] port hybrid tagged vlan 100
[Switch1-GigabitEthernet0/0/2] quit
[Switch1] interface gigabitethernet0/0/1
[Switch1-GigabitEthernet0/0/1] port link-type hybrid
[Switch1-GigabitEthernet0/0/1] port hybrid untagged vlan 100
[Switch1-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch1-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 100
[Switch1-GigabitEthernet0/0/1] quit
# Configure Switch2.
<HUAWEI> system-view
[HUAWEI] sysname Switch2
[Switch2] vlan 100
[Switch2-vlan100] quit
[Switch2] interface gigabitethernet0/0/2
[Switch2-GigabitEthernet0/0/2] port link-type hybrid
[Switch2-GigabitEthernet0/0/2] port hybrid tagged vlan 100
[Switch2-GigabitEthernet0/0/2] quit
[Switch2] interface gigabitethernet0/0/1
[Switch2-GigabitEthernet0/0/1] port link-type hybrid
[Switch2-GigabitEthernet0/0/1] port hybrid untagged vlan 100
[Switch2-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch2-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 100
[Switch2-GigabitEthernet0/0/1] quit
Step 3 Configure an IGP, for example, OSPF, on the MPLS backbone network.
Configure PE1, P, and PE2 to advertise 32-bit loopback interface addresses as the
LSR IDs.
# Configure PE1.
[PE1] router id 1.1.1.1
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] quit
[PE1] ospf 1
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 10.1.1.1 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure P.
[P] router id 2.2.2.2
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.2 32
[P-LoopBack1] quit
[P] ospf 1
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[P-ospf-1-area-0.0.0.0] network 10.1.1.2 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 10.2.2.2 0.0.0.255
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] quit
# Configure PE2.
[PE2] router id 3.3.3.3
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 3.3.3.3 32
[PE2-LoopBack1] quit
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 10.2.2.1 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# After the configuration is complete, PE1, P, and PE2 can establish OSPF neighbor
relationships. Run the display ospf peer command to verify that the OSPF
neighbor relationship status is Full. Run the display ip routing-table command to
verify that the PEs learn the route to the Loopback1 interface of each other. The
following is the display on PE1:
Step 4 Enable basic MPLS functions and MPLS LDP on the MPLS backbone network.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] mpls
[PE1-Vlanif20] mpls ldp
[PE1-Vlanif20] quit
# Configure P.
[P] mpls lsr-id 2.2.2.2
[P] mpls
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 20
[P-Vlanif20] mpls
[P-Vlanif20] mpls ldp
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] mpls ldp
[P-Vlanif30] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] mpls
# Configure PE2.
[PE2] mpls ldp remote-peer 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] remote-ip 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] quit
After the configuration is complete, run the display mpls ldp session command
on PE1 to view the LDP session setup. You can see an LDP session has been set up
between PE1 and PE2.
The following is the display on PE1:
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
3.3.3.3:0 Operational DU Passive 0000:00:00 2/2
------------------------------------------------------------------------------
TOTAL: 2 session(s) Found.
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.10.10.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
#
interface GigabitEthernet0/0/1.1
qinq termination pe-vid 100 ce-vid 10
mpls l2vc 3.3.3.3 101
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.255
#
return
● P configuration file
#
sysname P
#
router id 2.2.2.2
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
interface Vlanif20
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 10.2.2.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.2.0 0.0.0.255
#
return
#
sysname PE2
#
router id 3.3.3.3
#
vcmp role silent
#
vlan batch 30
#
mpls lsr-id 3.3.3.3
mpls
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 1.1.1.1
remote-ip 1.1.1.1
#
interface Vlanif30
ip address 10.2.2.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet0/0/2
port link-type hybrid
#
interface GigabitEthernet0/0/2.1
qinq termination pe-vid 100 ce-vid 10
mpls l2vc 1.1.1.1 101
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.2.2.0 0.0.0.255
#
return
● Switch2 configuration file
#
sysname Switch2
#
vlan batch 100
#
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid untagged vlan 100
port vlan-stacking vlan 10 stack-vlan 100
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 100
#
return
● CE2 configuration file
#
sysname CE2
#
vlan batch 10
#
interface Vlanif10
ip address 10.10.10.2 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
Networking Requirements
On the network shown in Figure 8-11, VPLS is enabled on PE1 and PE2. CE1 is
connected to PE1 and CE2 is connected to PE2. CE1 and CE2 are on the same VPLS
network. PWs are established by using LDP as the VPLS signaling protocol, and
VPLS is configured to connect CE1 and CE2.
GE0/0/1 GE0/0/2
PE1 PE2
GE0/0/2 GE0/0/1
GE0/0/1 P GE0/0/2
GE0/0/1 GE0/0/1
CE1 CE2
- Loopback1 - 1.1.1.1/32
- GigabitEthernet0/0 GigabitEthernet0/0 -
/2 /2.1
- Loopback1 - 3.3.3.3/32
- Loopback1 - 2.2.2.2/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a routing protocol on the backbone network to implement
interworking between devices.
2. Configure Dot1q sub-interfaces on PE interfaces connected to CEs so that the
Dot1q sub-interfaces can connect to the VPLS network.
3. Set up a remote LDP session between PEs.
4. Establish tunnels between PEs to transmit service data.
5. Enable MPLS L2VPN on the PEs.
6. Create a VSI on PEs and specify the signaling protocol as LDP.
NOTE
Procedure
Step 1 Configure a VLAN to which each interface belongs and assign IP addresses to
VLANIF interfaces according to Figure 8-11.
NOTE
● The AC-side and PW-side physical interfaces of a PE cannot be added to the same
VLAN; otherwise, a loop may occur.
● Ensure that each packet sent from a CE to a PE carries a VLAN tag.
# Configure CE1.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] vlan batch 10
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type trunk
[CE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface vlanif 10
[CE1-Vlanif10] ip address 10.1.1.1 24
[CE1-Vlanif10] quit
# Configure CE2.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan batch 10
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type trunk
[CE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface vlanif 10
[CE2-Vlanif10] ip address 10.1.1.2 24
[CE2-Vlanif10] quit
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] vlan batch 20
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] port link-type hybrid
[PE1-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[PE1-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[PE1-GigabitEthernet0/0/2] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 4.4.4.4 24
[PE1-Vlanif20] quit
# Configure P.
<HUAWEI> system-view
[HUAWEI] sysname P
[P] vlan batch 20 30
[P] interface gigabitethernet 0/0/1
[P-GigabitEthernet0/0/1] port link-type hybrid
[P-GigabitEthernet0/0/1] port hybrid pvid vlan 20
[P-GigabitEthernet0/0/1] port hybrid tagged vlan 20
[P-GigabitEthernet0/0/1] quit
[P] interface gigabitethernet 0/0/2
[P-GigabitEthernet0/0/2] port link-type hybrid
[P-GigabitEthernet0/0/2] port hybrid pvid vlan 30
[P-GigabitEthernet0/0/2] port hybrid tagged vlan 30
[P-GigabitEthernet0/0/2] quit
[P] interface vlanif 20
[P-Vlanif20] ip address 4.4.4.5 24
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] ip address 5.5.5.4 24
[P-Vlanif30] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] vlan batch 30
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type hybrid
[PE2-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[PE2-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[PE2-GigabitEthernet0/0/1] quit
# Configure P.
[P] router id 2.2.2.2
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.2 32
[P-LoopBack1] quit
[P] ospf 1
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[P-ospf-1-area-0.0.0.0] network 4.4.4.5 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 5.5.5.4 0.0.0.255
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] quit
# Configure PE2.
[PE2] router id 3.3.3.3
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 3.3.3.3 32
[PE2-LoopBack1] quit
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 5.5.5.5 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# Configure P.
[P] mpls lsr-id 2.2.2.2
[P] mpls
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 20
[P-Vlanif20] mpls
[P-Vlanif20] mpls ldp
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] mpls ldp
[P-Vlanif30] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] mpls
[PE2-Vlanif30] mpls ldp
[PE2-Vlanif30] quit
After the configuration is complete, run the display mpls ldp session command
on PE1, P, and PE2. You can see that the peer relationships are set up between PE1
and P, and between P and PE2. The status of the peer relationship is Operational.
Run the display mpls ldp command to view the MPLS LDP configuration. The
following is the display on PE1:
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
------------------------------------------------------------------------------
TOTAL: 1 session(s) Found.
# Configure PE2.
After the configuration is complete, run the display mpls ldp session command
on PE1 or PE2. You can see that the status of the peer relationship between PE1
and PE2 is Operational. That is, the peer relationship is set up. The following is
the display on PE1:
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
3.3.3.3:0 Operational DU Passive 0000:00:00 2/2
------------------------------------------------------------------------------
TOTAL: 2 session(s) Found.
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
# Configure PE2.
[PE2] vsi a2 static
[PE2-vsi-a2] pwsignal ldp
[PE2-vsi-a2-ldp] vsi-id 2
[PE2-vsi-a2-ldp] peer 1.1.1.1
[PE2-vsi-a2-ldp] quit
[PE2-vsi-a2] quit
# Configure PE2.
[PE2] vcmp role silent
[PE2] interface gigabitethernet0/0/2
After the configuration is complete, run the display vsi name a2 verbose
command on PE1. You can see that the VSI a2 sets up a PW to PE2 and the VSI
status is Up.
[PE1] display vsi name a2 verbose
***VSI Name : a2
Administrator VSI : no
Isolate Spoken : disable
VSI Index :0
PW Signaling : ldp
Member Discovery Style : static
PW MAC Learn Style : unqualify
Encapsulation Type : vlan
MTU : 1500
Diffserv Mode : uniform
Mpls Exp : --
DomainId : 255
Domain Name :
Ignore AcState : disable
P2P VSI : disable
Create Time : 0 days, 0 hours, 5 minutes, 1 seconds
VSI State : up
VSI ID :2
*Peer Router ID : 3.3.3.3
Negotiation-vc-id :2
primary or secondary : primary
ignore-standby-state : no
VC Label : 23552
Peer Type : dynamic
Session : up
Tunnel ID : 0x22
Broadcast Tunnel ID : 0x22
Broad BackupTunnel ID : 0x0
CKey :2
NKey :1
Stp Enable :0
PwIndex :0
Control Word : disable
**PW Information:
Ckey : 0x2
Nkey : 0x1
Main PW Token : 0x22
Slave PW Token : 0x0
Tnl Type : LSP
OutInterface : Vlanif20
Backup OutInterface :
Stp Enable :0
PW Last Up Time : 2010/12/30 11:32:03
PW Total Up Time : 0 days, 0 hours, 0 minutes, 50 seconds
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
#
vlan batch 20
#
mpls lsr-id 1.1.1.1
mpls
#
mpls l2vpn
#
vsi a2 static
pwsignal ldp
vsi-id 2
peer 3.3.3.3
#
mpls ldp
#
mpls ldp remote-peer 3.3.3.3
remote-ip 3.3.3.3
#
interface Vlanif20
ip address 4.4.4.4 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
#
interface GigabitEthernet0/0/1.1
dot1q termination vid 10
l2 binding vsi a2
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 4.4.4.0 0.0.0.255
#
return
● P configuration file
#
sysname P
#
router id 2.2.2.2
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
interface Vlanif20
ip address 4.4.4.5 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 5.5.5.4 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
GE0/0/2 GE0/0/2
PE1 PE2
GE0/0/1 GE0/0/1
GE0/0/1 P GE0/0/2
GE0/0/2 GE0/0/2
Switch1 Switch2
GE0/0/1 GE0/0/1
GE0/0/1 GE0/0/1
CE1 CE2
- Loopback1 - 1.1.1.1/32
- GigabitEthernet0/0 GigabitEthernet0/0 -
/2 /2.1
- Loopback1 - 3.3.3.3/32
- Loopback1 - 2.2.2.2/32
Configuration Roadmap
The configuration roadmap is as follows:
NOTE
Procedure
Step 1 Configure the VLAN to which each interface belongs according to Figure 8-12,
and assign IP addresses to VLANIF interfaces.
NOTE
● The AC-side and PW-side physical interfaces of a PE cannot be added to the same
VLAN; otherwise, a loop may occur.
● Ensure that each packet sent from a CE to the Switch carries one VLAN tag.
# Configure CE1.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] vlan batch 10
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type trunk
[CE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface vlanif 10
[CE1-Vlanif10] ip address 10.1.1.1 24
[CE1-Vlanif10] quit
# Configure CE2.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan batch 10
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type trunk
[CE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface vlanif 10
[CE2-Vlanif10] ip address 10.1.1.2 24
[CE2-Vlanif10] quit
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] vlan batch 20
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] port link-type hybrid
[PE1-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[PE1-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[PE1-GigabitEthernet0/0/2] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 4.4.4.4 24
[PE1-Vlanif20] quit
# Configure P.
<HUAWEI> system-view
[HUAWEI] sysname P
[P] vlan batch 20 30
[P] interface gigabitethernet 0/0/1
[P-GigabitEthernet0/0/1] port link-type hybrid
[P-GigabitEthernet0/0/1] port hybrid pvid vlan 20
[P-GigabitEthernet0/0/1] port hybrid tagged vlan 20
[P-GigabitEthernet0/0/1] quit
[P] interface gigabitethernet 0/0/2
[P-GigabitEthernet0/0/2] port link-type hybrid
[P-GigabitEthernet0/0/2] port hybrid pvid vlan 30
[P-GigabitEthernet0/0/2] port hybrid tagged vlan 30
[P-GigabitEthernet0/0/2] quit
[P] interface vlanif 20
[P-Vlanif20] ip address 4.4.4.5 24
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] ip address 5.5.5.4 24
[P-Vlanif30] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] vlan batch 30
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type hybrid
[PE2-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[PE2-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[PE2-GigabitEthernet0/0/1] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] ip address 5.5.5.5 24
[PE2-Vlanif30] quit
Step 2 Configure selective QinQ on interfaces of the Switch and specify the VLANs
allowed by the interfaces.
# Configure Switch1.
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] vlan 100
[Switch1-vlan100] quit
[Switch1] interface gigabitethernet0/0/2
[Switch1-GigabitEthernet0/0/2] port link-type hybrid
[Switch1-GigabitEthernet0/0/2] port hybrid tagged vlan 100
[Switch1-GigabitEthernet0/0/2] quit
[Switch1] interface gigabitethernet0/0/1
[Switch1-GigabitEthernet0/0/1] port link-type hybrid
[Switch1-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch1-GigabitEthernet0/0/1] port hybrid untagged vlan 100
[Switch1-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 100
[Switch1-GigabitEthernet0/0/1] quit
# Configure Switch2.
<HUAWEI> system-view
[HUAWEI] sysname Switch2
[Switch2] vlan 100
[Switch2-vlan100] quit
[Switch2] interface gigabitethernet0/0/2
[Switch2-GigabitEthernet0/0/2] port link-type hybrid
[Switch2-GigabitEthernet0/0/2] port hybrid tagged vlan 100
[Switch2-GigabitEthernet0/0/2] quit
[Switch2] interface gigabitethernet0/0/1
[Switch2-GigabitEthernet0/0/1] port link-type hybrid
[Switch2-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch2-GigabitEthernet0/0/1] port hybrid untagged vlan 100
[Switch2-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 100
[Switch2-GigabitEthernet0/0/1] quit
Configure PE1, P, and PE2 to advertise 32-bit loopback interface addresses as the
LSR IDs.
# Configure PE1.
[PE1] router id 1.1.1.1
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] quit
[PE1] ospf 1
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure P.
# Configure PE2.
[PE2] router id 3.3.3.3
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 3.3.3.3 32
[PE2-LoopBack1] quit
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 5.5.5.5 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# Configure P.
[P] mpls lsr-id 2.2.2.2
[P] mpls
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 20
[P-Vlanif20] mpls
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] mpls
[PE2-Vlanif30] mpls ldp
[PE2-Vlanif30] quit
After the configuration is complete, run the display mpls ldp session command
on PE1, P, and PE2. You can see that the peer relationships are set up between PE1
and P, and between P and PE2. The status of the peer relationship is Operational.
Run the display mpls ldp command to view the MPLS LDP configuration. The
following is the display on PE1:
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
------------------------------------------------------------------------------
TOTAL: 1 session(s) Found.
# Configure PE1.
[PE1] mpls ldp remote-peer 3.3.3.3
[PE1-mpls-ldp-remote-3.3.3.3] remote-ip 3.3.3.3
[PE1-mpls-ldp-remote-3.3.3.3] quit
# Configure PE2.
[PE2] mpls ldp remote-peer 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] remote-ip 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] quit
After the configuration is complete, run the display mpls ldp session command
on PE1 or PE2. You can see that the status of the peer relationship between PE1
and PE2 is Operational. That is, the peer relationship is set up. The following is the
display on PE1:
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
3.3.3.3:0 Operational DU Passive 0000:00:00 2/2
------------------------------------------------------------------------------
TOTAL: 2 session(s) Found.
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
# Configure PE2.
[PE2] vsi a2 static
[PE2-vsi-a2] pwsignal ldp
[PE2-vsi-a2-ldp] vsi-id 2
[PE2-vsi-a2-ldp] peer 1.1.1.1
[PE2-vsi-a2-ldp] quit
[PE2-vsi-a2] quit
# Configure PE2.
[PE2] vcmp role silent
[PE2] interface gigabitethernet0/0/2
[PE2-GigabitEthernet0/0/2] port link-type hybrid
[PE2-GigabitEthernet0/0/2] quit
[PE2] interface gigabitethernet0/0/2.1
[PE2-GigabitEthernet0/0/2.1] qinq termination pe-vid 100 ce-vid 10
[PE2-GigabitEthernet0/0/2.1] l2 binding vsi a2
[PE2-GigabitEthernet0/0/2.1] quit
***VSI Name : a2
Administrator VSI : no
Isolate Spoken : disable
VSI Index :0
PW Signaling : ldp
VSI ID :2
*Peer Router ID : 3.3.3.3
Negotiation-vc-id :2
primary or secondary : primary
ignore-standby-state : no
VC Label : 23552
Peer Type : dynamic
Session : up
Tunnel ID : 0x22
Broadcast Tunnel ID : 0x22
Broad BackupTunnel ID : 0x0
CKey :2
NKey :1
Stp Enable :0
PwIndex :0
Control Word : disable
**PW Information:
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
#
mpls ldp
#
interface Vlanif20
ip address 4.4.4.5 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 5.5.5.4 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 4.4.4.0 0.0.0.255
network 5.5.5.0 0.0.0.255
#
return
● PE2 configuration file
#
sysname PE2
#
router id 3.3.3.3
#
vcmp role silent
#
vlan batch 30
#
mpls lsr-id 3.3.3.3
mpls
#
mpls l2vpn
#
vsi a2 static
pwsignal ldp
vsi-id 2
peer 1.1.1.1
#
mpls ldp
#
mpls ldp remote-peer 1.1.1.1
remote-ip 1.1.1.1
#
interface Vlanif30
ip address 5.5.5.5 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet0/0/2
CE1 CE3
GE0/0/1 GE0/0/1
Loopback1
2.2.2.2/32
GE0/0/1 GE0/0/1
PE1 PE2
Loopback1 GE0/0/1 GE0/0/2 Loopback1
1.1.1.1/32 GE0/0/3 GE0/0/3 3.3.3.3/32
GE0/0/2 P GE0/0/2
MPLS backbone
AS: 100
GE0/0/1 GE0/0/1
CE2 CE4
VPN-B VPN-B
AS: 65420 AS: 65440
Configuration Roadmap
The configuration roadmap is as follows:
NOTE
Procedure
Step 1 Configure an IGP, for example, OSPF, on the MPLS backbone network so that PEs
and the P can communicate with each other.
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] router id 1.1.1.1
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] quit
[PE1] vlan batch 30
[PE1] interface gigabitethernet 0/0/3
[PE1-GigabitEthernet0/0/3] port link-type hybrid
[PE1-GigabitEthernet0/0/3] port hybrid pvid vlan 30
[PE1-GigabitEthernet0/0/3] port hybrid untagged vlan 30
[PE1-GigabitEthernet0/0/3] quit
[PE1] interface vlanif 30
[PE1-Vlanif30] ip address 7.7.7.7 24
[PE1-Vlanif30] quit
[PE1] ospf
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 7.7.7.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure P.
<HUAWEI> system-view
[HUAWEI] sysname P
[P] router id 2.2.2.2
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.2 32
[P-LoopBack1] quit
[P] vlan batch 30 60
[P] interface gigabitethernet 0/0/1
[P-GigabitEthernet0/0/1] port link-type hybrid
[P-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[P-GigabitEthernet0/0/1] port hybrid untagged vlan 30
[P-GigabitEthernet0/0/1] quit
[P] interface gigabitethernet 0/0/2
[P-GigabitEthernet0/0/2] port link-type hybrid
[P-GigabitEthernet0/0/2] port hybrid pvid vlan 60
[P-GigabitEthernet0/0/2] port hybrid untagged vlan 60
[P-GigabitEthernet0/0/2] quit
[P] interface vlanif 30
[P-Vlanif30] ip address 7.7.7.8 24
[P-Vlanif30] quit
[P] interface vlanif 60
[P-Vlanif60] ip address 6.6.6.6 24
[P-Vlanif60] quit
[P] ospf
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 7.7.7.0 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 6.6.6.0 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] router id 3.3.3.3
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 3.3.3.3 32
[PE2-LoopBack1] quit
[PE2] vlan batch 60
[PE2] interface gigabitethernet 0/0/3
[PE2-GigabitEthernet0/0/3] port link-type hybrid
[PE2-GigabitEthernet0/0/3] port hybrid pvid vlan 60
[PE2-GigabitEthernet0/0/3] port hybrid untagged vlan 60
[PE2-GigabitEthernet0/0/3] quit
[PE2] interface vlanif 60
[PE2-Vlanif60] ip address 6.6.6.7 24
[PE2-Vlanif60] quit
[PE2] ospf
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 6.6.6.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
After the configuration is complete, PE1, P, and PE2 can establish OSPF neighbor
relationships. Run the display ospf peer command. You can see that the OSPF
neighbor relationship status is Full. Run the display ip routing-table command.
You can see that the PEs learn each other's routes to the Loopback1 interface.
Step 2 Configure basic MPLS functions, enable MPLS LDP, and establish LDP LSPs on the
MPLS backbone network.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 30
[PE1-Vlanif30] mpls
[PE1-Vlanif30] mpls ldp
[PE1-Vlanif30] quit
# Configure P.
[P] mpls lsr-id 2.2.2.2
[P] mpls
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] mpls ldp
[P-Vlanif30] quit
[P] interface vlanif 60
[P-Vlanif60] mpls
[P-Vlanif60] mpls ldp
[P-Vlanif60] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 60
[PE2-Vlanif60] mpls
[PE2-Vlanif60] mpls ldp
[PE2-Vlanif60] quit
After the configuration is complete, LDP sessions can be set up between PE1 and
the P, and between the P and PE2. Run the display mpls ldp session command.
You can see that the Status field is Operational. Run the display mpls ldp lsp
command to view the MPLS LDP configuration.
The following is the display on PE1:
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
------------------------------------------------------------------------------
TOTAL: 1 session(s) Found.
[PE1] display mpls ldp lsp
# Configure PE2.
[PE2] ip vpn-instance vpna
[PE2-vpn-instance-vpna] route-distinguisher 200:1
[PE2-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both
[PE2-vpn-instance-vpna-af-ipv4] quit
[PE2-vpn-instance-vpna] quit
[PE2] ip vpn-instance vpnb
[PE2-vpn-instance-vpnb] route-distinguisher 200:2
[PE2-vpn-instance-vpnb-af-ipv4] vpn-target 222:2 both
[PE2-vpn-instance-vpnb-af-ipv4] quit
[PE2-vpn-instance-vpnb] quit
[PE2] vcmp role silent
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type hybrid
[PE2-GigabitEthernet0/0/1] quit
[PE2] interface gigabitethernet 0/0/1.1
[PE2-GigabitEthernet0/0/1.1] dot1q termination vid 10
[PE2-GigabitEthernet0/0/1.1] ip binding vpn-instance vpna
[PE2-GigabitEthernet0/0/1.1] ip address 10.3.1.2 24
NOTE
If multiple interfaces of a PE are bound to the same VPN instance, run the ping -vpn-
instance vpn-instance-name -a source-ip-address dest-ip-address command with -a source-
ip-address specified to ping the CE connected to the remote PE. Otherwise, the ping
operation may fail.
Step 4 Set up EBGP peer relationships between PEs and CEs and configure CEs to import
VPN routes.
# Configure CE1. The configurations of CE2, CE3, and CE4 are the same as the
configuration of CE1, and are not mentioned here.
[CE1] bgp 65410
[CE1-bgp] peer 10.1.1.2 as-number 100
[CE1-bgp] import-route direct
# Configure PE1. The configuration of PE2 is the same as the configuration of PE1,
and is not mentioned here.
[PE1] bgp 100
[PE1-bgp] ipv4-family vpn-instance vpna
[PE1-bgp-vpna] peer 10.1.1.1 as-number 65410
[PE1-bgp-vpna] import-route direct
[PE1-bgp-vpna] quit
[PE1-bgp] ipv4-family vpn-instance vpnb
[PE1-bgp-vpnb] peer 10.2.1.1 as-number 65420
[PE1-bgp-vpnb] import-route direct
[PE1-bgp-vpnb] quit
[PE1-bgp] quit
After the configuration is complete, run the display bgp vpnv4 vpn-instance peer
command on PEs. You can see that BGP peer relationships between PEs and CEs
have been established and are in the Established state.
The following is the peer relationship between PE1 and CE1:
[PE1] display bgp vpnv4 vpn-instance vpna peer
# Configure PE2.
[PE2] bgp 100
[PE2-bgp] peer 1.1.1.1 as-number 100
[PE2-bgp] peer 1.1.1.1 connect-interface loopback 1
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpnv4] peer 1.1.1.1 enable
[PE2-bgp-af-vpnv4] quit
[PE2-bgp] quit
After the configuration is complete, run the display bgp peer or display bgp
vpnv4 all peer command on PEs. You can see that the BGP peer relationships
have been established between the PEs.
[PE1] display bgp peer
Run the display ip routing-table vpn-instance command on a PE. You can view
the routes to the remote CE.
CEs in the same VPN can successfully ping each other but CEs in different VPNs
cannot.
For example, CE1 can successfully ping CE3 at 10.3.1.1 but cannot ping CE4 at
10.4.1.1.
[CE1] ping 10.3.1.1
PING 10.3.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.3.1.1: bytes=56 Sequence=1 ttl=253 time=72 ms
Reply from 10.3.1.1: bytes=56 Sequence=2 ttl=253 time=34 ms
Reply from 10.3.1.1: bytes=56 Sequence=3 ttl=253 time=50 ms
Reply from 10.3.1.1: bytes=56 Sequence=4 ttl=253 time=50 ms
Reply from 10.3.1.1: bytes=56 Sequence=5 ttl=253 time=34 ms
--- 10.3.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 34/48/72 ms
[CE1] ping 10.4.1.1
PING 10.4.1.1: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
--- 10.4.1.1 ping statistics ---
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
----End
Configuration Files
● PE1 configuration file
#
sysname PE1
#
router id 1.1.1.1
#
vcmp role silent
#
vlan batch 30
#
ip vpn-instance vpna
ipv4-family
route-distinguisher 100:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
ip vpn-instance vpnb
ipv4-family
route-distinguisher 100:2
vpn-target 222:2 export-extcommunity
vpn-target 222:2 import-extcommunity
#
mpls lsr-id 1.1.1.1
mpls
#
mpls ldp
#
interface Vlanif30
ip address 7.7.7.7 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
interface Vlanif60
ip address 6.6.6.6 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 6.6.6.0 0.0.0.255
network 7.7.7.0 0.0.0.255
#
return
● PE2 configuration file
#
sysname PE2
#
router id 3.3.3.3
#
vcmp role silent
#
vlan batch 60
#
ip vpn-instance vpna
ipv4-family
route-distinguisher 200:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
ip vpn-instance vpnb
ipv4-family
route-distinguisher 200:2
vpn-target 222:2 export-extcommunity
vpn-target 222:2 import-extcommunity
#
mpls lsr-id 3.3.3.3
mpls
#
mpls ldp
#
interface Vlanif60
ip address 6.6.6.7 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
#
interface GigabitEthernet0/0/1.1
dot1q termination vid 10
ip binding vpn-instance vpna
ip address 10.3.1.2 255.255.255.0
arp broadcast enable
#
interface GigabitEthernet0/0/2
port link-type hybrid
#
interface GigabitEthernet0/0/2.1
dot1q termination vid 20
ip binding vpn-instance vpnb
ip address 10.4.1.2 255.255.255.0
arp broadcast enable
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 1.1.1.1 enable
#
ipv4-family vpnv4
policy vpn-target
peer 1.1.1.1 enable
#
ipv4-family vpn-instance vpna
import-route direct
peer 10.3.1.1 as-number 65430
#
ipv4-family vpn-instance vpnb
import-route direct
peer 10.4.1.1 as-number 65440
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 6.6.6.0 0.0.0.255
#
return
● CE1 configuration file
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 10
port hybrid tagged vlan 10
#
bgp 65410
peer 10.1.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.1.1.2 enable
#
return
● CE2 configuration file
#
sysname CE2
#
vlan batch 20
#
interface Vlanif20
ip address 10.2.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
bgp 65420
peer 10.2.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.2.1.2 enable
#
return
Networking Requirements
On the network shown in Figure 8-14, CE1 and CE3 belong to VPN-A, and CE2
and CE4 belong to VPN-B. The VPN targets of VPN-A and VPN-B are 111:1 and
222:2 respectively. Users in different VPNs cannot communicate with each other.
When the Switch is connected to multiple CEs, the Switch can add the same VLAN
tag to the packets from different CEs, thereby saving VLAN IDs on the public
network.
CE1 CE3
GE/0/1 GE0/0/1
GE0/0/1 GE0/0/1
GE0/0/1 GE0/0/1
GE0/0/1 GE0/0/1
CE2 CE4
VPN-B VPN-B
AS: 65420 AS: 65440
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure VPN instances on PEs connected to CEs on the backbone network,
bind interfaces connected to CEs to VPN instances, and assign IP addresses to
interfaces connected to CEs.
2. Configure OSPF on PEs to implement interworking between PEs.
3. Configure basic MPLS functions and MPLS LDP, and set up MPLS LSPs.
4. Configure the Multi-protocol Extensions for Interior Border Gateway Protocol
(MP-IBGP) on PEs to exchange VPN routing information.
5. Configure EBGP on CEs and PEs to exchange VPN routing information.
NOTE
Procedure
Step 1 Configure selective QinQ on interfaces of the Switch and specify the VLANs
allowed by the interfaces.
# Configure Switch1.
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] vlan 100
[Switch1-vlan100] quit
[Switch1] interface GigabitEthernet 0/0/2
[Switch1-GigabitEthernet0/0/2] port link-type hybrid
[Switch1-GigabitEthernet0/0/2] port hybrid tagged vlan 100
[Switch1-GigabitEthernet0/0/2] quit
[Switch1] interface GigabitEthernet 0/0/1
[Switch1-GigabitEthernet0/0/1] port link-type hybrid
[Switch1-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch1-GigabitEthernet0/0/1] port hybrid untagged vlan 100
[Switch1-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 100
[Switch1-GigabitEthernet0/0/1] quit
# Configure Switch2.
<HUAWEI> system-view
[HUAWEI] sysname Switch2
[Switch2] vlan 200
[Switch2-vlan200] quit
[Switch2] interface GigabitEthernet 0/0/2
[Switch2-GigabitEthernet0/0/2] port link-type hybrid
[Switch2-GigabitEthernet0/0/2] port hybrid tagged vlan 200
[Switch2-GigabitEthernet0/0/2] quit
[Switch2] interface GigabitEthernet 0/0/1
[Switch2-GigabitEthernet0/0/1] port link-type hybrid
[Switch2-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch2-GigabitEthernet0/0/1] port hybrid untagged vlan 200
[Switch2-GigabitEthernet0/0/1] port vlan-stacking vlan 20 stack-vlan 200
[Switch2-GigabitEthernet0/0/1] quit
# Configure Switch3.
<HUAWEI> system-view
[HUAWEI] sysname Switch3
[Switch3] vlan 100
[Switch3-vlan100] quit
[Switch3] interface GigabitEthernet 0/0/2
[Switch3-GigabitEthernet0/0/2] port link-type hybrid
[Switch3-GigabitEthernet0/0/2] port hybrid tagged vlan 100
[Switch3-GigabitEthernet0/0/2] quit
[Switch3] interface GigabitEthernet 0/0/1
[Switch3-GigabitEthernet0/0/1] port link-type hybrid
[Switch3-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch3-GigabitEthernet0/0/1] port hybrid untagged vlan 100
[Switch3-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 100
[Switch3-GigabitEthernet0/0/1] quit
# Configure Switch4.
<HUAWEI> system-view
[HUAWEI] sysname Switch4
[Switch4] vlan 200
[Switch4-vlan200] quit
[Switch4] interface GigabitEthernet 0/0/2
[Switch4-GigabitEthernet0/0/2] port link-type hybrid
[Switch4-GigabitEthernet0/0/2] port hybrid tagged vlan 200
[Switch4-GigabitEthernet0/0/2] quit
[Switch4] interface GigabitEthernet 0/0/1
[Switch4-GigabitEthernet0/0/1] port link-type hybrid
[Switch4-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch4-GigabitEthernet0/0/1] port hybrid untagged vlan 200
[Switch4-GigabitEthernet0/0/1] port vlan-stacking vlan 20 stack-vlan 200
[Switch4-GigabitEthernet0/0/1] quit
Step 2 Configure an IGP, for example, OSPF, on the MPLS backbone network so that PEs
and the P can communicate with each other.
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] router id 1.1.1.1
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] quit
[PE1] vlan batch 30
[PE1] interface gigabitethernet 0/0/3
[PE1-GigabitEthernet0/0/3] port link-type hybrid
[PE1-GigabitEthernet0/0/3] port hybrid pvid vlan 30
[PE1-GigabitEthernet0/0/3] port hybrid untagged vlan 30
[PE1-GigabitEthernet0/0/3] quit
[PE1] interface vlanif 30
[PE1-Vlanif30] ip address 7.7.7.7 24
[PE1-Vlanif30] quit
[PE1] ospf
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 7.7.7.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure P.
<HUAWEI> system-view
[HUAWEI] sysname P
[P] router id 2.2.2.2
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.2 32
[P-LoopBack1] quit
[P] vlan batch 30 60
[P] interface gigabitethernet 0/0/1
[P-GigabitEthernet0/0/1] port link-type hybrid
[P-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[P-GigabitEthernet0/0/1] port hybrid untagged vlan 30
[P-GigabitEthernet0/0/1] quit
[P] interface gigabitethernet 0/0/2
[P-GigabitEthernet0/0/2] port link-type hybrid
[P-GigabitEthernet0/0/2] port hybrid pvid vlan 60
[P-GigabitEthernet0/0/2] port hybrid untagged vlan 60
[P-GigabitEthernet0/0/2] quit
[P] interface vlanif 30
[P-Vlanif30] ip address 7.7.7.8 24
[P-Vlanif30] quit
[P] interface vlanif 60
[P-Vlanif60] ip address 6.6.6.6 24
[P-Vlanif60] quit
[P] ospf
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 7.7.7.0 0.0.0.255
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] router id 3.3.3.3
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 3.3.3.3 32
[PE2-LoopBack1] quit
[PE2] vlan batch 60
[PE2] interface gigabitethernet 0/0/3
[PE2-GigabitEthernet0/0/3] port link-type hybrid
[PE2-GigabitEthernet0/0/3] port hybrid pvid vlan 60
[PE2-GigabitEthernet0/0/3] port hybrid untagged vlan 60
[PE2-GigabitEthernet0/0/3] quit
[PE2] interface vlanif 60
[PE2-Vlanif60] ip address 6.6.6.7 24
[PE2-Vlanif60] quit
[PE2] ospf
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 6.6.6.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
After the configuration is complete, PE1, P, and PE2 can establish OSPF neighbor
relationships. Run the display ospf peer command. You can see that the OSPF
neighbor relationship status is Full. Run the display ip routing-table command.
You can see that the PEs learn each other's routes to the Loopback1 interface.
Step 3 Configure basic MPLS functions, enable MPLS LDP, and establish LDP LSPs on the
MPLS backbone network.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 30
[PE1-Vlanif30] mpls
[PE1-Vlanif30] mpls ldp
[PE1-Vlanif30] quit
# Configure P.
[P] mpls lsr-id 2.2.2.2
[P] mpls
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] mpls ldp
[P-Vlanif30] quit
[P] interface vlanif 60
[P-Vlanif60] mpls
[P-Vlanif60] mpls ldp
[P-Vlanif60] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 60
[PE2-Vlanif60] mpls
[PE2-Vlanif60] mpls ldp
[PE2-Vlanif60] quit
After the configuration is complete, LDP sessions can be set up between PE1 and
the P, and between the P and PE2. Run the display mpls ldp session command.
You can see that the Status field is Operational. Run the display mpls ldp lsp
command to view the MPLS LDP configuration.
The following is the display on PE1:
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
------------------------------------------------------------------------------
TOTAL: 1 session(s) Found.
[PE1] display mpls ldp lsp
# Configure PE2.
[PE2] ip vpn-instance vpna
[PE2-vpn-instance-vpna] route-distinguisher 200:1
[PE2-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both
[PE2-vpn-instance-vpna-af-ipv4] quit
[PE2-vpn-instance-vpna] quit
[PE2] ip vpn-instance vpnb
[PE2-vpn-instance-vpnb] route-distinguisher 200:2
[PE2-vpn-instance-vpnb-af-ipv4] vpn-target 222:2 both
[PE2-vpn-instance-vpnb-af-ipv4] quit
[PE2-vpn-instance-vpnb] quit
[PE2] vcmp role silent
[PE2] interface GigabitEthernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type hybrid
[PE2-GigabitEthernet0/0/1] quit
[PE2] interface GigabitEthernet 0/0/1.1
[PE2-GigabitEthernet0/0/1.1] qinq termination pe-vid 100 ce-vid 10
[PE2-GigabitEthernet0/0/1.1] ip binding vpn-instance vpna
[PE2-GigabitEthernet0/0/1.1] ip address 10.3.1.2 24
[PE2-GigabitEthernet0/0/1.1] arp broadcast enable
[PE2-GigabitEthernet0/0/1.1] quit
[PE2] interface GigabitEthernet 0/0/2
[PE2-GigabitEthernet0/0/2] port link-type hybrid
[PE2-GigabitEthernet0/0/2] quit
[PE2] interface GigabitEthernet 0/0/2.1
[PE2-GigabitEthernet0/0/2.1] qinq termination pe-vid 200 ce-vid 20
[PE2-GigabitEthernet0/0/2.1] ip binding vpn-instance vpnb
[PE2-GigabitEthernet0/0/2.1] ip address 10.4.1.2 24
[PE2-GigabitEthernet0/0/2.1] arp broadcast enable
[PE2-GigabitEthernet0/0/2.1] quit
NOTE
If multiple interfaces of a PE are bound to the same VPN instance, run the ping -vpn-
instance vpn-instance-name -a source-ip-address dest-ip-address command with -a source-
ip-address specified to ping the CE connected to the remote PE. Otherwise, the ping
operation may fail.
Step 5 Set up EBGP peer relationships between PEs and CEs and configure CEs to import
VPN routes.
# Configure CE1. The configurations of CE2, CE3, and CE4 are the same as the
configuration of CE1, and are not mentioned here.
[CE1] bgp 65410
[CE1-bgp] peer 10.1.1.2 as-number 100
[CE1-bgp] import-route direct
# Configure PE1. The configuration of PE2 is the same as the configuration of PE1,
and is not mentioned here.
[PE1] bgp 100
[PE1-bgp] ipv4-family vpn-instance vpna
[PE1-bgp-vpna] peer 10.1.1.1 as-number 65410
[PE1-bgp-vpna] import-route direct
[PE1-bgp-vpna] quit
[PE1-bgp] ipv4-family vpn-instance vpnb
[PE1-bgp-vpnb] peer 10.2.1.1 as-number 65420
[PE1-bgp-vpnb] import-route direct
[PE1-bgp-vpnb] quit
[PE1-bgp] quit
After the configuration is complete, run the display bgp vpnv4 vpn-instance peer
command on PEs. You can see that BGP peer relationships between PEs and CEs
have been established and are in the Established state.
The following is the peer relationship between PE1 and CE1:
[PE1] display bgp vpnv4 vpn-instance vpna peer
# Configure PE2.
[PE2] bgp 100
[PE2-bgp] peer 1.1.1.1 as-number 100
After the configuration is complete, run the display bgp peer or display bgp
vpnv4 all peer command on PEs. You can see that the BGP peer relationships
have been established between the PEs.
[PE1] display bgp peer
Run the display ip routing-table vpn-instance command on a PE. You can view
the routes to the remote CE.
CEs in the same VPN can successfully ping each other but CEs in different VPNs
cannot.
For example, CE1 can successfully ping CE3 at 10.3.1.1 but cannot ping CE4 at
10.4.1.1.
[CE1] ping 10.3.1.1
PING 10.3.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.3.1.1: bytes=56 Sequence=1 ttl=253 time=72 ms
Reply from 10.3.1.1: bytes=56 Sequence=2 ttl=253 time=34 ms
Reply from 10.3.1.1: bytes=56 Sequence=3 ttl=253 time=50 ms
Reply from 10.3.1.1: bytes=56 Sequence=4 ttl=253 time=50 ms
Reply from 10.3.1.1: bytes=56 Sequence=5 ttl=253 time=34 ms
--- 10.3.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 34/48/72 ms
[CE1] ping 10.4.1.1
PING 10.4.1.1: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
--- 10.4.1.1 ping statistics ---
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
----End
Configuration Files
● PE1 configuration file
#
sysname PE1
#
router id 1.1.1.1
#
vcmp role silent
#
vlan batch 30
#
ip vpn-instance vpna
ipv4-family
route-distinguisher 100:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
ip vpn-instance vpnb
ipv4-family
route-distinguisher 100:2
vpn-target 222:2 export-extcommunity
vpn-target 222:2 import-extcommunity
#
mpls lsr-id 1.1.1.1
mpls
#
mpls ldp
#
interface Vlanif30
ip address 7.7.7.7 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
#
interface GigabitEthernet0/0/1.1
qinq termination pe-vid 100 ce-vid 10
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 7.7.7.0 0.0.0.255
network 6.6.6.0 0.0.0.255
#
return
● PE2 configuration file
#
sysname PE2
#
router id 3.3.3.3
#
vcmp role silent
#
vlan batch 60
#
ip vpn-instance vpna
ipv4-family
route-distinguisher 200:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
ip vpn-instance vpnb
ipv4-family
route-distinguisher 200:2
vpn-target 222:2 export-extcommunity
vpn-target 222:2 import-extcommunity
#
mpls lsr-id 3.3.3.3
mpls
#
mpls ldp
#
interface Vlanif60
ip address 6.6.6.7 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
#
interface GigabitEthernet0/0/1.1
qinq termination pe-vid 100 ce-vid 10
ip binding vpn-instance vpna
ip address 10.3.1.2 255.255.255.0
arp broadcast enable
#
interface GigabitEthernet0/0/2
port link-type hybrid
#
interface GigabitEthernet0/0/2.1
qinq termination pe-vid 200 ce-vid 20
ip binding vpn-instance vpnb
ip address 10.4.1.2 255.255.255.0
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
bgp 65420
peer 10.2.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.2.1.2 enable
#
return
● CE3 configuration file
#
sysname CE3
#
vlan batch 10
#
interface Vlanif10
ip address 10.3.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 10
port hybrid tagged vlan 10
#
bgp 65430
peer 10.3.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.3.1.2 enable
#
return
● CE4 configuration file
#
sysname CE4
#
vlan batch 20
#
interface Vlanif20
ip address 10.4.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
bgp 65440
peer 10.4.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.4.1.2 enable
#
return
● Switch1 configuration file
#
sysname Switch1
#
vlan batch 100
#
interface GigabitEthernet0/0/1
port link-type hybrid
This chapter describes how to configure voice VLAN. A voice VLAN changes the
priority of voice data packets to improve voice data transmission quality.
Purpose
Data, voice, and video services are often transmitted simultaneously over a
network. Voice services, in particular, require a higher forwarding priority than
data or video services. When bandwidth is limited, voice data must have
transmission preference over other types of data. This can be ensured by
configuring a voice VLAN on the switch to transmit voice data and setting QoS
parameters in the voice VLAN so that voice data is given preference when
congestion occurs.
Network
PC IP Phone Switch
Figure 9-2 shows another connection mode, in which only an IP phone connects
to a switch interface.
Network
IP Phone Switch
Some IP phones (for example, Cisco 7962) send tagged voice packets and some IP
phones (for example, Huawei MC850) send untagged voice packets. The following
sections describe how the MAC address-based voice VLAN and VLAN ID-based
voice VLAN transmit tagged and untagged voice packets.
Network
PC IP Phone Switch
voice VLAN is configured, the IP phone must be able to obtain voice VLAN
information from the switch.
LLDP is one of multiple methods in which an IP phone can obtain voice VLAN
information from a switch.
Network
PC IP phone Switch
1 Send an LLDPDU
IP Phone A
IP Phone C
IP Phone B
PC A PC C
Configure a voice VLAN based on the type of voice packets sent by IP phones:
● Configure MAC address-based voice VLAN when voice packets are untagged
or tagged with VLAN 0.
● Configure VLAN ID-based voice VLAN when IP phones can obtain voice VLAN
information on the switch.
Licensing Requirements
Voice VLAN configuration commands are available only after the S1720GW,
S1720GWR, and S1720X have the license (WEB management to full management
Electronic RTU License) loaded and activated and the switches are restarted. Voice
VLAN configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S2710SI V100R006(C03&C05)
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● VLAN 1 cannot be configured as a voice VLAN.
● To transmit different services, ensure that the voice VLAN and default VLAN
on an interface are different VLANs.
● Only one VLAN on an interface can be configured as a voice VLAN at a time.
● After a voice VLAN is configured on an interface, VLAN mapping, VLAN
stacking, or traffic policies cannot be configured on the interface.
● Do not set the VLAN ID to 0 on an IP phone.
● The automatic mode is not supported on the S5720HI.
● In auto mode, access, negotiation-auto, or negotiation-desirable interfaces
cannot be added to a voice VLAN. To add the interface to the voice VLAN, run
the port link-type command to change the link type of the interface to trunk
or hybrid.
● When an IP phone is connected to a switch through the OUI-based voice
VLAN, disable LLDP on the interface. If LLDP is enabled on the interface, the
switch will allocate a voice VLAN ID to the IP phone. The IP phone sends
tagged packets to the switch, whereas the switch sends untagged packets to
the IP phone. As a result, the IP phone cannot go online.
● In V200R003 and later versions, the automatic mode takes effect only when
the voice-vlan remark-mode mac-address command is configured to
increase the priority of voice packets based on MAC addresses and the voice-
vlan enable command without include-untagged specified is configured to
enable voice VLAN on the interface.
● When the remark (user group view) and voice-vlan remark commands are
used together to modify the user packet priority, if the services conflict:
– For S5720HI, the priority configured using the remark (user group view)
command takes effect.
– For S5720EI, S6720EI, and S6720S-EI, the priority configured using the
voice-vlan remark command takes effect.
Context
To implement the voice VLAN function, configure the VLAN used to forward voice
packets on the switch as a voice VLAN and enable the voice VLAN. You are
advised to configure different VLANs for voice and data services to facilitate
management.
Procedure
Step 1 Run system-view
A voice VLAN is configured and the voice VLAN function is enabled on the
interface.
NOTE
----End
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 voice-vlan remark-mode mac-address
A mode in which the priority of voice packets is increased is configured.
By default, the priority of voice packets is increased based on VLAN IDs.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run voice-vlan mac-address mac-address mask oui-mask [ description text ]
An OUI is configured for a voice VLAN.
By default, no OUI address is set.
When configuring an OUI for a voice VLAN, note the following:
● The MAC address cannot be all 0s, multicast address, or broadcast address.
● The S5720HI, S5720EI, S6720EI, and S6720S-EI support a maximum of 100
OUIs. When the switch is configured with 100 OUIs, subsequent
----End
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
The interface is configured as the hybrid interface.
Step 4 Run voice-vlan mode { auto | manual }
A mode in which an interface is added to a voice VLAN is configured.
By default, an interface is added to a voice VLAN in manual mode.
NOTE
Step 5 (Optional) Add an interface to a voice VLAN in manual mode according to 5.7.1
Configuring Interface-based VLAN Assignment (Statically Configured
Interface Type).
----End
Secu The inbound interface If the source MAC The secure mode takes
re enabled with the voice address does not effect only when the
VLAN function allows match the OUI, the voice-vlan remark-
only the voice packets interface does not mode mac-address
in which the source change the priority of command is
MAC address matches voice packets and configured to increase
the OUI address of the prevents the voice the priority of voice
voice VLAN, and packets from being packets based on MAC
discards non-voice forwarded in the voice addresses.
packets from the voice VLAN.
VLAN and forwards If the source MAC
packets from other address matches the
VLANs. OUI, the interface
changes the priority of
voice packets and
allows the voice
packets to be
forwarded in the voice
VLAN.
Nor The inbound interface If the source MAC Transmitting voice and
mal enabled with the voice address does not service data at the
VLAN function match the OUI, the same time in a voice
transmits both voice interface does not VLAN is not
packets and non-voice change the priority of recommended. If a
packets. In normal voice packets and voice VLAN must
mode, the interface is allows the voice transmit both voice
vulnerable to attacks packets to be and service data,
from malicious data forwarded in the voice ensure that the voice
traffic. VLAN. VLAN works in normal
If the source MAC mode.
address matches the
OUI, the interface
changes the priority of
voice packets and
allows the voice
packets to be
forwarded in the voice
VLAN.
Procedure
● Configuring the secure mode
a. Run system-view
The system view is displayed.
----End
Context
By default, the 802.1p priority and DSCP priority for a voice VLAN are 6 and 46
respectively. You can dynamically configure 802.1p priority and DSCP priority to
plan priorities for different voice services.
● The 802.1p priority is indicated by the value in the 3-bit PRI field in each
802.1Q VLAN frame. This field determines the transmission priority for data
packets when a switching device is congested.
● The DSCP value is indicated by the 6 bits in the Type of Service (ToS) field in
the IPv4 packet header. DSCP, as the signaling for DiffServ, is used for QoS
guarantee on IP networks. The traffic controller on the network gateway
takes actions merely based on the information carried by the 6 bits.
Procedure
Step 1 Run system-view
The 802.1p priority and DSCP priority are configured for a voice VLAN.
By default, the 802.1p priority and DSCP priority for a voice VLAN are 6 and 46
respectively.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
NOTE
----End
Context
If the VLAN ID in packets received by a switch interface is the same as the voice
VLAN ID, the switch considers the packets as voice packets and increases the
packet priority.
Procedure
Step 1 Run system-view
----End
Context
When a VLAN ID-based voice VLAN is used, the interface connected to a voice
device must be added to the voice VLAN manually so that the voice VLAN can
take effect.
Procedure
Step 1 Add an interface to a voice VLAN in manual mode according to 5.7.1 Configuring
Interface-based VLAN Assignment (Statically Configured Interface Type).
----End
The switch can encapsulate voice VLAN information into LLDPDUs and send them
to connected IP phones. However, IP phones of some vendors send Cisco Discovery
Protocol (CDP) packets. You can run the voice-vlan legacy enable command to
enable CDP-compatible function so that the switch encapsulates voice VLAN
information in CDP packets and sends them to connected IP phones.
Procedure
● Configuring the switch to advertise voice VLAN information to an IP phone
through LLDP
a. Run system-view
After LLDP is enabled in the system view, all interfaces are enabled with
LLDP.
● Configuring Cisco Discovery Protocol (CDP)-compatible Voice VLAN function
a. Run system-view
Procedure
Step 1 Run system-view
The system view is displayed.
The 802.1p priority and DSCP priority are configured for a voice VLAN.
By default, the 802.1p priority and DSCP priority for a voice VLAN are 6 and 46
respectively.
----End
Networking Requirements
As shown in Figure 9-6, the switch connects to IP phones and a PC. The switch
uses VLAN 2 to transmit voice packets and VLAN 3 to transmit data packets. PC A
connects to IP phone A and they connect to the switch, and IP phone B separately
connects to the switch. IP phones send untagged voice packets. Users require high
quality of the VoIP service; therefore, voice data flows must be transmitted with a
high priority to ensure the call quality.
Internet
GE0/0/1 GE0/0/2
IP Phone A GE0/0/1
MAC:0003-6B00-0001
Mask:ffff-ff00-0000
IP Phone C
IP Phone B
MAC:0003-6B00-0002
Mask:ffff-ff00-0000
PC A PC C
286E-D400-0001
Configuration Roadmap
Because voice and data packets received by the switch are untagged, you need to
configure OUIs to differentiate voice and data traffic. The configuration roadmap
is as follows:
1. Create VLANs on the switch and add interfaces to VLANs to implement Layer
2 connectivity.
2. Configure an OUI so that the switch adds a VLAN tag to voice packets in
which the source MAC address matches the OUI.
3. Configure VLAN 2 as the voice VLAN and configure the interface to allow
voice packets to pass through.
Procedure
Step 1 Configure VLANs and interfaces on the Switch.
# Create VLANs.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 2 3
Step 3 # Enable the voice VLAN function on GE0/0/1. The configuration of GE0/0/2 is
similar to the configuration of GE0/0/1, and is not mentioned here.
[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] voice-vlan 2 enable include-untagged
[Switch-GigabitEthernet0/0/1] voice-vlan remark-mode mac-address
[Switch-GigabitEthernet0/0/1] quit
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
voice-vlan mac-address 0003-6b00-0000 mask ffff-ff00-0000
#
vlan batch 2 to 3
#
interface GigabitEthernet0/0/1
Networking Requirements
As shown in Figure 9-7, the switch connects to IP phones and a PC. The switch
uses VLAN 2 to transmit voice packets and VLAN 3 to transmit data packets. PC A
connects to IP phone A and they connect to the switch, and IP phone B separately
connects to the switch. IP phones can obtain voice VLAN information through
LLDP and send tagged voice packets. Users require high quality of the VoIP
service; therefore, voice data flows must be transmitted with a high priority to
ensure the call quality. In addition, the administrator manages many IP phones
and requires simplified configurations.
Internet
GE0/0/1 GE0/0/2
GE0/0/1
IP Phone A
IP Phone C
IP Phone B
PC A PC C
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs on the switch and add interfaces to VLANs to implement Layer
2 connectivity.
2. Enable LLDP so that IP phones can obtain voice VLAN information through
LLDP.
3. Configure VLAN 2 as the voice VLAN and configure the interface to allow
voice packets to pass through. Configure a VLAN ID-based voice VLAN, which
relieves you from configuring OUIs.
Procedure
Step 1 Configure VLANs and interfaces on the Switch.
# Create VLANs.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 2 3
Step 3 # Enable the voice VLAN function on GE0/0/1. The configuration of GE0/0/2 is
similar to the configuration of GE0/0/1, and is not mentioned here.
[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] voice-vlan 2 enable
[Switch-GigabitEthernet0/0/1] voice-vlan remark-mode vlan
[Switch-GigabitEthernet0/0/1] quit
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 2 to 3
#
lldp enable
#
interface GigabitEthernet0/0/1
port link-type hybrid
voice-vlan 2 enable
port hybrid pvid vlan 3
port hybrid tagged vlan 2
port hybrid untagged vlan 3
#
interface GigabitEthernet0/0/2
port link-type hybrid
voice-vlan 2 enable
port hybrid tagged vlan 2
#
return
10 QinQ Configuration
Definition
QinQ expands VLAN space by adding an additional 802.1Q tag to 802.1Q tagged
packets. It allows services in a private VLAN to be transparently transmitted over a
public network. A packet transmitted on the backbone network 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 VPN technology because inner tags of QinQ packets are transparently
transmitted over a public network. It extends core MPLS VPN services to metro
Ethernet networks to establish an end-to-end VPN.
Since QinQ technology is easy to use, it has been widely applied in Internet
Service Provider (ISP) networks. For example, QinQ is combined with multiple
services in metro Ethernet solutions. Selective QinQ (VLAN stacking) makes QinQ
more popular among ISPs. As the metro Ethernet develops, equipment vendors
have developed their own metro Ethernet solutions, in which the simple and
flexible QinQ technology plays an important role.
Benefits
QinQ offers the following benefits:
● Extends the VLAN space to isolate and identify more users.
● Facilitates service deployment by allowing the inner and outer tags to
represent different information. For example, the inner tag identifies a user
and the outer tag identifies a service.
● Allows ISPs to implement refined service operation by providing diversified
encapsulation and termination modes.
VLAN 4 VLAN 3
Customer Customer
network A network B
CE1 CE2
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 in "Ethernet
Interface Configuration" in the S1720, S2700, S5700, and S6720 V200R011C10
Configuration Guide - Interface Management.
QinQ Encapsulation
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 encapsulation changes a single-tagged packet into a double-tagged packet,
and is usually performed on underlayer provider edge (UPE) interfaces connected
to customer networks.
Depending on the data encapsulated, QinQ encapsulation is applied as interface-
based or flow-based QinQ encapsulation. Additionally, QinQ encapsulation can be
performed on routed sub-interfaces.
● Interface-based QinQ encapsulation
…… Port3 ……
PE1 Port4
VLAN1000 VLAN4094 VLAN500 VLAN2500
Port1 Port2
Port3
…… ……
……
Table 10-1 shows the outer VLAN tag plan for Department 1 and Department 2.
Department 1 2 to 500 10
QinQ tunneling is configured on PE1 and PE2 in the following way to implement
communication within each department and isolate the two departments:
● Configure PE1 to add the outer VLAN 10 to packets received on Port1 and
Port2 and outer VLAN 20 to packets received on Port3.
● Configure PE2 to add the outer VLAN 20 to packets received on Port1 and
Port2.
● Configure Port4 on PE1 and Port3 on PE2 to allow packets of VLAN 20 to
pass.
Selective QinQ is an extension of basic QinQ and is more flexible. The difference is
as follows:
● Basic QinQ: adds the same outer VLAN tag to all packets arriving at a Layer 2
interface.
● Selective QinQ: adds different outer VLAN tags to packets arriving at a Layer
2 interface based on inner VLAN tags.
…… Port3 ……
PE1 Port3
……
……
……
VLAN100 VLAN500
Department 1
VLAN2 VLAN500 VLAN1000 VLAN2000
Department 1 Department 2
Internet
DeviceA
IP 10 Management VLAN 10
Interface VLANIF 10
user2
user1
VLAN 10
To log in to DeviceB and manage VLANs from DeviceA, you can configure VLAN
stacking on the VLANIF interface corresponding to the management VLAN on
DeviceB.
● If the double-tagged packets sent to the ISP network have the same outer
VLAN tags as the S-VLAN tags, the packets can be transparently transmitted
to DeviceB over the ISP network.
DeviceB enabled with QinQ stacking compares the VLAN tag of the received
packets with the VLAN tag on the VLANIF interface. If the packets have the
same outer tag as that on the VLANIF interface, DeviceB removes the outer
VLAN tag and sends the packet to the IP layer for processing.
● The VLANIF interface enabled with QinQ stacking on DeviceB adds outer
VLAN tags to received data packets. The outer VLAN tag is the same as the S-
VLAN tag. In this case, the double-tagged packets can be transparently
transmitted to DeviceA over the ISP network. After receiving the packets,
DeviceA removes the outer VLAN tag and forwards the packets to local users.
10.2.5 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 10-6 shows the Ethernet packet format defined in IEEE 802.1Q. An IEEE
802.1Q tag, containing the TPID, lies between the Source Address field and the
Length/Type field. A device checks the TPID value in a received packet to
determine whether the VLAN tag is an S-VLAN tag or C-VLAN tag. The device
compares the configured TPID value with the TPID value in the packet. For
example, if a frame carries the VLAN tag with TPID 0x8100 but the TPID
configured for a customer network on a device is 0x8200, the device considers the
frame untagged.
Carrier's systems may use different TPID values in outer VLAN tags. When a
Huawei device needs to interoperate with such a carrier system, set the TPID value
to the value used by the carrier so that QinQ packets sent from the Huawei device
can be transmitted across the carrier network. To prevent errors in packet
forwarding and processing, do not set the TPID to any of values listed in Table
10-3.
ARP 0x0806
RARP 0x8035
IP 0x0800
IPv6 0x86DD
PPPoE 0x8863/0x8864
MPLS 0x8847/0x8848
IPX/SPX 0x8137
LACP 0x8809
802.1x 0x888E
HGMP 0x88A7
Reserved 0xFFFD/0xFFFE/0xFFFF
Implementation
QinQ mapping is performed after packets are received on the inbound interface
and before packets are forwarded through the outbound interface.
● Before sending a packet from a local VLAN, a sub-interface replaces the VLAN
tag of the packet sent with a specified VLAN tag.
● After receiving a packet, a sub-interface replaces the VLAN tag of packet with
a local VLAN tag.
In real-world applications, QinQ mapping can map customer VLAN (C-VLAN) tags
to a service VLAN (S-VLAN) tag to shield different customer VLANs.
GE0/0/1.1 GE0/0/1.1
QinQ Mapping
IP 20 IP 40
Device1 Device4
PC1 PC2
172.16.0.1/24 172.16.0.7/24
Core Network
NPE NPE
VLAN 1001 VLAN 1XX
VLAN 2001 VLAN 3XX
VLAN 1000 VLAN 1XX VRRP VLAN 3001 VLAN 5XX
VLAN 2000 VLAN 3XX Metro
VLAN 3000 VLAN 5XX Ethernet
UPE
VLAN 101 VLAN 101
VLAN 301 VLAN 301
VLAN 501 VLAN 501
PVC101
PVC301
PVC501
As shown in Figure 10-8, the digital subscriber line access multiplexers (DSLAMs)
support multiple permanent virtual channels (PVCs) so that a same user can use
multiple services, such as High-Speed Internet (HSI), Internet Protocol Television
(IPTV), and voice over IP (VoIP).
The carrier assigns different PVCs and VLAN ranges to HSI, IPTV, and VoIP services,
as described in Table 10-5.
A user accesses the VoIP service. When a VoIP packet reaches a DSLAM through a
specified PVC, the DSLAM marks the packet with a VLAN in the VLAN range
mapped to the PVC, such as 301. When the VoIP packet reaches the UPE, the UPE
tags the packets with an outer VLAN ID mapping the VoIP VLAN ID range, such as
2000. The inner VLAN ID represents user information and the outer VLAN ID
represents service information and the location of the DSLAM (packets from
different DSLAMs are tagged with different outer VLAN IDs). When the packet
reaches the NPE indicated by the outer VLAN tag, the VLAN tag is terminated on
the QinQ termination sub-interface. According to the core network configuration,
the packet is forwarded on the IP network or enters the corresponding VPN.
HSI and IPTV services are processed in the same manner, except that VLAN tags of
HSI services are terminated on a broadband remote access server (BRAS).
The NPE can perform HQoS scheduling based on double tags and generate a
DHCP binding table to avoid network attacks. In addition, the NPE can implement
DHCP authentication based on double tags or other information. You can also
configure VRRP on QinQ termination sub-interfaces to ensure service reliability.
ME MPLS/IP ME
UPE NPE NPE UPE
VLAN 100 VLAN 100 VLAN 100
VLAN 200 VLAN 200 VLAN 200
VLAN 300 VLAN 300 VLAN 300
Others
Others
Finance Finance VLAN 300
VLAN 300
VLAN 100 VLAN 100
Marketing Marketing
VLAN 200 VLAN 200
The carrier uses VPLS technology on the MPLS/IP core network and QinQ
technology on the metro Ethernet network. Each site is assigned three VLANs 100,
200 and 300, which represent Finance, Marketing, and Others departments
respectively. The UPEs at two ends tag received packets with outer VLAN 1000
(different outer VLAN tags are allowed on two ends), and the same VSI is
configured on the NPEs. This configuration ensures that only users of the same
VLAN in different sites can communicate with each other.
Set the TPID value in an This configuration allows 10.8 Configuring the
outer VLAN tag a Huawei device to TPID Value in an Outer
communicate with a VLAN Tag
non-Huawei device.
Licensing Requirements
QinQ configuration commands are available only after the S1720GW, S1720GWR,
and S1720X have the license (WEB management to full management Electronic
RTU License) loaded and activated and the switches are restarted. QinQ
configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● For the points of attention when configuring QinQ on a sub-interface, see 8.4
Licensing Requirements and Limitations for VLAN Termination.
● The devices listed in Table 10-8 can add double tags to untagged packets.
Table 10-8 Products and versions supporting the function of adding double
tags to untagged packets
S5730SI V200R011C10
S5730S-EI V200R011C10
● The switch forwards packets based only on their outer VLAN tags and learns
MAC address entries based on the outer VLAN tags.
● Selective QinQ is recommended to be enabled on a hybrid interface and the
qinq vlan-translation enable command must have been executed to enable
VLAN translation. Selective QinQ can only take effect on the interface in the
inbound direction.
● When an interface configured with VLAN stacking needs to remove the outer
tag from outgoing frames, the interface must join the VLAN specified by
stack-vlan in untagged mode. If the outer VLAN does not need to be
removed, the interface must join the VLAN specified by stack-vlan in tagged
mode.
● The device configured with selective QinQ can only add an outer VLAN tag to
a frame with an inner VLAN tag on an interface, and the outer VLAN ID must
exist. Otherwise, the services where selective QinQ is configured are
unavailable.
● A VLAN bound to a BD cannot be specified as the value of stack-vlan (that is,
the outer VLAN ID added to frames) in VLAN stacking commands. Similarly, a
VLAN specified as the value of stack-vlan in VLAN stacking commands cannot
be bound to a BD.
● 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.
After selective QinQ is configured on the S3700EI, S3700SI, or S5700EI, VLAN
mapping, for example, port vlan-mapping vlan 20 map-vlan 20, must be
configured to map the VLAN to itself from which single-tagged packets need
to be transparently transmitted.
● When VLAN stacking is configured, do not configure stack-vlan to the VLAN
corresponding to the VLANIF interface.
● VLAN-based flow mirroring allows the device to identify only outer VLAN tags
of QinQ packets.
● The globally configured traffic-limit command that takes effect for all
interfaces in the inbound direction is invalid for QinQ packets.
● ND snooping and adding double tags to untagged packets can be configured
together on the S5720EI, S5720HI, S6720EI and S6720S-EI.
● SAVI and adding double tags to untagged packets can be configured together
on the S5720EI, S5720HI, S6720EI and S6720S-EI.
● If the PW-side interface is a Layer 3 interface switched by the undo
portswitch command, the AC-side interface cannot be a Layer 3 interface or
subinterface belonging to a Layer 3 interface; otherwise, traffic forwarding is
abnormal. This rule applies to S5720EI, S6720EI, and S6720S-EI.
Background
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. Private VLAN tags are used on
private networks such as enterprise networks, and public VLAN tags are used on
external networks such as ISP networks. QinQ expands VLAN space to 4094x4094
and allows packets on different private networks with the same VLAN IDs to be
transparently transmitted.
Procedure
Step 1 Run system-view
S6720SI, S6720S-SI, S5720SI, and S5720S-SI is negotiation-auto, and the link type
of an interface on other models is negotiation-desirable.
Dot1q-tunnel interfaces do not support Layer 2 multicast.
Step 6 Run port default vlan vlan-id
The VLAN ID of the public VLAN tag, that is, the default VLAN of the interface, is
configured.
By default, VLAN 1 is the default VLAN of all interfaces.
----End
Pre-configuration Tasks
Before configuring selective QinQ, create the outer VLAN.
Context
VLAN ID-based selective QinQ allows an interface to add outer VLAN tags to
packets based on VLAN IDs of the packets.
NOTE
● Selective QinQ is recommended to be enabled on a hybrid interface and the qinq vlan-
translation enable command must have been executed to enable VLAN translation.
Selective QinQ can only take effect on the interface in the inbound direction.
● The device configured with selective QinQ can only add an outer VLAN tag to a frame with
an inner VLAN tag on an interface, and the outer VLAN ID must exist. Otherwise, the
services where selective QinQ is configured are unavailable.
● When an interface configured with VLAN stacking needs to remove the outer tag from
outgoing frames, the interface must join the VLAN specified by stack-vlan in untagged
mode. If the outer VLAN does not need to be removed, the interface must join the VLAN
specified by stack-vlan in tagged mode.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
When map-vlan vlan-id4 is configured to perform VLAN stacking and VLAN mapping
concurrently, on switches other than the S5720EI, S5720HI, S6720EI, and S6720S-EI,
the same outer VLAN tag cannot be added to packets from different user VLANs. On
the S5720EI, S5720HI, S6720EI, and S6720S-EI, the same outer VLAN tag cannot be
added to packets from different user VLANs, and different inner VLAN tags in packets
from different user VLANs cannot be matched to the same VLAN tag. For example, if
packets containing VLAN IDs 10 and 20 respectively are received on an interface, the
port vlan-stacking vlan 10 stack-vlan 100 map-vlan 200 and port vlan-stacking
vlan 20 stack-vlan 100 map-vlan 200 commands cannot be configured together.
----End
Configuration Tips
Deleting QinQ configuration
Use either of the following methods to delete the selective QinQ configuration on
an interface:
● Run the undo port vlan-stacking vlan vlan-id1 [ to vlan-id2 ] [ stack-vlan
vlan-id3 ] command in the interface view to delete a selective QinQ entry on
the interface.
● Run the undo port vlan-stacking all command in the interface view to
delete all the selective QinQ entries on the interface.
NOTE
Only the S1720X, S1720X-E, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, and S6720S-
SI support this configuration.
Procedure
1. Configure a traffic classifier.
a. Run system-view
The system view is displayed.
b. Run traffic classifier classifier-name [ operator { and | or } ]
A traffic classifier is created and the traffic classifier view is displayed, or
the existing traffic classifier view is displayed.
and is the logical operator between the rules in the traffic classifier,
which means that:
▪ If the traffic classifier contains ACL rules, packets match the traffic
classifier only when they match one ACL rule and all the non-ACL
rules.
▪ If the traffic classifier does not contain any ACL rules, packets match
the traffic classifier only when they match all the rules in the
classifier.
The logical operator or means that packets match the traffic classifier as
long as they match one of rules in the classifier.
By default, the relationship between rules in a traffic classifier is OR.
c. Configure matching rules according to the following table.
Matchin Command Remarks
g Rule
d. Run quit
Exit from the traffic classifier view.
2. Configure a traffic behavior.
a. Run traffic behavior behavior-name
A traffic behavior is created and the traffic behavior view is displayed.
b. Run add-tag vlan-id vlan-id
The outer VLAN ID is specified in the traffic behavior.
You must specify an existing VLAN ID on the device in this command. You
do not need to create a VLAN specified by the original VLAN tag of a
received packet.
c. Run quit
Exit from the traffic behavior view.
d. 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.
After a traffic policy is applied, you cannot use the traffic policy
command to modify the matching order of traffic classifiers in the traffic
policy. To modify the matching order, delete the traffic policy, create a
traffic policy, and specify the matching order.
When creating a traffic policy, you can specify the matching order of its
matching rules. The matching order can be either automatic order or
configuration order:
If more than 128 ACL rules defining CAR are configured, a traffic policy must be
applied to an interface, a VLAN, and the system in sequence in the outbound
direction. In the preceding situation, if you need to update ACL rules, delete the
traffic policy from the interface, VLAN, and system and reconfigure it in
sequence.
c. Run classifier classifier-name behavior behavior-name
A traffic behavior is bound to a traffic classifier in the traffic policy.
d. Run quit
Exit from the traffic policy view.
e. Run quit
Exit from the system view.
4. Apply the traffic policy.
– Applying a traffic policy to an interface
i. Run system-view
The system view is displayed.
ii. Run interface interface-type interface-number
The interface view is displayed.
iii. Run traffic-policy policy-name { inbound | outbound }
A traffic policy is applied to the interface.
A traffic policy can be applied to only one direction on an interface,
but a traffic policy can be applied to different directions on different
interfaces. After a traffic policy is applied to an interface, the system
performs traffic policing for all the incoming or outgoing packets
that match traffic classification rules on the interface.
– Applying a traffic policy to a VLAN
i. Run system-view
The system view is displayed.
ii. Run vlan vlan-id
The VLAN view is displayed.
Context
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.
● The protocol ID configured on an interface by the qinq protocol command must be
different from other commonly used protocol IDs; otherwise, the interface cannot
distinguish packets of these protocols. For example, protocol-id cannot be set to 0x0806,
which is the ARP protocol ID.
Procedure
Step 1 Run system-view
----End
Context
To log in to a remote device from the local device to manage the remote device,
configure QinQ stacking on the VLANIF interface corresponding to the
management VLAN on the remote device. As shown in Figure 10-10, SwitchA is
connected to SwitchB through a third-party network. The management VLAN on
SwitchB is the same as the VLAN for users connected to SwitchA and is different
from the VLAN provided by the carrier.
Internet
SwitchA
10 IP Management VLAN 10
Interface VLANIF 10
user2
user1
VLAN 10
To log in to SwitchB from SwitchA, you can configure QinQ stacking on the
VLANIF interface corresponding to the management VLAN on SwitchB.
● Packet sent from SwitchA to SwitchB
The user-side interface on SwitchA configured with QinQ sends double-tagged
packets to the ISP network. The outer VLAN tag is the same as the VLAN tag
provided by the carrier so that the packets can be transparently transmitted to
SwitchB over the ISP network.
When SwitchB receives a double-tagged packet, it compares the VLAN tag of
the packet with the VLAN tag configured on the VLANIF interface. If the outer
tag of the packet is the same as the VLAN tag configured on the VLANIF
interface, SwitchB removes the outer tag and sends the packet to the IP layer
for processing.
● Packet sent from SwitchB to SwitchA
When the VLANIF interface of SwitchB receives a data packet, SwitchB adds a
VLAN tag to the packet according to the QinQ stacking configuration. The
new outer VLAN tag is the same as the VLAN tag provided by the carrier so
that the double-tagged data packet can be transparently transmitted to
SwitchA over the ISP network. SwitchA removes the outer VLAN tag of the
packet and forwards the packet.
Pre-configuration Tasks
Before configuring QinQ stacking on a VLANIF interface, complete the following
tasks:
● Create a VLAN.
● Configure a management VLAN.
Procedure
Step 1 Run system-view
Before running this command, ensure that the management VLAN exists.
NOTE
● When configuring QinQ stacking on a VLANIF interface, ensure that the VLANIF
interface corresponds to the management VLAN. VLANIF interfaces corresponding to
other VLANs do not support QinQ stacking.
● Before changing the configured outer VLAN, run the undo qinq stacking vlan
command to delete the original QinQ stacking.
● The qinq stacking vlan and icmp host-unreachable send commands cannot be used
together, so you must run the undo icmp host-unreachable send command before
using the qinq stacking vlan command.
● The outer VLAN added to packets must be an existing VLAN with no VLANIF interface
configured.
----End
Follow-up Procedure
● Run the display vlan [ vlan-id [ verbose ] ] command to check the
management VLAN.
● Run the display this command in the VLANIF interface view to check the
QinQ stacking configuration.
Context
Generally, two devices are required to add double tags to packets. Configuring one
device to add double VLAN tags to untagged packets can simplify configuration.
In addition, a Layer 2 interface can add double tags to untagged packets to
differentiate services or users.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run vlan vlan-id
The outer VLAN is created.
Step 3 Run quit
Return to the system view.
Step 4 Run interface interface-type interface-number
The interface view is displayed.
Step 5 Run port link-type hybrid
The link type of the interface is set to hybrid.
By default, the link type of an interface on the S1720GFR, S1720GW, S1720GWR,
S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2750EI, S2720EI, S5700LI, S5700S-
LI, S5720LI, S5720S-LI, S6720LI, S6720S-LI, S5710-X-LI, S5730SI, S5730S-EI,
S6720SI, S6720S-SI, S5720SI, and S5720S-SI is negotiation-auto, and the link type
of an interface on other models is negotiation-desirable.
Step 6 Run qinq vlan-translation enable
VLAN translation is enabled on the interface.
Step 7 Run port hybrid untagged vlan vlan-id
The interface is added to the outer VLAN.
Step 8 Run port vlan-stacking untagged stack-vlan vlan-id1 stack-inner-vlan vlan-id2
The interface is configured to add double VLAN tags to untagged packets.
NOTE
To enable an interface to add double VLAN tags to an untagged packet, you must set the
link type of the interface to hybrid and add the interface to the outer VLAN specified by
stack-vlan on the S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E,
S1720X-E, S2720EI, S2750EI, S5700LI, S5700S-LI, S5720LI, S5720S-LI, S6720LI, S6720S-LI,
S5710-X-LI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, and S5720S-SI. On other
devices, you need to set the link type of the interface to hybrid or trunk, and add the
interface to the outer VLAN specified by stack-vlan .
If the PVID of an interface is not VLAN 1, restore the PVID to VLAN 1 before running the
port vlan-stacking untagged command.
The port vlan-stacking untagged command actually configures a VLAN assignment mode.
On the S1720GFR, S1720GW, S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E,
S2750EI, S2720EI, S5700LI, S5700S-LI, S5720LI, S5720S-LI, S6720LI, S6720S-LI, S5710-X-LI,
S5730SI, S5730S-EI, S6720SI, S6720S-SI, S5720SI, and S5720S-SI, different VLAN assignment
modes are in the following order of priority: interface-based VLAN assignment > voice
VLAN include-untagged > MAC address-based VLAN assignment > IP subnet-based VLAN
assignment > port vlan-stacking untagged > protocol-based VLAN assignment >
interface-based VLAN assignment. On other models, different VLAN assignment modes are
in the following order of priority: policy-based VLAN assignment > voice VLAN include-
untagged > MAC address-based VLAN assignment > IP subnet-based VLAN assignment >
protocol-based VLAN assignment > interface-based VLAN assignment.
----End
Pre-configuration Tasks
Before configuring QinQ mapping, complete the following tasks:
● Connect the device correctly.
● Configure the VLANs that users belong to so that user packets carry one or
double VLAN tags.
● Ensure that the device is not a VCMP client.
Context
1-to-1 QinQ mapping allows a sub-interface to map a tag in a received single-
tagged packet to a specified tag.
Procedure
Step 1 Run system-view
Step 6 Run qinq mapping vid vlan-id1 [ to vlan-id2 ] map-vlan vid vlan-id3
The original VLAN IDs of single-tagged packets specified in the command must be
different from the outer VLAN IDs specified on all the other sub-interfaces.
NOTE
● QinQ mapping cannot be used with stacking, QinQ termination, and Dot1q termination
commands on the same sub-interface.
● If the PW-side interface is a Layer 3 interface switched by the undo portswitch
command, the AC-side interface cannot be a Layer 3 interface or subinterface belonging
to a Layer 3 interface; otherwise, traffic forwarding is abnormal. This rule applies to
S5720EI, S6720EI, and S6720S-EI.
----End
Context
2-to-1 QinQ mapping allows a sub-interface to map an outer tag in a received
double-tagged packet to a specified tag and retain the inner VLAN tag.
Procedure
Step 1 Run system-view
Step 6 Run qinq mapping pe-vid vlan-id1 ce-vid vlan-id2 [ to vlan-id3 ] map-vlan vid
vlan-id4
The original outer tag of double-tagged packets specified in the command must
be different from outer tags specified on all the other sub-interfaces.
NOTE
● QinQ mapping cannot be used with stacking, QinQ termination, and Dot1q termination
commands on the same sub-interface.
● If the PW-side interface is a Layer 3 interface switched by the undo portswitch
command, the AC-side interface cannot be a Layer 3 interface or subinterface belonging
to a Layer 3 interface; otherwise, traffic forwarding is abnormal. This rule applies to
S5720EI, S6720EI, and S6720S-EI.
----End
Context
During QinQ configuration (excluding basic QinQ configuration), VLAN translation
resources may be insufficient. You can run commands to view the total number of
inbound/outbound VLAN translation resources, the number of used VLAN
translation resources, and the number of remaining VLAN translation resources.
The command output helps you locate faults.
Procedure
Step 1 Run the display vlan-translation resource [ slot slot-number ] command in any
view to view VLAN translation resource usage.
NOTE
Only the S5720HI, S5720EI, S6720EI, and S6720S-EI support this command.
Step 2 Run the display spare-bucket resource [ slot slot-number ] command in any
view to view the usage of backup resources when VLAN translation resources
conflict.
NOTE
Only the S5720HI supports this command.
----End
Networking Requirements
As shown in Figure 10-11, there are two enterprises on the network, Enterprise 1
and Enterprise 2. Both of them have two office locations, which connect to
SwitchA and SwitchB of the ISP network. A non-Huawei device on the ISP network
uses the TPID value of 0x9100.
ISP
VLAN 100,200
TPID=0x9100
GE0/0/3 GE0/0/3
Switch A Switch B
GE0/0/1 GE0/0/2 GE0/0/1 GE0/0/2
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLAN 100 and VLAN 200 on SwitchA and SwitchB. Configure interfaces
connected to the two enterprises as QinQ interfaces and add them to VLAN
100 and VLAN 200 respectively, so that packets from the two enterprises are
tagged with different outer VLAN tags.
2. Add interfaces of SwitchA and SwitchB connected to the ISP network to VLAN
100 and VLAN 200 so that packets from the two VLANs are allowed to pass
through.
3. On the interfaces of SwitchA and SwitchB connected to the ISP network, set
the TPID in outer VLAN tags to the value used on the non-Huawei device so
that SwitchA and SwitchB can interwork with the non-Huawei device.
Procedure
Step 1 Create VLANs.
# Configure GE0/0/1 and GE0/0/2 on SwitchA as QinQ interfaces, and set the
default VLAN of GE0/0/1 to VLAN 100 and the default VLAN of GE0/0/2 to VLAN
200. The configuration of SwitchB is similar to the configuration of SwitchA, and is
not mentioned here.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type dot1q-tunnel
[SwitchA-GigabitEthernet0/0/1] port default vlan 100
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type dot1q-tunnel
[SwitchA-GigabitEthernet0/0/2] port default vlan 200
[SwitchA-GigabitEthernet0/0/2] quit
Step 3 Configure the interfaces of SwitchA and SwitchB connected to the ISP network.
# Add GE0/0/3 of 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 gigabitethernet 0/0/3
[SwitchA-GigabitEthernet0/0/3] port link-type trunk
[SwitchA-GigabitEthernet0/0/3] port trunk allow-pass vlan 100 200
[SwitchA-GigabitEthernet0/0/3] quit
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 100 200
#
interface GigabitEthernet0/0/1
port link-type dot1q-tunnel
port default vlan 100
#
interface GigabitEthernet0/0/2
port link-type dot1q-tunnel
port default vlan 200
#
interface GigabitEthernet0/0/3
qinq protocol 9100
port link-type trunk
port trunk allow-pass vlan 100 200
#
return
Related Content
Videos
Configuring QinQ
Networking Requirements
As shown in Figure 10-12, Internet access users (using PCs) and VoIP users (using
VoIP terminals) connect to the ISP network through SwitchA and SwitchB and
communicate with each other through the ISP network.
The enterprise assigns VLAN 100 to PCs and VLAN 300 to VoIP terminals. Packets
from PCs and VoIP terminals need to be transmitted over the ISP network in VLAN
2 and VLAN 3 respectively.
SwitchA SwitchB
GE0/0/2 Carrier GE0/0/2
network
GE0/0/1 GE0/0/1
PC VoIP VoIP PC
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs on SwitchA and SwitchB.
2. Configure link types of interfaces on SwitchA and SwitchB and add the
interfaces to VLANs.
3. Configure selective QinQ on interfaces of SwitchA and SwitchB.
Procedure
Step 1 Create VLANs.
# On SwitchA, create VLAN 2 and VLAN 3, that is, VLAN IDs in the outer VLAN
tags to be added.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 2 3
# On SwitchB, create VLAN 2 and VLAN 3, that is, VLAN IDs in the outer VLAN
tags to be added.
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] vlan batch 2 3
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 2 to 3
#
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid untagged vlan 2 to 3
port vlan-stacking vlan 100 stack-vlan 2
port vlan-stacking vlan 300 stack-vlan 3
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
Figure 10-13 Networking diagram for configuring selective QinQ and VLAN
mapping
ME60
Internet
Corridor
switch
…… …… …… ……
Home
gateway
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Configure SwitchA.
# Create VLANs.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 21 to 70 1101 to 1103
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 21 to 70 1101 to 1103
#
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid tagged vlan 1101 to 1103
port hybrid untagged vlan 21
port vlan-stacking vlan 101 to 150 stack-vlan 21
#
return
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid tagged vlan 101 1000 to 1103
port vlan-mapping vlan 1000 to 1100 map-vlan 101
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 101 to 150 1101 to 1103
#
return
Networking Requirements
As shown in Figure 10-14, Internet access users (using PCs) and VoIP users (using
VoIP terminals) connect to the ISP network through SwitchA and SwitchB. These
users communicate with each other through the ISP network.
Packets from PCs and VoIP terminals need to be transmitted over the ISP network
in VLAN 2 and VLAN 3 respectively.
You can configure a traffic policy to implement selective QinQ on the Switch.
NOTE
Only the S1720X, S1720X-E, S5730SI, S5730S-EI, S6720LI, S6720S-LI, S6720SI, and S6720S-
SI support this example.
SwitchA SwitchB
GE0/0/2 Carrier GE0/0/2
network
GE0/0/1 GE0/0/1
PC VoIP VoIP PC
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Create VLANs.
# On SwitchA, create VLAN 2 and VLAN 3, that is, VLAN IDs in the outer VLAN
tags to be added.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 2 3
# On SwitchB, create VLAN 2 and VLAN 3, that is, VLAN IDs in the outer VLAN
tags to be added.
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] vlan batch 2 3
Step 3 Apply the traffic policy to interfaces of SwitchA and SwitchB to implement
selective QinQ.
# Configure GE 0/0/1 on SwitchA.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type hybrid
[SwitchA-GigabitEthernet0/0/1] port hybrid untagged vlan 2 3
[SwitchA-GigabitEthernet0/0/1] traffic-policy name1 inbound
[SwitchA-GigabitEthernet0/0/1] quit
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 2 to 3
#
traffic classifier name1 operator or
if-match vlan-id 100 to 200
traffic classifier name2 operator or
if-match vlan-id 300 to 400
#
traffic behavior name1
add-tag vlan-id 2
traffic behavior name2
add-tag vlan-id 3
#
traffic policy name1
classifier name1 behavior name1
classifier name2 behavior name2
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid untagged vlan 2 to 3
traffic-policy name1 inbound
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
NOTE
● Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support this example.
● VLAN termination sub-interfaces cannot be created on a VCMP client.
GE0/0/2 GE0/0/1
PE1 PE2
GE0/0/2 GE0/0/1
GE0/0/1 P GE0/0/2
CE1 CE2
- Loopback1 - 1.1.1.1/32
- GigabitEthernet0/0 GigabitEthernet0/0 -
/2 /2.1
- Loopback1 - 3.3.3.3/32
- Loopback1 - 2.2.2.2/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a routing protocol on PE and P devices of the backbone network to
implement interworking, and enable MPLS.
2. Use the default tunnel policy to create an LSP for data transmission.
3. Enable MPLS L2VPN and create VC connections on PEs.
4. Create a sub-interface on the interface of PE1 connected to CE1, configure
VLAN mapping of a single tag on the sub-interface, and create a VC to
connect the sub-interface to the VLL network.
5. Configure a Dot1q sub-interface on the interface of PE2 connected to CE2,
and create a VC to connect the sub-interface to the VLL network.
Procedure
Step 1 Add interfaces of CEs, PEs, and P to VLANs and configure IP addresses for the
VLANIF interfaces according to Figure 10-15.
# Configure CE1 to ensure that packets sent from CE1 to PE1 carry a VLAN tag.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] vlan batch 10
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type trunk
[CE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface vlanif 10
[CE1-Vlanif10] ip address 10.10.10.1 24
[CE1-Vlanif10] quit
# Configure CE2 to ensure that packets sent from CE2 to PE2 carry a VLAN tag.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan batch 20
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type trunk
[CE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 20
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface vlanif 20
[CE2-Vlanif20] ip address 10.10.10.2 24
[CE2-Vlanif20] quit
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] vlan batch 20
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] port link-type hybrid
[PE1-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[PE1-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[PE1-GigabitEthernet0/0/2] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 10.1.1.1 24
[PE1-Vlanif20] quit
# Configure P.
<HUAWEI> system-view
[HUAWEI] sysname P
[P] vlan batch 20 30
[P] interface gigabitethernet 0/0/1
[P-GigabitEthernet0/0/1] port link-type hybrid
[P-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[P-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[P-GigabitEthernet0/0/1] quit
[P] interface gigabitethernet 0/0/2
[P-GigabitEthernet0/0/2] port link-type hybrid
[P-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[P-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[P-GigabitEthernet0/0/2] quit
[P] interface vlanif 20
[P-Vlanif20] ip address 10.1.1.2 24
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] ip address 10.2.2.2 24
[P-Vlanif30] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] vlan batch 30
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type hybrid
[PE2-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[PE2-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[PE2-GigabitEthernet0/0/1] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] ip address 10.2.2.1 24
[PE2-Vlanif30] quit
Step 2 Configure an IGP on the MPLS backbone network. OSPF is used in this example.
Configure PE1, P, and PE2 to advertise 32-bit loopback interface addresses as the
LSR IDs.
# Configure PE1.
[PE1] router id 1.1.1.1
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] quit
[PE1] ospf 1
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 10.1.1.1 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure P.
[P] router id 2.2.2.2
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.2 32
[P-LoopBack1] quit
[P] ospf 1
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[P-ospf-1-area-0.0.0.0] network 10.1.1.2 0.0.0.255
# Configure PE2.
[PE2] router id 3.3.3.3
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 3.3.3.3 32
[PE2-LoopBack1] quit
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 10.2.2.1 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# After the configuration is complete, PE1, P, and PE2 can establish OSPF neighbor
relationships. Run the display ospf peer command to verify that the OSPF
neighbor relationship status is Full. Run the display ip routing-table command to
verify that the PEs learn the route to the Loopback1 interface of each other. The
following is the display on PE1:
[PE1] display ospf peer
Step 3 Enable basic MPLS functions and MPLS LDP on the MPLS network.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] mpls
[PE1-Vlanif20] mpls ldp
[PE1-Vlanif20] quit
# Configure P.
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] mpls
[PE2-Vlanif30] mpls ldp
[PE2-Vlanif30] quit
# Configure PE2.
[PE2] mpls ldp remote-peer 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] remote-ip 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] quit
After the configuration is complete, run the display mpls ldp session command
on PE1 to view the LDP session setup. You can see that an LDP session has been
set up between PE1 and PE2.
The output on PE1 is used as an example:
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
3.3.3.3:0 Operational DU Passive 0000:00:00 2/2
------------------------------------------------------------------------------
TOTAL: 2 session(s) Found.
On PEs, check the L2VPN connections. You can see that an L2VC connection has
been set up and is in Up state.
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.10.10.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
remote-ip 3.3.3.3
#
interface Vlanif20
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
#
interface GigabitEthernet0/0/1.1
qinq mapping vid 10 map-vlan vid 20
mpls l2vc 3.3.3.3 101
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.255
#
return
● P configuration file
#
sysname P
#
router id 2.2.2.2
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
interface Vlanif20
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 10.2.2.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.2.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 10-16, CE1 and CE2 are connected to PE1 and PE2 respectively
through VLANs.
When Switch1 and Switch2 add different VLAN tags to packets, configure double-
tag VLAN mapping on PE sub-interfaces and connect the sub-interfaces to the VLL
network so that CE1 and CE2 can communicate with each other.
When a Switch is connected to multiple CEs, the Switch can add the same outer
VLAN tag to packets with different VLAN tags from different CEs, thereby saving
VLAN IDs on the public network.
NOTE
● Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support this example.
● VLAN termination sub-interfaces cannot be created on a VCMP client.
GE0/0/2 GE0/0/1
PE1 PE2
GE0/0/2 GE0/0/1
GE0/0/1 P GE0/0/2
GE0/0/2 GE0/0/2
Switch1 Switch2
GE0/0/1 GE0/0/1
GE0/0/1 GE0/0/1
CE1 CE2
- Loopback1 - 1.1.1.1/32
- GigabitEthernet0/0 GigabitEthernet0/0 -
/2 /2.1
- Loopback1 - 3.3.3.3/32
- Loopback1 - 2.2.2.2/32
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Configure the VLANs on the CE, PE, and P devices, add interfaces to the VLANs,
and assign IP addresses to the corresponding VLANIF interfaces according to
Figure 10-16.
# Configure CE1 to ensure that each packet sent from CE1 to Switch1 carries one
VLAN tag.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] vlan batch 10
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type trunk
[CE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface vlanif 10
[CE1-Vlanif10] ip address 10.10.10.1 24
[CE1-Vlanif10] quit
# Configure CE2 to ensure that each packet sent from CE2 to Switch2 carries one
VLAN tag.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan batch 10
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type trunk
[CE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface vlanif 10
[CE2-Vlanif10] ip address 10.10.10.2 24
[CE2-Vlanif10] quit
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] vlan batch 20
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] port link-type hybrid
[PE1-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[PE1-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[PE1-GigabitEthernet0/0/2] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 10.1.1.1 24
[PE1-Vlanif20] quit
# Configure P.
<HUAWEI> system-view
[HUAWEI] sysname P
[P] vlan batch 20 30
[P] interface gigabitethernet 0/0/1
[P-GigabitEthernet0/0/1] port link-type hybrid
[P-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[P-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[P-GigabitEthernet0/0/1] quit
[P] interface gigabitethernet 0/0/2
[P-GigabitEthernet0/0/2] port link-type hybrid
[P-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[P-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[P-GigabitEthernet0/0/2] quit
[P] interface vlanif 20
[P-Vlanif20] ip address 10.1.1.2 24
[P-Vlanif20] quit
[P] interface vlanif 30
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] vlan batch 30
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type hybrid
[PE2-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[PE2-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[PE2-GigabitEthernet0/0/1] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] ip address 10.2.2.1 24
[PE2-Vlanif30] quit
Step 2 Configure selective QinQ on switch interfaces and specify the VLANs allowed by
the interfaces.
# Configure Switch1.
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] vlan 100
[Switch1-vlan100] quit
[Switch1] interface gigabitethernet0/0/2
[Switch1-GigabitEthernet0/0/2] port link-type hybrid
[Switch1-GigabitEthernet0/0/2] port hybrid tagged vlan 100
[Switch1-GigabitEthernet0/0/2] quit
[Switch1] interface gigabitethernet0/0/1
[Switch1-GigabitEthernet0/0/1] port link-type hybrid
[Switch1-GigabitEthernet0/0/1] port hybrid untagged vlan 100
[Switch1-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch1-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 100
[Switch1-GigabitEthernet0/0/1] quit
# Configure Switch2.
<HUAWEI> system-view
[HUAWEI] sysname Switch2
[Switch2] vlan 200
[Switch2-vlan200] quit
[Switch2] interface gigabitethernet0/0/2
[Switch2-GigabitEthernet0/0/2] port link-type hybrid
[Switch2-GigabitEthernet0/0/2] port hybrid tagged vlan 200
[Switch2-GigabitEthernet0/0/2] quit
[Switch2] interface gigabitethernet0/0/1
[Switch2-GigabitEthernet0/0/1] port link-type hybrid
[Switch2-GigabitEthernet0/0/1] port hybrid untagged vlan 200
[Switch2-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch2-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 200
[Switch2-GigabitEthernet0/0/1] quit
Step 3 Configure an IGP on the MPLS backbone network. OSPF is used in this example.
Configure PE1, P, and PE2 to advertise 32-bit loopback interface addresses as the
LSR IDs.
# Configure PE1.
[PE1] router id 1.1.1.1
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] quit
[PE1] ospf 1
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 10.1.1.1 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure P.
[P] router id 2.2.2.2
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.2 32
[P-LoopBack1] quit
[P] ospf 1
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[P-ospf-1-area-0.0.0.0] network 10.1.1.2 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 10.2.2.2 0.0.0.255
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] quit
# Configure PE2.
[PE2] router id 3.3.3.3
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 3.3.3.3 32
[PE2-LoopBack1] quit
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 10.2.2.1 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# After the configuration is complete, PE1, P, and PE2 can establish OSPF neighbor
relationships. Run the display ospf peer command to verify that the OSPF
neighbor relationship status is Full. Run the display ip routing-table command to
verify that the PEs learn the route to the Loopback1 interface of each other. The
following is the display on PE1:
[PE1] display ospf peer
Step 4 Enable basic MPLS functions and MPLS LDP on the MPLS network.
# Configure PE1.
# Configure P.
[P] mpls lsr-id 2.2.2.2
[P] mpls
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 20
[P-Vlanif20] mpls
[P-Vlanif20] mpls ldp
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] mpls ldp
[P-Vlanif30] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] mpls
[PE2-Vlanif30] mpls ldp
[PE2-Vlanif30] quit
# Configure PE2.
[PE2] mpls ldp remote-peer 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] remote-ip 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] quit
After the configuration is complete, run the display mpls ldp session command
on PE1 to view the LDP session setup. You can see that an LDP session has been
set up between PE1 and PE2.
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
3.3.3.3:0 Operational DU Passive 0000:00:00 2/2
------------------------------------------------------------------------------
TOTAL: 2 session(s) Found.
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.10.10.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
interface Vlanif20
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 10.2.2.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.2.0 0.0.0.255
#
return
● PE2 configuration file
#
sysname PE2
#
router id 3.3.3.3
#
vcmp role silent
#
vlan batch 30
#
mpls lsr-id 3.3.3.3
mpls
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 1.1.1.1
remote-ip 1.1.1.1
#
interface Vlanif30
ip address 10.2.2.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet0/0/2
port link-type hybrid
#
interface GigabitEthernet0/0/2.1
qinq termination pe-vid 200 ce-vid 10
mpls l2vc 1.1.1.1 101
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.2.2.0 0.0.0.255
#
return
When a Switch is connected to multiple CEs, the Switch can add the same outer
VLAN tag to packets with different VLAN tags from different CEs, thereby saving
VLAN IDs on the public network.
NOTE
● Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support this example.
● VLAN termination sub-interfaces cannot be created on a VCMP client.
GE0/0/2 GE0/0/1
PE1 PE2
GE0/0/2 GE0/0/1
GE0/0/1 P GE0/0/2
GE0/0/2 GE0/0/2
Switch1 Switch2
GE0/0/1 GE0/0/1
GE0/0/1 GE0/0/1
CE1 CE2
- Loopback1 - 1.1.1.1/32
- GigabitEthernet0/0 GigabitEthernet0/0 -
/2 /2.1
- Loopback1 - 3.3.3.3/32
- Loopback1 - 2.2.2.2/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a routing protocol on PE and P devices of the backbone network to
implement interworking, and enable MPLS.
2. Use the default tunnel policy to create an LSP for data transmission.
3. Enable MPLS L2VPN and create VC connections on PEs.
4. On PE1, configure VLAN stacking on the sub-interface connected to Switch1,
and create a VC to connect the sub-interface to a VLL network.
5. On PE2, configure a QinQ sub-interface on the interface connected to
Switch2, and create a VC connect the QinQ sub-interface to a VLL network.
6. On Switch1, add the interface connected to CE1 to a specified VLAN.
7. On Switch2, configure selective QinQ on the interface connected to CE2.
Procedure
Step 1 Create VLANs on the CE, PE, and P devices, add interfaces to the VLANs, and
assign IP addresses to VLANIF interfaces according to Figure 10-17.
# Configure CE1 to ensure that each packet sent from CE1 to Switch1 carries one
VLAN tag.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] vlan batch 10
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type trunk
[CE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface vlanif 10
[CE1-Vlanif10] ip address 10.10.10.1 24
[CE1-Vlanif10] quit
# Configure CE2 to ensure that each packet sent from CE2 to Switch2 carries one
VLAN tag.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan batch 10
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type trunk
[CE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface vlanif 10
[CE2-Vlanif10] ip address 10.10.10.2 24
[CE2-Vlanif10] quit
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] vlan batch 20
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] port link-type hybrid
[PE1-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[PE1-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[PE1-GigabitEthernet0/0/2] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 10.1.1.1 24
[PE1-Vlanif20] quit
# Configure P.
<HUAWEI> system-view
[HUAWEI] sysname P
[P] vlan batch 20 30
[P] interface gigabitethernet 0/0/1
[P-GigabitEthernet0/0/1] port link-type hybrid
[P-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[P-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[P-GigabitEthernet0/0/1] quit
[P] interface gigabitethernet 0/0/2
[P-GigabitEthernet0/0/2] port link-type hybrid
[P-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[P-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[P-GigabitEthernet0/0/2] quit
[P] interface vlanif 20
[P-Vlanif20] ip address 10.1.1.2 24
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] ip address 10.2.2.2 24
[P-Vlanif30] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] vlan batch 30
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type hybrid
[PE2-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[PE2-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[PE2-GigabitEthernet0/0/1] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] ip address 10.2.2.1 24
[PE2-Vlanif30] quit
Step 2 Configure selective QinQ on switch interfaces and specify the VLANs allowed by
the interfaces.
# Configure Switch1.
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] vlan 10
[Switch1-vlan10] quit
# Configure Switch2.
<HUAWEI> system-view
[HUAWEI] sysname Switch2
[Switch2] vlan 100
[Switch2-vlan100] quit
[Switch2] interface gigabitethernet0/0/2
[Switch2-GigabitEthernet0/0/2] port link-type hybrid
[Switch2-GigabitEthernet0/0/2] port hybrid tagged vlan 100
[Switch2-GigabitEthernet0/0/2] quit
[Switch2] interface gigabitethernet0/0/1
[Switch2-GigabitEthernet0/0/1] port link-type hybrid
[Switch2-GigabitEthernet0/0/1] port hybrid untagged vlan 100
[Switch2-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch2-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 100
[Switch2-GigabitEthernet0/0/1] quit
Step 3 Configure an IGP on the MPLS backbone network. OSPF is used in this example.
Configure PE1, P, and PE2 to advertise 32-bit loopback interface addresses as the
LSR IDs.
# Configure PE1.
[PE1] router id 1.1.1.1
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] quit
[PE1] ospf 1
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 10.1.1.1 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure P.
[P] router id 2.2.2.2
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.2 32
[P-LoopBack1] quit
[P] ospf 1
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[P-ospf-1-area-0.0.0.0] network 10.1.1.2 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 10.2.2.2 0.0.0.255
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] quit
# Configure PE2.
[PE2] router id 3.3.3.3
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 3.3.3.3 32
[PE2-LoopBack1] quit
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 10.2.2.1 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# After the configuration is complete, PE1, P, and PE2 can establish OSPF neighbor
relationships. Run the display ospf peer command to verify that the OSPF
neighbor relationship status is Full. Run the display ip routing-table command to
verify that the PEs learn the route to the Loopback1 interface of each other. The
following is the display on PE1:
[PE1] display ospf peer
Step 4 Enable basic MPLS functions and MPLS LDP on the MPLS network.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] mpls
[PE1-Vlanif20] mpls ldp
[PE1-Vlanif20] quit
# Configure P.
[P] mpls lsr-id 2.2.2.2
[P] mpls
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 20
[P-Vlanif20] mpls
[P-Vlanif20] mpls ldp
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] mpls ldp
[P-Vlanif30] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] mpls
[PE2-Vlanif30] mpls ldp
[PE2-Vlanif30] quit
# Configure PE1.
[PE1] mpls ldp remote-peer 3.3.3.3
[PE1-mpls-ldp-remote-3.3.3.3] remote-ip 3.3.3.3
[PE1-mpls-ldp-remote-3.3.3.3] quit
# Configure PE2.
[PE2] mpls ldp remote-peer 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] remote-ip 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] quit
After the configuration is complete, run the display mpls ldp session command
on PE1 to view the LDP session setup. You can see that an LDP session is set up
between PE1 and PE2.
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
3.3.3.3:0 Operational DU Passive 0000:00:00 2/2
------------------------------------------------------------------------------
TOTAL: 2 session(s) Found.
Check the L2VPN connections on PEs. You can see that an L2VC connection has
been set up and is in Up state.
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.10.10.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
#
interface Vlanif20
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
#
interface GigabitEthernet0/0/1.1
qinq stacking vid 10 pe-vid 100
mpls l2vc 3.3.3.3 101
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.255
#
return
● P configuration file
#
sysname P
#
router id 2.2.2.2
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
interface Vlanif20
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 10.2.2.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.2.0 0.0.0.255
#
return
● PE2 configuration file
#
sysname PE2
#
router id 3.3.3.3
#
vcmp role silent
#
vlan batch 30
#
mpls lsr-id 3.3.3.3
mpls
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 1.1.1.1
remote-ip 1.1.1.1
#
interface Vlanif30
ip address 10.2.2.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet0/0/2.1
qinq termination pe-vid 100 ce-vid 10
mpls l2vc 1.1.1.1 101
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.2.2.0 0.0.0.255
#
return
● Switch2 configuration file
#
sysname Switch2
#
vlan batch 100
#
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid untagged vlan 100
port vlan-stacking vlan 10 stack-vlan 100
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 100
#
return
● CE2 configuration file
#
sysname CE2
#
vlan batch 10
#
interface Vlanif10
ip address 10.10.10.2 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
NOTE
● Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support this example.
● VLAN termination sub-interfaces cannot be created on a VCMP client.
GE0/0/1 GE0/0/2
PE1 PE2
GE0/0/2 GE0/0/1
GE0/0/1 P GE0/0/2
GE0/0/1 GE0/0/1
CE1 CE2
- Loopback1 - 1.1.1.1/32
- GigabitEthernet0/0 GigabitEthernet0/0 -
/2 /2.1
- Loopback1 - 3.3.3.3/32
- Loopback1 - 2.2.2.2/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a routing protocol on the backbone network to implement
interworking between devices.
2. Set up a remote LDP session between PEs.
3. Establish tunnels between PEs to transmit service data.
4. Enable MPLS L2VPN on the PEs.
5. Create a VSI on the PEs and specify LDP as the signaling protocol.
6. Configure single-tag VLAN mapping on the PE1 sub-interface connected to
CE1 and bind the sub-interface the VSI to connect it to the VPLS network.
7. Configure a Dot1q sub-interface on the interface of PE2 connected to CE2 and
bind the sub-interface to the VSI to connect it to the VPLS network.
Procedure
Step 1 Create VLANs on the CE, PE, and P devices, add interfaces to the VLANs, and
assign IP addresses to VLANIF interfaces according to Figure 10-18.
NOTE
● The AC-side and PW-side physical interfaces of a PE cannot be added to the same
VLAN; otherwise, a loop may occur.
● After the configuration is complete, the packets sent from a CE to a PE must carry a
VLAN tag.
# Configure CE1.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] vlan batch 10
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type trunk
[CE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface vlanif 10
[CE1-Vlanif10] ip address 10.1.1.1 24
[CE1-Vlanif10] quit
# Configure CE2.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan batch 20
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type trunk
[CE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 20
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface vlanif 20
[CE2-Vlanif20] ip address 10.1.1.2 24
[CE2-Vlanif20] quit
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] vlan batch 20
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] port link-type hybrid
[PE1-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[PE1-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[PE1-GigabitEthernet0/0/2] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 4.4.4.4 24
[PE1-Vlanif20] quit
# Configure P.
<HUAWEI> system-view
[HUAWEI] sysname P
[P] vlan batch 20 30
[P] interface gigabitethernet 0/0/1
[P-GigabitEthernet0/0/1] port link-type hybrid
[P-GigabitEthernet0/0/1] port hybrid pvid vlan 20
[P-GigabitEthernet0/0/1] port hybrid tagged vlan 20
[P-GigabitEthernet0/0/1] quit
[P] interface gigabitethernet 0/0/2
[P-GigabitEthernet0/0/2] port link-type hybrid
[P-GigabitEthernet0/0/2] port hybrid pvid vlan 30
[P-GigabitEthernet0/0/2] port hybrid tagged vlan 30
[P-GigabitEthernet0/0/2] quit
[P] interface vlanif 20
[P-Vlanif20] ip address 4.4.4.5 24
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] ip address 5.5.5.4 24
[P-Vlanif30] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] vlan batch 30
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type hybrid
[PE2-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[PE2-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[PE2-GigabitEthernet0/0/1] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] ip address 5.5.5.5 24
[PE2-Vlanif30] quit
# Configure P.
[P] router id 2.2.2.2
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.2 32
[P-LoopBack1] quit
[P] ospf 1
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[P-ospf-1-area-0.0.0.0] network 4.4.4.5 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 5.5.5.4 0.0.0.255
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] quit
# Configure PE2.
[PE2] router id 3.3.3.3
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 3.3.3.3 32
[PE2-LoopBack1] quit
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 5.5.5.5 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# Configure P.
[P] mpls lsr-id 2.2.2.2
[P] mpls
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 20
[P-Vlanif20] mpls
[P-Vlanif20] mpls ldp
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] mpls ldp
[P-Vlanif30] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] mpls
[PE2-Vlanif30] mpls ldp
[PE2-Vlanif30] quit
After the configuration is complete, run the display mpls ldp session command
on PE1, P, and PE2. You can see that the peer relationships are set up between PE1
and P, and between P and PE2. The status of the peer relationship is Operational.
Run the display mpls ldp command to view the MPLS LDP configuration. The
following is the display on PE1:
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
------------------------------------------------------------------------------
TOTAL: 1 session(s) Found.
# Configure PE2.
[PE2] mpls ldp remote-peer 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] remote-ip 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] quit
After the configuration is complete, run the display mpls ldp session command
on PE1 or PE2. You can see that the peer status is Operational, indicating that a
peer relationship has been set up between PE1 and PE2. The display on PE1 is
used as an example.
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
3.3.3.3:0 Operational DU Passive 0000:00:00 2/2
------------------------------------------------------------------------------
TOTAL: 2 session(s) Found.
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
# Configure PE2.
[PE2] vsi a2 static
[PE2-vsi-a2] pwsignal ldp
[PE2-vsi-a2-ldp] vsi-id 2
[PE2-vsi-a2-ldp] peer 1.1.1.1
[PE2-vsi-a2-ldp] quit
[PE2-vsi-a2] quit
# Configure PE2.
[PE2] vcmp role silent
[PE2] interface gigabitethernet0/0/2
[PE2-GigabitEthernet0/0/2] port link-type hybrid
[PE2-GigabitEthernet0/0/2] quit
[PE2] interface gigabitethernet0/0/2.1
[PE2-GigabitEthernet0/0/2.1] dot1q termination vid 20
[PE2-GigabitEthernet0/0/2.1] l2 binding vsi a2
[PE2-GigabitEthernet0/0/2.1] quit
After the configuration is complete, run the display vsi name a2 verbose
command on PE1. You can see that the VSI a2 sets up a PW to PE2 and the VSI
status is Up.
[PE1] display vsi name a2 verbose
***VSI Name : a2
Administrator VSI : no
Isolate Spoken : disable
VSI Index :0
PW Signaling : ldp
Member Discovery Style : static
PW MAC Learn Style : unqualify
Encapsulation Type : vlan
MTU : 1500
Diffserv Mode : uniform
Mpls Exp : --
DomainId : 255
Domain Name :
Ignore AcState : disable
P2P VSI : disable
Create Time : 0 days, 0 hours, 5 minutes, 1 seconds
VSI State : up
VSI ID :2
*Peer Router ID : 3.3.3.3
Negotiation-vc-id :2
primary or secondary : primary
ignore-standby-state : no
VC Label : 23552
Peer Type : dynamic
Session : up
Tunnel ID : 0x22
Broadcast Tunnel ID : 0x22
Broad BackupTunnel ID : 0x0
CKey :2
NKey :1
Stp Enable :0
PwIndex :0
Control Word : disable
**PW Information:
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
interface Vlanif20
ip address 4.4.4.5 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 5.5.5.4 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 4.4.4.0 0.0.0.255
network 5.5.5.0 0.0.0.255
#
return
● PE2 configuration file
#
sysname PE2
#
router id 3.3.3.3
#
vcmp role silent
#
vlan batch 30
#
mpls lsr-id 3.3.3.3
mpls
#
mpls l2vpn
#
vsi a2 static
pwsignal ldp
vsi-id 2
peer 1.1.1.1
#
mpls ldp
#
mpls ldp remote-peer 1.1.1.1
remote-ip 1.1.1.1
#
interface Vlanif30
ip address 5.5.5.5 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet0/0/2
port link-type hybrid
#
interface GigabitEthernet0/0/2.1
NOTE
● Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support this example.
● VLAN termination sub-interfaces cannot be created on a VCMP client.
GE0/0/2 GE0/0/2
PE1 PE2
GE0/0/1 GE0/0/1
GE0/0/1 P GE0/0/2
GE0/0/2 GE0/0/2
Switch1 Switch2
GE0/0/1 GE0/0/1
GE0/0/1 GE0/0/1
CE1 CE2
- Loopback1 - 1.1.1.1/32
- GigabitEthernet0/0 GigabitEthernet0/0 -
/2 /2.1
- Loopback1 - 3.3.3.3/32
- Loopback1 - 2.2.2.2/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a routing protocol on the backbone network to implement
interworking.
2. Configure selective QinQ on the switch interfaces connected to CEs.
3. Set up a remote LDP session between PEs.
4. Establish tunnels between PEs to transmit service data.
5. Enable MPLS L2VPN on the PEs.
6. Create a VSI on the PEs and specify LDP as the signaling protocol.
7. Configure double-tag VLAN mapping on the sub-interface connected to
Switch1 on PE1 and bind the sub-interface to the VSI to connect it to the
VPLS network.
8. Configure a QinQ sub-interface on the interface connected to Switch2 on PE2
and bind the sub-interface to the VSI to connect it to the VPLS network.
Procedure
Step 1 Create VLANs on the devices, add interfaces to the VLANs, and assign IP addresses
to VLANIF interfaces according to Figure 10-19.
NOTE
● The AC-side and PW-side physical interfaces of a PE cannot be added to the same
VLAN; otherwise, a loop may occur.
● Ensure that each packet sent from a CE to the Switch carries one VLAN tag.
# Configure CE1.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] vlan batch 10
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type trunk
[CE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface vlanif 10
[CE1-Vlanif10] ip address 10.1.1.1 24
[CE1-Vlanif10] quit
# Configure CE2.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan batch 10
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] vlan batch 20
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] port link-type hybrid
[PE1-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[PE1-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[PE1-GigabitEthernet0/0/2] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 4.4.4.4 24
[PE1-Vlanif20] quit
# Configure P.
<HUAWEI> system-view
[HUAWEI] sysname P
[P] vlan batch 20 30
[P] interface gigabitethernet 0/0/1
[P-GigabitEthernet0/0/1] port link-type hybrid
[P-GigabitEthernet0/0/1] port hybrid pvid vlan 20
[P-GigabitEthernet0/0/1] port hybrid tagged vlan 20
[P-GigabitEthernet0/0/1] quit
[P] interface gigabitethernet 0/0/2
[P-GigabitEthernet0/0/2] port link-type hybrid
[P-GigabitEthernet0/0/2] port hybrid pvid vlan 30
[P-GigabitEthernet0/0/2] port hybrid tagged vlan 30
[P-GigabitEthernet0/0/2] quit
[P] interface vlanif 20
[P-Vlanif20] ip address 4.4.4.5 24
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] ip address 5.5.5.4 24
[P-Vlanif30] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] vlan batch 30
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type hybrid
[PE2-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[PE2-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[PE2-GigabitEthernet0/0/1] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] ip address 5.5.5.5 24
[PE2-Vlanif30] quit
Step 2 Configure selective QinQ on switch interfaces and specify the VLANs allowed by
the interfaces.
# Configure Switch1.
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] vlan 100
[Switch1-vlan100] quit
[Switch1] interface gigabitethernet0/0/2
[Switch1-GigabitEthernet0/0/2] port link-type hybrid
[Switch1-GigabitEthernet0/0/2] port hybrid tagged vlan 100
[Switch1-GigabitEthernet0/0/2] quit
[Switch1] interface gigabitethernet0/0/1
[Switch1-GigabitEthernet0/0/1] port link-type hybrid
[Switch1-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch1-GigabitEthernet0/0/1] port hybrid untagged vlan 100
[Switch1-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 100
[Switch1-GigabitEthernet0/0/1] quit
# Configure Switch2.
<HUAWEI> system-view
[HUAWEI] sysname Switch2
[Switch2] vlan 200
[Switch2-vlan200] quit
[Switch2] interface gigabitethernet0/0/2
[Switch2-GigabitEthernet0/0/2] port link-type hybrid
[Switch2-GigabitEthernet0/0/2] port hybrid tagged vlan 200
[Switch2-GigabitEthernet0/0/2] quit
[Switch2] interface gigabitethernet0/0/1
[Switch2-GigabitEthernet0/0/1] port link-type hybrid
[Switch2-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch2-GigabitEthernet0/0/1] port hybrid untagged vlan 200
[Switch2-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 200
[Switch2-GigabitEthernet0/0/1] quit
Configure PE1, P, and PE2 to advertise 32-bit loopback interface addresses as the
LSR IDs.
# Configure PE1.
[PE1] router id 1.1.1.1
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] quit
[PE1] ospf 1
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure P.
[P] router id 2.2.2.2
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.2 32
[P-LoopBack1] quit
[P] ospf 1
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[P-ospf-1-area-0.0.0.0] network 4.4.4.5 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 5.5.5.4 0.0.0.255
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] quit
# Configure PE2.
[PE2] router id 3.3.3.3
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 3.3.3.3 32
[PE2-LoopBack1] quit
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 5.5.5.5 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# Configure P.
[P] mpls lsr-id 2.2.2.2
[P] mpls
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 20
[P-Vlanif20] mpls
[P-Vlanif20] mpls ldp
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] mpls ldp
[P-Vlanif30] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] mpls
[PE2-Vlanif30] mpls ldp
[PE2-Vlanif30] quit
After the configuration is complete, run the display mpls ldp session command
on PE1, P, and PE2. You can see that the peer relationships are set up between PE1
and P, and between P and PE2. The status of the peer relationship is Operational.
Run the display mpls ldp command to view the MPLS LDP configuration. The
following is the display on PE1:
# Configure PE2.
[PE2] mpls ldp remote-peer 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] remote-ip 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] quit
After the configuration is complete, run the display mpls ldp session command
on PE1 or PE2. You can see that the status of the peer relationship between PE1
and PE2 is Operational. That is, the peer relationship is set up. The display on PE1
is used as an example.
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
3.3.3.3:0 Operational DU Passive 0000:00:00 2/2
------------------------------------------------------------------------------
TOTAL: 2 session(s) Found.
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
# Configure PE2.
[PE2] vsi a2 static
[PE2-vsi-a2] pwsignal ldp
[PE2-vsi-a2-ldp] vsi-id 2
[PE2-vsi-a2-ldp] peer 1.1.1.1
[PE2-vsi-a2-ldp] quit
[PE2-vsi-a2] quit
# Configure PE2.
[PE2] vcmp role silent
[PE2] interface gigabitethernet0/0/2
[PE2-GigabitEthernet0/0/2] port link-type hybrid
[PE2-GigabitEthernet0/0/2] quit
[PE2] interface gigabitethernet0/0/2.1
[PE2-GigabitEthernet0/0/2.1] qinq termination pe-vid 200 ce-vid 10
[PE2-GigabitEthernet0/0/2.1] l2 binding vsi a2
[PE2-GigabitEthernet0/0/2.1] quit
***VSI Name : a2
Administrator VSI : no
Isolate Spoken : disable
VSI Index :0
PW Signaling : ldp
Member Discovery Style : static
PW MAC Learn Style : unqualify
Encapsulation Type : vlan
MTU : 1500
Diffserv Mode : uniform
Mpls Exp : --
DomainId : 255
Domain Name :
Ignore AcState : disable
P2P VSI : disable
Create Time : 0 days, 0 hours, 5 minutes, 1 seconds
VSI State : up
VSI ID :2
*Peer Router ID : 3.3.3.3
Negotiation-vc-id :2
primary or secondary : primary
ignore-standby-state : no
VC Label : 23552
Peer Type : dynamic
Session : up
Tunnel ID : 0x22
Broadcast Tunnel ID : 0x22
Broad BackupTunnel ID : 0x0
CKey :2
NKey :1
Stp Enable :0
PwIndex :0
Control Word : disable
**PW Information:
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
peer 3.3.3.3
#
mpls ldp
#
mpls ldp remote-peer 3.3.3.3
remote-ip 3.3.3.3
#
interface Vlanif20
ip address 4.4.4.4 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
#
interface GigabitEthernet0/0/1.1
qinq mapping pe-vid 100 ce-vid 10 map-vlan vid 200
l2 binding vsi a2
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 4.4.4.0 0.0.0.255
#
return
● P configuration file
#
sysname P
#
router id 2.2.2.2
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
interface Vlanif20
ip address 4.4.4.5 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 5.5.5.4 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 4.4.4.0 0.0.0.255
network 5.5.5.0 0.0.0.255
#
return
● PE2 configuration file
#
sysname PE2
#
router id 3.3.3.3
#
vcmp role silent
#
vlan batch 30
#
mpls lsr-id 3.3.3.3
mpls
#
mpls l2vpn
#
vsi a2 static
pwsignal ldp
vsi-id 2
peer 1.1.1.1
#
mpls ldp
#
mpls ldp remote-peer 1.1.1.1
remote-ip 1.1.1.1
#
interface Vlanif30
ip address 5.5.5.5 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet0/0/2
port link-type hybrid
#
interface GigabitEthernet0/0/2.1
qinq termination pe-vid 200 ce-vid 10
l2 binding vsi a2
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 5.5.5.0 0.0.0.255
#
return
the same VPLS network. To implement communication between CE1 and CE2, use
LDP as the VPLS signaling protocol to establish PWs and configure VPLS.
Switch1 forwards the packets sent from CE1 without changing VLAN tags of the
packets.
You are required to configure selective QinQ on the interface connected to CE2 so
that Switch2 adds the carrier-specified VLAN tag to the packets sent from CE2.
The packets sent from Switch1 to PE1 contain only one VLAN tag, and the packets
sent from Switch2 to PE2 contain two VLAN tags. In this case, you need to
configure VLAN stacking on the sub-interface of PE1 connected to Switch1 and
connect the sub-interface to the VPLS network to enable communication between
CE1 and CE2.
When a Switch is connected to multiple CEs, the Switch can add the same outer
VLAN tag to packets with different VLAN tags from different CEs, thereby saving
VLAN IDs on the public network.
NOTE
● Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support this example.
● VLAN termination sub-interfaces cannot be created on a VCMP client.
GE0/0/2 GE0/0/2
PE1 PE2
GE0/0/1 GE0/0/1
GE0/0/1 P GE0/0/2
GE0/0/2 GE0/0/2
Switch1 Switch2
GE0/0/1 GE0/0/1
GE0/0/1 GE0/0/1
CE1 CE2
- Loopback1 - 1.1.1.1/32
- GigabitEthernet0/0 GigabitEthernet0/0 -
/2 /2.1
- Loopback1 - 3.3.3.3/32
- Loopback1 - 2.2.2.2/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a routing protocol on the backbone network to implement
interworking.
2. Add the interface of Switch1 connected to CE1 to a specified VLAN.
3. Configure selective QinQ on the interface of Switch2 connected to CE2.
4. Set up a remote LDP session between PEs.
5. Establish tunnels between PEs to transmit service data.
6. Enable MPLS L2VPN on the PEs.
7. Create a VSI on the PEs and specify LDP as the signaling protocol.
8. Configure a VLAN stacking sub-interface on the interface of PE1 connected to
Switch1 and bind the sub-interface to the VSI to connect it to the VPLS
network.
9. Configure a QinQ sub-interface on the interface of PE2 connected to Switch2
and bind the sub-interface to the VSI to connect the sub-interface to the VPLS
network.
Procedure
Step 1 Create VLANs on the devices, add interfaces to the VLANs, and assign IP addresses
to VLANIF interfaces according to Figure 10-20.
NOTE
● The AC-side and PW-side physical interfaces of a PE cannot be added to the same
VLAN; otherwise, a loop may occur.
● Ensure that each packet sent from a CE to the Switch carries one VLAN tag.
# Configure CE1.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] vlan batch 10
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type trunk
[CE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface vlanif 10
[CE1-Vlanif10] ip address 10.1.1.1 24
[CE1-Vlanif10] quit
# Configure CE2.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan batch 10
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type trunk
[CE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface vlanif 10
[CE2-Vlanif10] ip address 10.1.1.2 24
[CE2-Vlanif10] quit
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] vlan batch 20
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] port link-type hybrid
[PE1-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[PE1-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[PE1-GigabitEthernet0/0/2] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 4.4.4.4 24
[PE1-Vlanif20] quit
# Configure P.
<HUAWEI> system-view
[HUAWEI] sysname P
[P] vlan batch 20 30
[P] interface gigabitethernet 0/0/1
[P-GigabitEthernet0/0/1] port link-type hybrid
[P-GigabitEthernet0/0/1] port hybrid pvid vlan 20
[P-GigabitEthernet0/0/1] port hybrid tagged vlan 20
[P-GigabitEthernet0/0/1] quit
[P] interface gigabitethernet 0/0/2
[P-GigabitEthernet0/0/2] port link-type hybrid
[P-GigabitEthernet0/0/2] port hybrid pvid vlan 30
[P-GigabitEthernet0/0/2] port hybrid tagged vlan 30
[P-GigabitEthernet0/0/2] quit
[P] interface vlanif 20
[P-Vlanif20] ip address 4.4.4.5 24
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] ip address 5.5.5.4 24
[P-Vlanif30] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] vlan batch 30
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type hybrid
[PE2-GigabitEthernet0/0/1] port hybrid pvid vlan 30
[PE2-GigabitEthernet0/0/1] port hybrid tagged vlan 30
[PE2-GigabitEthernet0/0/1] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] ip address 5.5.5.5 24
[PE2-Vlanif30] quit
Step 2 Configure selective QinQ on switch interfaces and specify the VLANs allowed by
the interfaces.
# Configure Switch1.
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] vlan 10
[Switch1-vlan10] quit
[Switch1] interface gigabitethernet0/0/2
[Switch1-GigabitEthernet0/0/2] port link-type hybrid
[Switch1-GigabitEthernet0/0/2] port hybrid tagged vlan 10
[Switch1-GigabitEthernet0/0/2] quit
[Switch1] interface gigabitethernet0/0/1
[Switch1-GigabitEthernet0/0/1] port link-type hybrid
[Switch1-GigabitEthernet0/0/1] port hybrid tagged vlan 10
[Switch1-GigabitEthernet0/0/1] quit
# Configure Switch2.
<HUAWEI> system-view
[HUAWEI] sysname Switch2
[Switch2] vlan 100
[Switch2-vlan100] quit
[Switch2] interface gigabitethernet0/0/2
[Switch2-GigabitEthernet0/0/2] port link-type hybrid
[Switch2-GigabitEthernet0/0/2] port hybrid tagged vlan 100
[Switch2-GigabitEthernet0/0/2] quit
[Switch2] interface gigabitethernet0/0/1
[Switch2-GigabitEthernet0/0/1] port link-type hybrid
[Switch2-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch2-GigabitEthernet0/0/1] port hybrid untagged vlan 100
[Switch2-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 100
[Switch2-GigabitEthernet0/0/1] quit
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure P.
[P] router id 2.2.2.2
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.2 32
[P-LoopBack1] quit
[P] ospf 1
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[P-ospf-1-area-0.0.0.0] network 4.4.4.5 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 5.5.5.4 0.0.0.255
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] quit
# Configure PE2.
[PE2] router id 3.3.3.3
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 3.3.3.3 32
[PE2-LoopBack1] quit
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 5.5.5.5 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# Configure P.
[P] mpls lsr-id 2.2.2.2
[P] mpls
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 20
[P-Vlanif20] mpls
[P-Vlanif20] mpls ldp
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] mpls ldp
[P-Vlanif30] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] mpls
[PE2-Vlanif30] mpls ldp
[PE2-Vlanif30] quit
After the configuration is complete, run the display mpls ldp session command
on PE1, P, and PE2. You can see that the peer relationships are set up between PE1
and P, and between P and PE2. The status of the peer relationship is Operational.
Run the display mpls ldp command to view the MPLS LDP configuration. The
following is the display on PE1:
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
------------------------------------------------------------------------------
TOTAL: 1 session(s) Found.
# Configure PE2.
[PE2] mpls ldp remote-peer 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] remote-ip 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] quit
After the configuration is complete, run the display mpls ldp session command
on PE1 or PE2. You can see that the peer status is Operational, indicating that a
peer relationship has been set up between PE1 and PE2. The display on PE1 is
used as an example.
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
# Configure PE2.
[PE2] vsi a2 static
[PE2-vsi-a2] pwsignal ldp
[PE2-vsi-a2-ldp] vsi-id 2
[PE2-vsi-a2-ldp] peer 1.1.1.1
[PE2-vsi-a2-ldp] quit
[PE2-vsi-a2] quit
# Configure PE2.
[PE2] vcmp role silent
[PE2] interface gigabitethernet0/0/2
[PE2-GigabitEthernet0/0/2] port link-type hybrid
[PE2-GigabitEthernet0/0/2] quit
[PE2] interface gigabitethernet0/0/2.1
[PE2-GigabitEthernet0/0/2.1] qinq termination pe-vid 100 ce-vid 10
[PE2-GigabitEthernet0/0/2.1] l2 binding vsi a2
[PE2-GigabitEthernet0/0/2.1] quit
***VSI Name : a2
Administrator VSI : no
Isolate Spoken : disable
VSI Index :0
PW Signaling : ldp
Member Discovery Style : static
PW MAC Learn Style : unqualify
Encapsulation Type : vlan
MTU : 1500
Diffserv Mode : uniform
Mpls Exp : --
DomainId : 255
Domain Name :
Ignore AcState : disable
P2P VSI : disable
Create Time : 0 days, 0 hours, 5 minutes, 1 seconds
VSI State : up
VSI ID :2
*Peer Router ID : 3.3.3.3
Negotiation-vc-id :2
primary or secondary : primary
ignore-standby-state : no
VC Label : 23552
Peer Type : dynamic
Session : up
Tunnel ID : 0x22
Broadcast Tunnel ID : 0x22
Broad BackupTunnel ID : 0x0
CKey :2
NKey :1
Stp Enable :0
PwIndex :0
Control Word : disable
**PW Information:
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
#
interface GigabitEthernet0/0/2
port link-type hybrid
#
interface GigabitEthernet0/0/2.1
qinq termination pe-vid 100 ce-vid 10
l2 binding vsi a2
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 5.5.5.0 0.0.0.255
#
return
10 IP GE0/0/2
GE0/0/1 SwitchC
user1
VLAN 10
NOTE
When configuring QinQ stacking on a VLANIF interface, ensure that the VLANIF interface
corresponds to the management VLAN. VLANIF interfaces corresponding to other VLANs do
not support QinQ stacking.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure QinQ on SwitchA.
2. Perform the following configurations on SwitchB:
a. Create VLAN 10 and configure VLAN 10 as the management VLAN.
b. Create VLANIF 10.
c. Configure QinQ stacking on a VLANIF interface.
Procedure
Step 1 Configure SwitchC.
# Configure SwitchC to allow packets from VLAN 10 to pass through GE0/0/1 and
GE0/0/2.
<HUAWEI> system-view
[HUAWEI] sysname SwitchC
[SwitchC] vlan batch 10
[SwitchC] interface gigabitethernet 0/0/1
[SwitchC-GigabitEthernet0/0/1] port link-type hybrid
[SwitchC-GigabitEthernet0/0/1] port hybrid tagged vlan 10
[SwitchC-GigabitEthernet0/0/1] quit
[SwitchC] interface gigabitethernet 0/0/2
[SwitchC-GigabitEthernet0/0/2] port link-type hybrid
[SwitchC-GigabitEthernet0/0/2] port hybrid tagged vlan 10
[SwitchC-GigabitEthernet0/0/2] quit
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 20
#
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid untagged vlan 20
port vlan-stacking vlan 10 stack-vlan 20
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 20
#
return
● SwitchC configuration file
#
sysname SwitchC
#
vlan batch 10
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 10
#
return
● SwitchB configuration file
#
sysname SwitchB
#
vlan batch 10 20
#
vlan 10
management-vlan
#
interface Vlanif10
ip address 10.10.10.1 255.255.255.0
Procedure
1. Run the display this command in the view of the interface configured with
selective QinQ to check the outer VLAN tag.
2. Run the display vlan summary command in any view to check whether the
outer VLAN has been created.
<HUAWEI> display vlan summary
Static vlan:
Total 3 static vlan.
1 9 to 10
Dynamic vlan:
Total 0 dynamic vlan.
Reserved vlan:
Total 0 reserved vlan.
– If the command output contains the outer VLAN ID, the outer VLAN has
been created. Continue to check for other common misconfigurations.
– If the command output does not contain the outer VLAN ID, the outer
VLAN is not created. Run the vlan batch command to create a VLAN and
check whether QinQ traffic can be correctly transmitted. If traffic
forwarding still fails, continue to check for other common
misconfigurations.
Procedure
1. Run the display this command in the view of the interface configured with
selective QinQ to check the outer VLAN tag.
2. Run the display vlan vlan-id command in any view to check whether the
interface configured with selective QinQ belongs to the outer VLAN. vlan-id
specifies the outer VLAN ID.
<HUAWEI> display vlan 3
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------
– If the system displays the message "Error:The VLAN does not exist.", the
outer VLAN is not created. Run the vlan batch command to create the
outer VLAN and run the display vlan vlan-id command to check whether
the interface belongs to the VLAN.
– If there is no interface configured with selective QinQ, run the port
hybrid untagged vlan vlan-id command to add the interface to the
VLAN in untagged mode.
– If the command output does not display the interface configured with
selective QinQ but the flag before the interface is not UT, run the port
hybrid untagged vlan vlan-id command to add the interface to the
VLAN in untagged mode.
– If the command output displays the interface configured with selective
QinQ and the interface has joined the VLAN in untagged mode, continue
to check for other common misconfigurations.
Definition
VLAN mapping technology changes VLAN tags in packets to map different VLANs.
Purpose
Two Layer 2 user networks in the same VLAN can be connected through a
backbone network. To ensure Layer 2 connectivity between users, and to
uniformly deploy Layer 2 protocols, the two user networks need to interwork
seamlessly. However, the backbone network cannot directly transmit VLAN packets
from the user networks, because the VLAN plans on the backbone and user
networks are different.
To solve this problem, configure VLAN mapping. When VLAN packets from a user
network enter the backbone network, an edge device on the backbone network
changes the customer VLAN (C-VLAN) ID to the service VLAN (S-VLAN ID). After
the packets are transmitted, the edge device reverts the VLAN ID change. This
ensures seamless interworking between the two user networks. The other 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.
Configuring VLAN mapping on the switch connecting the two user networks
allows a user to manage the two networks as a single Layer 2 network, despite
the differing VLAN plans of the user networks.
Working Mechanism
Depending on whether a packet is tagged or untagged, the switch processes a
received packet as follows:
● Tagged packed: Based on the VLAN mapping mode, the switch determines
whether a single tag, double tags, or the outer tag is to be replaced. The
switch then learns the MAC addresses in the packet. The switch updates the
MAC address entries in the VLAN mapping table based on the source MAC
address and mapped VLAN ID. It then searches for the MAC address entries
based on the destination MAC address and the mapped VLAN ID. If the
destination MAC address matches an entry, the switch forwards the packet
through the corresponding outbound interface. If not, the switch broadcasts
the packet in the specified VLAN.
● Untagged packet: Based on the VLAN creation mode, the switch determines
whether to add a VLAN tag. If the packet can be added to a VLAN, the switch
adds a VLAN tag to it and learns the MAC addresses. The switch then
performs Layer 2 forwarding based on the destination MAC address. If the
packet cannot be added to a VLAN, the switch either delivers the packet to
the CPU or discards it.
Figure 11-1 shows VLAN mapping between VLAN 2 and VLAN 3 configured on
PORT 1. Before sending packets from VLAN 2 to VLAN 3, PORT 1 replaces the
VLAN tags with VLAN 3 tags. When receiving packets from VLAN 3 to VLAN 2,
PORT 1 replaces the VLAN tags with VLAN 2 tags. This implements
communication between devices in VLAN 2 and VLAN 3.
VLAN 2 VLAN 3
2 3
PORT1
3
Switch Switch
A B
3
2
3
172.16.0.1/16 172.16.0.7/16
IPTV
VLAN 2 Corridor
Switch
HSI
VLAN 2->VLAN 202
Residential VLAN 3->VLAN 302
Gateway VLAN 4->VLAN 402
VLAN 3
IPTV
Residential
Gateway
VoIP
VLAN 4
In the networking diagram shown in Figure 11-2, services (HSI, IPTV, and
VoIP) of each user are transmitted on different VLANs. Same services are
transmitted on the same C-VLAN. To differentiate users, deploy Corridor
Switch to allow the same services used by different users to be transmitted on
different VLANs, which implements 1:1 VLAN mapping. 1:1 VLAN mapping
requires a large number of VLANs to isolate services of different users;
however, the VLAN quantity provided by the network access device at the
aggregation layer is limited. To resolve this problem, configure the VLAN
aggregation function to allow the same services to be transmitted on the
same VLAN (N:1 VLAN mapping).
● 2:1 VLAN mapping
When the interface receives a double-tagged packet, the interface maps the
outer VLAN tag in the packet to an S-VLAN tag and transparently transmits
the inner VLAN tag.
2:1 VLAN mapping applies to the network shown in Figure 11-3.
Internet
Aggregation Switch
Community
Switch IP 501 2~3
S5
IP 501 4
IP 201 2 ~3
S3 Corridor S4
Switch
IP 401 4
Residential
S1 Gateway S2
Switch2 Switch3
Internet
outside tag:50
inner tag:60
Switch1 Switch4
Licensing Requirements
VLAN mapping configuration commands are available only after the S1720GW,
S1720GWR, and S1720X have the license (WEB management to full management
Electronic RTU License) loaded and activated and the switches are restarted. VLAN
mapping configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements of 1:1 mode and N:1 mode for 1 to 1VLAN Mapping
S2710SI V100R006(C03&C05)
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Version Requirements of 1:1 mode and N:1 mode for 2 to 1 VLAN Mapping
S5730SI V200R011C10
NOTE
The S5730SI does not support N:1 VLAN mapping.
S5730S-EI V200R011C10
NOTE
The S5730S-EI does not support N:1 VLAN mapping.
S5730SI V200R011C10
S5730S-EI V200R011C10
Feature Limitations
● VLAN mapping can be configured only on a trunk or hybrid interface, and the
hybrid interface must be added to the translated VLAN in tagged mode.
● When N:1 VLAN mapping is configured, the interface needs to join the
original VLAN in tagged mode.
● When VLAN mapping is configured, it is not recommended that map-vlan be
configured for the VLAN corresponding to the VLANIF interface.
● If VLAN mapping and DHCP are configured on the same interface, it is
recommended to add the interface to the original VLANs (VLANs before
mapping) in tagged mode.
● N:1 VLAN mapping takes effect only when the packets with original VLANs
are sent first. In this case, if packets are sent from the S-VLAN first, the C-
VLAN to be mapped cannot be determined because no ACL entry is
generated. As a result, the packets are discarded.
● N:1 VLAN mapping is not supported in a stack scenario.
● N:1 VLAN mapping does not take effect for reverse BUM traffic.
● A VLAN bound to a BD cannot be specified as the value of map-vlan (the
outer VLAN ID in the mapped tag) in VLAN mapping commands. Similarly, a
VLAN specified as the value of map-vlan in VLAN mapping commands cannot
be bound to a BD.
Pre-configuration Tasks
Before configuring VLAN ID-based VLAN mapping, complete the following tasks:
● Create the specified VLAN.
● Add the primary interface to the mapped VLAN.
NOTE
The port vlan-mapping ingress command is only supported by S1720GFR, S1720GW,
S1720GWR, S1720X, S1720GW-E, S1720GWR-E, S1720X-E, S2750EI, S2720EI, S5700S-LI,
S5700LI, S5720LI, S5720S-LI, S6720LI, S6720S-LI, S5710-X-LI, S5730SI, S5730S-EI, S6720SI,
S6720S-SI, S5720SI, and S5720S-SI.
Pre-configuration Tasks
Before configuring 1:1 VLAN mapping, complete the following tasks:
● Create the specified VLAN.
● Add the primary interface to the translated VLAN.
Procedure
Step 1 Run system-view
The system view is displayed.
NOTE
● VLAN mapping can be configured only on a trunk or hybrid interface, and the hybrid
interface must be added to the translated VLAN in tagged mode.
● When N:1 VLAN mapping is configured (VLAN IDs can be non-contiguous before
mapping), the interface needs to be added to these VLANs in tagged mode, and the
VLAN specified by map-vlan cannot be a VLAN corresponding to a VLANIF interface.
● If VLAN mapping and DHCP are configured on the same interface, it is recommended to
add the interface to the original VLANs (VLANs before mapping) in tagged mode.
● Configuring mac-limit and N:1 VLAN mapping simultaneously causes a high CPU usage
on some low-end switches. Therefore, such configuration is not recommended.
● N:1 VLAN mapping takes effect only when the packets with original VLANs are sent
first. In this case, if packets are sent from the S-VLAN first, the C-VLAN to be mapped
cannot be determined because no ACL entry is generated. As a result, the packets are
discarded.
----End
Context
When receiving a tagged packet, an interface maps the VLAN ID in the packet to
an S-VLAN ID.
NOTE
Only the S1720X, S1720X-E, S5720HI, S5720EI, S5730SI, S5730S-EI, S6720LI, S6720S-LI,
S6720SI, S6720S-SI, S6720EI, and S6720S-EI support this configuration.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 5 Run port vlan-mapping vlan vlan-id1 inner-vlan vlan-id2 [ to vlan-id3 ] map-
vlan vlan-id4 [ remark-8021p 8021p-value ]
----End
Context
QinQ is used to send double-tagged packets, which prevents the conflict between
C-VLAN IDs and S-VLAN IDs and differentiates services and users. However, the
interface will discard the packets because C-VLAN IDs are different from S-VLAN
IDs. To ensure communication continuity, configure 2:2 VLAN mapping on the PE
and replace double C-VLAN tags with double S-VLAN tags.
NOTE
Only the S1720X, S1720X-E, S5720HI, S5720EI, S5730SI, S5730S-EI, S6720LI, S6720S-LI,
S6720SI, S6720S-SI, S6720EI, and S6720S-EI support this configuration.
Procedure
Step 1 Run system-view
Step 5 Run port vlan-mapping vlan vlan-id1 inner-vlan vlan-id2 map-vlan vlan-id3
map-inner-vlan vlan-id4 [ remark-8021p 8021p-value ]
----End
Procedure
● Run the display vlan vlan-id command to check whether the interface is
added to the translated S-VLAN.
● Run the display current-configuration command to check the VLAN
mapping configuration on the interface.
----End
Procedure
1. Configure a traffic classifier.
a. Run system-view
The system view is displayed.
b. Run traffic classifier classifier-name [ operator { and | or } ]
A traffic classifier is created and the traffic classifier view is displayed, or
an existing traffic classifier view is displayed.
and is the logical operator between the rules in the traffic classifier,
which means that:
▪ If the traffic classifier contains ACL rules, packets match the traffic
classifier only when they match one ACL rule and all the non-ACL
rules.
▪ If the traffic classifier does not contain any ACL rules, packets match
the traffic classifier only when they match all the rules in the
classifier.
The logical operator or means that packets match the traffic classifier if
they match one of the rules in the classifier.
By default, the relationship between rules in a traffic classifier is OR.
c. Configure matching rules according to the following table.
NOTE
Only the S5720EI, S6720EI, and S6720S-EI support traffic classifiers with
advanced ACLs containing the ttl-expired field.
When a traffic classifier contains if-match ipv6 acl { acl-number | acl-name },
the S5720HI does not support remark 8021p [ 8021p-value | inner-8021p ],
remark cvlan-id cvlan-id, remark vlan-id vlan-id, or mac-address learning
disable.
d. Run quit
Exit from the traffic classifier view.
2. Configure a traffic behavior.
a. Run traffic behavior behavior-name
A traffic behavior is created and the traffic behavior view is displayed.
b. Run remark vlan-id vlan-id
The traffic behavior is configured. The outer VLAN ID of the packet is re-
marked.
c. (Optional) Run remark cvlan-id vlan-id
The traffic behavior is configured. The inner VLAN ID of the packet is re-
marked.
NOTE
Only the S5720HI, S5720EI, S6720EI, and S6720S-EI support this configuration.
d. Run quit
Exit from the traffic behavior view.
e. Run quit
Exit from the system view.
3. Configure a traffic policy.
a. Run traffic policy policy-name [ match-order { auto | config } ]
A traffic policy is created and the traffic policy view is displayed, or the
view of an existing traffic policy is displayed. If you do not specify a
matching order for traffic classifiers in the traffic policy, the default
matching order config is used.
After a traffic policy is applied, you cannot use the traffic policy
command to modify the matching order of traffic classifiers in the traffic
policy. To modify the matching order, delete the traffic policy, create a
traffic policy, and specify the matching order.
When creating a traffic policy, you can specify the matching order of its
matching rules. The matching order can be either automatic order or
configuration order:
If more than 128 ACL rules defining CAR are configured, a traffic policy must be
applied to an interface, a VLAN, and the system in sequence in the outbound
direction. In the preceding situation, if you need to update ACL rules, delete the
traffic policy from the interface, VLAN, and system and reconfigure it in
sequence.
b. Run classifier classifier-name behavior behavior-name
A traffic behavior is bound to a traffic classifier in the traffic policy.
c. Run quit
Exit from the traffic policy view.
d. Run quit
Exit from the system view.
4. Apply the traffic policy.
– Applying a traffic policy to an interface
i. Run system-view
The system view is displayed.
ii. Run interface interface-type interface-number
The interface view is displayed.
iii. Run traffic-policy policy-name { inbound | outbound }
A traffic policy is applied to the interface.
A traffic policy can be applied to only one direction on an interface,
but a traffic policy can be applied to different directions on different
interfaces. After a traffic policy is applied to an interface, the system
performs traffic policing for all the incoming or outgoing packets
that match traffic classification rules on the interface.
– Applying a traffic policy to a VLAN
i. Run system-view
The system view is displayed.
ii. Run vlan vlan-id
The VLAN view is displayed.
iii. Run traffic-policy policy-name { inbound | outbound }
A traffic policy is applied to the VLAN.
Only one traffic policy can be applied to a VLAN in the inbound or
outbound direction.
After a traffic policy is applied, the system performs traffic policing
for the packets that belong to a VLAN and match traffic classification
rules in the inbound or outbound direction.
– Applying a traffic policy to the system
i. Run system-view
The system view is displayed.
ii. Run traffic-policy policy-name global { inbound | outbound } [ slot
slot-id ]
A traffic policy is applied to the system.
Only one traffic policy can be applied to the system or slot in one
direction. A traffic policy cannot be applied to the same direction in
the system and slot simultaneously.
○ In a stack, a traffic policy that is applied to the system takes
effect on all the interfaces and VLANs of all the member
switches in the stack. The system then performs traffic policing
for all the incoming and outgoing packets that match traffic
classification rules on all the member switches. A traffic policy
that is applied to a specified slot takes effect on all the
interfaces and VLANs of the member switch with the specified
stack ID. The system then performs traffic policing for all the
incoming and outgoing packets that match traffic classification
rules on this member switch.
○ On a standalone switch, a traffic policy that is applied to the
system takes effect on all the interfaces and VLANs of the local
switch. The system then performs traffic policing for all the
incoming and outgoing packets that match traffic classification
rules on the local switch. Traffic policies applied to the slot and
system have the same functions.
Context
During VLAN Mapping configuration, VLAN translation resources may be
insufficient. You can run commands to view the total number of inbound/
outbound VLAN translation resources, the number of used VLAN translation
resources, and the number of remaining VLAN translation resources. The
command output helps you locate faults.
Procedure
Step 1 Run the display vlan-translation resource [ slot slot-number ] command in any
view to view VLAN translation resource usage.
NOTE
Only the S5720HI, S5720EI, S6720EI, and S6720S-EI support this command.
Step 2 Run the display spare-bucket resource [ slot slot-number ] command in any
view to view the usage of backup resources when VLAN translation resources
conflict.
NOTE
Only the S5720HI supports this command.
----End
Community1 Community2
VLAN6 VLAN5
172.16.0.2/16 172.16.0.6/16
172.16.0.1/16 172.16.0.3/16 172.16.0.5/16 172.16.0.7/16
Configuration Roadmap
The configuration roadmap is as follows:
1. Add the switch port connecting to community 1 to VLAN6 and add the switch
port connecting to community 2 to VLAN5.
2. Configure VLAN mapping on GE0/0/1 of PE1 and PE2 and map C-VLAN IDs to
S-VLAN IDs so that users in different VLANs can communicate with each
other.
Procedure
Step 1 Add downlink interfaces on switches to specified VLANs.
# Configure CE1.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] vlan 6
[CE1-vlan6] quit
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type access
[CE1-GigabitEthernet0/0/1] port default vlan 6
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface gigabitethernet 0/0/2
[CE1-GigabitEthernet0/0/2] port link-type access
[CE1-GigabitEthernet0/0/2] port default vlan 6
[CE1-GigabitEthernet0/0/2] quit
[CE1] interface gigabitethernet 0/0/3
[CE1-GigabitEthernet0/0/3] port link-type trunk
[CE1-GigabitEthernet0/0/3] port trunk allow-pass vlan 6
[CE1-GigabitEthernet0/0/3] quit
# Configure CE2.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan 5
[CE2-vlan5] quit
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type access
[CE2-GigabitEthernet0/0/1] port default vlan 5
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface gigabitethernet 0/0/2
[CE2-GigabitEthernet0/0/2] port link-type access
[CE2-GigabitEthernet0/0/2] port default vlan 5
[CE2-GigabitEthernet0/0/2] quit
[CE2] interface gigabitethernet 0/0/3
[CE2-GigabitEthernet0/0/3] port link-type trunk
[CE2-GigabitEthernet0/0/3] port trunk allow-pass vlan 5
[CE2-GigabitEthernet0/0/3] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] vlan 10
[PE2-vlan10] quit
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type trunk
[PE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[PE2-GigabitEthernet0/0/1] qinq vlan-translation enable
[PE2-GigabitEthernet0/0/1] port vlan-mapping vlan 5 map-vlan 10
[PE2-GigabitEthernet0/0/1] quit
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 6
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 6
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 6
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 6
#
return
● CE2 configuration file
#
sysname CE2
#
vlan batch 5
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 5
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 5
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 5
#
return
● PE1 configuration file
#
sysname PE1
#
vlan batch 10
#
interface GigabitEthernet0/0/1
port link-type trunk
qinq vlan-translation enable
port trunk allow-pass vlan 10
Networking Requirements
In Figure 11-6, a large number of switches need to be deployed at the corridor so
that the same service used by different users can be sent on different VLANs. To
save VLAN resources, configure the VLAN aggregation function (N:1) on the
switches so that same services are sent on the same VLAN.
Internet
Switch GE0/0/1
VLAN100~109
SwitchA
…… …… ……
Configuration Roadmap
The configuration roadmap is as follows:
1. Create the original VLAN and the translated VLAN on the Switch and add
GE0/0/1 to the VLANs in tagged mode.
2. Configure VLAN mapping on GE0/0/1 on the Switch.
Procedure
Step 1 Configure the Switch.
# Create a VLAN.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 10 100 to 109
----End
Configuration Files
● Switch configuration file
#
sysname Switch
#
vlan batch 10 100 to 109
#
interface gigabitethernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid tagged vlan 10 100 to 109
port vlan-mapping vlan 100 to 109 map-vlan 10
#
return
Only the S1720X, S1720X-E, S5720HI, S5720EI, S5730SI, S5730S-EI, S6720LI, S6720S-LI,
S6720SI, S6720S-SI, S6720EI, and S6720S-EI support this example.
Internet
Community GE0/0/3
Switch IP 2 ~3 501
S5
GE0/0/2 GE0/0/1 IP 4 501
S1 GE0/0/4 GE0/0/4 S2
Residential
Gateway
GE
1
1
GE
/0/
GE0/0/2
GE0/0/2
/0/
0/0
0/0
0
0
GE
GE
/3
/3
Configuration Roadmap
The configuration roadmap is as follows:
1. Add switch ports connecting to users to specified VLANs to distinguish
different services.
2. Configure the QinQ function on the Corridor Switch to distinguish users and
services.
3. Configure VLAN mapping on the Community Switch to save VLAN resources.
Procedure
Step 1 Add downlink interfaces of S1 and S2 to specified VLANs.
# Configure S1.
<HUAWEI> system-view
[HUAWEI] sysname S1
[S1] vlan batch 2 to 4
[S1] interface gigabitethernet 0/0/1
[S1-GigabitEthernet0/0/1] port link-type access
[S1-GigabitEthernet0/0/1] port default vlan 2
[S1-GigabitEthernet0/0/1] quit
[S1] interface gigabitethernet 0/0/2
[S1-GigabitEthernet0/0/2] port link-type access
[S1-GigabitEthernet0/0/2] port default vlan 3
[S1-GigabitEthernet0/0/2] quit
[S1] interface gigabitethernet 0/0/3
[S1-GigabitEthernet0/0/3] port link-type access
[S1-GigabitEthernet0/0/3] port default vlan 4
[S1-GigabitEthernet0/0/3] quit
[S1] interface gigabitethernet 0/0/4
[S1-GigabitEthernet0/0/4] port link-type trunk
[S1-GigabitEthernet0/0/4] port trunk allow-pass vlan 2 to 4
[S1-GigabitEthernet0/0/4] quit
# Configure S2.
<HUAWEI> system-view
[HUAWEI] sysname S2
[S2] vlan batch 2 to 4
[S2] interface gigabitethernet 0/0/1
[S2-GigabitEthernet0/0/1] port link-type access
[S2-GigabitEthernet0/0/1] port default vlan 2
[S2-GigabitEthernet0/0/1] quit
[S2] interface gigabitethernet 0/0/2
[S2-GigabitEthernet0/0/2] port link-type access
[S2-GigabitEthernet0/0/2] port default vlan 3
[S2-GigabitEthernet0/0/2] quit
[S2] interface gigabitethernet 0/0/3
[S2-GigabitEthernet0/0/3] port link-type access
[S2-GigabitEthernet0/0/3] port default vlan 4
[S2-GigabitEthernet0/0/3] quit
[S2] interface gigabitethernet 0/0/4
[S2-GigabitEthernet0/0/4] port link-type trunk
[S2-GigabitEthernet0/0/4] port trunk allow-pass vlan 2 to 4
[S2-GigabitEthernet0/0/4] quit
Step 2 Configure the QinQ function on the Corridor Switch to allow the Corridor Switch
to send double-tagged packets to the Community Switch.
# Configure S3.
<HUAWEI> system-view
[HUAWEI] sysname S3
[S3] vlan batch 201 401
[S3] interface gigabitethernet 0/0/1
[S3-GigabitEthernet0/0/1] port link-type hybrid
[S3-GigabitEthernet0/0/1] port hybrid untagged vlan 201 401
[S3-GigabitEthernet0/0/1] qinq vlan-translation enable
[S3-GigabitEthernet0/0/1] port vlan-stacking vlan 2 to 3 stack-vlan 201
[S3-GigabitEthernet0/0/1] port vlan-stacking vlan 4 stack-vlan 401
[S3-GigabitEthernet0/0/1] quit
[S3] interface gigabitethernet 0/0/2
[S3-GigabitEthernet0/0/2] port link-type trunk
[S3-GigabitEthernet0/0/2] port trunk allow-pass vlan 201 401
[S3-GigabitEthernet0/0/2] quit
# Configure S4.
<HUAWEI> system-view
[HUAWEI] sysname S4
[S4] vlan batch 201 401
[S4] interface gigabitethernet 0/0/1
[S4-GigabitEthernet0/0/1] port link-type hybrid
[S4-GigabitEthernet0/0/1] port hybrid untagged vlan 201 401
Configuration Files
● Configuration file of S1
#
sysname S1
#
vlan batch 2 to 4
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 2
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 3
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 4
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 4
#
return
● Configuration file of S2
#
sysname S2
#
vlan batch 2 to 4
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 2
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 3
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 4
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 4
#
return
● Configuration file of S3
#
sysname S3
#
vlan batch 201 401
#
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid untagged vlan 201 401
port vlan-stacking vlan 2 to 3 stack-vlan 201
port vlan-stacking vlan 4 stack-vlan 401
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 201 401
#
return
● Configuration file of S4
#
sysname S4
#
vlan batch 201 401
#
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid untagged vlan 201 401
port vlan-stacking vlan 2 to 3 stack-vlan 201
port vlan-stacking vlan 4 stack-vlan 401
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 201 401
#
return
● Configuration file of S5
#
sysname S5
#
vlan batch 501
#
interface GigabitEthernet0/0/1
port link-type trunk
qinq vlan-translation enable
port trunk allow-pass vlan 501
port vlan-mapping vlan 201 inner-vlan 2 to 3 map-vlan
501
port vlan-mapping vlan 401 inner-vlan 4 map-vlan 501
#
interface GigabitEthernet0/0/2
port link-type trunk
qinq vlan-translation enable
port trunk allow-pass vlan 501
port vlan-mapping vlan 201 inner-vlan 2 to 3 map-vlan
501
port vlan-mapping vlan 401 inner-vlan 4 map-vlan 501
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 501
#
return
Only the S1720X, S1720X-E, S5720HI, S5720EI, S5730SI, S5730S-EI, S6720LI, S6720S-LI,
S6720SI, S6720S-SI, S6720EI, and S6720S-EI support this example.
QinQ is used to send double-tagged packets, which prevents the conflict between
C-VLAN IDs and S-VLAN IDs and differentiates services and users. However, the
interface will discard the packets because C-VLAN IDs are different from S-VLAN
IDs. To ensure communication continuity, configure 2:2 VLAN mapping on the PE
and replace double C-VLAN tags with double S-VLAN tags.
In Figure 11-8, users send double-tagged packets to the ISP network. These
packets cannot be sent successfully because the VLAN IDs are different from the
S-VLAN IDs. To solve this problem, ensure that the users of the Switch5 and
Switch6 can communicate.
Switch2 Switch3
ISP
outside tag:50
inner tag:60
GE0/0/1 GE0/0/1
GE0/0/2 GE0/0/2
Switch1 Switch4
GE0/0/1 GE0/0/1
GE0/0/2
GE0/0/2
Switch5 Switch6
GE0/0/1 GE0/0/1
VLAN 10 VLAN 30
VLAN Mapping
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Add downlink interfaces on switches to specified VLANs.
# Configure Switch5.
<HUAWEI> system-view
[HUAWEI] sysname Switch5
[Switch5] vlan 10
[Switch5-vlan10] quit
[Switch5] interface gigabitethernet 0/0/1
[Switch5-GigabitEthernet0/0/1] port link-type access
[Switch5-GigabitEthernet0/0/1] port default vlan 10
[Switch5-GigabitEthernet0/0/1] quit
[Switch5] interface gigabitethernet 0/0/2
[Switch5-GigabitEthernet0/0/2] port link-type trunk
[Switch5-GigabitEthernet0/0/2] port trunk allow-pass vlan 10
# Configure Switch6.
<HUAWEI> system-view
[HUAWEI] sysname Switch6
[Switch6] vlan 30
[Switch6-vlan30] quit
[Switch6] interface gigabitethernet 0/0/1
[Switch6-GigabitEthernet0/0/1] port link-type access
[Switch6-GigabitEthernet0/0/1] port default vlan 30
[Switch6-GigabitEthernet0/0/1] quit
[Switch6] interface gigabitethernet 0/0/2
[Switch6-GigabitEthernet0/0/2] port link-type trunk
[Switch6-GigabitEthernet0/0/2] port trunk allow-pass vlan 30
Step 2 Configure the QinQ function on Switch1 and Switch4 so that packets sent to the
ISP network are double-tagged.
# Configure Switch 1.
<HUAWEI> system-view
[HUAWEI] sysname Switch1
[Switch1] vlan 20
[Switch1-vlan20] quit
[Switch1] interface gigabitethernet 0/0/1
[Switch1-GigabitEthernet0/0/1] port link-type hybrid
[Switch1-GigabitEthernet0/0/1] port hybrid untagged vlan 20
[Switch1-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch1-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 20
[Switch1-GigabitEthernet0/0/1] quit
[Switch1] interface gigabitethernet 0/0/2
[Switch1-GigabitEthernet0/0/2] port link-type trunk
[Switch1-GigabitEthernet0/0/2] port trunk allow-pass vlan 20
[Switch1-GigabitEthernet0/0/2] quit
# Configure Switch 4.
<HUAWEI> system-view
[HUAWEI] sysname Switch4
[Switch4] vlan 40
[Switch4-vlan40] quit
[Switch4] interface gigabitethernet 0/0/1
[Switch4-GigabitEthernet0/0/1] port link-type hybrid
[Switch4-GigabitEthernet0/0/1] port hybrid untagged vlan 40
[Switch4-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch4-GigabitEthernet0/0/1] port vlan-stacking vlan 30 stack-vlan 40
[Switch4-GigabitEthernet0/0/1] quit
[Switch4] interface gigabitethernet 0/0/2
[Switch4-GigabitEthernet0/0/2] port link-type trunk
[Switch4-GigabitEthernet0/0/2] port trunk allow-pass vlan 40
[Switch4-GigabitEthernet0/0/2] quit
Step 3 Configure 2:2 VLAN mapping on switches connected to the ISP network.
# Configure Switch2.
<HUAWEI> system-view
[HUAWEI] sysname Switch2
[Switch2] interface gigabitethernet 0/0/1
[Switch2-GigabitEthernet0/0/1] port link-type hybrid
[Switch2-GigabitEthernet0/0/1] port hybrid tagged vlan 50
[Switch2-GigabitEthernet0/0/1] qinq vlan-translation enable
[Switch2-GigabitEthernet0/0/1] port vlan-mapping vlan 20 inner-vlan 10 map-vlan 50 map-inner-vlan
60
# Configure Switch3.
<HUAWEI> system-view
[HUAWEI] sysname Switch3
[Switch3] interface gigabitethernet 0/0/1
[Switch3-GigabitEthernet0/0/1] port link-type hybrid
[Switch3-GigabitEthernet0/0/1] port hybrid tagged vlan 50
Verify that users connected to Switch5 and users connected to Switch6 can
communicate with each other.
----End
Configuration Files
● Switch1 configuration file
#
sysname Switch1
#
vlan batch 20
#
interface GigabitEthernet0/0/1
port link-type hybrid
qinq vlan-translation enable
port hybrid untagged vlan 20
port vlan-stacking vlan 10 stack-vlan 20
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
return
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
return
ISP network
VLAN10
SwitchC SwitchD
GE0/0/1 GE0/0/1
SwitchA SwitchB
VLAN6 GE0/0/1 GE0/0/1 VLAN5
GE0/0/2 GE0/0/3 GE0/0/3
GE0/0/2
Procedure
1. In the user view, run the display vlan command to verify that the translated
VLAN (map-vlan) is created.
– If the translated VLAN has not been created, run the vlan command to
create it.
– If the translated VLAN is created, go to the next step.
2. In the interface view, run the display this command to verify that the
interfaces configured with VLAN mapping have been added to the translated
VLAN in tagged mode.
NOTE
● VLAN mapping can be configured only on a trunk or hybrid interface, and the hybrid
interface must be added to the translated VLAN in tagged mode.
● If a range of original VLANs is specified by vlan-id1 to vlan-id2 on an interface, the
interface must be added to all the original VLANs in tagged mode, and the translated
VLAN cannot have a VLANIF interface.
● Limiting MAC address learning on an interface may affect N:1 VLAN mapping on the
interface.
– If the interfaces configured with VLAN mapping have not been added to
the translated VLAN in tagged mode, run the port trunk allow-pass vlan
or port hybrid tagged vlan command in the interface view to add the
interfaces to the translated VLAN in tagged mode.
– If the interfaces have been added to the translated VLAN in tagged
mode, go to the next step.
3. In the interface view, run the display this command to verify that the
translated VLAN ID configured on the interface is the same as the S-VLAN ID
assigned by the carrier.
– If the translated VLAN ID on an interface is different from the S-VLAN ID
assigned by the carrier, run the undo port vlan-mapping command on
the interface to delete the VLAN mapping configuration, and run the
port vlan-mapping vlan command to set the translated VLAN ID to the
S-VLAN ID.
– If the translated VLAN ID is the same as the S-VLAN ID assigned by the
carrier, go to the next step.
4. In the user view, run the display vlan vlan-id command to verify that user-
side interfaces are added to C-VLANs.
If the user-side interfaces are not in the C-VLANs, run the port trunk allow-
pass vlan, port hybrid tagged vlan, or port default vlan command to add
the interfaces to the C-VLANs.
12 GVRP Configuration
This chapter describes how to configure the Generic VLAN Registration Protocol
(GVRP).
Definition
The Generic Attribute Registration Protocol (GARP) provides a mechanism for
propagating attributes so that a protocol entity can register and deregister
attributes. By filling different attributes into GARP packets, GARP supports various
upper-layer applications.
The GARP VLAN Registration Protocol (GVRP) is used to register and deregister
VLAN attributes.
GARP identifies applications through destination MAC addresses. IEEE Std 802.1Q
assigns 01-80-C2-00-00-21 to the VLAN application (GVRP).
Purpose
To deploy a VLAN on all devices on a network, a network administrator must
manually create it on each device. In Figure 12-1, three routers are connected
through trunk links. VLAN 2 is configured on SwitchA, and VLAN 1 is configured
on SwitchB and SwitchC. To forward packets of VLAN 2 from SwitchA to SwitchC,
the network administrator must manually create VLAN 2 on SwitchB and SwitchC.
SwitchB
When a network is complex and the network administrator is unfamiliar with the
network topology, or when many VLANs are configured on the network, the
manual configuration workload is enormous. In addition, configuration errors may
occur due to human error. GVRP can be configured on the network to implement
automatic registration of VLANs, reducing configuration workload and the
likelihood of configuration errors.
Benefits
GVRP is based on GARP. It dynamically maintains VLAN attributes on devices.
Using 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 the workload of the network
administrator and helping to ensure correct configuration.
Participant
On a device, each interface running a protocol is a participant. On a device
running GVRP, each GVRP-enabled interface is treated as a GVRP participant, as
shown in Figure 12-2.
SwitchA SwitchC
SwitchB
GARP Messages
GARP participants exchange VLAN information through GARP messages. Major
GARP messages are Join messages, Leave messages, and LeaveAll messages.
● Join message
When a GARP participant expects other devices to register its attributes, it
sends Join messages to other devices. When the GARP participant receives a
GARP Timers
GARP defines four timers:
● Join timer
The Join timer controls the sending of Join messages including JoinIn
messages and JoinEmpty messages.
After sending the first Join message, a participant starts the Join timer. If the
participant receives a JoinIn message before the Join timer expires, it does not
send a second Join message. If the participant does not receive any JoinIn
message, it sends a second Join message when the Join timer expires. This
ensures that Join messages can be sent to other participants. Each interface
maintains an independent Join timer.
● Hold timer
The Hold timer controls the sending of Join messages (JoinIn messages and
JoinEmpty messages) and Leave messages (LeaveIn messages and
LeaveEmpty messages).
After a participant is configured with an attribute or receives a message, it
sends the message to other participants only after the Hold timer expires. The
participant encapsulates messages received within the hold time into a
minimum number of packets, reducing the number of packets sent to other
participants. If the participant does not use the Hold timer but forwards a
message immediately after receiving it, a large number of packets are
transmitted on the network. This makes the network unstable and wastes
data fields of packets.
Each interface maintains an independent Hold timer. The Hold timer value
must be equal to or smaller than half of the Join timer value.
● Leave timer
The Leave timer controls attribute deregistration.
A participant starts the Leave timer after receiving a Leave or LeaveAll
message. If the participant does not receive any Join message of the
corresponding attribute before the Leave timer expires, the participant
deregisters the attribute.
A participant sends a Leave message if one of its attributes is deleted, but the
attribute may still exist on other participants. Therefore, the participant
receiving the Leave message cannot deregister the attribute immediately; it
must wait for messages from other participants.
For example, an attribute has two sources on the network: participant A and
participant B. Other participants register the attribute through GARP. If the
attribute is deleted from participant A, participant A sends a Leave message
to other participants. After receiving the Leave message, participant B sends a
Join message to other participants because the attribute still exists on
participant B. After receiving the Join message from participant B, other
participants retain the attribute. Other participants deregister the attribute
only if they do not receive any Join message of the attribute within a period
longer than two times the Join timer value. Therefore, the Leave timer value
must be greater than two times the Join timer value.
Each interface maintains an independent Leave timer.
● LeaveAll timer
When a GARP participant starts, it starts the LeaveAll timer. When the
LeaveAll timer expires, the participant sends a LeaveAll message and restarts
the LeaveAll timer.
After receiving a LeaveAll message, a participant restarts all GARP timers.
When its LeaveAll timer expires, the participant sends another LeaveAll
message. This reduces the number of LeaveAll messages sent within a period
of time.
If the LeaveAll timers of multiple devices expire simultaneously, they send
LeaveAll messages simultaneously, leading to an unnecessary generation of
LeaveAll messages. To solve this problem, each device uses a random value
between the LeaveAll timer value and 1.5 times the LeaveAll timer value as
its LeaveAll timer value. When a LeaveAll event occurs, all attributes on the
entire network are deregistered. The LeaveAll event affects the entire
network; therefore, the LeaveAll timer must be set to a value which is greater
than the Leave timer value.
Each device maintains a global LeaveAll timer.
Registration Modes
A manually configured VLAN is a static VLAN, and a VLAN created through GVRP
is a dynamic VLAN. GVRP provides three registration modes. Static VLANs and
dynamic VLANs are processed differently in each registration mode:
● In normal mode, dynamic VLANs can be registered on interfaces, and
interfaces can send declarations of static VLANs and dynamic VLANs.
GARP packets are encapsulated in the IEEE 802.3 Ethernet format, as shown in
Figure 12-4.
1 3 N
1 2 N
1 N
1 2 3 N
One-Way Registration
Port 2 Port 3
SwitchB
Static VLAN 2 is created on SwitchA. Ports on SwitchB and SwitchC can join VLAN
2 automatically through one-way registration. The process is as follows:
1. After VLAN 2 is created on SwitchA, Port 1 of SwitchA starts the Join timer
and Hold timer. When the Hold timer expires, Port 1 sends the first JoinEmpty
message to SwitchB. When the Join timer expires, Port 1 restarts the Hold
timer. When the Hold timer expires again, Port 1 sends the second JoinEmpty
message.
2. After Port 2 of SwitchB receives the first JoinEmpty message, SwitchB creates
dynamic VLAN 2 and adds Port 2 to VLAN 2. In addition, SwitchB requests
Port 3 to start the Join timer and Hold timer. When the Hold timer expires,
Port 3 sends the first JoinEmpty message to SwitchC. When the Join timer
expires, Port 3 restarts the Hold timer. When the Hold timer expires again,
Port 3 sends the second JoinEmpty message. After Port 2 receives the second
JoinEmpty message, SwitchB does not take any action because Port 2 has
been added to VLAN 2.
3. After Port 4 of SwitchC receives the first JoinEmpty message, SwitchC creates
dynamic VLAN 2 and adds Port 4 to VLAN 2. After Port 4 receives the second
JoinEmpty message, SwitchC does not take any action because Port 4 has
been added to VLAN 2.
4. Every time the LeaveAll timer expires or a LeaveAll message is received, each
switch restarts the LeaveAll, Join, Hold, and Leave timers. Port 1 then repeats
step 1 and sends JoinEmpty messages. In the same way, Port 3 of SwitchB
sends JoinEmpty messages to SwitchC.
Two-Way Registration
SwitchB
After one-way registration is complete, Port 1, Port 2, and Port 4 are added to
VLAN 2 but Port 3 is not added to VLAN 2 because only interfaces receiving a
JoinEmpty or JoinIn message can be added to dynamic VLANs. To transmit traffic
of VLAN 2 in both directions, VLAN registration from SwitchC to SwitchA is
required. The process is as follows:
1. After one-way registration is complete, static VLAN 2 is created on SwitchC
(the dynamic VLAN is replaced by the static VLAN). Port 4 of SwitchC starts
the Join timer and Hold timer. When the Hold timer expires, Port 4 sends the
first JoinIn message (because it has registered VLAN 2) to SwitchB. When the
Join timer expires, Port 4 restarts the Hold timer. When the Hold timer
expires, Port 4 sends the second JoinIn message.
2. After Port 3 of SwitchB receives the first JoinIn message, SwitchB adds Port 3
to VLAN 2 and requests Port 2 to start the Join timer and Hold timer. When
the Hold timer expires, Port 2 sends the first JoinIn message to SwitchA. When
the Join timer expires, Port 2 restarts the Hold timer. When the Hold timer
expires again, Port 2 sends the second JoinIn message. After Port 3 receives
the second JoinIn message, SwitchB does not take any action because Port 3
has been added to VLAN 2.
3. 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, each switch restarts the LeaveAll timer, Join timer, Hold
timer, and Leave timer. Port 1 of SwitchA sends a JoinIn message to SwitchB
when the Hold timer expires.
4. SwitchB sends a JoinIn message to SwitchC.
5. After receiving the JoinIn message, SwitchC does not create dynamic VLAN 2
because static VLAN 2 has been created.
One-Way Deregistration
LeaveIn
Port 2 Port 3
SwitchB
When VLAN 2 is not required on the switches, the switches can deregister VLAN 2.
The process is as follows:
1. After static VLAN 2 is manually deleted from SwitchA, Port 1 of SwitchA starts
the Hold timer. When the Hold timer expires, Port 1 sends a LeaveEmpty
message to SwitchB. Port 1 needs to send only one LeaveEmpty message.
2. After Port 2 of SwitchB receives the LeaveEmpty message, it starts the Leave
timer. When the Leave timer expires, Port 2 deregisters VLAN 2. Then Port 2 is
deleted from VLAN 2, but VLAN 2 is not deleted from SwitchB because Port 3
is still in VLAN 2. At this time, SwitchB requests Port 3 to start the Hold timer
and Leave timer. When the Hold timer expires, Port 3 sends a LeaveIn
message to SwitchC. Static VLAN 2 is not deleted from SwitchC; therefore,
Port 3 can receive the JoinIn message sent from Port 4 after the Leave timer
expires. In this case, SwitchA and SwitchB can still learn dynamic VLAN 2.
3. After SwitchC receives the LeaveIn message, Port 4 is not deleted from VLAN
2 because VLAN 2 is a static VLAN on SwitchC.
Two-Way Deregistration
LeaveEmpty Port 4
LeaveEmpty
Port 1
LeaveEmpty LeaveIn
Port 2 Port 3
SwitchB
To delete VLAN 2 from all the switches, two-way deregistration is required. The
process is as follows:
1. After static VLAN 2 is manually deleted from SwitchC, Port 4 of SwitchC starts
the Hold timer. When the Hold timer expires, Port 4 sends a LeaveEmpty
message to SwitchB.
2. After Port 3 of SwitchB receives the LeaveEmpty message, it starts the Leave
timer. When the Leave timer expires, Port 3 deregisters VLAN 2. Then Port 3 is
deleted from dynamic VLAN 2, and dynamic VLAN 2 is deleted from SwitchB.
At this time, SwitchB requests Port 2 to start the Hold timer. When the Hold
timer expires, Port 2 sends a LeaveEmpty message to SwitchA.
3. After Port 1 of SwitchA receives the LeaveEmpty message, it starts the Leave
timer. When the Leave timer expires, Port 1 deregisters VLAN 2. Then Port 1 is
deleted from dynamic VLAN 2, and dynamic VLAN 2 is deleted from SwitchA.
SwitchA SwitchC
VLAN 100~1000 VLAN 100~1000
Licensing Requirements
GVRP configuration commands are available only after the S1720GW, S1720GWR,
and S1720X have the license (WEB management to full management Electronic
RTU License) loaded and activated and the switches are restarted. GVRP
configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see 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 12-2 Relationship between GARP timer values and number of dynamic
VLANs that need to be registered
Context
Before enabling GVRP on an interface, you must enable GVRP globally. GVRP can
be enabled only on trunk interfaces. You must perform related configurations to
ensure that all dynamically registered VLANs can pass the trunk interfaces.
NOTE
If the VCMP role is the client or server, GVRP cannot be enabled. In this case, run the vcmp role
command to configure the VCMP role as silent or transparent. If GVRP has been enabled, do
not switch the VCMP role to client or server.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run gvrp
GVRP is enabled globally.
Step 3 Run interface interface-type interface-number
The interface view is displayed.
Step 4 Run port link-type trunk
The link type of the interface is set to trunk.
Step 5 Run port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all }
The interface is added to the specified VLANs.
Step 6 Run gvrp
GVRP is enabled on the interface.
By default, GVRP is disabled globally and on each interface.
NOTE
● VLAN configuration will trigger GVRP messages. If too many VLANs are configured, you
are advised to configure VLANs on devices one by one and configure the timer.
Otherwise, dynamic VLANs may flap.
● When many dynamically registered VLANs such as 4094 VLANs are configured, run the
car packet-type gvrp cir cir-value command to increase the CPCAR value. To prevent a
high load on the CPU, the CPCAR cannot be increased infinitely. If the CPCAR values are
adjusted improperly, network services are affected. To adjust the CPCAR values, contact
technical support personnel.
● If an interface is changed to another link type, such as access, hybrid, negotiation-
desirable, or negotiation-auto, the GVRP configuration on the interface is automatically
deleted.
● The blocked interface in instance 0 of STP/RSTP/MSTP can block GVRP packets. The
blocked interfaces of other MSTIs and other ring network protocols such as ERPS, SEP,
RRPP, Smart Link, and VBST cannot block GVRP packets. To ensure that GVRP runs
normally and to prevent GVRP loops, do not enable GVRP on the blocked interface of a
ring network protocol.
● The blocked ports of LBDT cannot block GVRP packets. To ensure that GVRP runs
normally and prevent GVRP loops, do not enable GVRP on the blocked port of LBDT.
----End
Context
A GVRP interface supports three registration modes:
● Normal: In this mode, the GVRP interface can dynamically register and
deregister VLANs, as well as transmit dynamic VLAN registration information
and static VLAN registration information.
● Fixed: In this mode, the GVRP interface is disabled from dynamically
registering and deregistering VLANs and can only transmit the static VLAN
registration information. If the registration mode is set to fixed for a trunk
interface, the interface allows only the manually configured VLANs to pass,
even if the interface is configured to allow all the VLANs to pass.
● Forbidden: In this mode, the GVRP interface is disabled from dynamically
registering and deregistering VLANs and can transmit only information about
VLAN 1. If the registration mode is set to forbidden for a trunk interface, the
interface allows only VLAN 1 to pass even if the interface is configured to
allow all the VLANs to pass.
Procedure
Step 1 Run system-view
NOTE
Before setting the registration mode for an interface, enable GVRP on the interface.
----End
Context
When a GARP participant is enabled, the LeaveAll timer starts. When the LeaveAll
timer expires, the GARP participant sends LeaveAll messages to request that other
GARP participants re-register all of their attributes. The LeaveAll timer then
restarts.
Devices on a network may have different LeaveAll timer settings. In this case, all
the devices use the smallest LeaveAll timer value on the network. When the
LeaveAll timer of a device expires, the device sends LeaveAll messages to other
devices. After other devices receive the LeaveAll messages, they reset their
LeaveAll timers. Therefore, only the LeaveAll timer with the smallest value takes
effect, even if devices have different LeaveAll timer settings.
When using the garp timer command to set GARP timers, pay attention to the
following points:
● The undo garp timer command restores the default values of GARP timers. If
the default value of a timer is out of the valid range, the undo garp timer
command does not take effect.
● The value range of each timer changes along with the values of the other
timers. If a value you set for a timer is not in the allowed range, you can
change the value of the timer that determines the value range of this timer.
● To restore the default values of all the GARP timers, restore the Hold timer to
the default value, and then sequentially restore the Join timer, Leave timer,
and LeaveAll timer to the default values.
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 12-3 Relationship between GARP timer values and number of dynamic
VLANs that need to be registered
Procedure
Step 1 Run system-view
The default value of the LeaveAll timer is 1000 centiseconds (10 seconds).
The Leave timer length on an interface is restricted by the global LeaveAll timer
length. When configuring the global LeaveAll timer, ensure that all the interfaces
configured with a GARP Leave timer are working properly.
The value of the Hold timer, Join timer, or Leave timer is set.
By default, the value of the Hold timer is 10 centiseconds, the value of the Join
timer is 20 centiseconds, and the value of the Leave timer is 60 centiseconds.
----End
Procedure
● Run the display gvrp status command to view the status of global GVRP.
● Run the display gvrp statistics [ interface { interface-type interface-number
[ to interface-type interface-number ] }&<1-10> ] command to view the
GVRP statistics on an interface.
● Run the display garp timer [ interface { interface-type interface-number [ to
interface-type interface-number ] }&<1-10> ] command to view the values of
the GARP timers.
----End
Context
NOTICE
Cleared GVRP statistics cannot be restored. Exercise caution when you run this
command.
Procedure
Step 1 Run the reset garp statistics [ interface { interface-type interface-number [ to
interface-type interface-number ] }&<1-10> ] command in the user view to clear
GARP statistics on the specified interfaces.
----End
Networking Requirements
In Figure 12-10, company A's headquarters, a branch of company A, and company
B are connected using switches. GVRP is enabled to implement dynamic VLAN
registration.
Branch of
Company B
company A
Configuration Roadmap
The configuration roadmap is as follows:
NOTE
Before enabling GVRP, you must configure the VCMP role as transparent or silent.
Procedure
Step 1 Configure SwitchA.
# Set the link type of GE 0/0/1 and GE 0/0/2 to trunk and configure the interfaces
to allow all VLANs to pass through.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type trunk
[SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan all
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type trunk
# Set the link type of GE 0/0/1 and GE 0/0/2 to trunk and configure the interfaces
to allow all VLANs to pass through.
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] port link-type trunk
[SwitchB-GigabitEthernet0/0/1] port trunk allow-pass vlan all
[SwitchB-GigabitEthernet0/0/1] quit
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] port link-type trunk
[SwitchB-GigabitEthernet0/0/2] port trunk allow-pass vlan all
[SwitchB-GigabitEthernet0/0/2] quit
# Set the link type of GE 0/0/1 and GE 0/0/2 to trunk and configure the interfaces
to allow all VLANs to pass through.
[SwitchC] interface gigabitethernet 0/0/1
[SwitchC-GigabitEthernet0/0/1] port link-type trunk
[SwitchC-GigabitEthernet0/0/1] port trunk allow-pass vlan all
[SwitchC-GigabitEthernet0/0/1] quit
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vcmp role silent
#
gvrp
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
#
return
12.9.1 Why Is the CPU Usage High When VLANs Are Created
or Deleted Through GVRP in Default Configuration?
The switch supports VLAN configuration on devices at both ends. When GVRP is
enabled on the network, it advertises information about dynamic VLANs in two
directions. Then the intermediate devices dynamically create and delete VLANs
based on the information. Dynamic maintenance of VLANs can greatly reduce
manual configurations.
The maximum 4 K dynamic VLANs are frequently created and deleted, which
triggers larger amount of packet communication. Receiving packets and delivering
dynamic VLANs occupy large amount of CPU resources.
In actual networking, you need to adjust GARP timers to the recommended values.
NOTE
The recommended values of the GARP timers are as follows:
GARP Hold timer: 100 centiseconds (1 second)
GARP Join timer: 600 centiseconds (6 seconds)
GARP Leave timer: 3000 centiseconds (30 seconds)
GARP LeaveAll timer: 12,000 centiseconds (2 minutes)
When more than 100 dynamic VLANs are created, use the preceding recommended values.
When the number of dynamic VLANs increases, lengths of the GARP timers need to be
increased.
13 VCMP Configuration
This chapter describes how to configure the VLAN Central Management Protocol
(VCMP). VCMP allows VLAN creation and deletion on a switch to be synchronized
to other specified switches on a Layer 2 network, implementing centralized VLAN
management and maintenance and reducing network maintenance workload.
Definition
The Virtual Local Area Network Central Management Protocol (VCMP), a Layer 2
protocol in the Open System Interconnection (OSI) model, transmits VLAN
information and ensures consistent VLAN information on the Layer 2 network.
Purpose
In most cases, switches on an enterprise network need to synchronize VLAN
information with each other to ensure that they can correctly forward data. On a
small-scale enterprise network, the network administrator can log in to each
NOTE
● VCMP can only help the network administrator synchronize VLAN information but not
dynamically assign VLANs. VCMP is often used with Link-type Negotiation Protocol
(LNP) to simplify user configurations. For details about LNP, see 5.2.5 LNP.
● Generic VLAN Registration Protocol (GVRP) can reduce VLAN configurations and
dynamically assign interfaces to VLANs. GVRP creates dynamic VLANs, but VCMP
creates static VLANs.
Benefits to Customers
VCMP configured on a switch of a Layer 2 network brings in the following
benefits:
● Implements centralized VLAN management and maintenance, and reduces
the network maintenance workload.
● Implements the plug-and-play function of access switches.
Layer 2
network
Client Client Client
VCMP Domain
As shown in Figure 13-1, a VCMP domain is composed of switches that have the
same VCMP domain name and are connected through trunk or hybrid interfaces.
All switches in the VCMP domain must use the same domain name, and each
switch can join only one VCMP domain. Switches in different VCMP domains
cannot synchronize VLAN information.
A VCMP domain specifies the scope for the administrative switch and managed
switches. Switches in a VCMP domain are managed by the administrative switch.
There is only one administrative switch and multiple managed switches in a VCMP
domain.
VCMP Roles
VCMP determines attributes of switches based on VCMP roles. Table 13-1
describes VCMP roles.
NOTE
● VCMP transparent and silent switches do not belong to any VCMP domain.
● If an edge switch in a VCMP domain needs to be managed, configure the edge switch as
a VCMP client. To prevent VCMP packets in the local VCMP domain from being
transmitted to other VCMP domains, disable VCMP on the edge switch interface
connected to other VCMP domains.
Summary-Advert packets sent by the VCMP server carry the configuration revision
number. A VCMP client uses it to determine whether VLAN information sent from
the VCMP server is newer than the local VLAN information. If so, the VCMP client
synchronizes VLAN information with the VCMP server.
A configuration revision number is represented by an 8-digit hexadecimal number.
The four left-most bits indicate the change of the VCMP domain or device ID and
the four right-most bits indicate the VLAN change. Upon a VLAN change on the
VCMP server, the configuration revision number is automatically increased. When
the VCMP domain name or device ID changes, the four left-most bits of the
configuration revision number are recalculated and the four right-most bits are
reset.
In Figure 13-2:
● SwitchA: VCMP server
● SwitchB: VCMP transparent switch
● SwitchC, SwitchD and SwitchE: VCMP clients
● SwitchF: VCMP silent switch
Figure 13-2 VLAN synchronization when the VCMP server configuration changes
Create VLAN 100.
Summary-Advert packet
NOTE
Transparent
Directly forward VCMP packets.
SwitchB
Trigger an Advert-
Request packet. Synchronize VLAN
information on the server.
New client
SwitchF
Summary-Advert packet
Advert-Request packet
After SwitchF is configured with VCMP and specified as a VCMP client, SwitchF
becomes the new VCMP client.
1. SwitchF sends an Advert-Request packet to SwitchD to request VLAN
information on SwitchA.
2. SwitchD forwards the Advert-Request packet to SwitchB.
3. SwitchB forwards the Advert-Request packet to its neighbors.
4. In the following situations:
– When the VCMP server receives an Advert-Request packet:
NOTE
Advert-Request packets are triggered when a VCMP client restarts or a VCMP interface goes
Up. VLAN information synchronization is similar.
Multi-Server Trap
Only one VCMP server exists in a VCMP domain. To prevent attacks of bogus
VCMP servers, the VCMP server matches the VCMP domain name, device ID, and
source MAC address in the received Summary-Advert packets with local ones. If
the VCMP domain name and device ID match local ones but the source MAC
address in the packet is different from the system MAC address, the VCMP server
sends a trap about the multi-server event to the NMS.
To prevent the VCMP server from being affected by too many traps, the VCMP
server sends traps to the NMS once every 30 minutes.
VCMP Authentication
When an unauthorized switch joins a VCMP domain, VLAN information on the
switch may be synchronized in the VCMP domain, affecting network stability. To
prevent unauthorized switches from joining a VCMP domain and enhance VCMP
domain security, configure a VCMP domain authentication password on the VCMP
server and clients.
If the VCMP domain authentication password is configured on the VCMP server or
a VCMP client, the VCMP server or VCMP client uses the password character string
(empty character string is used by default) as the key and performs SHA-256 for
the VCMP domain name, and device ID to obtain a digest. Then the VCMP server
encapsulates the digest in a Summary-Advert packet or the VCMP client
encapsulates the digest in an Advert-Request packet. When each VCMP client in
the VCMP domain receives a Summary-Advert packet from the VCMP server, the
VCMP client uses the locally configured password to perform SHA-256 for the
VCMP domain name, device ID, and configuration revision number, and compares
the calculated digest with the digest in the Summary-Advert packet. If the
calculated digest matches the digest in the Summary-Advert packet, the
Summary-Advert packet passes authentication and further VCMP processing is
performed. Otherwise, the Summary-Advert packet is discarded. When the VCMP
server receives an Advert-Request packet from a VCMP client, authentication and
processing are similar.
If no domain authentication password is set, VCMP packets pass without
authentication.
NOTE
● In a VCMP domain, the VCMP domain authentication password on the VCMP server and
clients must be the same.
● To ensure device security, change the password periodically.
Internet
Router
Core
switch
Department A Department B
Server Server
VCMP1 AGG1 AGG2 VCMP2
clients in VCMP1, AGG2 as the VCMP server in VCMP2, and ACC3 and ACC4 as
VCMP clients in VCMP2. The network administrator needs to create and delete
VLAN information only on AGG1 and AGG2. ACC1 to ACC4 synchronize VLAN
information with AGG1 and AGG2 respectively. This implements centralized VLAN
configuration and management.
NOTE
VCMP packets can be only transmitted on trunk and hybrid interfaces. When deploying
VCMP, you need to deploy LNP to dynamically negotiate the link type, which simplifies use
configurations. For details about LNP, see 5.2.5 LNP.
Licensing Requirements
VCMP configuration commands are available only after the S1720GW, S1720GWR,
and S1720X have the license (WEB management to full management Electronic
RTU License) loaded and activated and the switches are restarted. VCMP
configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S5700EI V200R005(C00&C01&C02&C03)
S5700SI V200R005C00
S5710EI V200R005(C00&C02)
S5700HI V200R005(C00SPC500&C01&C02)
S5710HI V200R005(C00&C02&C03)
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● VCMP can only help the network administrator synchronize VLAN information
but not dynamically assign interfaces to VLANs. VCMP is often used with LNP
to simplify user configurations. For details about LNP, see "LNP" in "VLAN
Configuration" in the Configuration Guide - Ethernet Switching of the
corresponding product version.
● VCMP packets can be only transmitted in VLAN 1. By default, all interfaces
join VLAN 1. To prevent loops, deploy a loop prevention protocol such as STP
in addition to VCMP. After STP is deployed, blocked interfaces cannot receive
or send VCMP packets.
● By default, a switch is a VCMP client. If a switch is upgraded from a version
that does not support VCMP to a VCMP-supporting version, the VCMP role is
Silent by default. In addition, to ensure that the switch's VCMP role is
consistent before and after the upgrade, the switch by default delivers the
undo bpdu mac-address 0118-8255-5555 command to process VCMP
packets as data packets. To enable VCMP, see "Configuring VCMP" in "VCMP
Configuration" in the Configuration Guide – Ethernet Switching Configuration
Guide of the corresponding product version.
● VCMP synchronizes only the VLAN ID in the current version.
● One switch can join only one VCMP domain, and only one VCMP server exists
in a VCMP domain.
● If the VCMP domain authentication password is set, ensure that the VCMP
server and clients use the same VCMP domain authentication password.
● If VLANs created or deleted on the VCMP server are the control VLANs of the
Ethernet Ring Protection Switch (ERPS), Rapid Ring Protection Protocol
(RRPP), Smart Ethernet Protocol (SEP), or Smart link, or reserved VLANs of
stack, a VCMP client does not create or delete the VLANs.
● If the Generic VLAN Registration Protocol (GVRP) has been enabled, the
VCMP role can be only the transparent or silent switch. If the VCMP role is set
to client or server, do not use GVRP.
When the value of Server ID in the display vcmp status command output is not empty,
the device used as a VCMP client has been connected to a VCMP server.
Context
VCMP implements centralized VLAN management and manages network devices
based on VCMP domains (for details, see VCMP Domain). VCMP defines four
roles: server, client, transparent, and silent (for details, see VCMP Roles). Switches
added to a VCMP domain as clients are managed by the VCMP server in the same
VCMP domain. After a VLAN is created or deleted on the VCMP server, VCMP
clients automatically synchronize VLAN information with the server. VCMP reduces
the workload on modifying the same VLAN information on multiple switches and
ensures VLAN information consistency.
You are advised to configure VCMP on an enterprise network as follows:
● Configure an aggregation or core switch as the VCMP server. Only one VCMP
server exists in a VCMP domain.
● Configure access switches as VCMP clients.
● Configure switches that do not need to be managed by the VCMP server and
are located between the VCMP server and clients as VCMP transparent
switches.
● Configure edge devices connected to other networks as VCMP silent switches
to prevent the connected networks from being affected.
A VCMP client identifies the VCMP server by device ID. The VCMP client obtains
the device ID of the VCMP server from the first received VCMP packet, and
synchronizes VLAN information with only the VCMP server specified by the device
ID. The device ID of the VCMP server learned by a VCMP client remains
unchanged unless the role of the VCMP client changes. The VCMP server can
receive and transmit VCMP packets and achieve centralized management only
when being configured with the device ID.
When an unauthorized switch is added to a VCMP domain, VCMP clients in this
VCMP domain may synchronize VLAN information of the unauthorized switch,
affecting network stability. To prevent unauthorized switches from joining a VCMP
domain, configure an authentication password on the VCMP server and clients in
the VCMP domain.
Pre-configuration Tasks
Before configuring VCMP, complete the following tasks:
● Connect interfaces and setting physical parameters of the interfaces to ensure
that the physical status of the interfaces is Up. For details, see Ethernet
Interface Configuration in the S1720, S2700, S5700, and S6720 V200R011C10
Configuration Guide - Interface Management.
● Configure the link type of interfaces as trunk and hybrid so that the interfaces
can forward VCMP packets.
NOTE
● VCMP is often used with LNP to dynamically negotiate the link type, which
simplifies use configurations. For detailed LNP configuration, see steps 1 to 6 in
5.7.2 Configuring Interface-based VLAN Assignment (LNP Dynamically
Negotiates the Link Type).
● You can run the display lnp summary command to check whether LNP is
configured on the switch and check the link type of the interface. If LNP is not
configured on the switch or the link type of the interface is not trunk or hybrid, run
the port link-type { hybrid | trunk } command to configure the link type of the
interface.
Procedure
Step 1 Run system-view
NOTE
If a switch is upgraded from a version that does not support VCMP to a VCMP-supporting
version, the VCMP role is silent by default.
Step 3 Perform the following operations based on the VCMP role of the switch.
● Perform the following operations on the VCMP server:
a. Run vcmp domain domain-name
A VCMP domain is configured.
By default, no VCMP domain is created.
All switches in a VCMP domain must use the same VCMP domain name.
Each switch can be added to only one VCMP domain.
b. Run vcmp device-id device-name
A device ID is set for the VCMP server.
By default, no device ID is set for the VCMP server.
c. (Optional) Run vcmp authentication sha2-256 password password
A VCMP domain authentication password is configured.
The VCMP server and clients in a VCMP domain must be configured with
the same authentication password. To ensure device security, change the
password periodically.
By default, no authentication password is configured in a VCMP domain,
and VCMP packets pass authentication.
● Perform the following operations on a VCMP client:
a. (Optional) Run vcmp domain domain-name
A VCMP domain is configured.
By default, no VCMP domain is created.
All switches in a VCMP domain must use the same VCMP domain name.
If the domain name is not set on a VCMP client, the VCMP client learns
the domain name in the first received VCMP packet.
Each switch can be added to only one VCMP domain.
b. (Optional) Run vcmp authentication sha2-256 password password
A VCMP domain authentication password is configured.
The VCMP server and clients in a VCMP domain must be configured with
the same authentication password. To ensure device security, change the
password periodically.
By default, no authentication password is configured in a VCMP domain,
and VCMP packets pass authentication.
● When the VCMP role is transparent or silent, go to the next step.
Step 4 Run interface interface-type interface-number
The view of a Layer 2 Ethernet interface where VCMP is to be enabled is displayed.
VCMP can be enabled only on Layer 2 Ethernet interfaces.
Step 5 Run undo vcmp disable
VCMP is enabled on the interface.
By default, VCMP is enabled on all interfaces of a switch.
NOTE
If an edge switch in a VCMP domain needs to be managed, configure the edge switch as a
VCMP client. To prevent VCMP packets in the local VCMP domain from being transmitted to
other VCMP domains, run the vcmp disable command to disable VCMP on the edge switch
interface connected to other VCMP domains.
----End
Procedure
● Run the display vcmp counters command in any view to view statistics on
VCMP packets.
● Run the display vcmp track command in any view to view the VLAN change
trace on the VCMP client.
----End
NOTICE
Procedure
● Run the reset vcmp command in the user view to clear learned VCMP
information.
● Run the reset vcmp track command in the user view to clear the existing
VLAN change trace.
----End
Networking Requirements
As shown in Figure 13-5, the enterprise branch network is a Layer 2 network. The
AGG is the aggregation switch, ACC1 to ACC3 are access switches, and ACC1 is
Internet
Router
GE0/0/1 GE0/0/3
Server
GE0/0/2 AGG
Configuration Roadmap
VCMP can be deployed on the enterprise branch network by configuring the AGG
as the VCMP server, ACC2 and ACC3 as VCMP clients, and ACC1 as a VCMP silent
switch. In this way, the network administrator only needs to modify VLAN
information on the AGG. The AGG sends the modified VLAN information to ACC1,
ACC2, and ACC3 on the enterprise branch network. ACC2 and ACC3 synchronize
VLAN information with the AGG, whereas ACC1 does not. VCMP reduces the
workload on modifying the same VLAN information on multiple switches and
allows the independent VLAN configuration on ACC1.
To relieve the network administrator from setting the link type, configure LNP to
automatically negotiate the link type.
The configuration roadmap is as follows:
1. Configure LNP to automatically negotiate the link type, which simplifies use
configurations.
2. Specify VCMP roles for switches to determine the VCMP management scope,
administrative switch, and managed switches.
Procedure
Step 1 Configure LNP to automatically negotiate the link type.
By default, LNP is enabled globally and on all interfaces. That is, the link type of
the interfaces will be automatically negotiated through LNP.
You can run the display lnp summary command to check whether LNP is enabled
globally and on an interface (Global LNP and link-type(C) fields) and check the
link type of the interface (link-type(N)).
● If LNP is not enabled globally or on an interface, perform the following
operations:
# Enable global LNP. The configurations of ACC1, ACC2, and ACC3 are similar
to the configuration of the AGG, and are not mentioned here.
<HUAWEI> system-view
[HUAWEI] sysname AGG
[AGG] undo lnp disable
# Enable LNP on interfaces. The configurations of ACC1, ACC2, and ACC3 are
similar to the configuration of the AGG, and are not mentioned here.
[AGG] interface GigabitEthernet 0/0/1
[AGG-GigabitEthernet0/0/1] undo port negotiation disable
[AGG-GigabitEthernet0/0/1] port link-type negotiation-desirable
[AGG-GigabitEthernet0/0/1] quit
[AGG] interface GigabitEthernet 0/0/2
[AGG-GigabitEthernet0/0/2] undo port negotiation disable
[AGG-GigabitEthernet0/0/2] port link-type negotiation-desirable
[AGG-GigabitEthernet0/0/2] quit
[AGG] interface GigabitEthernet 0/0/3
[AGG-GigabitEthernet0/0/3] undo port negotiation disable
[AGG-GigabitEthernet0/0/3] port link-type negotiation-desirable
[AGG-GigabitEthernet0/0/3] quit
● If LNP is enabled globally and on an interface but the link type of the
interface connecting switches is Access, run the port link-type { trunk |
hybrid } command to specify the link type of the interface so that VCMP can
work properly.
On the AGG, run the vlan vlan-id command to create VLAN 10, and run the
display vlan summary command on ACC1, ACC2, and ACC3 respectively to view
VLAN information. The command output shows that ACC2 and ACC3 have
synchronized VLAN information with that on the AGG, whereas ACC1 has not.
[AGG] vlan 10
[AGG-vlan10] quit
[AGG] display vlan summary
Static VLAN:
Total 2 static VLAN.
1 10
Dynamic VLAN:
Total 0 dynamic VLAN.
Reserved VLAN:
Total 0 reserved VLAN.
[ACC1] display vlan summary
Static VLAN:
Total 1 static VLAN.
Dynamic VLAN:
Total 0 dynamic VLAN.
Reserved VLAN:
Total 0 reserved VLAN.
[ACC2] display vlan summary
Static VLAN:
Total 2 static VLAN.
1 10
Dynamic VLAN:
Total 0 dynamic VLAN.
Reserved VLAN:
Total 0 reserved VLAN.
[ACC3] display vlan summary
Static VLAN:
Total 2 static VLAN.
1 10
Dynamic VLAN:
Total 0 dynamic VLAN.
Reserved VLAN:
Total 0 reserved VLAN.
----End
Configuration Files
● AGG configuration file
#
sysname AGG
#
vcmp role server
vcmp domain vd1
vcmp device-id server
vcmp authentication sha2-256 password %^%#6dD+>}ffA7*[j2#]0%%GfN#;I}#.lQ2Yfb2b1y"0%^%#
#
vlan batch 10
#
return
#
sysname ACC3
#
vcmp domain vd1
vcmp authentication sha2-256 password %^%#6dD+>}ffA7*[j2#]0%%GfN#;I}#.lQ2Yfb2b1y"0%^%#
#
vlan batch 10
#
interface GigabitEthernet0/0/2
vcmp disable
#
return
14 STP/RSTP Configuration
This chapter describes how to configure the Spanning Tree Protocol (STP) and
Rapid Spanning Tree Protocol (RSTP).
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 be interrupted. STP solves this problem.
Devices running STP exchange STP bridge protocol data units (BPDUs) to discover
loops on the network and block some ports to prune the network into a loop-free
tree network. STP prevents infinite looping of packets to ensure packet processing
capabilities of switches.
The STP network convergence speed is slow, so IEEE released 802.1w in 2001,
which introduces RSTP. RSTP improves STP to speed up network convergence.
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.
14.2.1 Background
STP prevents loops on a local area network (LAN). The switching devices running
STP exchange information with one another to discover loops on the network, and
block certain ports to eliminate loops. With the growth in scale of LANs, STP has
become an important protocol for a LAN.
port1 port1
S1 S2
port2 port2
Host B
Data flow
On the network shown in Figure 14-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 14-1, STP is not enabled on the
switching devices. If Host A 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.
● Assume that no broadcast storm has occurred on the network shown in
Figure 14-1. HostA sends a unicast packet to HostB. If HostB is temporarily
removed from the network at this time, the MAC address entry for HostB will
be deleted on S1 and S2. The unicast packet sent by HostA to HostB 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 HostA to HostB, 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 HostA. S1 and S2 modify the
MAC address entries continuously, causing the MAC address table to flap. As a
result, MAC address entries are damaged.
The port priority affects the role of a port in a specified spanning tree instance. For
details, see 14.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 and 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.
root bridge
A B S2
PC=100;RPC=0 PC=100;RPC=100
S1
B A
PC=100;RPC=0 PC=99;RPC=100
A B
PC=100;RPC=100 PC=99;RPC=199
B A
S3 PC=200;RPC=100 PC=200;RPC=300 S4
● Root bridge
The root bridge is the bridge with the smallest BID. The smallest BID 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 14-1 explains the designated bridge and designated port.
As shown in Figure 14-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 the
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 ID, root path cost, sender BID, PID}.
Table 14-2 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 14-2 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 based on the root ID field in Table 14-2.
● Smallest root path cost: used to select the root port on a non-root bridge. On
the root bridge, the path cost of each port is 0.
● Smallest sender BID: used to select the root port among ports with the same
root path cost. The port with the smallest BID is selected as the root port in
STP calculation. For example, S2 has a smaller BID than S3 in Figure 14-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 greatest PID is blocked.
The PIDs are compared in the scenario shown in Figure 14-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 14-3 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.
Disabled or
Down
①
⑤
Blocking
②
④ ⑤
Listening
③
④ ⑤
Learning
③
④ ⑤
Forwarding
NOTE
By default, a Huawei network device uses the MSTP mode. After a device transitions from
the MSTP mode to the STP mode, its STP ports support only those states defined in MSTP,
which are Forwarding, Learning, and Discarding. Table 14-4 describes the three port states.
Forwardi A port in Forwarding state can forward user traffic and process
ng BPDUs.
Port Description
State
The following parameters affect the STP port states and convergence.
● Hello Time
The Hello Time specifies the interval at which an STP device sends
configuration BPDU packets 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,
TCN BPDUs are transmitted immediately, independent 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, new configuration BPDUs cannot be immediately
spread over the entire network. If the new root port and designated port
forward data immediately, 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. Within this period, the new
configuration BPDUs can be transmitted over the network, preventing
transient loops.
The default Forward Delay timer value is 15 seconds. This means that the port
stays in the Listening state for 15 seconds and then stays in the Learning state
for another 15 seconds before transitioning to the Forwarding state. The port
is blocked when it is in the 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 compares the Message
Age value with the Max Age value in the received configuration BPDU.
– If the Message Age value is smaller 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 14-5 provides the timer values defined in IEEE 802.1D.
Configuration BPDU
Configuration BPDUs are used most commonly and are sent to exchange topology
information among STP devices.
Each bridge actively sends configuration BPDUs during initialization. After the
network topology becomes stable, the designated port of each device periodically
sends configuration BPDUs. A configuration BPDU is at least 35 bytes long,
including 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. In this way, the bridge does not need to process BPDUs with
the same information as the local port.
BPDU Type 1 Indicates the type of a BPDU. The value is one of the
following:
● 0x00: configuration BPDU
● 0x80: TCN BPDU
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 14-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
shown in Table 14-6. 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 either of 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.
traffic. All ports on the devices are in Listening state. Then the devices select the
root bridge, root ports, and designated ports based on configuration BPDUs.
BPDU Exchange
Figure 14-8 shows the initial information exchange process. The four parameters
in a pair of brackets represent the root 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
St Process
ep
1 Each port compares the received configuration BPDU with its own
configuration BPDU:
● If the received configuration BPDU is inferior, the port discards the
received configuration BPDU and retains its own configuration
BPDU.
● If the received configuration BPDU is superior, the port replaces its
own configuration BPDU with the received one.
● If the received configuration BPDU is the same, the port discards
the received configuration BPDU.
2 The device compares configuration BPDUs on all the ports and selects
the optimal one.
Pa
=5
th
st
co
co
st
th
=1
Pa
0
Port B1 Port C1
Path cost=4
Port B2 Port C2
DeviceB DeviceC DeviceC
DeviceB
Priority=1 Priority=2
root port
designated port
blocked port
As shown in Figure 14-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.
Dev ● Port B1 receives the configuration BPDU ● Port B1: {0, 0, 0, Port
iceB {0, 0, 0, Port A1} from Port A1 and finds A1}
it superior to its own configuration ● Port B2: {1, 0, 1, Port
BPDU {1, 0, 1, Port B1}, so Port B1 B2}
updates its 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.
Dev ● Port C1 receives the configuration BPDU ● Port C1: {0, 0, 0, Port
iceC {0, 0, 0, Port A2} from Port A2 and finds A2}
it superior to its own configuration ● Port C2: {1, 0, 1, Port
BPDU {0, 0, 0, Port C1}, so Port C1 B2}
updates its 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 C2}, so Port C2
updates its configuration BPDU.
After the topology becomes stable, the root bridge still sends configuration BPDUs
at a specific interval. If the received configuration BPDU is superior, a non-root
bridge replaces the configuration BPDU on the corresponding port with the
received configuration BPDU. If the received configuration BPDU is inferior or the
same, a non-root bridge discards the received configuration BPDU.
NOTE
● TCN BPDUs are used to inform the upstream device and root bridge of topology
changes.
● Configuration BPDUs with the TCA bit set to 1 are used by the upstream device to
inform the downstream device that the topology changes are known and instruct the
downstream device to stop sending TCN BPDUs.
● Configuration BPDUs with the TC bit set to 1 are used by the upstream device to inform
the downstream device of topology changes and instruct the downstream device to
delete MAC address entries. In this manner, fast network convergence is achieved.
Disadvantages of STP
STP ensures a loop-free network but has a slow network topology convergence
speed, leading to service quality deterioration. If the network topology changes
frequently, connections on the STP network are frequently torn down, causing
frequent service interruption. This is unacceptable to users.
STP has the following disadvantages:
● STP does not distinguish port states and port roles clearly, making it difficult
for less experienced administrators to learn and deploy this protocol.
A network protocol that clearly defines and distinguishes different situations
outperforms the others that fail to do so.
– Ports in the Listening, Learning, and Blocking states are the same to users
because they are all prevented from forwarding service traffic.
– From the perspective of port use and configuration, the essential
differences between ports lie in the port roles rather than port states.
Both root and designated ports can be in Listening state or Forwarding
state, so the ports cannot be distinguished by their states.
● The STP algorithm determines topology changes after the timer expires,
which slows down network convergence.
● The STP algorithm requires that the root bridge should send configuration
BPDUs after the network topology becomes stable, and other devices process
and spread the configuration BPDUs to the entire network. This also slows
down topology convergence.
B A
S2 S3
A A a
S1
root bridge
B A
S2 S3
A a
B A
b
root port
designated port
Alternate port
Backup port
As shown in Figure 14-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:
– From the perspective of configuration BPDU transmission:
After roles of all RSTP ports are determined, the topology convergence is
completed.
● RSTP redefines port states.
RSTP deletes two port states defined in STP and reduces the number of port
states to 3. Depending on whether a port can forward user traffic and learn
MAC addresses, the port may be in any of the following states:
– If the port does not forward user traffic or learn MAC addresses, it is in
the Discarding state.
– If the port does not forward user traffic but learns MAC addresses, it is in
the Learning state.
– If the port forwards user traffic and learns MAC addresses, it is in the
Forwarding state.
Table 14-11 compares the port states defined in STP and RSTP. Port states are
not necessarily related to port roles. Table 14-11 lists possible states for
different port roles.
Table 14-11 Comparison between port states defined in STP and RSTP
STP Port State RSTP Port State Port Role
Disabled Discarding -
● 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
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 14-12 shows the Flags field in an RST
BPDU.
root port
designated port
Alternate port
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 to the NMS. The root port enters the Discarding state
and becomes the designated port, whereas 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
Loop protection takes effect only on the root port and alternate ports.
– TC BPDU attack defense
A switching device deletes its MAC address entries and ARP entries after
receiving TC BPDUs. If an attacker sends a large number of bogus TC
BPDUs to the switching device in a short time, the device frequently
deletes MAC address entries and ARP entries. This increases the load on
the switching device and threatens network stability.
After enabling TC BPDU attack defense on a switching device, you can set
the number of times the device processes TC BPDUs within a given time.
If the number of TC BPDUs that the switching device receives within the
given time exceeds the specified threshold, the switching device processes
only the specified number of TC BPDUs. Excess TC BPDUs are processed
by the switching device as a whole after the specified period expires. This
function prevents the switching device from frequently deleting its MAC
address entries and ARP entries.
link with S2. On S2, p2 is an alternate port; p3 is a designated port and is in the
Forwarding state; p4 is an edge port.
p0 1 Proposal
3 Agreement
p1
S2
p2 E p4
p3
Designated port
Alternate port
E Edge port
STP can select designated ports quickly; however, to prevent loops, all ports must
wait at least one Forward Delay interval before starting data forwarding. RSTP
blocks non-root ports to prevent loops and uses the proposal/agreement
mechanism to shorten the time that an upstream port waits before transitioning
to the Forwarding state.
NOTE
The proposal/agreement mechanism applies only to P2P full-duplex links between two
switching devices. When proposal/agreement fails, a designated port is elected after two
Forward Delay intervals, same as designated port election in STP mode.
STP Application
Loops often occur on a complex network, because multiple physical links are often
deployed between two devices to implement link redundancy. Loops may cause
broadcast storms and damage MAC address entries on network devices.
Network
STP
CE1 CE2
PC1 PC2
Blocked port
As shown in Figure 14-15, 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 14.9 Setting RSTP
that affect RSTP and fast transition Parameters that Affect
convergence configuration on ports to RSTP Convergence
implement rapid
convergence.
Licensing Requirements
STP or RSTP configuration commands are available only after the S1720GW,
S1720GWR, and S1720X have the license (WEB management to full management
Electronic RTU License) loaded and activated and the switches are restarted. STP
or RSTP configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S2710SI V100R006(C03&C05)
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
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 the change of these parameters may cause
network flapping. To ensure fast and stable spanning tree calculation, configure
parameters such as the device priority and port priority before enabling STP or
RSTP.
Context
A switching device supports three working modes: STP, RSTP, and MSTP. Use the
STP mode on a ring network running only STP, and use the RSTP mode on a ring
network running only RSTP.
Procedure
Step 1 Run system-view
----End
NOTE
It is recommended that you specify the root bridge and secondary root bridge when
configuring STP/RSTP.
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 root primary
The device is configured as the root bridge.
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.
● Perform the following operations on the device to be used as the secondary
root bridge.
a. Run system-view
The system view is displayed.
b. Run stp root secondary
The device is configured as the secondary root bridge.
----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 switching device
deployed at a high network layer; however, such a device may not have the
highest priority on the network. Therefore, you need to set a high priority for such
a device to ensure that it can be selected as the root bridge.
Because low-performance devices at lower network layers are not suitable as the
root bridge, set low priorities for these devices.
A smaller priority value indicates a higher priority of the switching device. The
switching device with a higher priority is more likely to be elected as the root
bridge.
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
Context
Path cost is the reference value used for link selection on an STP/RSTP network.
The path cost value range is determined by the calculation method. After the
calculation method is determined, it is recommended that you set smaller path
cost values for the ports with higher link rates.
In the Huawei calculation method, the link rate determines the recommended
value for the path cost. Table 14-14 lists the recommended path costs for ports
with different link rates.
Table 14-14 Mappings between link rates and path cost values
Link Rate Recommended Recommended Allowable Path
Path Cost Path Cost Range Cost Range
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 cost.
All switching 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.
● 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.
----End
Procedure
Step 1 Run system-view
----End
Context
NOTICE
Procedure
Step 1 Run system-view
NOTE
For the S1720GFR, S2750EI, S5700LI, and S5700S-LI, a maximum of 64 STP-enabled ports in Up
state are recommended. If there are more than 64 STP-enabled ports in Up state, the CPU may
be affected and faults such as protocol flapping may occur.
For the S1720GW, S1720GWR, S1720GW-E, S1720GWR-E, S2720EI, S5710-X-LI, S5720LI, S5720S-
LI, S5730SI, S5730S-EI, S1720X, S1720X-E, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S5720SI, and
S5720S-SI, a maximum of 128 STP-enabled ports in Up state are recommended. If there are
more than 128 STP-enabled ports in Up state, the CPU may be affected and faults such as
protocol flapping may occur.
For the S5720EI, a maximum of 200 STP-enabled ports in Up state are recommended. If there
are more than 200 STP-enabled ports in Up state, the CPU may be affected and faults such as
protocol flapping may occur.
For the S5720HI, S6720EI, and S6720S-EI, a maximum of 256 STP-enabled ports in Up state are
recommended. If there are more than 256 STP-enabled ports in Up state, the CPU may be
affected and faults such as protocol flapping may occur.
----End
Follow-up Procedure
When the topology of a spanning tree changes, the forwarding paths for
associated VLANs are changed. Switching devices need to update the ARP entries
corresponding to those VLANs. Depending on how switching devices process ARP
entries, STP/RSTP convergence mode can be fast or normal.
● In fast mode, ARP entries to be updated are directly deleted.
● In normal mode, ARP entries to be updated are rapidly aged.
The remaining lifetime of ARP entries to be updated is set to 0 to immediately
age the ARP entries out. If the number of ARP aging probes is greater than 0,
the switching device performs aging probe for these ARP entries.
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.
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. A larger network diameter indicates a larger network
scale.
An improper network diameter may cause slow network convergence and affect
communication. Run the stp bridge-diameter command to set an appropriate
network diameter based on the network scale, which helps speed up 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.
● It is recommended that you run the stp bridge-diameter diameter command to set the
network diameter. Then, the switching device 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 busy. In this case,
recalculating the spanning tree will cause a waste of network resources. To avoid
wasting network resources, set a long timeout interval on a stable network.
If a switching device does not receive any BPDUs from the upstream device within
the timeout interval, spanning tree recalculation is performed. The timeout
interval is calculated as follows:
Procedure
Step 1 Run system-view
The Timer Factor value is set. This parameter determines the timeout interval
during which the device waits for BPDUs from the upstream device.
----End
Context
The following timers are used in spanning tree calculation:
● Forward Delay: specifies the delay before a state transition. After the topology
of a ring network changes, it takes some time to spread the new
configuration BPDU throughout the entire network. As a result, the original
blocked port may be unblocked before a new port is blocked. When this
occurs, a loop exists on the network. You can set the Forward Delay timer to
prevent loops. When the topology changes, all ports will be temporarily
blocked during the Forward Delay.
● Hello Time: specifies the interval at which hello packets are sent. A device
sends configuration BPDUs at the specified interval to detect link failures. If
the switching device does not receive any BPDUs within the timeout period
(timeout period = Hello Time x 3 x Timer Factor), the device recalculates the
spanning tree.
● Max Age: determines whether BPDUs expire. A switching device determines
that a received configuration BPDU times out when the Max Age expires.
Devices on a ring network must use the same values of Forward Delay, Hello
Time, and Max Age.
You are not advised to directly change the preceding three timers. The three
parameters are relevant to the network scale; therefore, it is recommended that
you set the network diameter so that the spanning tree protocol automatically
adjusts these timers. When the default network diameter is used, the three timers
also retain their default values.
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 switching 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 switching 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 switching device.
By default, the Max Age timer is 2000 centiseconds (20 seconds).
----End
has two member interfaces in Up state. Each member link has the same
bandwidth, and deviceA is selected as the root bridge.
● Eth-Trunk 1 has higher bandwidth than Eth-Trunk 2. After STP calculation,
Eth-Trunk 1 on deviceB is selected as the root port and Eth-Trunk 2 is selected
as the alternate port.
● If the maximum number of connections affecting bandwidth of Eth-Trunk 1 is
set to 1, the path cost of Eth-Trunk 1 is larger than the path cost of Eth-Trunk
2. Therefore, the two devices perform spanning tree recalculation. Then Eth-
Trunk 1 on deviceB becomes the alternate port and Eth-Trunk 2 becomes the
root port.
Root Bridge
SwitchA SwitchB
Eth-Trunk1
After
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
----End
Pre-configuration Tasks
Before configuring RSTP parameters that affect RSTP convergence, configure basic
RSTP functions.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp bridge-diameter diameter
The network diameter is configured.
By default, the network diameter is 7.
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. Then, the switching device calculates the optimal Forward Delay
timer value, Hello timer value, and Max Age timer value based on the configured
network diameter.
----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. This parameter determines the timeout interval
during which the device waits for BPDUs from the upstream device.
By default, the timeout period is 9 times the Hello timer value.
----End
prevent loops. When the topology changes, all ports will be temporarily
blocked during the Forward Delay.
● Hello Time: specifies the interval at which hello packets are sent. A device
sends configuration BPDUs at the specified interval to detect link failures. If
the switching device does not receive any BPDUs within the timeout period
(timeout period = Hello Time x 3 x Timer Factor), the device recalculates the
spanning tree.
● Max Age: determines whether BPDUs expire. A switching device determines
that a received configuration BPDU times out when the Max Age expires.
Devices on a ring network must use the same values of Forward Delay, Hello
Time, and Max Age.
You are not advised to directly change the preceding three timers. The three
parameters are relevant to the network scale; therefore, it is recommended that
you set the network diameter so that the spanning tree protocol automatically
adjusts these timers. When the default network diameter is used, the three timers
also retain their default values.
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
Step 2 Set the Forward Delay, Hello Time, and Max Age timers.
1. Run stp timer forward-delay forward-delay
----End
Context
The path costs affect spanning tree calculation. Changes of path costs trigger
spanning tree recalculation. The path cost of an interface is affected by its
bandwidth, so you can change the interface bandwidth to affect spanning tree
calculation.
As shown in Figure 14-17, deviceA and deviceB are connected through two Eth-
Trunk links. Eth-Trunk 1 has three member interfaces in Up state and Eth-Trunk 2
has two member interfaces in Up state. Each member link has the same
bandwidth, and deviceA is selected as the root bridge.
● Eth-Trunk 1 has higher bandwidth than Eth-Trunk 2. After STP calculation,
Eth-Trunk 1 on deviceB is selected as the root port and Eth-Trunk 2 is selected
as the alternate port.
● If the maximum number of connections affecting bandwidth of Eth-Trunk 1 is
set to 1, the path cost of Eth-Trunk 1 is larger than the path cost of Eth-Trunk
2. Therefore, the two devices perform spanning tree recalculation. Then Eth-
Trunk 1 on deviceB becomes the alternate port and Eth-Trunk 2 becomes the
root port.
Root Bridge
SwitchA SwitchB
Eth-Trunk1
After
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
----End
Context
P2P links can implement rapid convergence. 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 more BPDUs sent from an interface within a Hello Time interval, the more
system resources consumed. Setting a proper transmission rate (packet-number)
on an interface prevents excess bandwidth usage when network flapping occurs.
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, an interface sends a maximum of six BPDUs per second. 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.
----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.
● Switching to the RSTP mode in the system view
a. Run system-view
The system view is displayed.
b. Run stp mcheck
NOTE
After all ports are configured as edge ports and BPDU filter ports in the system view, none
of ports on the local device sends BPDUs or negotiates the STP states 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 deciding to perform
this configuration.
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. Exercise caution when deciding to perform this
configuration.
Procedure
● Configuring all ports as edge ports and BPDU filter ports
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.
By default, all ports are non-BPDU filter ports.
● Configuring a specified port as an edge port and BPDU filter port
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The view of an 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, all ports are non-edge ports.
----End
Procedure
● Run the display stp [ interface interface-type interface-number | slot slot-id ]
[ brief ] command to view the spanning tree status and statistics.
----End
Procedure
Step 1 Run system-view
----End
Follow-up Procedure
If you want an edge port to automatically recover from the error-down state, run
the error-down auto-recovery cause bpdu-protection interval interval-value
command in the system view to configure the auto recovery function and set a
recovery delay on the port. Then a port in error-down state can automatically go
Up after the delay expires. Note the following when setting the recovery delay:
● By default, the auto recovery function is disabled; therefore, the recovery
delay parameter does not have a default value. When you enable the auto
recovery function, you must set a recovery delay.
● A smaller value of interval-value indicates a shorter time taken for an edge
port to go Up, and a higher frequency of Up/Down state transitions on the
port.
● A larger value of interval-value indicates a longer time taken for the edge
port to go Up, and a longer service interruption time.
● The auto recovery function takes effect only for the interfaces that transition
to the error-down state after the error-down auto-recovery command is
executed.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp tc-protection interval interval-value
The time period during which the device processes the maximum number of TC
BPDUs is set.
By default, the time period is the Hello time.
Step 3 Run stp tc-protection threshold threshold
The maximum number of times the switching device processes TC BPDUs and
updates forwarding entries within the specified time period is set.
By default, the device processes only one TC BPDU within a specified time period.
The switch processes only TC BPDUs of a number configured by stp tc-protection
threshold 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. For example, if the time period is set to 10
seconds and the maximum of TC BPDUs is set to 5, the switch processes only the
first five TC BPDUs within 10 seconds. Subsequent TC BPDUs are processed
together 10 seconds later.
----End
----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.
Step 3 Run stp loop-protection
Loop protection is enabled on the root port or alternate port.
NOTE
An alternate port is a backup for a root port. If a switching device has an alternate port,
configure loop protection on both the root port and the alternate port.
Root protection and loop protection cannot be configured on the same port.
----End
Context
A switching device supports the following Proposal/Agreement modes:
● Enhanced mode: The device determines the root port when it calculates the
synchronization flag bit.
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.
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. Then, the root port transitions to the
Forwarding state.
b. 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.
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
----End
Context
NOTICE
STP/RSTP statistics cannot be restored after being cleared. Exercise caution when
deciding to clear STP/RSTP statistics.
Procedure
● Run the reset stp [ interface interface-type interface-number ] statistics
command to clear spanning-tree statistics.
● Run the reset stp error packet statistics command to clear statistics about
error STP packets.
----End
Context
The statistics about STP/RSTP topology changes can be viewed. If the statistics
increase, network flapping occurs.
Procedure
● Run the display stp topology-change command to view statistics about STP/
RSTP topology changes.
● Run the display stp [ interface interface-type interface-number | slot slot-id ]
tc-bpdu statistics command to view statistics about sent and received
TC/TCN packets.
● Run the display stp [ interface interface-type interface-number | slot slot-id ]
[ brief ] command to view the spanning tree status and statistics.
----End
Network
GE0/0/3 GE0/0/3
Root
SwitchD GE0/0/1 GE0/0/1
Bridge
STP
GE0/0/3 GE0/0/3
SwitchC SwitchB
GE0/0/1 GE0/0/1
GE0/0/2 GE0/0/2
PC1 PC2
Blocked port
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the STP mode for the switches on the ring network.
2. Configure the primary and secondary root bridges.
3. Set a path cost for the ports to be blocked.
4. Enable STP to eliminate loops. Because ports connected to the PCs do not
participate in STP calculation, configure these ports as both edge ports.
Procedure
Step 1 Configure basic STP functions.
1. Configure the STP mode for the switches on the ring network.
# Configure the STP mode on SwitchA.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] stp mode stp
<HUAWEI> system-view
[HUAWEI] sysname SwitchC
[SwitchC] stp mode stp
# Configure the STP mode on SwitchD.
<HUAWEI> system-view
[HUAWEI] sysname SwitchD
[SwitchD] stp mode stp
2. Configure the primary and secondary root bridges.
# Configure SwitchA as the primary root bridge.
[SwitchA] stp root primary
# Configure SwitchD as the secondary root bridge.
[SwitchD] stp root secondary
3. Set a path cost for the ports to be blocked.
– The path cost value range depends on path cost calculation methods.
This example uses the Huawei proprietary calculation method and sets
the path cost to 20000 (the greatest value in the range).
– All switching devices on a network must use the same path cost
calculation method.
# On Switch A, set the path cost calculation method to the Huawei
proprietary method.
[SwitchA] stp pathcost-standard legacy
# On Switch B, set the path cost calculation method to the Huawei
proprietary method.
[SwitchB] stp pathcost-standard legacy
# On Switch C, set the path cost of GigabitEthernet0/0/1 to 20000.
[SwitchC] stp pathcost-standard legacy
[SwitchC] interface gigabitethernet 0/0/1
[SwitchC-GigabitEthernet0/0/1] stp cost 20000
[SwitchC-GigabitEthernet0/0/1] quit
# On SwitchD, set the path cost calculation method to the Huawei proprietary
method.
[SwitchD] stp pathcost-standard legacy
4. Enable STP to eliminate loops.
– Configure the ports connected to PCs as both edge ports.
# Configure GigabitEthernet0/0/2 on SwitchB as both an edge port.
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] stp edged-port enable
[SwitchB-GigabitEthernet0/0/2] quit
(Optional) Configure BPDU protection on SwitchB.
[SwitchB] stp bpdu-protection
# Configure GigabitEthernet0/0/2 on SwitchC as both an edge port.
[SwitchC] interface gigabitethernet 0/0/2
[SwitchC-GigabitEthernet0/0/2] stp edged-port enable
[SwitchC-GigabitEthernet0/0/2] quit
(Optional) Configure BPDU protection on SwitchC.
[SwitchC] stp bpdu-protection
NOTE
If edge ports are connected to network devices that have STP enabled and BPDU
protection is enabled, the edge ports will be shut down and their attributes
remain unchanged after they receive BPDUs.
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
stp mode stp
stp instance 0 root primary
Related Content
Videos
Configuring STP to Prevent Loops
Network
GE0/0/3 GE0/0/3
Root
GE0/0/1 GE0/0/1
SwitchD Bridge
RSTP
GE0/0/3 GE0/0/3
SwitchC SwitchB
GE0/0/1 GE0/0/1
GE0/0/2 GE0/0/2
PC1 PC2
Blocked port
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic RSTP functions.
a. Configure the RSTP mode for the switches on the ring network.
b. Configure the primary and secondary root bridges.
c. Set a path cost for the ports to be blocked.
d. Enable RSTP to eliminate loops. Because ports connected to the PCs do
not participate in RSTP calculation, configure these ports as both edge
ports.
2. Configure RSTP protection functions. For example, configure root protection
on designated ports of the root bridge.
Procedure
Step 1 Configure basic RSTP functions.
1. Configure the RSTP mode for the switches on the ring network.
# Configure the RSTP mode on SwitchA.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] stp mode rstp
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] stp mode rstp
# On SwitchB, set the path cost calculation method to the Huawei proprietary
method.
[SwitchB] stp pathcost-standard legacy
# On SwitchD, set the path cost calculation method to the Huawei proprietary
method.
[SwitchD] stp pathcost-standard legacy
NOTE
If edge ports are connected to network devices that have STP enabled and BPDU
protection is enabled, the edge ports will be shut down and their attributes
remain unchanged after they receive BPDUs.
– Enable RSTP globally.
# Enable RSTP globally on SwitchA.
[SwitchA] stp enable
# Enable RSTP globally on SwitchB.
[SwitchB] stp enable
# Enable RSTP globally on SwitchC.
[SwitchC] stp enable
# Enable RSTP globally on SwitchD.
[SwitchD] stp enable
Step 2 Configure RSTP protection functions. For example, configure root protection on
designated ports of the root bridge.
# Enable root protection on GE 0/0/1 on SwitchA.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] stp root-protection
[SwitchA-GigabitEthernet0/0/1] quit
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
stp mode rstp
stp instance 0 root primary
stp pathcost-standard legacy
#
interface GigabitEthernet0/0/1
stp root-protection
#
interface GigabitEthernet0/0/2
stp root-protection
#
return
● SwitchB configuration file
#
sysname SwitchB
#
stp mode rstp
stp bpdu-protection
stp pathcost-standard legacy
#
interface GigabitEthernet0/0/2
stp edged-port enable
#
return
● SwitchC configuration file
#
sysname SwitchC
#
stp mode rstp
stp bpdu-protection
stp pathcost-standard legacy
#
interface GigabitEthernet0/0/1
stp instance 0 cost 20000
#
interface GigabitEthernet0/0/2
stp edged-port enable
#
return
● SwitchD configuration file
#
sysname SwitchD
#
stp mode rstp
stp instance 0 root secondary
stp pathcost-standard legacy
#
return
Related Content
Videos
● On a port, run the stp edge-port enable command to configure the port as
an STP edge port, and run the stp bpdu-filter enable command to enable
the BPDU packet filtering function and prevent the port from sending BPDU
packets.
● Run the stp disable command on the port to disable the STP protocol and
make the port remain in forwarding state.
To ensure availability and security, you are advised to configure the port as an STP
edge port. This is because when a loop occurs on a terminal device connected to
an edge port, the port automatically switches to a non-edge port and enables the
loop breaking function of STP.
Switches using RSTP and STP can be connected. STP protocols include the STP,
RSTP, and MSTP protocols. These protocols support forward compatibility and
connection to a certain extent. The following table describes the connection
effects.
An STP device connects to RSTP connects to the STP port, and the mode
an RSTP device. automatically changes to STP to implement slow
convergence.
An RSTP device connects The CIST can be connected. That is, instance 0 can
to an MSTP device. be connected. The connection ports are inter-AS
ports.
An MSTP device connects MSTP connects to the STP port, and the mode
to an STP device. automatically changes to STP to implement slow
convergence.
NOTE
When a port whose mode switches reconnects to another device, the original mode must
be restored by running the stp mcheck command.
NOTE
Globally run the bpdu enable command for the S2700 switch. Run the bpdu enable
command on the port for other devices.
have the same domain name, revision level, and VLAN mapping table. To solve
this problem, run the stp config-digest-snoop command to enable digest
snooping. This function enables the Huawei switch to keep its BPDU key
consistent with that used on the peer device.
transparently transmit the STP or RSTP packets from the device after the stp
disable and bpdu enable commands are run on the interface.
● If a non-Huawei device is a Cisco device that runs PVST, the switch cannot
negotiate with the device, but can transparently transmit the packets from the
device.
15 MSTP Configuration
This chapter describes how to configure the Multiple Spanning Tree Protocol
(MSTP).
Definition
The Multiple Spanning Tree Protocol (MSTP) enables multiple VLAN instances to
be mapped to the same spanning tree without creating loops. MSTP is a Layer 2
protocol that was first defined in IEEE 802.1s.
Purpose
MSTP generates multiple spanning trees that are used independently of each
other to forward traffic in different VLANs, which allows load balancing to be
implemented without the risk of broadcast storms.
VLAN 2 VLAN 3
S2 S5
S3 S6
spanning tree(root bridge:S6)
In Figure 15-1, S6 is the root switch. The links between S2 and S5 and between S1
and S4 are blocked. VLAN packets are transmitted through "VLAN 2" or "VLAN 3"
links.
Because the link between S2 and S5 is blocked and the link between S3 and S6
denies packets from VLAN 2, HostA and HostB cannot communicate with each
other despite both belonging to VLAN 2.
MSTP Improvements
Because the link between S2 and S5 is blocked and the link between S3 and S6
denies packets from VLAN 2, HostA and HostB cannot communicate with each
other despite both belonging to VLAN 2.
To address the limitation of STP and RSTP, MSTP allows fast convergence and
provides multiple paths to load balance VLAN traffic.
MSTP divides a switching network into multiple regions, each of which has
multiple spanning trees that are independent of each other. Each spanning tree is
called a Multiple Spanning Tree Instance (MSTI) and each region is called a
Multiple Spanning Tree (MST) region. Figure 15-2 shows an example of an MST
region.
NOTE
HostC HostA
VLAN 3 VLAN 2
(VLAN 3) (VLAN 2)
VLAN 2
S2 S5
S3 S6
spanning tree(root bridge:S4)
spanning tree(root bridge:S6)
In Figure 15-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 situation, devices within the same VLAN can communicate with each other.
Packets of different VLANs are load balanced along different paths.
MSTP Network
S1
CST
IST
MST Region
An MST region contains multiple network segments, each of which contains one
or more switches. The switches in one MST region all share the following
characteristics:
● MSTP-enabled
● Same region name
● Same VLAN-MSTI mappings
● Same MSTP revision level
Multiple switches can be grouped into an MST region by using MSTP configuration
commands.
In Figure 15-4, MST region 4 contains SwitchA, SwitchB, SwitchC, and SwitchD,
and has three MSTIs.
Figure 15-4 MST region with four switches and three MSTIs
A D A D
B C B C
MSTI 1 MSTI 2
S3
A D
Root
VLAN 1 -> MSTI 1 bridge
VLAN 2 -> MSTI 2
other VLAN S -> MSTI 3
B C MSTI
MST Region 4 MSTI 3
MSTI topology in MST region 4
CST
A Common Spanning Tree (CST) connects all MST regions on a switching network.
The CST is calculated using STP or RSTP, with each MST region being considered
as a single node.
In Figure 15-3, the regions that are connected through blue lines form a CST.
IST
An Internal Spanning Tree (IST) resides within an MST region.
In Figure 15-3, the switches that are connected through dark blue lines in an MST
region form an IST.
SST
A Single Spanning Tree (SST) is formed in either of the following situations:
● A switch running STP or RSTP belongs to only one spanning tree.
● An MST region has only one switch.
CIST
A Common and Internal Spanning Tree (CIST) connects all the switches on a
switching network and is calculated using STP or RSTP.
Regional Root
Regional roots are classified into Internal Spanning Tree (IST) and MSTI regional
roots.
In Figure 15-3, the switches that are closest to the CIST root are IST regional
roots.
An MST region can contain multiple spanning trees, each of which is called an
MSTI. An MSTI regional root is the root of the MSTI. In Figure 15-4, each MSTI
has its own regional root.
CIST Root
In Figure 15-3, the CIST root is the root bridge of the CIST. The CIST root is a
device in S1.
Master Bridge
The master bridge is the switch closest to the CIST root in a region, for example,
S1 in Figure 15-3.
If the CIST root is in an MST region, the CIST root is the master bridge of the
region.
Port Roles
MSTP adds two extra port roles to those defined in RSTP. Table 15-1 describes the
port roles included in MSTP.
NOTE
Root A root port sends data to a root bridge and is the port closest to the
port root bridge. Root bridges do not have root ports.
Root ports are responsible for sending data to root bridges.
In Figure 15-5, S1 is the root; CP1 is the root port on S3; BP1 is the
root port on S2.
Alternat ● Alternate ports provide an alternate path to the root bridge. This
e port path is different from the path through the root port.
● An alternate port is blocked from sending BPDUs after a BPDU
sent by another bridge is received.
In Figure 15-5, BP2 is an alternate port.
Master A master port is on the shortest path connecting MST regions 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 master ports in instances.
In Figure 15-6, S1, S2, S3, and S4 form an MST region. AP1 on S1 is
the master port because it is the closest port in the region to the
CIST root.
Port Description
Role
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 In Figure 15-6, AP1, DP1, and DP2 in an MST region are directly
connected to other regions. This means that they are all regional
edge ports of 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.
Root
AP2 AP3
CP1 BP1
S3 S2
root port
designated port
Alternate port
Backup port
AP1
Master
S1
S2 S3
S4
Blocked port
Port Description
State
Forwardi A port in this state can send and receive BPDUs. It can also forward
ng user traffic.
Learning A port in this state learns MAC addresses from user traffic to
construct a MAC address table.
In Learning state, the port can send and receive BPDUs, but cannot
forward user traffic.
NOTE
Root, master, designated, and regional edge ports support all three port states. Alternate and
backup ports support only the Discarding state.
NOTE
The first 36 bytes of an MST BPDU are the same as those of an RST BPDU.
Fields from the 37th byte of an MST BPDU are MSTP-specific. The MSTI Configuration
Messages field consists of configuration messages of multiple MSTIs.
CIST External 4 Indicates the total path cost from the MST
Path Cost region where the switch resides to the MST
region where the CIST root switch resides. This
value is calculated based on link bandwidth.
CIST Internal 4 Indicates the total path costs from the local port
Root Path to the IST master. This value is calculated based
Cost on link bandwidth.
The number of BPDUs sent during a Hello interval increases as the Hello Time
value is increased. Setting the Hello Time to a smaller value limits the number of
BPDUs sent by a port during a Hello interval, which helps prevent network
topology flapping and excessive use of bandwidth resources by BPDUs.
Vectors
Both MSTIs and the CIST are calculated based on vectors, carried in MST BPDUs.
There are seven types of vectors used to calculate MSTIs and the CIST. Each vector
carries a priority value. For each vector, smaller priority values indicate higher
priorities.
Root ID Identifies the root switch for the CIST. The root identifier
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 root.
path cost (ERPC) ERPCs are the same on all switches in an MST region. If the
CIST root is in an MST region, all ERPCs in that MST region
are set to 0.
Regional root ID Identifies the MSTI regional root and 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 regional
path cost (IRPC) root. The IRPC saved on a regional edge port must be
greater than the IRPC saved on a non-regional edge port.
Designated Identifies the nearest upstream bridge on the path from the
switching device local bridge to the regional root. If the local bridge is the
ID root or the regional root, this ID is the same as the local
bridge ID.
Designated port Identifies the port on the designated switch connected to the
ID root port on the local bridge. The designated port ID consists
of the priority value (4 bits) and port number (12 bits). The
priority value must be a multiple of 16.
Receiving port Identifies the port receiving the BPDU. The receiving port ID
ID consists of the priority value (4 bits) and port number (12
bits). The priority value must be a multiple of 16.
● Root ID
● External root path cost
● Regional root ID
● Internal root path cost
● Designated switch ID
● Designated port ID
● Receiving port ID
● Regional root ID
● Internal root path cost
● Designated switch ID
● Designated port ID
● Receiving port ID
NOTE
● Root IDs
● ERPCs
● Regional root IDs
● IRPCs
● Designated switch IDs
If the vectors being compared are the same, the next vector in the list is
compared. If the vectors being compared are different, the remaining vectors are
not compared
CIST Calculation
After comparing the vectors, the switch 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. The CST and ISTs form a CIST
for the entire network.
MSTI Calculation
In an MST region, MSTP independently calculates an MSTI for each VLAN based
on mappings between VLANs and MSTIs. The calculation process is similar to that
used by STP to calculate a spanning tree. For details, see 14.2.4 STP Topology
Calculation.
Send a proposal so
that the port can
rapidly enter the
Forwarding state Configure the root port
and block non-edge ports
Send an agreement
The root port
The designated enters the
port enters the Send an agreement Forwarding state
Forwarding state
Root port
Designated port
The network shown in Figure 15-9 can be divided into multiple MSTP processes
by using MSTP multi-process. In Figure 15-9:
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
STP/RSTP
S1 S4
Access
S2 S3
NOTE
Purpose
MSTP multi-process provides the following benefits:
● Greatly improves the applicability of STP to different networking conditions.
Additional Concepts
● Public link status
In Figure 15-9, the public link between UPE1 and UPE2 is a Layer 2 link
running MSTP. This public link is different from the links that connect
switching devices to UPEs. The ports on the public link 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.
In addition, a port on the public link participates in the calculation for
multiple MSTP processes, and obtains different status. As a result, the port
cannot determine its status.
To prevent this situation, the port always adopts its status in MSTP process 0
when participating in the calculation for multiple MSTP processes.
NOTE
By default, MSTP process 0 is created when a device starts, and MSTP configurations
in the system view and interface view belong to this process.
● Reliability
On the network shown in Figure 15-10, after the topology of a ring changes,
the MSTP multi-process mechanism helps UPEs flood a TC BPDU to all devices
on the ring and prevent the TC BPDU from being flooded to devices on the
other ring. UPE1 and UPE2 update MAC and ARP entries on the ports
corresponding to the changed spanning tree.
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
STP/RSTP
S1 S4
Access
S3
S2
Topology change
On the network shown in Figure 15-11, 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
Access
S2 S4
S1 S3
UPE1 is configured with the highest priority, UPE2 with the second highest
priority, and all other switches with default or lower priorities. After the link
between UPE1 and UPE2 fails, the blocked ports (replacing the root ports) on
switching devices no longer receive packets with higher priorities, triggering
state machine calculation. If the calculation changes the blocked ports to
designated ports, a permanent loop forms, as shown in Figure 15-12.
Core
MPLS/IP Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
STP/RSTP
Access
S2 S4
S1 S3
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
Eth-Trunk
STP/RSTP
Access
S2 S4
S1 S3
Core
MPLS/IP Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
Root
protection
S2
S4
Access
STP/RSTP
S1 S3
MST Region
S1 S2
all VLAN
VLAN
VLAN VLAN
10&20 VLAN
20&30 20&30
10&20
VLAN
S3 20&40 S4
In Figure 15-15, S1 and S2 are devices at the aggregation layer, and 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 the access device.
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.
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
STP/RSTP
S1 S4
Access
S2 S3
Licensing Requirements
MSTP configuration commands are available only after the S1720GW, S1720GWR,
and S1720X have the license (WEB management to full management Electronic
RTU License) loaded and activated and the switches are restarted. MSTP
configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S2710SI V100R006(C03&C05)
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● Table 15-8 lists the specification of MSTP.
Item Specification
● MSTP BPDUs may be discarded in a scenario wherein there are many MSTIs
and MSTP multi-process is configured. This is due to the default CIR of STP
being insufficient. (The default CIR of STP is insufficient because the length of
MSTP BPDUs increases as the number of MSTIs increases, and the number of
outgoing MSTP BPDUs increases when MSTP multi-process is configured.) To
avoid this situation, increase the CIR of STP.
If the CPCAR values are adjusted improperly, network services are affected. To
adjust the CPCAR values of STP BPDUs, contact technical support personnel.
● Enabling MSTP on a ring network immediately triggers spanning tree
calculation. If basic configurations are not performed on switches and
interfaces before MSTP is enabled, network flapping may occur upon changes
to parameters such as device priority and interface priority.
Context
MSTP based on the basic STP/RSTP function divides a switching network into
multiple regions, each of which has multiple spanning trees that are independent
of each other. MSTP isolates different VLANs' traffic, and load-balances VLAN
traffic. MSTP is configured on switches to trim a ring network to a loop-free
network. Devices start spanning tree calculation after the working mode is set and
MSTP is enabled. To intervene in the spanning tree calculation, use any of the
following methods:
Context
Before configuring basic MSTP functions, set the working mode of a switch to
MSTP. MSTP is compatible with STP and RSTP.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp mode mstp
The working mode of the switch 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 switches belong to the same MST region when they have the same:
● Name of the MST region
● Mapping between VLANs and MSTIs
● Revision level of the MST region
Perform the following steps on a switch that needs to join an MST region.
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 region-name name
The name of an MST region is configured.
By default, the MST region name is the MAC address of the bridge MAC of the
switch.
Step 4 Perform either of the following steps to configure VLAN-to-instance mappings.
NOTE
Changing MST region configurations (especially changes in the VLAN mapping table)
triggers spanning tree recalculation and may cause route flapping. Therefore:
● After configuring an MST region name, VLAN-to-MSTI mappings, and an MSTP revision
number, run the check region-configuration command in the MST region view to
verify the configuration. After confirming the region configurations, run the active
region-configuration command to activate MST region configurations.
● You are advised not to modify MST region parameters after the MST region is activated.
----End
Context
MSTP can calculate the root bridge or you can manually configure the root bridge
or secondary root bridge. Manually configuring the root bridge and secondary root
bridge is recommended.
Procedure
● Perform the following operations on the device to be used as the root bridge.
a. Run system-view
By default, a switch does not function as the root bridge. After the
configuration is complete, the priority value of the device is 0 (this value
cannot be modified).
By default, a switch does not function as the secondary root bridge. After
the configuration is complete, the priority value of the device is 4096
(this value cannot be modified).
----End
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 switch in an MSTI.
The default priority value of the switch is 32768.
If instance-id is not specified, a priority is set for the switch 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
Procedure
Step 1 Run system-view
The system view is displayed.
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 instance instance-id port priority priority
A port priority is set in an MSTI.
By default, the port priority is 128.
The priority value ranges from 0 to 240, in increments of 16.
----End
Procedure
Step 1 Run system-view
NOTE
NOTE
For the S1720GFR, S2750EI, S5700LI, and S5700S-LI, a maximum of 64 STP-enabled ports in Up
state are recommended. If there are more than 64 STP-enabled ports in Up state, the CPU may
be affected and faults such as protocol flapping may occur.
For the S1720GW, S1720GWR, S1720GW-E, S1720GWR-E, S2720EI, S5710-X-LI, S5720LI, S5720S-
LI, S5730SI, S5730S-EI, S1720X, S1720X-E, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S5720SI, and
S5720S-SI, a maximum of 128 STP-enabled ports in Up state are recommended. If there are
more than 128 STP-enabled ports in Up state, the CPU may be affected and faults such as
protocol flapping may occur.
For the S5720EI, a maximum of 200 STP-enabled ports in Up state are recommended. If there
are more than 200 STP-enabled ports in Up state, the CPU may be affected and faults such as
protocol flapping may occur.
For the S5720HI, S6720EI, and S6720S-EI, a maximum of 256 STP-enabled ports in Up state are
recommended. If there are more than 256 STP-enabled ports in Up state, the CPU may be
affected and faults such as protocol flapping may occur.
----End
Follow-up Procedure
If the topology of a spanning tree changes, the forwarding paths to associated
VLANs are changed. On the switch, 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.
NOTE
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 [ 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.
Context
A process ID uniquely identifies an MSTP process. After the ports on an MSTP-
enabled device are bound to different processes, the switch performs MSTP
calculation based on processes, with only relevant ports in each process taking
part in MSTP calculation. To create an MSTP process, perform the following
procedure on the devices connected to access rings.
Procedure
Step 1 Run system-view
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 followed by the stp binding process command.
----End
Context
After being added to MSTP processes, interfaces can participate in MSTP
calculation. The links connecting MSTP-enabled devices and access rings are called
access links, and 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 a port on an access link to an MSTP process
a. Run system-view
NOTE
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, run the stp enable command in the interface view.
----End
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 process process-id
The MSTP process view is displayed.
c. Run stp [ instance instance-id ] root primary
The device is configured as the root bridge.
By default, a switch does not function as the root bridge. After the
configuration is complete, the priority value of the device is 0 (this value
cannot be modified).
If instance is not specified, the device in MSTI 0 is a root bridge.
● Perform the following operations on the device to be used as the secondary
root bridge.
a. Run system-view
The system view is displayed.
b. Run stp process process-id
The MSTP process view is displayed.
c. Run stp [ instance instance-id ] root secondary
The device is configured as the secondary root bridge.
By default, a switch does not function as the secondary root bridge. After
the configuration is complete, the priority value of the device is 4096
(this value cannot be modified).
If instance is not specified, the device in MSTI 0 is a secondary root
bridge.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp process process-id
NOTE
● To configure a switch as the primary root bridge, run the stp [ instance instance-id ]
root primary command directly. The priority value of this switch is 0.
● To configure a switch as the secondary root bridge, run the stp [ instance instance-id ]
root secondary command. The priority value of this switch is 4096.
In an MSTI, a switch 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
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. Setting different path costs for a port
in different MSTIs allows VLAN traffic to be transmitted along different physical
links for load balancing.
If loops occur on a network, it is recommended that you set a large path cost for
ports with low link rates. MSTP then blocks these ports.
Procedure
Step 1 Run system-view
By default, the IEEE 802.1t standard (dot1t) is used to calculate the path cost.
All switches on a network must use the same path cost calculation method.
----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 binding process process-id
The port is bound to an MSTP process.
Step 4 Run stp [ process process-id ] instance instance-id port priority priority
A port priority is set in an MSTI.
By default, the port priority is 128.
The priority value ranges from 0 to 240, in increments of 16.
----End
Procedure
Step 1 Run system-view
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.
----End
Context
After MSTP multi-process is enabled on the switch, you must enable MSTP in the
MSTP process view so that the MSTP configuration can take effect in the MSTP
process.
Procedure
Step 1 Run system-view
NOTE
For the S1720GFR, S2750EI, S5700LI, and S5700S-LI, a maximum of 64 STP-enabled ports in Up
state are recommended. If there are more than 64 STP-enabled ports in Up state, the CPU may
be affected and faults such as protocol flapping may occur.
For the S1720GW, S1720GWR, S1720GW-E, S1720GWR-E, S2720EI, S5710-X-LI, S5720LI, S5720S-
LI, S5730SI, S5730S-EI, S1720X, S1720X-E, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S5720SI, and
S5720S-SI, a maximum of 128 STP-enabled ports in Up state are recommended. If there are
more than 128 STP-enabled ports in Up state, the CPU may be affected and faults such as
protocol flapping may occur.
For the S5720EI, a maximum of 200 STP-enabled ports in Up state are recommended. If there
are more than 200 STP-enabled ports in Up state, the CPU may be affected and faults such as
protocol flapping may occur.
For the S5720HI, S6720EI, and S6720S-EI, a maximum of 256 STP-enabled ports in Up state are
recommended. If there are more than 256 STP-enabled ports in Up state, the CPU may be
affected and faults such as protocol flapping may occur.
----End
Follow-up Procedure
If the topology of a spanning tree changes, the forwarding paths to associated
VLANs are changed. On the switch, therefore, the ARP entries corresponding to
these VLANs need to be updated. MSTP processes ARP entries in either fast or
normal mode.
● In fast mode, ARP entries to be updated are directly deleted.
● In normal mode, ARP entries to be updated are rapidly aged.
The remaining lifetime of ARP entries to be updated is set to 0. The switch
rapidly processes these aged entries. If the number of ARP aging probe
attempts is not set to 0, ARP implements aging probe for these ARP entries.
In either fast or normal mode, MAC entries are directly deleted.
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.
NOTICE
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.
Pre-configuration Tasks
Before configuring MSTP parameters that affect route convergence, configure
MSTP or MSTP multi-process.
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. A larger network diameter indicates a larger network
scale.
An improper network diameter may cause slow network convergence and affect
communication. Run the stp bridge-diameter command to set an appropriate
network diameter based on the network scale, which helps speed up convergence.
It is recommended that all devices be configured with the same network diameter.
Procedure
Step 1 Run system-view
NOTE
The switch calculates the optimal Forward Delay period, Hello timer value, and
Max Age timer value based on the specified network diameter.
NOTE
RSTP uses a single spanning tree instance on the entire network, meaning that performance
deterioration cannot be prevented when the network scale increases. Therefore, the network
diameter cannot be larger than 7.
----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
----End
the switching device does not receive any BPDUs within the timeout period
(timeout period = Hello Time x 3 x Timer Factor), the device recalculates the
spanning tree.
● Max Age: determines whether BPDUs expire. A switching device determines
that a received configuration BPDU times out when the Max Age expires.
Devices on a ring network must use the same values of Forward Delay, Hello
Time, and Max Age.
You are not advised to directly change the preceding three timers. The three
parameters are relevant to the network scale; therefore, it is recommended that
you set the network diameter so that the spanning tree protocol automatically
adjusts these timers. When the default network diameter is used, the three timers
also retain their default values.
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 (Optional) Run stp process process-id
The MSTP process view is displayed.
NOTE
----End
Context
The path costs affect spanning tree calculation. Changes of path costs trigger
spanning tree recalculation. The path cost of an interface is affected by its
bandwidth, so you can change the interface bandwidth to affect spanning tree
calculation.
As shown in Figure 15-17, deviceA and deviceB are connected through two Eth-
Trunk links. Eth-Trunk 1 has three member interfaces in Up state and Eth-Trunk 2
has two member interfaces in Up state. Each member link has the same
bandwidth, and deviceA is selected as the root bridge.
● Eth-Trunk 1 has higher bandwidth than Eth-Trunk 2. After STP calculation,
Eth-Trunk 1 on deviceB is selected as the root port and Eth-Trunk 2 is selected
as the alternate port.
● If the maximum number of connections affecting bandwidth of Eth-Trunk 1 is
set to 1, the path cost of Eth-Trunk 1 is larger than the path cost of Eth-Trunk
2. Therefore, the two devices perform spanning tree recalculation. Then Eth-
Trunk 1 on deviceB becomes the alternate port and Eth-Trunk 2 becomes the
root port.
Root Bridge
SwitchA SwitchB
Eth-Trunk1
After
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
----End
Context
It is easy to implement rapid convergence on a P2P link. 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
A larger value of packet-number indicates more BPDUs sent in a hello interval
and therefore more system resources occupied. Setting the proper value of
packet-number prevents excess bandwidth usage when route flapping occurs.
Procedure
Step 1 Run system-view
By default, the maximum number of BPDUs that a port sends is 6 per second.
----End
Context
If an interface on an MSTP-enabled device is connected to an STP-enabled device,
the interface switches to the STP-compatible mode.
Procedure
● Switch to the MSTP mode in the interface view.
a. Run system-view
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 the 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.
By default, a port is a non-BPDU filter port.
● Configuring a port as an edge port and BPDU filter port in the interface view
a. Run system-view
The system view is displayed.
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
By default, the maximum number of hops of the spanning tree in an MST region
is 20.
----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
Pre-configuration Tasks
Before configuring MSTP protection functions, configure MSTP or MSTP multi-
process.
Context
Edge ports are directly connected to user terminals and will not receive BPDUs.
Attackers may send pseudo BPDUs to attack the switch. If the edge ports receive
the BPDUs, the switch configures the edge ports as non-edge ports and triggers a
new spanning tree calculation. Network flapping then occurs. BPDU protection can
be used to protect switches against malicious attacks.
Perform the following procedure on all switches that have edge ports.
Procedure
Step 1 Run system-view
NOTE
----End
Follow-up Procedure
If you want an edge port to automatically recover from the error-down state, run
the error-down auto-recovery cause bpdu-protection interval interval-value
command in the system view to configure the auto recovery function and set a
recovery delay on the port. Then a port in error-down state can automatically go
Up after the delay expires. Note the following when setting the recovery delay:
● By default, the auto recovery function is disabled; therefore, the recovery
delay parameter does not have a default value. When you enable the auto
recovery function, you must set a recovery delay.
● A smaller value of interval-value indicates a shorter time taken for an edge
port to go Up, and a higher frequency of Up/Down state transitions on the
port.
● A larger value of interval-value indicates a longer time taken for the edge
port to go Up, and a longer service interruption time.
● The auto recovery function takes effect only for the interfaces that transition
to the error-down state after the error-down auto-recovery command is
executed.
Procedure
Step 1 Run system-view
NOTE
NOTE
Within the time specified by stp tc-protection interval, the switch processes the number of
TC BPDUs specified by stp tc-protection threshold. Packets that exceed this threshold are
delayed, so spanning tree convergence may be affected. For example, if the period is set to
10s and the threshold is set to 5, the device processes five TC BPDUs within 10s. After 10s,
the device processes subsequent TC BPDUs.
----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 participating in STP 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 switch 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 switch 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
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp process process-id
The MSTP process view is displayed.
NOTE
----End
When Huawei devices are connected to non-Huawei devices, select the same
mode as that used on non-Huawei devices.
Procedure
Step 1 Run system-view
----End
Context
MSTP protocol packets have two formats: dot1s (IEEE 802.1s standard packets)
and legacy (proprietary protocol packets).
You can specify the packet format or use the auto mode. In auto mode, the switch
switches the MSTP protocol packet format based on the received MSTP protocol
packet format so that the switch can communicate with the peer device.
Procedure
Step 1 Run system-view
NOTE
The negotiation will fail if the format of MSTP packets is set to dot1s at one end and
legacy at the other end.
----End
Context
Interconnected Huawei and non-Huawei devices cannot communicate with each
other if they have the same region name, revision number, and VLAN-to-instance
mappings but different BPDU keys. To address this problem, enable the digest
snooping function on the Huawei device.
Perform the following steps on a switch in an MST region to enable the digest
snooping function.
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.
● Run the reset stp error packet statistics to clear the statistics of error STP
packets.
----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 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 ]
Network
RG1
SwitchA Eth-Trunk1 SwitchB
GE0/0/1 Eth-Trunk1
GE0/0/1
GE0/0/3 GE0/0/3
GE0/0/2
SwitchC SwitchD
GE0/0/2
GE0/0/1 GE0/0/1
MSTI 1:
Root Switch:SwitchA
Blocked port
MSTI 2:
Root Switch:SwitchB
Blocked port
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic MSTP functions on the switch on the ring network. Because
ports connected to the PCs do not participate in MSTP calculation, configure
these ports as edge ports.
2. Configure protection functions to protect devices or links. You can configure
root protection on the designated port of the root bridge.
NOTE
When the link between the root bridge and secondary root bridge goes Down, the port
enabled with root protection becomes Discarding because root protection takes effect.
To improve the reliability, you are advised to bind the link between the root bridge and
secondary root bridge to an Eth-Trunk.
3. Configure Layer 2 forwarding.
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 switches belong to the same MST region when they have the same:
– Name of the MST region
– Mapping between VLANs and MSTIs
– Revision level of the MST region
# Configure an MST region on SwitchA.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[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] active region-configuration
[SwitchA-mst-region] quit
# Configure an MST region on SwitchB.
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[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] active region-configuration
[SwitchB-mst-region] quit
# Configure an MST region on SwitchC.
<HUAWEI> system-view
[HUAWEI] sysname SwitchC
[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] active region-configuration
[SwitchC-mst-region] quit
# Configure an MST region on SwitchD.
<HUAWEI> system-view
[HUAWEI] sysname SwitchD
[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] active region-configuration
[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 calculation method as an example to set the path cost to 20000 for
the ports to be blocked.
– All switches on a network must use the same path cost calculation method.
# Configure SwitchA to use Huawei calculation method to calculate the path
cost.
[SwitchA] stp pathcost-standard legacy
NOTE
If edge ports are connected to network devices that have STP enabled and BPDU
protection is enabled, the edge ports will be shut down and their attributes
remain unchanged after they receive BPDUs.
Step 2 Configure root protection on the designated port of the root bridge.
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
0 GigabitEthernet0/0/1 DESI FORWARDING ROOT
0 Eth-Trunk1 DESI FORWARDING NONE
1 GigabitEthernet0/0/1 DESI FORWARDING ROOT
In MSTI 1, GE0/0/1 and Eth-Trunk1 are designated ports because SwitchA is the
root bridge. In MSTI 2, GE0/0/1 on SwitchA is the designated port and Eth-Trunk1
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
0 GigabitEthernet0/0/1 DESI FORWARDING ROOT
0 Eth-Trunk1 ROOT FORWARDING NONE
1 GigabitEthernet0/0/1 DESI FORWARDING ROOT
1 Eth-Trunk1 ROOT FORWARDING NONE
2 GigabitEthernet0/0/1 DESI FORWARDING ROOT
2 Eth-Trunk1 DESI FORWARDING NONE
In MSTI 2, GE0/0/1 and Eth-Trunk1 are designated ports because SwitchB is the
root bridge. In MSTI 1, GE0/0/1 on SwitchB is the designated port and Eth-Trunk1
is the root port.
# Run the display stp interface brief commands on SwitchC. Output similar to
the following is displayed:
[SwitchC] display stp interface gigabitethernet 0/0/3 brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/3 ROOT FORWARDING NONE
1 GigabitEthernet0/0/3 ROOT FORWARDING NONE
2 GigabitEthernet0/0/3 ROOT FORWARDING NONE
[SwitchC] display stp interface gigabitethernet 0/0/2 brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/2 DESI FORWARDING NONE
1 GigabitEthernet0/0/2 DESI FORWARDING NONE
2 GigabitEthernet0/0/2 ALTE DISCARDING NONE
GE0/0/3 on SwitchC is the root port in MSTI 1 and MSTI 2. GE0/0/2 on SwitchC is
the designated port in MSTI 1 but is blocked in MSTI 2.
# Run the display stp interface brief commands on SwitchD. Output similar to
the following is displayed:
[SwitchD] display stp interface gigabitethernet 0/0/3 brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/3 ROOT FORWARDING NONE
1 GigabitEthernet0/0/3 ROOT FORWARDING NONE
2 GigabitEthernet0/0/3 ROOT FORWARDING NONE
[SwitchD] display stp interface gigabitethernet 0/0/2 brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/2 ALTE DISCARDING NONE
1 GigabitEthernet0/0/2 ALTE DISCARDING NONE
2 GigabitEthernet0/0/2 DESI FORWARDING NONE
GE0/0/3 on SwitchD is the root port in MSTI 1 and MSTI 2. GE0/0/2 on SwitchD is
the blocked port in MSTI 1 and is the designated port in MSTI 2.
----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
active region-configuration
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 20
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 20
stp root-protection
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
eth-trunk 1
#
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
active region-configuration
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 20
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 20
stp root-protection
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
eth-trunk 1
#
return
● SwitchC configuration file
#
sysname SwitchC
#
vlan batch 2 to 20
#
stp bpdu-protection
Related Content
Videos
Configuring MSTP to Prevent Loops
Only the S5720SI, S5720S-SI, S5730SI, S5730S-EI, S6720SI, S6720S-SI, S5720EI, S5720HI,
S6720EI, and S6720S-EI support this example.
In Figure 15-19, hosts connect to Switch C, and Switch C connects to the Internet
through Switch A and Switch B. To improve access reliability, the user configures
redundant links. The redundant links cause a network loop, which leads to
broadcast storms and MAC address damaging.
It is required that the network loop be prevented when redundant links are
deployed, traffic be switched to another link when one link fails, and network
bandwidth be effectively used.
MSTP can be configured on the network to prevent loops. MSTP blocks redundant
links and prunes a network into a tree topology free from loops. In addition, VRRP
needs to be configured on Switch A and Switch B. Host A connects to the Internet
by using Switch A as the default gateway and Switch B as the secondary gateway.
Host B connects to the Internet by using Switch B as the default gateway and
Switch A as the secondary gateway. This allows traffic to be load balanced and
communication reliability improved.
GE0/0/2
/2 /1
E 0/0
G
SwitchC MSTP Internet
GE0/0/2
GE
3 0
0/0/ SwitchC /0/4
GE
HostB GE RouterB
0/0 0/3
VLAN3 /1 GE0/
10.1.3.101/24
SwitchB
VRID 1:Backup
VRRP VRID 2 VRID 2:Master
Virtual IP Address:
10.1.3.100
MSTI1: MSTI2:
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic MSTP on the switches, including:
a. Configure MST and create multi-instance, map VLAN 2 to MSTI 1, and
map VLAN 3 to MSTI 2 to load balance traffic.
b. Configure the root bridge and backup bridge in the MST region.
c. Configure the path cost on an interface so that the interface can be
blocked.
d. Enable MSTP to prevent loops:
Procedure
Step 1 Configure basic MSTP functions.
1. Add Switch A, Switch B, and Switch C to region RG1, and create instances
MSTI 1 and MSTI 2.
# Configure an MST region on Switch A.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] stp region-configuration
[SwitchA-mst-region] region-name RG1
[SwitchA-mst-region] instance 1 vlan 2
[SwitchA-mst-region] instance 2 vlan 3
[SwitchA-mst-region] active region-configuration
[SwitchA-mst-region] quit
# Configure an MST region on Switch B.
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] stp region-configuration
[SwitchB-mst-region] region-name RG1
2. Configure the root bridges and backup bridges for MSTI 1 and MSTI 2 in RG1.
– Configure the root bridge and backup bridge for MSTI 1.
# Set Switch A as the root bridge of MSTI 1.
[SwitchA] stp instance 1 root primary
3. Set the path costs of the interfaces that you want to block on MSTI 1 and
MSTI 2 to be greater than the default value.
NOTE
– The path cost range is determined by the calculation method. The Huawei
calculation method is used as an example. Set the path costs of the interfaces to
20000.
– The switches on the same network must use the same calculation method to
calculate path costs.
# Set the path cost calculation method on Switch A to Huawei calculation
method.
[SwitchA] stp pathcost-standard legacy
NOTE
If edge ports are connected to network devices that have STP enabled and BPDU
protection is enabled, the edge ports will be shut down and their attributes
remain unchanged after they receive BPDUs.
Step 2 Enable the protection function on the designated interfaces of each root bridge.
# Enable root protection on GE0/0/1 of Switch A.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] stp root-protection
[SwitchA-GigabitEthernet0/0/1] quit
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 Switch A to view the status and
protection mode on ports. Output similar to the following is displayed:
[SwitchA] display stp brief
MSTID Port Role STP State Protection
# Run the display stp brief command on Switch B. Output similar to the
following is displayed:
[SwitchB] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 DESI FORWARDING ROOT
0 GigabitEthernet0/0/2 ROOT FORWARDING NONE
1 GigabitEthernet0/0/1 DESI FORWARDING ROOT
1 GigabitEthernet0/0/2 ROOT FORWARDING NONE
2 GigabitEthernet0/0/1 DESI FORWARDING ROOT
2 GigabitEthernet0/0/2 DESI FORWARDING NONE
# Run the display stp interface brief command on Switch C. Output similar to
the following is displayed:
[SwitchC] display stp interface gigabitethernet 0/0/1 brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 ROOT FORWARDING NONE
1 GigabitEthernet0/0/1 ROOT FORWARDING NONE
2 GigabitEthernet0/0/1 ALTE DISCARDING NONE
[SwitchC] display stp interface gigabitethernet 0/0/4 brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/4 ALTE DISCARDING NONE
1 GigabitEthernet0/0/4 ALTE DISCARDING NONE
2 GigabitEthernet0/0/4 ROOT FORWARDING NONE
# Create VRRP group 2 on SwitchA and SwitchB. Set SwitchB as the master device,
priority to 120, and preemption delay to 20 seconds. Set SwitchA as the backup
device and retain the default priority.
[SwitchB] interface vlanif 3
[SwitchB-Vlanif3] vrrp vrid 2 virtual-ip 10.1.3.100
[SwitchB-Vlanif3] vrrp vrid 2 priority 120
[SwitchB-Vlanif3] vrrp vrid 2 preempt-mode timer delay 20
[SwitchB-Vlanif3] quit
[SwitchA] interface vlanif 3
[SwitchA-Vlanif3] vrrp vrid 2 virtual-ip 10.1.3.100
[SwitchA-Vlanif3] quit
# Set the virtual IP address 10.1.2.100 of VRRP group 1 as the default gateway of
Host A, and the virtual IP address 10.1.3.100 of VRRP group 2 as the default
gateway of Host B.
Step 7 Verify the configuration.
# After completing the preceding configurations, run the display vrrp command
on SwitchA. SwitchA's VRRP status is master in VRRP group 1 and backup in VRRP
group 2.
[SwitchA] display vrrp
Vlanif2 | Virtual Router 1
State : Master
Virtual IP : 10.1.2.100
Master IP : 10.1.2.102
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 20 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
# Run the display vrrp command on SwitchB. SwitchB's VRRP status is backup in
VRRP group 1 and master in VRRP group 2.
[SwitchB] display vrrp
Vlanif2 | Virtual Router 1
State : Backup
Virtual IP : 10.1.2.100
Master IP : 10.1.2.102
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 120
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2012-05-11 11:39:18
Last change time : 2012-05-26 11:38:58
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 2 to 4
#
stp bpdu-protection
stp instance 1 root primary
stp instance 2 root secondary
stp pathcost-standard legacy
#
stp region-configuration
region-name RG1
instance 1 vlan 2
instance 2 vlan 3
active region-configuration
#
interface Vlanif2
ip address 10.1.2.102 255.255.255.0
vrrp vrid 1 virtual-ip 10.1.2.100
vrrp vrid 1 priority 120
vrrp vrid 1 preempt-mode timer delay 20
#
interface Vlanif3
ip address 10.1.3.102 255.255.255.0
vrrp vrid 2 virtual-ip 10.1.3.100
#
interface Vlanif4
ip address 10.1.4.102 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 3
stp root-protection
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 4
stp edged-port enable
#
ospf 1
area 0.0.0.0
network 10.1.2.0 0.0.0.255
network 10.1.3.0 0.0.0.255
network 10.1.4.0 0.0.0.255
#
return
● SwitchB configuration file
#
sysname SwitchB
#
vlan batch 2 to 3 5
#
stp instance 1 root secondary
stp instance 2 root primary
stp bpdu-protection
stp pathcost-standard legacy
#
stp region-configuration
region-name RG1
instance 1 vlan 2
instance 2 vlan 3
active region-configuration
#
interface Vlanif2
ip address 10.1.2.103 255.255.255.0
vrrp vrid 1 virtual-ip 10.1.2.100
#
interface Vlanif3
ip address 10.1.3.103 255.255.255.0
vrrp vrid 2 virtual-ip 10.1.3.100
vrrp vrid 2 priority 120
vrrp vrid 2 preempt-mode timer delay 20
#
interface Vlanif5
ip address 10.1.5.103 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 3
stp root-protection
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 5
stp edged-port enable
#
ospf 1
area 0.0.0.0
network 10.1.2.0 0.0.0.255
network 10.1.3.0 0.0.0.255
network 10.1.5.0 0.0.0.255
#
return
This configuration can be supported only on the S5720EI, S5720HI, S6720EI, and S6720S-EI.
In Figure 15-20, each CE is dual-homed to PEs. The PEs establish a VPLS full
mesh. The CEs and PEs run MSTP. Generally, traffic is forwarded through the
primary link. If the primary link fails, traffic is switched to the secondary link.
Figure 15-20 Network diagram for connecting CEs to the VPLS in dual-homing
mode
1.1.1.1/32 2.2.2.2/32
PE1 PE2
GE0/0/1 GE0/0/1
GE0/0/2 GE0/0/2
GE0/0/1 GE0/0/3 GE0/0/3 GE0/0/1
GE0/0/2 VPLS GE0/0/2
CE1 GE0/0/3 GE0/0/2 CE2
PC1 GE0/0/4 GE0/0/2 GE0/0/3 GE0/0/4 PC2
10.1.1.1/24 GE0/0/1 GE0/0/1 10.1.1.2/24
PE4 PE3
4.4.4.4/32 3.3.3.3/32
Loopback1 - 1.1.1.1/32
Loopback1 - 2.2.2.2/32
Loopback1 - 3.3.3.3/32
Loopback1 - 4.4.4.4/32
CE1 GigabitEthernet0/ - -
0/1
GigabitEthernet0/ - -
0/4
GigabitEthernet0/ - -
0/2
CE2 GigabitEthernet0/ - -
0/1
GigabitEthernet0/ - -
0/4
GigabitEthernet0/ - -
0/2
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the routing protocol on the backbone network to implement
interworking.
2. Set up a remote LDP session between the PEs.
3. Establish a VPLS full mesh between PEs.
4. Configure MSTP. Configure PE1 and PE2 as the primary roots, and configure
PE3 and PE4 as the secondary roots.
Procedure
Step 1 Specify the VLANs that device interfaces belong to and set the IP addresses of the
corresponding VLANIF interfaces according to Figure 15-20.
NOTE
● The AC-side and PW-side physical interfaces of a PE cannot be added to the same
VLAN; otherwise, a loop may occur.
● Packets sent from CEs to PEs must contain VLAN tags.
# Configure CE1.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] vlan batch 100
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type trunk
[CE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 100
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface gigabitethernet 0/0/4
[CE1-GigabitEthernet0/0/4] port link-type trunk
[CE1-GigabitEthernet0/0/4] port trunk allow-pass vlan 100
[CE1-GigabitEthernet0/0/4] quit
[CE1] interface gigabitethernet 0/0/2
[CE1-GigabitEthernet0/0/2] port link-type access
[CE1-GigabitEthernet0/0/2] port default vlan 100
[CE1-GigabitEthernet0/0/2] quit
# Configure CE2.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan batch 100
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type trunk
[CE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 100
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface gigabitethernet 0/0/4
[CE2-GigabitEthernet0/0/4] port link-type trunk
[CE2-GigabitEthernet0/0/4] port trunk allow-pass vlan 100
[CE2-GigabitEthernet0/0/4] quit
[CE2] interface gigabitethernet 0/0/2
[CE2-GigabitEthernet0/0/2] port link-type access
[CE2-GigabitEthernet0/0/2] port default vlan 100
[CE2-GigabitEthernet0/0/2] quit
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] vlan batch 10 40
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] port link-type trunk
[PE1-GigabitEthernet0/0/2] port trunk allow-pass vlan 10
[PE1-GigabitEthernet0/0/2] quit
[PE1] interface gigabitethernet 0/0/3
[PE1-GigabitEthernet0/0/3] port link-type trunk
[PE1-GigabitEthernet0/0/3] port trunk allow-pass vlan 40
[PE1-GigabitEthernet0/0/3] quit
[PE1] interface vlanif 10
[PE1-Vlanif10] ip address 172.16.1.1 24
[PE1-Vlanif10] quit
[PE1] interface vlanif 40
[PE1-Vlanif40] ip address 172.19.1.2 24
[PE1-Vlanif40] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
# Configure PE3.
<HUAWEI> system-view
[HUAWEI] sysname PE3
[PE3] vlan batch 20 30
[PE3] interface gigabitethernet 0/0/2
[PE3-GigabitEthernet0/0/2] port link-type trunk
[PE3-GigabitEthernet0/0/2] port trunk allow-pass vlan 20
[PE3-GigabitEthernet0/0/2] quit
[PE3] interface gigabitethernet 0/0/3
[PE3-GigabitEthernet0/0/3] port link-type trunk
[PE3-GigabitEthernet0/0/3] port trunk allow-pass vlan 30
[PE3-GigabitEthernet0/0/3] quit
[PE3] interface vlanif 20
[PE3-Vlanif20] ip address 172.17.1.2 24
[PE3-Vlanif20] quit
[PE3] interface vlanif 30
[PE3-Vlanif30] ip address 172.18.1.1 24
[PE3-Vlanif30] quit
# Configure PE4.
<HUAWEI> system-view
[HUAWEI] sysname PE4
[PE4] vlan batch 30 40
[PE4] interface gigabitethernet 0/0/2
[PE4-GigabitEthernet0/0/2] port link-type trunk
[PE4-GigabitEthernet0/0/2] port trunk allow-pass vlan 30
[PE4-GigabitEthernet0/0/2] quit
[PE4] interface gigabitethernet 0/0/3
[PE4-GigabitEthernet0/0/3] port link-type trunk
[PE4-GigabitEthernet0/0/3] port trunk allow-pass vlan 40
[PE4-GigabitEthernet0/0/3] quit
[PE4] interface vlanif 30
[PE4-Vlanif30] ip address 172.18.1.2 24
[PE4-Vlanif30] quit
[PE4] interface vlanif 40
[PE4-Vlanif40] ip address 172.19.1.1 24
[PE4-Vlanif40] quit
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure PE2.
[PE2] router id 2.2.2.2
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 2.2.2.2 32
[PE2-LoopBack1] quit
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 172.16.1.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] network 172.17.1.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# Configure PE3.
[PE3] router id 3.3.3.3
[PE3] interface loopback 1
[PE3-LoopBack1] ip address 3.3.3.3 32
[PE3-LoopBack1] quit
[PE3] ospf 1
[PE3-ospf-1] area 0
[PE3-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE3-ospf-1-area-0.0.0.0] network 172.17.1.0 0.0.0.255
[PE3-ospf-1-area-0.0.0.0] network 172.18.1.0 0.0.0.255
[PE3-ospf-1-area-0.0.0.0] quit
[PE3-ospf-1] quit
# Configure PE4.
[PE4] router id 4.4.4.4
[PE4] interface loopback 1
[PE4-LoopBack1] ip address 4.4.4.4 32
[PE4-LoopBack1] quit
[PE4] ospf 1
[PE4-ospf-1] area 0
[PE4-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0
[PE4-ospf-1-area-0.0.0.0] network 172.18.1.0 0.0.0.255
[PE4-ospf-1-area-0.0.0.0] network 172.19.1.0 0.0.0.255
[PE4-ospf-1-area-0.0.0.0] quit
[PE4-ospf-1] quit
# Wait for 40s and run the display ip routing-table command on PE1, PE2, and
PE3. Output similar to the following is displayed (PE1 is used as an example). The
output indicates that the PEs have learned the routes to one another.
[PE1] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 13
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 10
[PE1-Vlanif10] mpls
[PE1-Vlanif10] mpls ldp
[PE1-Vlanif10] quit
[PE1] interface vlanif 40
[PE1-Vlanif40] mpls
[PE1-Vlanif40] mpls ldp
[PE1-Vlanif40] quit
# Configure PE2.
[PE2] mpls lsr-id 2.2.2.2
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 10
[PE2-Vlanif10] mpls
[PE2-Vlanif10] mpls ldp
[PE2-Vlanif10] quit
[PE2] interface vlanif 20
[PE2-Vlanif20] mpls
[PE2-Vlanif20] mpls ldp
[PE2-Vlanif20] quit
# Configure PE3.
[PE3] mpls lsr-id 3.3.3.3
[PE3] mpls
[PE3-mpls] quit
[PE3] mpls ldp
[PE3-mpls-ldp] quit
[PE3] interface vlanif 20
[PE3-Vlanif20] mpls
[PE3-Vlanif20] mpls ldp
[PE3-Vlanif20] quit
[PE3] interface vlanif 30
[PE3-Vlanif30] mpls
[PE3-Vlanif30] mpls ldp
[PE3-Vlanif30] quit
# Configure PE4.
[PE4] mpls lsr-id 4.4.4.4
[PE4] mpls
[PE4-mpls] quit
[PE4] mpls ldp
[PE4-mpls-ldp] quit
[PE4] interface vlanif 30
[PE4-Vlanif30] mpls
[PE4-Vlanif30] mpls ldp
[PE4-Vlanif30] quit
[PE4] interface vlanif 40
[PE4-Vlanif40] mpls
[PE4-Vlanif40] mpls ldp
[PE4-Vlanif40] quit
# Configure PE2.
# Configure PE3.
[PE3] mpls ldp remote-peer 1.1.1.1
[PE3-mpls-ldp-remote-1.1.1.1] remote-ip 1.1.1.1
[PE3-mpls-ldp-remote-1.1.1.1] quit
# Configure PE4.
[PE4] mpls ldp remote-peer 2.2.2.2
[PE4-mpls-ldp-remote-2.2.2.2] remote-ip 2.2.2.2
[PE4-mpls-ldp-remote-2.2.2.2] quit
After the configuration is complete, run the display mpls ldp session command
on the PEs. The command output shows that the status of the remote LDP peer
relationship is Operational, indicating that remote LDP sessions have been set up.
The output on PE1 is used as an example:
[PE1] display mpls ldp session
# Configure PE1.
[PE1] mpls l2vpn
[PE1-l2vpn] quit
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
# Configure PE3.
[PE3] mpls l2vpn
[PE3-l2vpn] quit
# Configure PE4.
[PE4] mpls l2vpn
[PE4-l2vpn] quit
# Configure PE1.
[PE1] vsi a2 static
[PE1-vsi-a2] pwsignal ldp
[PE1-vsi-a2-ldp] vsi-id 2
[PE1-vsi-a2-ldp] peer 2.2.2.2
[PE1-vsi-a2-ldp] peer 3.3.3.3
[PE1-vsi-a2-ldp] peer 4.4.4.4
[PE1-vsi-a2-ldp] quit
[PE1-vsi-a2] quit
# Configure PE2.
[PE2] vsi a2 static
[PE2-vsi-a2] pwsignal ldp
[PE2-vsi-a2-ldp] vsi-id 2
[PE2-vsi-a2-ldp] peer 1.1.1.1
[PE2-vsi-a2-ldp] peer 3.3.3.3
[PE2-vsi-a2-ldp] peer 4.4.4.4
[PE2-vsi-a2-ldp] quit
[PE2-vsi-a2] quit
Before configuring the termination sub-interface, run the display vcmp status command to
view the VCMP role. If the value of the Role field is Client, run the vcmp role { silent |
transparent } command to change the VCMP role to silent or transparent.
# Configure PE1.
[PE1] interface gigabitethernet 0/0/1
[PE1-GigabitEthernet0/0/1] port link-type hybrid
[PE1-GigabitEthernet0/0/1] quit
[PE1] interface gigabitethernet 0/0/1.1
[PE1-GigabitEthernet0/0/1.1] dot1q termination vid 100
[PE1-GigabitEthernet0/0/1.1] l2 binding vsi a2
[PE1-GigabitEthernet0/0/1.1] quit
# Configure PE2.
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type hybrid
[PE2-GigabitEthernet0/0/1] quit
[PE2] interface gigabitethernet 0/0/1.1
[PE2-GigabitEthernet0/0/1.1] dot1q termination vid 100
[PE2-GigabitEthernet0/0/1.1] l2 binding vsi a2
[PE2-GigabitEthernet0/0/1.1] quit
# Configure PE3.
[PE3] interface gigabitethernet 0/0/1
[PE3-GigabitEthernet0/0/1] port link-type hybrid
[PE3-GigabitEthernet0/0/1] quit
[PE3] interface gigabitethernet 0/0/1.1
[PE3-GigabitEthernet0/0/1.1] dot1q termination vid 100
[PE3-GigabitEthernet0/0/1.1] l2 binding vsi a2
[PE3-GigabitEthernet0/0/1.1] quit
# Configure PE4.
[PE4] interface gigabitethernet 0/0/1
[PE4-GigabitEthernet0/0/1] port link-type hybrid
[PE4-GigabitEthernet0/0/1] quit
[PE4] interface gigabitethernet 0/0/1.1
[PE4-GigabitEthernet0/0/1.1] dot1q termination vid 100
[PE4-GigabitEthernet0/0/1.1] l2 binding vsi a2
[PE4-GigabitEthernet0/0/1.1] quit
NOTE
If edge ports are connected to network devices that have STP enabled and BPDU
protection is enabled, the edge ports will be shut down and their attributes remain
unchanged after they receive BPDUs.
# Configure PE1.
[PE1] stp enable
[PE1] interface gigabitethernet 0/0/1
[PE1-GigabitEthernet0/0/1] stp vpls-subinterface enable
[PE1-GigabitEthernet0/0/1] stp enable
[PE1-GigabitEthernet0/0/1] quit
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] stp disable
[PE1-GigabitEthernet0/0/2] quit
[PE1] interface gigabitethernet 0/0/3
[PE1-GigabitEthernet0/0/3] stp disable
[PE1-GigabitEthernet0/0/3] quit
# Configure PE2.
[PE2] stp enable
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] stp vpls-subinterface enable
[PE2-GigabitEthernet0/0/1] stp enable
[PE2-GigabitEthernet0/0/1] quit
[PE2] interface gigabitethernet 0/0/2
[PE2-GigabitEthernet0/0/2] stp disable
[PE2-GigabitEthernet0/0/2] quit
[PE2] interface gigabitethernet 0/0/3
[PE2-GigabitEthernet0/0/3] stp disable
[PE2-GigabitEthernet0/0/3] quit
# Configure PE3.
[PE3] stp enable
[PE3] interface gigabitethernet 0/0/1
[PE3-GigabitEthernet0/0/1] stp vpls-subinterface enable
[PE3-GigabitEthernet0/0/1] stp root-protection
[PE3-GigabitEthernet0/0/1] stp enable
[PE3-GigabitEthernet0/0/1] quit
[PE3] interface gigabitethernet 0/0/2
[PE3-GigabitEthernet0/0/2] stp disable
[PE3-GigabitEthernet0/0/2] quit
[PE3] interface gigabitethernet 0/0/3
[PE3-GigabitEthernet0/0/3] stp disable
[PE3-GigabitEthernet0/0/3] quit
# Configure PE4.
[PE4] stp enable
[PE4] interface gigabitethernet 0/0/1
[PE4-GigabitEthernet0/0/1] stp vpls-subinterface enable
[PE4-GigabitEthernet0/0/1] stp root-protection
[PE4-GigabitEthernet0/0/1] stp enable
[PE4-GigabitEthernet0/0/1] quit
[PE4] interface gigabitethernet 0/0/2
[PE4-GigabitEthernet0/0/2] stp disable
[PE4-GigabitEthernet0/0/2] quit
[PE4] interface gigabitethernet 0/0/3
***VSI Name : a2
Administrator VSI : no
Isolate Spoken : disable
VSI Index :0
PW Signaling : ldp
Member Discovery Style : static
PW MAC Learn Style : unqualify
Encapsulation Type : vlan
MTU : 1500
Diffserv Mode : uniform
Mpls Exp : --
DomainId : 255
Domain Name :
Ignore AcState : disable
P2P VSI : disable
Create Time : 0 days, 20 hours, 29 minutes, 54 seconds
VSI State : up
VSI ID :2
*Peer Router ID : 2.2.2.2
Negotiation-vc-id :2
primary or secondary : primary
ignore-standby-state : no
VC Label : 4099
Peer Type : dynamic
Session : up
Tunnel ID : 0xd
Broadcast Tunnel ID : 0xd
Broad BackupTunnel ID : 0x0
CKey :2
NKey :1
Stp Enable :0
PwIndex :0
Control Word : disable
*Peer Router ID : 3.3.3.3
Negotiation-vc-id :2
primary or secondary : primary
ignore-standby-state : no
VC Label : 4100
Peer Type : dynamic
Session : up
Tunnel ID : 0xf
Broadcast Tunnel ID : 0xf
Broad BackupTunnel ID : 0x0
CKey :4
NKey :3
Stp Enable :0
PwIndex :0
Control Word : disable
*Peer Router ID : 4.4.4.4
Negotiation-vc-id :2
primary or secondary : primary
ignore-standby-state : no
VC Label : 4101
Peer Type : dynamic
Session : up
Tunnel ID : 0xb
Broadcast Tunnel ID : 0xb
Broad BackupTunnel ID : 0x0
CKey :6
NKey :5
Stp Enable :0
PwIndex :0
Control Word : disable
**PW Information:
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 100
#
stp bpdu-protection
#
stp region-configuration
region-name RG1
active region-configuration
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 100
stp edged-port enable
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 100
#
return
● CE2 configuration file
#
sysname CE2
#
vlan batch 100
#
stp bpdu-protection
#
stp region-configuration
region-name RG1
active region-configuration
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 100
stp edged-port enable
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 100
#
return
● PE1 configuration file
#
sysname PE1
#
router id 1.1.1.1
#
vlan batch 10 40
#
stp instance 0 priority 0
#
stp region-configuration
region-name RG1
active region-configuration
#
mpls lsr-id 1.1.1.1
mpls
#
mpls l2vpn
#
vsi a2 static
pwsignal ldp
vsi-id 2
peer 2.2.2.2
peer 3.3.3.3
peer 4.4.4.4
#
mpls ldp
#
mpls ldp remote-peer 3.3.3.3
remote-ip 3.3.3.3
#
interface Vlanif10
ip address 172.16.1.1 255.255.255.0
mpls
mpls ldp
#
interface Vlanif40
ip address 172.19.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
stp vpls-subinterface enable
#
interface GigabitEthernet0/0/1.1
dot1q termination vid 100
l2 binding vsi a2
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10
stp disable
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 40
stp disable
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 172.16.1.0 0.0.0.255
network 172.19.1.0 0.0.0.255
#
return
● PE2 configuration file
#
sysname PE2
#
router id 2.2.2.2
#
vlan batch 10 20
#
stp instance 0 priority 0
#
stp region-configuration
region-name RG1
active region-configuration
#
mpls lsr-id 2.2.2.2
mpls
#
mpls l2vpn
#
vsi a2 static
pwsignal ldp
vsi-id 2
peer 1.1.1.1
peer 3.3.3.3
peer 4.4.4.4
#
mpls ldp
#
mpls ldp remote-peer 4.4.4.4
remote-ip 4.4.4.4
#
interface Vlanif10
ip address 172.16.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif20
ip address 172.17.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
stp vpls-subinterface enable
#
interface GigabitEthernet0/0/1.1
dot1q termination vid 100
l2 binding vsi a2
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10
stp disable
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 20
stp disable
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 172.16.1.0 0.0.0.255
network 172.17.1.0 0.0.0.255
#
return
● PE3 configuration file
#
sysname PE3
#
router id 3.3.3.3
#
vlan batch 20 30
#
stp instance 0 priority 4096
#
stp region-configuration
region-name RG1
active region-configuration
#
mpls lsr-id 3.3.3.3
mpls
#
mpls l2vpn
#
vsi a2 static
pwsignal ldp
vsi-id 2
peer 1.1.1.1
peer 2.2.2.2
peer 4.4.4.4
#
mpls ldp
#
mpls ldp remote-peer 1.1.1.1
remote-ip 1.1.1.1
#
interface Vlanif20
ip address 172.17.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 172.18.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type hybrid
stp root-protection
stp vpls-subinterface enable
#
interface GigabitEthernet0/0/1.1
dot1q termination vid 100
l2 binding vsi a2
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 20
stp disable
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 30
stp disable
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 172.17.1.0 0.0.0.255
Networking Requirements
On a network deployed with both Layer 2 single-access rings and multi-access
rings, switches transmit both Layer 2 and Layer 3 services. To enable different
rings to transmit different services, configure MSTP multi-process. Spanning trees
of different processes are calculated independently.
In Figure 15-21, both Layer 2 single-access rings and dual-access rings are
deployed and switches A and B carry both Layer 2 and Layer 3 services. Switches A
and B connected to dual-access rings are also connected to a single-access ring.
NOTE
In the ring where MSTP multi-process is configured, you are advised not to block the
interface directly connected to the root protection-enabled designated port.
Figure 15-21 MSTP multi-process for Layer 2 single-access rings and multi-access
rings
Network
SwitchC
GE0/0/5 GE0/0/5
Region name:RG1
PE2
PE1 SwitchB
SwitchA
CE CE
GE0/0/4 GE0/0/1 GE0/0/4
GE0/0/1
GE0/0/3 GE0/0/3
GE0/0/2 GE0/0/2
CE
CE
Instance1:VLAN2~100 Instance3:VLAN201~300
Process 1
Process 3
CE CE
Instance2:VLAN101~200
Process 2
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic MSTP functions, add a device to an MST region, and create
MSTIs.
NOTE
Procedure
Step 1 Configure basic MSTP functions, add devices to an MST region, and create MSTIs.
1. Configure MST regions and create MSTIs.
# Configure an MST region and create MSTIs on SwitchA.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] stp region-configuration
[SwitchA-mst-region] region-name RG1
[SwitchA-mst-region] instance 1 vlan 2 to 100
[SwitchA-mst-region] instance 2 vlan 101 to 200
[SwitchA-mst-region] instance 3 vlan 201 to 300
[SwitchA-mst-region] active region-configuration
[SwitchA-mst-region] quit
2. Enable MSTP.
# Configure SwitchA.
[SwitchA] stp enable
# Configure SwitchB.
[SwitchB] stp enable
[SwitchA-mst-process-1] quit
[SwitchA] stp process 2
[SwitchA-mst-process-2] quit
# Configure SwitchB.
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] stp enable
[SwitchB-GigabitEthernet0/0/1] bpdu enable
[SwitchB-GigabitEthernet0/0/1] stp binding process 2 link-share
[SwitchB-GigabitEthernet0/0/1] quit
# Configure SwitchB.
[SwitchB] stp process 3
[SwitchB-mst-process-3] stp enable
[SwitchB-mst-process-3] quit
[SwitchB] stp process 2
[SwitchB-mst-process-2] stp enable
[SwitchB-mst-process-2] quit
# Configure SwitchB.
[SwitchB] stp process 3
[SwitchB-mst-process-3] stp instance 0 root primary
[SwitchB-mst-process-3] stp instance 3 root primary
[SwitchB-mst-process-3] quit
[SwitchB] stp process 2
[SwitchB-mst-process-2] stp instance 0 root secondary
[SwitchB-mst-process-2] stp instance 2 root secondary
[SwitchB-mst-process-2] quit
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] stp root-protection
[SwitchB-GigabitEthernet0/0/2] quit
NOTE
– In each ring, the priority of the MSTP process on the downstream CE must be
lower than the priority of the MSTP process on the switch.
– For switches A and B on the dual-access ring, you are recommended to configure
them as the primary root bridges of different MSTIs.
● Configure shared link protection.
# Configure SwitchA.
[SwitchA] stp process 2
[SwitchA-mst-process-2] stp link-share-protection
[SwitchA-mst-process-2] quit
# Configure SwitchB.
[SwitchB] stp process 2
[SwitchB-mst-process-2] stp link-share-protection
[SwitchB-mst-process-2] quit
# Create VLANs 101 to 300 on SwitchB. Add GE 0/0/3 and GE 0/0/4 to VLANs 201
to 300, and add GE 0/0/1 and GE 0/0/2 to VLANs 101 to 200.
[SwitchB] vlan batch 101 to 300
[SwitchB] interface gigabitethernet 0/0/3
[SwitchB-GigabitEthernet0/0/3] port link-type trunk
[SwitchB-GigabitEthernet0/0/3] port trunk allow-pass vlan 201 to 300
[SwitchB-GigabitEthernet0/0/3] quit
[SwitchB] interface gigabitethernet 0/0/4
[SwitchB-GigabitEthernet0/0/4] port link-type trunk
[SwitchB-GigabitEthernet0/0/4] port trunk allow-pass vlan 201 to 300
[SwitchB-GigabitEthernet0/0/4] quit
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] port link-type trunk
[SwitchB-GigabitEthernet0/0/1] port trunk allow-pass vlan 101 to 200
[SwitchB-GigabitEthernet0/0/1] quit
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] port link-type trunk
[SwitchB-GigabitEthernet0/0/2] port trunk allow-pass vlan 101 to 200
[SwitchB-GigabitEthernet0/0/2] quit
----End
Configuration Files
Only the MSTP-related configuration files are provided.
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 2 to 200
#
stp region-configuration
region-name RG1
instance 1 vlan 2 to 100
instance 2 vlan 101 to 200
instance 3 vlan 201 to 300
active region-configuration
#
stp process 1
stp instance 0 root primary
stp instance 1 root primary
stp enable
stp process 2
stp instance 0 root primary
stp instance 2 root primary
stp link-share-protection
stp enable
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 101 to 200
stp binding process 2 link-share
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 101 to 200
stp binding process 2
stp root-protection
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 100
stp binding process 1
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 100
stp binding process 1
#
return
● SwitchB configuration file
#
sysname SwitchB
#
vlan batch 101 to 300
#
stp region-configuration
region-name RG1
instance 1 vlan 2 to 100
instance 2 vlan 101 to 200
instance 3 vlan 201 to 300
active region-configuration
#
stp process 2
stp instance 0 root secondary
stp instance 2 root secondary
stp link-share-protection
stp enable
stp process 3
● On a port, run the stp edge-port enable command to configure the port as
an STP edge port, and run the stp bpdu-filter enable command to enable
the BPDU packet filtering function and prevent the port from sending BPDU
packets.
● Run the stp disable command on the port to disable the STP protocol and
make the port remain in forwarding state.
To ensure availability and security, you are advised to configure the port as an STP
edge port. This is because when a loop occurs on a terminal device connected to
an edge port, the port automatically switches to a non-edge port and enables the
loop breaking function of STP.
16 VBST Configuration
This chapter describes how to configure the 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.
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 and multi-process 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 improving
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 16-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
DMAC SMAC Length LLC Data CRC
encapsulation
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
(VLAN 3) VLAN 3 VLAN 2 (VLAN 2)
VLAN 2
S2 S5
S3 S6
STP/RSTP spanning tree (root bridge S6)
S1 S4
VLAN 3 VLAN 2, 3 VLAN 2
HostC HostA
(VLAN 3) VLAN 3 VLAN 2 (VLAN 2)
VLAN 2
S2 S5
S3 S6
In Figure 16-2:
● Through topology calculation, STP/RSTP generates a spanning tree with the
root bridge as S6. The links between S2 and S5 and between S1 and S4 are
blocked. HostA and HostB belong to VLAN 2. The link between S2 and S5
does not permit packets of VLAN 2 to pass through because the link between
S2 and S5 is blocked. Therefore, HostA fails to communicate with HostB.
● Through topology calculation, VBST generates spanning trees VLAN 2 and
VLAN 3 with root bridges as S4 and S6 respectively. Traffic in VLAN 2 and
VLAN3 is forwarded through their respective spanning trees so that traffic is
load balanced between paths S2-S5 and S3-S6.
VLAN 1, 10
VBST VBST
Trunk
S3 S4
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 VLAN 1
as defined by STP/RSTP.
Assume that the congestion point of the spanning tree in VLAN 1 is on S4.
Because VBST runs on S4, so the congestion point exists in VLAN 1. S4 can
still receive and forward VBST BPDUs in VLAN 10. Loops occur in VLAN 10, so
spanning tree calculation in VLAN 10 is triggered. S1 and S2 transparently
transmit VBST BPDUs in VLAN 10, so only four interfaces on S3 and S4
participate in spanning tree calculation in VLAN 10. Then the spanning trees
in VLAN 1 and VLAN 10 are formed, as shown in Figure 16-3.
Assume that the blocking point of the spanning tree in VLAN 1 is on S2. STP/
RSTP runs on S2, so the blocking port exists on S2. S2 cannot forward VBST
BPDUs from VLAN 10 and no loop occurs in VLAN 10, so spanning tree
calculation in VLAN 10 is not triggered. VBST BPDUs from VLAN 10 can be
forwarded along the spanning tree in VLAN 1, that is, VLAN 10 and VLAN 1
share the spanning tree. as shown in Figure 16-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 16-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 16-4 shows the formed spanning
trees and forwarding paths. In Figure 16-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 configuration commands are available only after the S1720GW, S1720GWR,
and S1720X have the license (WEB management to full management Electronic
RTU License) loaded and activated and the switches are restarted. VBST
configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S5700SI V200R005C00
S5700EI V200R005(C00&C01&C02&C03)
S5710EI V200R005(C00&C02)
S5700HI V200R005(C00SPC500&C01&C02)
S5710HI V200R005(C00&C02&C03)
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● Table 16-4 describes the specifications of VBST.
Item Specification
● The switch does not support association between VBST and VPLS.
● When VBST is enabled on a ring network, VBST immediately starts spanning
tree calculation. Parameters such as the device priority and port priority affect
spanning tree calculation, and the change of these parameters may cause
network flapping. To ensure fast and stable spanning tree calculation, perform
basic configurations on the switch and interfaces before enabling VBST.
● If the protected instance has been configured in a SEP segment or ERPS ring
but the mapping between protected instances and VLANs is not configured,
VBST cannot be enabled.
● VBST cannot be enabled in the ignored VLAN or control VLAN used by ERPS,
RRPP, SEP, or Smart Link.
● If 1:N (N>1) mapping between MSTIs and VLANs has been configured on the
switch, delete the mapping before changing the STP working mode to VBST.
● If the stp vpls-subinterface enable command has been configured on a
switch, run the undo stp vpls-subinterface enable command on an interface
before changing the STP working mode to VBST.
● If the device has been configured as the root bridge or secondary root bridge,
run the undo stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> root command to
disable the root bridge or secondary root bridge function and run the stp vlan
{ vlan-id1 [ to vlan-id2 ] } &<1-10> priority priority command to change the
device priority.
● When more than 128 MSTIs are dynamically specified, STP is disabled in a
created VLAN in the configuration file, for example, stp vlan 100 disable.
● 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)
● 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 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.
Exercise caution when you configure a port as an edge port and BPDU filter
port.
● Root protection takes effect only on designated ports.
● In VBST networking, if the link type of the local interface is set to access, the
link type of the remote interface must also be set to access; if the link types
of the local and remote interfaces are both not access, the PVIDs of the two
interfaces must be the same. Otherwise, the two devices cannot negotiate the
VBST status, failing to achieve loop prevention.
● If a switch has an alternate port (backup of the root port), configure loop
protection on both the root port and alternate port.
Pre-configuration Tasks
Before configuring basic VBST functions, connect ports and set the physical
parameters of each interface to make the physical layer in Up state. For details,
see Basic Configuration for Interfaces and Ethernet Interface Configuration in the
S1720, S2700, S5700, and S6720 V200R011C10 Configuration Guide - Interface
Management.
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.
Generally, a high-performance switch at a high network layer is required to be
selected as the root bridge. However, the high-performance switch at a high
network layer may not have a high priority. It is necessary to set the device
priority to ensure that the device functions as the root bridge. Low-performance
devices at lower network layers are not fit to serve as root bridges. Therefore, set
low priorities for these devices.
Procedure
Step 1 Run system-view
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-id1 [ to vlan-id2 ] } &<1-10> root command to
disable the root bridge or secondary root bridge function and run the stp vlan { vlan-id1
[ to vlan-id2 ] } &<1-10> 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 16-5 shows the mapping between link rates
and path costs.
Procedure
Step 1 Run system-view
All switches on the same network must use the same path cost calculation
method.
The view of the Ethernet interface that participates in spanning tree calculation is
displayed.
● 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.
----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 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 vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> port priority priority
The priority of the port in each VLAN is set.
By default, the priority of a switch port is 128.
----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.
The mapping between MSTIs and VLANs can be manually configured or
dynamically specified.
● You can manually configure the mapping between MSTIs and VLANs on the
switch. If a static mapping is also configured for a VLAN, the static mapping
takes effect.
● After VBST is enabled, the system dynamically allocates instance IDs to
existing or new VLANs in ascending order. The dynamically specified mapping
cannot be changed manually. After a VLAN is deleted or STP is disabled
globally, its mapping is automatically deleted.
NOTE
When more than 128 MSTIs are dynamically specified, if a VLAN is created, in the
configuration file, STP is disabled, for example, stp vlan 100 disable.
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.
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.
NOTICE
The change of 1:1 mapping between MSTIs and VLANs causes VBST recalculation
and network flapping. Therefore, it is recommended that you run the check
region-configuration command in the MST region view to check whether the
parameters of the MST region are set correctly before activating the configuration
of the MST region. When determining that parameters of the MST region are set
correctly, run the active region-configuration command to activate 1:1 mapping
between MSTIs and VLANs.
----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 S5720HI, S6720EI, and S6720S-EI support up to 1200 PVs, the S1720X,
S1720X-E, S6720LI, S6720S-LI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, and
S5720EI supports up to 1000 PVs, the S1720GFR, S2750EI, and S5700LI support
up to 300 PVs, and other switches support up to 600 PVs.
● The number of PVs in the stack is the sum of PVs of member switches.
However, the S5720EI supports up to 2400 PVs.
● For an Eth-Trunk, the number of PVs supported by the system is the number of
PVs supported by the master device.
Procedure
Step 1 Run system-view
NOTE
NOTE
VBST cannot be enabled in the ignored VLAN or control VLAN used by ERPS, RRPP, SEP, or
Smart Link.
If VLAN mapping or VLAN stacking is configured on an interface corresponding to the
VLAN, VBST negotiation for this VLAN will fail.
NOTE
STP cannot be used with SEP or Smart Link. An STP-enabled interface cannot join a SEP
segment or Smart Link group. Similarly, the interface that has joined the SEP segment or
Smart Link group cannot be enabled with STP.
----End
Procedure
● Run the display stp [ vlan vlan-id ] [ interface interface-type interface-
number | slot slot-id ] [ brief ] command to check the spanning tree status
and statistics.
● Run the display stp [ vlan vlan-id ] active command to check details of and
statistics on spanning trees of all ports in Up state.
● 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 global command to check the summary of the spanning
tree protocol.
● Run the display stp region-configuration command to check the mapping
between instances and VLANs.
----End
Context
After basic VBST functions are configured, VBST implements fast convergence
using default parameters. To achieve better convergence, set parameters that
affect VBST convergence. 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, perform the
task of 16.7 Configuring VBST.
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-id1 [ to vlan-id2 ] } &<1-10> 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.
----End
Context
VBST uses the following parameters in spanning tree calculation:
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
Step 2 Set values of Hello time, Forward Delay, and Max Age.
● Run stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> 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-id1 [ to vlan-id2 ] } &<1-10> 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-id1 [ to vlan-id2 ] } &<1-10> timer max-age max-age
The value of Max Age is set.
----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 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 system view is displayed.
Step 2 Run stp timer-factor factor
The timeout interval for the switch to wait for BPDUs from the upstream device is
set.
By default, the timeout interval is 9 times the value of Hello time.
----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
The system view is displayed.
Step 2 Run interface interface-type interface-number
● If the Ethernet port works in full-duplex mode, the port is connected to a P2P
link. You can specify force-true to implement fast convergence.
● If the Ethernet port works in half-duplex mode, specify force-true to forcibly
set the link type to P2P to implement fast convergence.
● In other situations, specify auto so that the port identifies whether it is
connected to a P2P link.
----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 maximum number of BPDUs that the port can send at an interval of Hello
time is set.
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
When a port on a VBST-enabled switch is connected to an STP-enabled switch, the
port automatically switches to the STP mode.
In the following cases, you need to switch the port back to the VBST mode
manually:
Procedure
● Switching a port to the VBST mode
a. Run system-view
After the switch is switched to the VBST mode in the system view, all
ports switch to the VBST mode.
----End
Context
When the topology of an MSTI changes, the forwarding path of the VLAN
mapping the MSTI also changes. The MAC address entries and ARP entries
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp converge { fast | normal }
A convergence mode is configured.
By default, the VBST convergence mode of a port is normal.
NOTE
normal is recommended. If fast is used, frequently deleting ARP entries may result in 100%
CPU usage of the device. As a result, packets are not processed in a timely manner and
network flapping occurs.
----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, and 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 of 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.
● 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.
----End
Procedure
● Run the display stp [ vlan vlan-id ] [ interface interface-type interface-
number | slot slot-id ] [ brief ] command to check the spanning tree status
and statistics.
● Run the display stp [ vlan vlan-id ] active command to check details of and
statistics on spanning trees of all ports in Up state.
● 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 global command to check the summary of the spanning
tree protocol.
----End
Pre-configuration Tasks
Before configuring protection functions of VBST, complete the following task:
● Perform the task of 16.7 Configuring VBST.
● (Optional) Perform the operation of Configuring an Edge Port before
configuring BPDU protection.
Context
Edge ports are directly connected to user terminals and will not receive BPDUs. If
a switch is attacked by bogus BPDUs, edge ports will receive these BPDUs. The
switch then sets the edge ports as non-edge ports and recalculates the spanning
tree, resulting in network flapping.
BPDU protection can be used to protect the switch against malicious attacks. After
BPDU protection is enabled on the switch, the switch shuts down an edge port if
the edge port receives a BPDU.
Perform the following operations on the switch configured with an edge port.
Procedure
Step 1 Run system-view
----End
Follow-up Procedure
To configure a shutdown edge port to go Up automatically, run the error-down
auto-recovery cause bpdu-protection interval interval-value command in the
system view to configure the automatic recovery function and set the recovery
delay. After the delay expires, the port automatically goes Up. Note the following
when setting interval interval-value:
● A smaller value indicates a shorter delay for the port to go Up automatically
and a higher frequency at which the port alternates between Up and Down
states.
● A larger value indicates a longer delay for the port to go Up automatically
and longer traffic interruption.
Context
When malicious attackers send bogus TC BPDUs to attack the switch, the switch
receives a large number of TC BPDUs within a short time. If MAC address entries
and ARP entries are deleted frequently, the switch is heavily burdened, causing
potential risks to the network.
TC protection is used to suppress TC BPDUs. You can set the number of times the
switch processes TC BPDUs within a given time period. If the number of TC BPDUs
that the switch receives within a given time exceeds the specified threshold, the
switch processes TC BPDUs only for the specified number of times. After the
specified number of times is reached, the switch processes excess TC BPDUs at one
time only. For example, the period is set to 10s and the threshold is set to 5. After
the switch receives TC BPDUs, the switch processes the first five TC BPDUs within
10s. After 10s, the switch processes subsequent TC BPDUs. In this way, the switch
does not need to frequently delete MAC entries and ARP entries.
Procedure
Step 1 Run system-view
By default, the default number of times that the switch handles the TC BPDUs
and updates forwarding entries is 1 within a unit time.
NOTE
Within the time specified by stp tc-protection interval, the switch processes TC BPDUs of a
number specified by stp tc-protection threshold. Other packets are delayed, so
convergence may be affected.
----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
changed, triggering spanning tree recalculation. As a result, traffic may be
switched from high-speed links to low-speed links, causing network congestion. To
prevent network congestion, enable root protection on the switch to protect the
role of the root switch by retaining the role of the designated port.
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.
----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 to the
NMS. 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
----End
Procedure
● Run the display stp [ vlan vlan-id ] [ interface interface-type interface-
number | slot slot-id ] [ brief ] command to check the spanning tree status,
including the root protection status and information about other protection
functions.
● Run the display stp [ vlan vlan-id ] active command to check details of and
statistics on spanning trees of all ports in Up state, including the root
protection status and information about other protection functions.
● Run the display stp global command to check the summary of the spanning
tree protocol.
----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.
b. The upstream device then 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 sends an Agreement message to the upstream
device. After receiving the Agreement message, the upstream device sets
the port connected to the downstream device as a designated port, and
the designated port transitions to the Forwarding state.
● Common mode: The port ignores 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 Proposal message, the
downstream device sets the port connected to the upstream device as a
root port and blocks all non-edge ports. The root port then transitions to
the Forwarding state.
b. The downstream device sends an Agreement message to the upstream
device. After receiving the Agreement message, the upstream device sets
the port connected to the downstream device as a designated port, and
the designated port transitions to the Forwarding state.
On a network running VBST protocol, a Huawei datacom device and the
connected non-Huawei device may fail to communicate if they use different
Proposal/Agreement modes. The Huawei datacom device can select the same
mode as that on the non-Huawei device to implement interworking.
If Huawei datacom device and Handreamnet switch are deployed on the VBST
network, non-standard STP/RSTP packets sent by the Handreamnet switch may
cause temporary loops. Therefore, the Huawei datacom device interface needs to
be configured to discard non-standard STP/RSTP packets to prevent temporary
loops.
Pre-configuration Tasks
Before setting parameters for interworking between a Huawei datacom device and
a non-Huawei device, perform the task of 16.7 Configuring VBST.
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 no-agreement-check
The common mode is configured.
By default, the enhanced mode is used on a port.
Step 4 (Optional) Run stp agreement-legacy
The interface is configured to discard non-standard STP/RSTP packets sent by the
Handreamnet switch.
By default, Huawei datacom device interface does not discard non-standard STP/
RSTP packets sent by the Handreamnet switch.
Step 5 (Optional) Run stp revertive slow
The interface is configured the delay in revertive switching during VBST calculation
on a port.
NOTE
----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 ] topology-change command to check
VBST topology change statistics.
● Run the display stp error packet command to check the number of received
error packets and the content of recently received error packets.
● Run the display vbst [ vlan vlan-id ] [ interface interface-type interface-
number | slot slot-id ] bpdu-statistics command to check BPDU statistics.
● Run the display stp [ vlan vlan-id ] [ interface interface-type interface-
number | slot slot-id ] tc-bpdu statistics command to check statistics on TC
or TCN BPDUs on the VBST-enabled port.
----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 reset vbst command.
Procedure
● Run the reset vbst [ interface interface-type interface-number | slot slot-id ]
bpdu-statistics command in the user view to clear statistics on VBST BPDUs.
----End
Networking Requirements
As shown in Figure 16-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
GE0/0/1 GE0/0/1
VLAN10, 20, 30
GE0/0/3 GE0/0/2 GE0/0/2 GE0/0/3
VLAN10, 20 VLAN20, 30
20 VL
10, AN
N 20
VLA ,3
0
GE0/0/3 GE0/0/3
GE0/0/2 GE0/0/2
SwitchC SwitchD
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:
Procedure
Step 1 Configure Layer 2 forwarding on switches on 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
[SwitchA] vlan batch 10 20 30
# Add GE0/0/1 on SwitchB to VLAN 10, VLAN 20, and VLAN 30.
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] port link-type trunk
– 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 GE0/0/2 on SwitchC to 2000000 in VLAN 10 and VLAN
20.
[SwitchC] interface gigabitethernet 0/0/2
[SwitchC-GigabitEthernet0/0/2] stp vlan 10 cost 2000000
[SwitchC-GigabitEthernet0/0/2] stp vlan 20 cost 2000000
[SwitchC-GigabitEthernet0/0/2] quit
# Set the path cost of GE0/0/2 on SwitchD to 2000000 in VLAN 20 and VLAN
30.
[SwitchD] interface gigabitethernet 0/0/2
[SwitchD-GigabitEthernet0/0/2] stp vlan 20 cost 2000000
[SwitchD-GigabitEthernet0/0/2] stp vlan 30 cost 2000000
[SwitchD-GigabitEthernet0/0/2] quit
4. Enable VBST to eliminate loops.
– Disable VBST in VLAN 1.
NOTE
By default, all interfaces join VLAN 1 and VBST in VLAN 1 is enabled. In this
example, to reduce spanning tree calculation, VBST is disabled in VLAN 1. To
prevent loops in VLAN 1 after VBST is disabled, delete interfaces from VLAN 1.
# Disable VBST in VLAN 1 on SwitchA. The configurations on SwitchB,
SwitchC, and SwitchD are similar to the configuration of SwitchA, and are
not mentioned here.
The preceding information shows that SwitchA is selected as the root bridge in
VLAN 10 and GE0/0/1 and GE0/0/3 are selected as designated ports in Forwarding
state.
# Run the display stp brief command on SwitchB, SwitchC, and SwitchD to view
the port status.
[SwitchB] display stp brief
VLAN-ID Port Role STP State Protection
10 GigabitEthernet0/0/1 ROOT FORWARDING NONE
10 GigabitEthernet0/0/2 DESI FORWARDING NONE
20 GigabitEthernet0/0/1 ROOT FORWARDING NONE
20 GigabitEthernet0/0/2 DESI FORWARDING NONE
20 GigabitEthernet0/0/3 DESI FORWARDING NONE
30 GigabitEthernet0/0/1 DESI FORWARDING NONE
30 GigabitEthernet0/0/3 DESI FORWARDING NONE
[SwitchC] display stp brief
VLAN-ID Port Role STP State Protection
10 GigabitEthernet0/0/2 ALTE DISCARDING NONE
10 GigabitEthernet0/0/3 ROOT FORWARDING NONE
10 GigabitEthernet0/0/4 DESI FORWARDING NONE
20 GigabitEthernet0/0/2 ALTE DISCARDING NONE
20 GigabitEthernet0/0/3 ROOT FORWARDING NONE
20 GigabitEthernet0/0/5 DESI FORWARDING NONE
[SwitchD] display stp brief
VLAN-ID Port Role STP State Protection
20 GigabitEthernet0/0/2 ALTE DISCARDING NONE
20 GigabitEthernet0/0/3 ROOT FORWARDING NONE
20 GigabitEthernet0/0/4 DESI FORWARDING NONE
30 GigabitEthernet0/0/2 ALTE DISCARDING NONE
30 GigabitEthernet0/0/3 ROOT FORWARDING NONE
30 GigabitEthernet0/0/5 DESI FORWARDING NONE
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 10 20 30
#
stp mode vbst
#
stp vlan 1 disable
stp vlan 30 root secondary
stp vlan 10 20 root primary
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20 30
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 30
#
interface GigabitEthernet0/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
#
return
● SwitchB configuration file
#
sysname SwitchB
#
vlan batch 10 20 30
#
stp mode vbst
#
stp vlan 1 disable
stp vlan 10 20 root secondary
stp vlan 30 root primary
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20 30
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 30
#
return
● SwitchC configuration file
#
sysname SwitchC
#
vlan batch 10 20
#
stp mode vbst
#
stp vlan 1 disable
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
stp vlan 10 20 cost 2000000
#
interface GigabitEthernet0/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 10
stp edged-port enable
#
interface GigabitEthernet0/0/5
port link-type access
port default vlan 20
stp edged-port enable
#
return
17 SEP Configuration
This chapter describes how to configure the Smart Ethernet Protection (SEP). SEP
is a ring network protocol specially used for the Ethernet link layer. It blocks
redundant links to prevent logical loops on a ring network.
Definition
The Smart Ethernet Protection (SEP) protocol is a ring network protocol specially
used for the Ethernet link layer. A SEP segment consists of interconnected Layer 2
switching devices configured with the same SEP segment ID and control VLAN ID.
A SEP segment is the basic unit of SEP.
Purpose
SEP blocks redundant links to prevent logical loops on a ring network. Redundant
links are used on an Ethernet switching network to provide link backup and
enhance network reliability. However, the use of redundant links may produce
loops, causing broadcast storms and rendering the MAC address table unstable. As
a result, communication quality deteriorates, and services may even be
interrupted. Huawei switches support the following ring network protocols:
● STP/RSTP/MSTP
STP, RSTP, and MSTP are standard protocols for breaking loops on Ethernet
networks. Networks running these protocols converge slowly, failing to meet
the transmission requirements of some real-time services. The convergence
time is affected by the network topology. Huawei devices running STP, RSTP,
or MSTP can communicate with non-Huawei devices.
● RRPP
RRPP is a fast convergence Huawei proprietary protocol. RRPP requires a
physical topology to be divided into logical topologies so that major rings and
sub-rings can be differentiated. Therefore, RRPP does not apply to complex
networks. A Huawei device running RRPP cannot communicate with any non-
Huawei device.
Figure 17-1 shows a typical SEP application. CE1 is connected to Network Provider
Edges (NPEs) through a semi-ring formed by switches. A Virtual Router
Redundancy Protocol (VRRP) group is deployed on the NPEs. NPE1 initially serves
as the master and NPE2 as the backup. When the link between NPE1 and LSW5 or
a node on the link becomes faulty, NPE1 becomes the backup. NPE2 then
becomes the master. The following situations occur depending on whether SEP is
deployed. The following assumes that the link between LSW1 and LSW5 becomes
faulty.
● If SEP is not deployed on the semi-ring, CE1 traffic is still transmitted along
the original path, but NPE1 does not forward traffic, causing traffic
interruption.
● If SEP is deployed on the semi-ring, the blocked interface on LSW5 becomes
unblocked, enters the Forwarding state, and sends link state advertisements
(LSAs) to instruct other nodes on the SEP segment to update their LSA
databases. CE1 traffic is transmitted along backup link LSW5 -> LSW2 ->
LSW4 -> NPE2, ensuring uninterrupted traffic transmission.
NPE1
VRRP+peer BFD IP/MPLS
NPE2 Core
CE1
LSW5
In typical SEP networking, a physical ring can be configured with only one SEP
segment in which only one interface can be blocked. If an interface in a complete
SEP segment is blocked, all service data is transmitted only along the path where
the primary edge interface is located. The path where the secondary edge
interface is located remains idle, wasting bandwidth.
Network Network
LSW5
SEP SEP
Segment Segment
LSW3
LSW3
CE
CE
No-Neighbor Primary Edge Port
No-Neighbor Secondary Edge Port
Primary Edge Port
Secondary Edge Port
Block Port
Edge interface Primary edge A SEP segment has only one primary
interface edge interface, which is determined
by the configuration and election.
The primary edge interface initiates
blocked interface preemption,
terminates packets, and sends
topology change notification
messages to other networks.
● Blocked interface
In a SEP segment, some interfaces are blocked to prevent loops.
Any interface in a SEP segment may be blocked if no interface is specified for
blocking. A complete SEP segment has only one blocked interface.
SEP Packet
Table 17-2 shows the types of SEP packets.
segment and send LSA request packets to the devices. After receiving LSA
request packets from the device, neighboring interfaces reply with LSA ACK
packets that contain the latest link state information.
● SEP segment topology display
The topology display function allows you to view the topology that has the
highest network connectivity of any device in a SEP segment. Link state
synchronization ensures that all devices in a SEP segment display the same
topology.
Table 17-3 describes different types of SEP segment topologies.
NOTE
The constraints listed in Table 17-3 ensure that each node in a ring or linear topology
displays the same topology information.
NOTE
If only one interface on a node has SEP enabled, you must set the role of the interface to
edge so that the interface can function as an edge interface.
In Figure 17-3, if there is no faulty link on the network and SEP is enabled on the
interfaces, the following situations occur:
● Common interfaces do not participate in primary edge interface election. Only
P1 on LSW1 and P1 on LSW5 participate in primary edge interface election.
● If P1 on LSW1 and P1 on LSW5 have the same role, P1 with a larger MAC
address is elected as the primary edge interface.
After the primary edge interface is selected, it periodically sends primary edge
interface election packets without waiting for successful neighbor negotiations. A
primary edge interface election packet contains the interface role (primary edge
interface, secondary edge interface, or common interface), bridge MAC address of
the interface, interface ID, and integrity of the topology database.
P1 P1 P1 P1
SEP SEP
Segment Segment
Two secondary edge interfaces exist in the SEP segment and periodically send
primary edge interface election packets.
When all link faults in the SEP segment are rectified, the two secondary edge
interfaces can receive primary edge interface election packets and elect a new
primary edge interface within a configured interval (1s by default).
The following describes the interface blocking mode and preemption mechanism.
Specify a blocked SEP sets the hop count of the primary edge
interface based on the interface to 1 and the hop count of the
configured hop count. neighboring interface of the primary interface
to 2. Hop counts of other interfaces increase by
steps of 1 in the downstream direction of the
primary edge interface.
● Preemption
After the interface blocking mode is specified, you can configure the
preemption mode to determine whether an interface will be blocked. Table
17-5 describes the preemption modes.
Non-preemption When all link faults are rectified or the last two
interfaces enabled with SEP complete neighbor
negotiations, interfaces send blocking status
packets to each other. The interface with the
highest priority is then blocked and the other
interfaces enter the Forwarding state.
The fault is rectified and After faults occur in the SEP segment and the last
the preemption function faulty interface recovers, the blocked interface is
takes effect. preempted and the topology is considered
changed.
Preemption is triggered by the primary edge
interface. When an interface in a SEP segment
receives a preemption packet from the primary
edge interface, the interface must send Flush-FDB
packets to notify other nodes in the SEP segment
that there is a change in topology.
Network
LSW8
SEP SEP
LSW1 Segment1 Segment3 LSW13
LSW9 LSW10
Failed
LSW3 LSW4 LSW5 LSW6 LSW7
NOTE
The topology change notification function is configured on devices that connect an upper-
layer network and a lower-layer network. If the topology of one network changes, devices
affected inform the other network of the change.
Table 17-7 lists the scenarios in which topology changes are reported.
IP/MPLS Core
CFM
PE-AGG1 PE-AGG2
LSW1 LSW5
SEP
Segment
LSW2 LSW4
LSW3
CE
No-neighbor Primary Edge Port
No-neighbor Secondary Edge Port
Block Port
SEP associated with Ethernet CFM
In Figure 17-5, association between SEP and CFM is configured on LSW1 in the
SEP segment. When CFM detects a fault on the network at the aggregation layer,
LSW1 sends a CCM to notify the Operation, Administration, and Maintenance
(OAM) module of the fault. The SEP status of the interface associated with CFM
then changes to Down.
The interface associated with CFM is in the SEP segment. If this interface goes
Down, LSW2 must send a Flush-FDB packet to notify other nodes of the change in
topology. After LSW3 receives the Flush-FDB packet, the blocked interface on
LSW3 is unblocked and enters the Forwarding state. This interface sends a Flush-
FDB packet to instruct other nodes in the SEP segment to update their MAC
address tables and ARP tables. The lower-layer network can then detect the faults
on the upper-layer network, ensuring reliable service transmission.
LSW9 LSW10
SEP
Segment 1
LSW7 LSW8
SEP
Segment2
LSW4 LSW6
LSW5
SEP
Segment3
LSW1 LSW3
LSW2
SEP Multi-Instance
In common SEP networking shown in Figure 17-7, a physical ring network can be
configured with only one SEP segment in which only one interface can be blocked.
If an interface in a complete SEP segment is blocked, all service data is
transmitted only along the path where the primary edge interface is located. The
path where the secondary edge interface is located remains idle, wasting
bandwidth.
LSW2 LSW4
SEP
Segment1
LSW1 LSW3
VLAN 100~200 VLAN 201~400
CE1 CE2
Primary Edge Port
Secondary Edge Port
Block Port
LSW2 LSW4
SEP
Segment2
P2 SEP Segment1 P1
LSW1 LSW3
Instance1: Instance2:
VLAN 100~200 VLAN 201~400
CE1 CE2
Primary Edge Port
Secondary Edge Port
Block Port
In Figure 17-8, the SEP multi-instance ring network that consists of LSW1 to
LSW4 has two SEP segments. P1 is the blocked interface in SEP segment 1, and P2
is the blocked interface in SEP segment 2.
● Protected instance 1 is configured in SEP segment 1 to protect the data from
VLAN 100 to VLAN 200. The data is transmitted along path LSW1 -> LSW2. As
the blocked interface in SEP segment 2, P2 blocks only the data from VLAN
201 to VLAN 400.
● Protected instance 2 is configured in SEP segment 2 to protect the data from
VLAN 201 to VLAN 400. The data is transmitted along path LSW3 -> LSW4. As
the blocked interface in SEP segment 1, P1 blocks only the data from VLAN
100 to VLAN 200.
When a node or link fault occurs, each SEP segment calculates its own topology
independently, and the nodes in each SEP segment update their own LSA
databases.
In Figure 17-9, a fault occurs on the link between LSW3 and LSW4. The link fault
does not affect the transmission path for the data from VLAN 100 to VLAN 200 in
SEP segment 1, but blocks the transmission path for the data from VLAN 201 to
VLAN 400 in SEP segment 2.
Figure 17-9 Networking diagram for a link fault on a SEP multi-instance network
LSW2 LSW4
SEP
Segment2
P2 SEP Segment1 P1
LSW1 LSW3
Instance1: Instance2:
VLAN 100~200 VLAN 201~400
CE1 CE2
After the link between LSW3 and LSW4 becomes faulty, LSW3 starts to send LSAs
to instruct the other devices in SEP segment 2 to update their LSA databases, and
the blocked interface enters the Forwarding state. After the topology of SEP
segment 2 is recalculated, the data from VLAN 201 to VLAN 400 is transmitted
along path LSW3 -> LSW1 -> LSW2.
After the link between LSW3 and LSW4 recovers, the devices in SEP segment 2
perform delayed preemption. After the preemption delay expires, P1 becomes the
blocked interface again, and sends LSAs to instruct the other devices in SEP
segment 2 to update their LSA databases. After the topology of SEP segment 2 is
recalculated, the data from VLAN 201 to VLAN 400 is transmitted along path
LSW3 -> LSW4.
Network
LSW1 LSW5
SEP
Segment
LSW2 LSW4
LSW3
CE
In Figure 17-10, LSW1 to LSW5 are not directly connected and form an open ring
to connect to a Layer 2 network.
LSW1 LSW5
SEP
Segment
LSW2 LSW4
LSW3
LSW2 LSW4
LSW3
Se
SE ent
gm
P 3
t2
gm SEP
SEP
en
LSW9
LSW6 Segment 4
Se
LSW12
SEP
LSW8 Segment 5
LSW14
LSW7 LSW13
LSW10 LSW11
Block Port
In Figure 17-12, LSW1 to LSW5 are at the aggregation layer, and LSW6 to LSW14
are at the access layer. Layer 2 services are transparently transmitted at the access
layer and the aggregation layer.
If the topology of the access layer changes, a node in the SEP segment sends a
Flush-FDB packet to instruct other nodes in the SEP segment to update their MAC
address tables and ARP tables. Edge devices in the SEP segment send TC packets
to notify the upper-layer network that the topology of the SEP segment changes.
PE3 PE4
MSTP
PE1 PE2
SEP
Segment
LSW1 LSW2
LSW3
No-neighbor Primary Edge Port
No-neighbor Secondary Edge Port
Block Port
In Figure 17-13, LSW1 to LSW3 form a SEP segment to access the MSTP ring.
LSW1 to LSW3 are at the access layer and transparently transmit Layer 2 unicast
and multicast services.
If the topology of the access layer changes, a node in the SEP segment sends a
Flush-FDB packet to instruct other nodes in the SEP segment to update their MAC
address tables and ARP tables. LSW1 and LSW2 at the edge of the SEP segment
send a TC packet to notify the aggregation layer of the topology change in the
SEP segment.
PE3 PE4
RRPP
PE1 PE2
SEP
Segment
LSW1 LSW2
LSW3
Primary Edge Port
Secondary Edge Port
Block Port
In Figure 17-14, PE1, PE2 and LSW1 to LSW3 form a SEP segment to access the
RRPP ring. PE1, PE2 and LSW1 to LSW3 are at the access layer and transparently
transmit Layer 2 unicast and multicast services. When SEP runs at the access layer,
redundancy protection switching can be implemented at the access layer.
If the topology of the access layer changes, a node in the SEP segment sends a
Flush-FDB packet to instruct other nodes to update their MAC address tables and
ARP tables. PE1 and PE2 at the edge of the SEP segment send a TC packet to
notify the aggregation layer of the topology change in the SEP segment.
A physical ring may contain one or two SEP segments. Each SEP segment needs to
be configured with a protected instance, each protected instance indicating a
VLAN range. The topology calculated by a SEP segment is only valid for that SEP
segment.
After different protected instances are configured for SEP segments and the
mapping between protected instances and VLANs is set, a blocked interface is only
valid for the VLANs protected by the SEP segment where the blocked interface
resides. Data traffic for different VLANs can be transmitted along different paths.
This implements traffic load balancing and link backup.
LSW2 LSW4
SEP
Segment2
P2 SEP Segment1 P1
LSW1 LSW3
Instance1: Instance2:
VLAN 100~200 VLAN 201~400
CE1 CE2
Primary Edge Port
Secondary Edge Port
Block Port
IP/MPLS Core
CFM
PE-AGG1 PE-AGG2
LSW1 LSW5
SEP
Segment
LSW2 LSW4
LSW3
CE
No-neighbor Primary Edge Port
No-neighbor Secondary Edge Port
Block Port
SEP associated with Ethernet CFM
When the SEP status of the interface associated with CFM goes Down, LSW2 must
send a Flush-FDB packet to notify other nodes of the topology changes. After
LSW3 receives the Flush-FDB packet, the blocked interface on LSW3 is unblocked
and enters the Forwarding state. The interface sends a Flush-FDB packet to
instruct the other nodes to update their MAC address and ARP tables. Therefore,
the lower-layer network can then detect the faults on the upper-layer network,
ensuring reliable service transmission.
Configure basic SEP After basic SEP functions 17.6 Configuring SEP
functions. are configured on
devices, the devices start
SEP negotiation.
Interfaces that complete
neighbor negotiations
last are blocked to
eliminate redundant
links.
NOTE
When logging in to nodes
on a SEP semi-ring
through Telnet to
configure the nodes, note
the following points:
● VLANIF interfaces and
their IP addresses need
to be configured,
because these nodes
are Layer 2 devices.
The VLANs to which
these VLANIF
interfaces correspond
must be mapped to
SEP protected
instances.
● Basic SEP functions
need to be configured
from the node at one
end of the semi-ring to
the node at the other
end of the semi-ring.
Licensing Requirements
SEP configuration commands are available only after the S1720GW, S1720GWR,
and S1720X have the license (WEB management to full management Electronic
RTU License) loaded and activated and the switches are restarted. SEP
configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● Table 17-10 lists the specification of SEP.
● On a SEP network where there are no-neighbor edge interfaces, a device that
is not in a SEP segment cannot be added to the control VLAN of the SEP
segment. Otherwise, a loop will occur on the network.
Pre-configuration Tasks
Before configuring basic SEP functions, complete the following tasks:
● Establish the ring network.
● Ensure that the devices are powered on correctly and operate properly.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run sep segment segment-id
A SEP segment is created and the view of the SEP segment is displayed.
The switch supports a maximum of 16 SEP segments.
Step 3 (Optional) Run description text
A description is configured for the SEP segment.
By default, no description is configured for an SEP segment.
----End
NOTE
On a SEP network that has no-neighbor edge interfaces, a device that is not in a SEP
segment cannot be added to the control VLAN of the SEP segment. Otherwise, a loop will
occur on the network.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run sep segment segment-id
A SEP segment is created and the view of the SEP segment is displayed.
Step 3 Run control-vlan vlan-id
A control VLAN is configured for the SEP segment to transmit SEP packets.
The control VLAN must be not created, and is not used by RRPP, dynamic
instances of VBST, VLAN mapping, and VLAN stacking. Additionally, no interface is
added to the control VLAN in trunk, access, hybrid, or qinq mode.
● Different SEP segments can use the same control VLAN.
● If an interface has been added to the SEP segment, the control VLAN of the
SEP segment cannot be deleted directly. To delete the control VLAN, run the
undo sep segment segment-id command in the interface view to delete the
interface from the SEP segment, and then run the undo control-vlan
command in the SEP segment view to delete the control VLAN.
● If no interface is added to the SEP segment, you can run the control-vlan
vlan-id command multiple times. Only the latest configuration takes effect.
● After the control VLAN is created successfully, the command used to create a
common VLAN will be displayed in the configuration file.
Each SEP segment must be configured with a control VLAN. After an interface
is added to a SEP segment configured with a control VLAN, the interface will
be automatically added to the control VLAN.
– If the interface type is trunk, in the configuration file, the port trunk
allow-pass vlan command is displayed in the view of the interface added
to the SEP segment.
– If the interface type is hybrid, in the configuration file, the port hybrid
tagged vlan command is displayed in the view of the interface added to
the SEP segment.
----End
Context
Interfaces can be added to a SEP segment only after the SEP segment is
configured with protected instances.
Procedure
Step 1 Run system-view
Step 2 (Optional) Create and configure the mapping between MSTIs and VLANs.
NOTE
If the stp mode vbst command sets the STP working mode to VBST, you must perform this
step to configure the mapping between MSTIs and VLANs. Otherwise, the protected
instance in a SEP segment cannot be configured.
A SEP segment is created and the view of the SEP segment is displayed.
When the mapping between MSTIs and VLANs is configured, instance-id in this
step must be the same as instance-id in the instance command.
NOTE
When the mapping between MSTIs and VLANs is not configured, the SEP protected
instance is valid for all VLANs.
----End
NOTE
● Normally, edge interfaces and no-neighbor edge interfaces belong to different SEP
segments.
● Before adding a Layer 2 interface to a SEP segment, ensure that STP has been disabled
on the interface (except that the interface is a no-neighbor edge interface).
● Before adding an interface to a SEP segment, disable Smart Link on the interface.
● Before adding an interface to a SEP segment, disable port security on the interface;
otherwise, loops cannot be prevented.
Procedure
Step 1 Run system-view
NOTE
----End
Procedure
● Run the display sep segment { segment-id | all } command to check the
configurations of SEP segments.
● Run the display sep interface [ interface-type interface-number | segment
segment-id ] [ verbose ] command to check information about interfaces
that are added to a specified SEP segment.
● Run the display sep topology [ segment segment-id ] [ verbose ] command
to check the topology status of a specified SEP segment.
----End
Context
In a SEP segment, some interfaces are blocked to prevent loops.
You can configure the interface blocking mode to specify a blocked interface.
Table 17-12 lists interface blocking modes.
Perform the following operations on the device where the primary edge interface
or no-neighbor primary edge interface is located:
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run sep segment segment-id
A SEP segment is created and the view of the SEP segment is displayed.
Step 3 Run block port { optimal | middle | hop hop-id | sysname sysname interface
{ interface-type interface-number | interface-name } }
An interface blocking mode is set.
By default, one of the interfaces at two ends of the link that is set up last or
recovers from a fault last is blocked.
----End
Follow-up Procedure
If the interface with the highest priority is specified to block, run the sep segment
segment-id priority priority command in the view of the interface to be blocked
to increase its priority. When a fault is rectified, the specified interface is blocked.
The default priority of an interface added to a SEP segment is 64. The priority
value of an interface is an integer that ranges from 1 to 128. A larger priority
value indicates a higher priority.
Context
After the interface blocking mode is specified, whether a specified interface will be
blocked is determined by the preemption mode. Table 17-13 lists the preemption
modes.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run sep segment segment-id
A SEP segment is created and the view of the SEP segment is displayed.
Step 3 Run preempt { manual | delay seconds }
The preemption mode is configured on the primary edge interface.
By default, no preemption mode is configured on the primary edge interface, that
is, the non-preemption mode is used.
----End
IP/MPLS Core
group 2:Master
Core
group 1:Master
group 2:Backup group 1:Backup
NPE1 NPE2
VRRP+peer BFD
Aggregation
LSW2 LSW4
SEP
Segment2
P2 SEP Segment1 P1
LSW1 LSW3
Instance1: Instance2:
Access
CE1 CE2
NOTE
Currently, SEP multi-instance allows two SEP segments to be configured on a physical ring.
Different blocked interfaces and priorities need to be configured for the two SEP segments.
Pre-configuration Tasks
Before configuring SEP multi-instance, complete the following tasks:
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 [ to vlan-id ] } &<1-10>
Mappings between protected instances and VLANs are configured.
The value of instance-id specified in this command must be the same as that of
instance-id specified in the protected-instance command.
Before you switch a VLAN from one SEP segment to another segment, shut down
the blocked port. If you do not shut down the blocked port, a routing loop may
occur after the VLAN switchover.
NOTE
To configure the mapping between a protected 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 protected instance. Otherwise, loops may occur.
----End
NOTE
Currently, topology changes in a SEP segment can be reported to other SEP segments, STP
networks, RRPP networks, VPLS networks, and SmartLink networks.
Only S5720EI, S5720HI, S6720EI, and S6720S-EI support VPLS networks.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run sep segment segment-id
A SEP segment is created and the view of the SEP segment is displayed.
Step 3 Run tc-notify { segment { segment-id1 [ to segment-id2 ] } &<1-10> | stp | rrpp |
smart-link send-packet vlan vlan-id | vpls }
The topology change of the specified SEP segment is reported to another SEP
segment or a network running other ring protocols such as STP or RRPP.
By default, the topology change of a SEP segment is not reported.
NOTE
----End
Follow-up Procedure
In the networking scenario where three or more SEP ring networks exist, when a
topology change notification is sent through multiple links, the upper-layer
network will receive it multiple times. This reduces packet processing efficiency on
the upper-layer network. Therefore, topology change notifications need to be
suppressed. Suppressing topology change notifications frees the upper-layer
network from processing multiple duplicate packets and protects the devices in
the SEP segment against topology change notification attacks.
Run the tc-protection interval interval-value command in the SEP segment view
to set the interval for suppressing topology change notifications.
By default, the interval for suppressing topology change notifications is 2s, and
three topology change notifications with different source addresses are processed
within 2s.
NOTE
● In the networking scenario where three or more SEP ring networks exist, the tc-
protection interval interval-value command must be run. If this command is not run,
the default interval for suppressing topology change notifications is used.
● A longer interval ensures stable SEP operation but reduces convergence performance.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run sep segment segment-id
A SEP segment is created and the view of the SEP segment is displayed.
Step 3 Run deal smart-link-flush
The device in a SEP segment is configured to process SmartLink Flush packets.
By default, no device in a SEP segment is configured to process SmartLink Flush
packets.
Step 4 Run quit
Return to the system view.
Step 5 Run interface interface-type interface-number
The interface view is displayed.
Step 6 Run smart-link flush receive control-vlan vlan-id [ password { simple | sha }
password ]
The control VLAN ID and password contained in Flush packets on both devices
must be the same.
----End
Context
SEP runs on devices at the access layer or aggregation layer. To enable devices
running SEP to detect the topology changes in an upper-layer network, you must
configure on SEP and CFM association the device connecting the lower-layer
network to the upper-layer network.
When CFM detects a fault on the upper-layer network, the edge device sends a
CFM packet to notify the OAM module of the fault. Then the SEP status of the
interface associated with CFM on the edge device changes to Down.
The peer device (on the SEP segment) of the edge device notifies other nodes in
the same SEP segment of topology changes by sending Flush-FDB packets. After a
device in the SEP segment receives the Flush-FDB packet, the blocked interface on
the device is unblocked, enters the Forwarding state, and sends a Flush-FDB
packet to instruct other nodes in the SEP segment to refresh their MAC forwarding
tables and ARP tables. Therefore, the lower-layer network can then detect the
faults on the upper-layer network, ensuring reliable service transmission.
NOTE
IEEE 802.1ag, also known as Connectivity Fault Management (CFM), defines OAM
functions, such as continuity check (CC), link trace (LT) and loopback (LB), for Ethernet
networks. CFM is network-level OAM and applies to large-scale end-to-end networking.
Procedure
Step 1 Run system-view
Step 3 Run oam-bind ingress cfm md md-name ma ma-name egress sep segment
segment-id interface interface-type interface-number
Association between SEP and CFM is configured.
----End
Context
NOTICE
SEP statistics cannot be restored after being cleared. Therefore, exercise caution
when you run reset commands.
Procedure
Step 1 Run the reset sep interface interface-type interface-number statistics command
in the user view to clear SEP packet statistics on a specified interface in a SEP
segment.
----End
layer Layer 2 network are directly connected to each other. The closed ring
network is deployed at the aggregation layer to transparently transmit Layer 2
unicast and multicast packets. SEP runs at the aggregation layer to implement link
redundancy.
In Figure 17-18, Layer 2 switching devices LSW1 to LSW5 form a ring network.
SEP runs at the aggregation layer.
● When there is no faulty link on a ring network, SEP can eliminate loops on
the network.
● When a link fails on the ring network, SEP can rapidly restore communication
between nodes on the network.
IP/MPLS Core
Core
SEP
Segment1
GE0/0/1 GE0/0/1
LSW2 LSW4
LSW3 GE0/0/2
GE0/0/2
GE0/0/1 GE0/0/2
GE0/0/3
GE0/0/1
Primary Edge Port
Access
CE1
Secondary Edge Port
VLAN
100 Block Port
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic SEP functions.
a. Configure SEP segment 1 on LSW1 to LSW5 and configure VLAN 10 as
the control VLAN of SEP segment 1.
b. Add all devices on the ring to SEP segment 1, and configure the roles of
GE0/0/1 and GE0/0/3 of LSW1 in SEP segment 1.
c. On the device where the primary edge interface is located, specify the
interface with the highest priority to block.
d. Set priorities of the interfaces in the SEP segment.
Set the highest priority for GE0/0/2 of LSW3 and retain the default
priority of the other interfaces so that GE0/0/2 of LSW3 will be blocked.
e. Configure delayed preemption on the device where the primary edge
interface is located.
2. Configure the Layer 2 forwarding function on CE1 and LSW1 to LSW5.
Procedure
Step 1 Configure basic SEP functions.
1. Configure SEP segment 1 on LSW1 to LSW5 and configure VLAN 10 as the
control VLAN of SEP segment 1.
# Configure LSW1.
<HUAWEI> system-view
[HUAWEI] sysname LSW1
[LSW1] sep segment 1
[LSW1-sep-segment1] control-vlan 10
[LSW1-sep-segment1] protected-instance all
[LSW1-sep-segment1] quit
# Configure LSW2.
<HUAWEI> system-view
[HUAWEI] sysname LSW2
[LSW2] sep segment 1
[LSW2-sep-segment1] control-vlan 10
[LSW2-sep-segment1] protected-instance all
[LSW2-sep-segment1] quit
# Configure LSW3.
<HUAWEI> system-view
[HUAWEI] sysname LSW3
[LSW3] sep segment 1
[LSW3-sep-segment1] control-vlan 10
[LSW3-sep-segment1] protected-instance all
[LSW3-sep-segment1] quit
# Configure LSW4.
<HUAWEI> system-view
[HUAWEI] sysname LSW4
[LSW4] sep segment 1
[LSW4-sep-segment1] control-vlan 10
[LSW4-sep-segment1] protected-instance all
[LSW4-sep-segment1] quit
# Configure LSW5.
<HUAWEI> system-view
[HUAWEI] sysname LSW5
[LSW5] sep segment 1
[LSW5-sep-segment1] control-vlan 10
NOTE
– The control VLAN must be a VLAN that has not been created or used, but the
configuration file automatically displays the command for creating the VLAN.
– Each SEP segment must be configured with a control VLAN. After an interface is
added to a SEP segment configured with a control VLAN, the interface will be
automatically added to the control VLAN.
2. Add all devices on the ring to SEP segment 1 and configure interface roles on
the devices.
NOTE
# Configure LSW2.
[LSW2] interface gigabitethernet 0/0/1
[LSW2-GigabitEthernet0/0/1] port link-type hybrid
[LSW2-GigabitEthernet0/0/1] stp disable
[LSW2-GigabitEthernet0/0/1] sep segment 1
[LSW2-GigabitEthernet0/0/1] quit
[LSW2] interface gigabitethernet 0/0/2
[LSW2-GigabitEthernet0/0/2] port link-type hybrid
[LSW2-GigabitEthernet0/0/2] stp disable
[LSW2-GigabitEthernet0/0/2] sep segment 1
[LSW2-GigabitEthernet0/0/2] quit
# Configure LSW3.
[LSW3] interface gigabitethernet 0/0/1
[LSW3-GigabitEthernet0/0/1] port link-type hybrid
[LSW3-GigabitEthernet0/0/1] stp disable
[LSW3-GigabitEthernet0/0/1] sep segment 1
[LSW3-GigabitEthernet0/0/1] quit
[LSW3] interface gigabitethernet 0/0/2
[LSW3-GigabitEthernet0/0/2] port link-type hybrid
[LSW3-GigabitEthernet0/0/2] stp disable
[LSW3-GigabitEthernet0/0/2] sep segment 1
[LSW3-GigabitEthernet0/0/2] quit
# Configure LSW4.
[LSW4] interface gigabitethernet 0/0/1
[LSW4-GigabitEthernet0/0/1] port link-type hybrid
[LSW4-GigabitEthernet0/0/1] stp disable
[LSW4-GigabitEthernet0/0/1] sep segment 1
[LSW4-GigabitEthernet0/0/1] quit
[LSW4] interface gigabitethernet 0/0/2
[LSW4-GigabitEthernet0/0/2] port link-type hybrid
[LSW4-GigabitEthernet0/0/2] stp disable
[LSW4-GigabitEthernet0/0/2] sep segment 1
[LSW4-GigabitEthernet0/0/2] quit
# Configure LSW5.
NOTE
– You must set the preemption delay when delayed preemption is used because
there is no default delay time.
– When the last faulty interface recovers, edge interfaces do not receive any fault
notification packet. If the primary edge interface does not receive any fault
notification packet, it starts the delay timer. After the delay timer expires, nodes in
the SEP segment start blocked interface preemption.
To implement delayed preemption in this example, simulate a port fault and then
rectify the fault. For example:
Run the shutdown command on GE0/0/2 of LSW2 to simulate an interface fault,
and then run the undo shutdown command on GE0/0/2 to rectify the fault.
Step 2 Configure the Layer 2 forwarding function on CE1 and LSW1 to LSW5.
For details about the configuration, see the configuration files.
Step 3 Verify the configuration.
● Run the shutdown command on GE0/0/1 of LSW3 to simulate an interface
fault, and then run the display sep interface command on LSW3 to check
whether GE0/0/2 of LSW3 has switched from the Discarding state to the
Forwarding state.
<LSW3> display sep interface gigabitethernet 0/0/2
SEP segment 1
----------------------------------------------------------------
Interface Port Role Neighbor Status Port Status
----------------------------------------------------------------
GE0/0/2 common up forwarding
----End
Configuration Files
● LSW1 configuration file
#
sysname LSW1
#
vlan batch 10 100 200
#
sep segment 1
control-vlan 10
block port optimal
preempt delay 30
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10 100
stp disable
sep segment 1 edge primary
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 200
port hybrid tagged vlan 100
port hybrid untagged vlan 200
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 10 100 200
stp disable
sep segment 1 edge secondary
#
return
● LSW2 configuration file
#
sysname LSW2
#
vlan batch 10 100
#
sep segment 1
control-vlan 10
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10 100
stp disable
sep segment 1
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 10 100
stp disable
sep segment 1
#
return
● LSW3 configuration file
#
sysname LSW3
#
vlan batch 10 100
#
sep segment 1
control-vlan 10
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10 100
stp disable
sep segment 1
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 10 100
stp disable
sep segment 1
sep segment 1 priority 128
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 100
#
return
#
sysname CE1
#
vlan batch 100
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 100
#
return
Related Content
Videos
Configuring SEP
Core
IP/MPLS Core
GE0/0/2 GE0/0/2
GE0/0/1 GE0/0/3
Segment 1
LSW4
LSW2 GE0/0/1
GE0/0/2
GE0/0/2
G
LSW3
E0
/
0/
3
GE0/0/4
GE0/0/1 GE0/0/2 GE0/0/1 GE0/0/2
t2
gm EP
Se
en
SE en
LSW6 GE0/0/2
Se S
LSW11
gm
P t
GE0/0/2 LSW8
GE0/0/1
3
GE0/0/1 GE0/0/1
CE2
CE1
VLAN VLAN
200 100
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic SEP functions.
a. Configure SEP segments 1 to 3 and configure VLAN 10, VLAN 20, and
VLAN 30 as their respective control VLANs.
▪ On LSW1 to LSW5, add the interfaces on the ring at the access layer
to SEP segment 1. Configure the roles of GE0/0/1 and GE0/0/3 of
LSW1 in SEP segment 1.
Procedure
Step 1 Configure basic SEP functions.
1. Configure SEP segments 1 to 3 and configure VLAN 10, VLAN 20, and VLAN
30 as their respective control VLANs, In Figure 17-19.
# Configure LSW1.
<HUAWEI> system-view
[HUAWEI] sysname LSW1
[LSW1] sep segment 1
[LSW1-sep-segment1] control-vlan 10
[LSW1-sep-segment1] protected-instance all
[LSW1-sep-segment1] quit
# Configure LSW2.
<HUAWEI> system-view
[HUAWEI] sysname LSW2
[LSW2] sep segment 1
[LSW2-sep-segment1] control-vlan 10
[LSW2-sep-segment1] protected-instance all
[LSW2-sep-segment1] quit
[LSW2] sep segment 2
[LSW2-sep-segment2] control-vlan 20
[LSW2-sep-segment2] protected-instance all
[LSW2-sep-segment2] quit
# Configure LSW3.
<HUAWEI> system-view
[HUAWEI] sysname LSW3
[LSW3] sep segment 1
[LSW3-sep-segment1] control-vlan 10
[LSW3-sep-segment1] protected-instance all
[LSW3-sep-segment1] quit
[LSW3] sep segment 2
[LSW3-sep-segment2] control-vlan 20
[LSW3-sep-segment2] protected-instance all
[LSW3-sep-segment2] quit
[LSW3] sep segment 3
[LSW3-sep-segment3] control-vlan 30
[LSW3-sep-segment3] protected-instance all
[LSW3-sep-segment3] quit
# Configure LSW4.
<HUAWEI> system-view
[HUAWEI] sysname LSW4
[LSW4] sep segment 1
[LSW4-sep-segment1] control-vlan 10
[LSW4-sep-segment1] protected-instance all
[LSW4-sep-segment1] quit
[LSW4] sep segment 3
[LSW4-sep-segment3] control-vlan 30
[LSW4-sep-segment3] protected-instance all
[LSW4-sep-segment3] quit
# Configure LSW5.
<HUAWEI> system-view
[HUAWEI] sysname LSW5
[LSW5] sep segment 1
[LSW5-sep-segment1] control-vlan 10
[LSW5-sep-segment1] protected-instance all
[LSW5-sep-segment1] quit
NOTE
– The control VLAN must be a VLAN that has not been created or used, but the
configuration file automatically displays the command for creating the VLAN.
– Each SEP segment must be configured with a control VLAN. After an interface is
added to a SEP segment configured with a control VLAN, the interface will be
automatically added to the control VLAN.
2. Add devices on the rings to the SEP segments and configure interface roles
according to Figure 17-19.
NOTE
# Configure LSW2.
[LSW2] interface gigabitethernet 0/0/1
[LSW2-GigabitEthernet0/0/1] port link-type hybrid
[LSW2-GigabitEthernet0/0/1] stp disable
[LSW2-GigabitEthernet0/0/1] sep segment 1
[LSW2-GigabitEthernet0/0/1] quit
[LSW2] interface gigabitethernet 0/0/3
[LSW2-GigabitEthernet0/0/3] port link-type hybrid
[LSW2-GigabitEthernet0/0/3] stp disable
[LSW2-GigabitEthernet0/0/3] sep segment 1
[LSW2-GigabitEthernet0/0/3] quit
[LSW2] interface gigabitethernet 0/0/2
[LSW2-GigabitEthernet0/0/2] port link-type hybrid
[LSW2-GigabitEthernet0/0/2] stp disable
[LSW2-GigabitEthernet0/0/2] sep segment 2 edge primary
[LSW2-GigabitEthernet0/0/2] quit
# Configure LSW3.
[LSW3] interface gigabitethernet 0/0/3
[LSW3-GigabitEthernet0/0/3] port link-type hybrid
[LSW3-GigabitEthernet0/0/3] stp disable
[LSW3-GigabitEthernet0/0/3] sep segment 1
[LSW3-GigabitEthernet0/0/3] quit
[LSW3] interface gigabitethernet 0/0/4
[LSW3-GigabitEthernet0/0/4] port link-type hybrid
[LSW3-GigabitEthernet0/0/4] stp disable
[LSW3-GigabitEthernet0/0/4] sep segment 1
[LSW3-GigabitEthernet0/0/4] quit
[LSW3] interface gigabitethernet 0/0/2
[LSW3-GigabitEthernet0/0/2] port link-type hybrid
[LSW3-GigabitEthernet0/0/2] stp disable
[LSW3-GigabitEthernet0/0/2] sep segment 2 edge secondary
[LSW3-GigabitEthernet0/0/2] quit
[LSW3] interface gigabitethernet 0/0/1
[LSW3-GigabitEthernet0/0/1] port link-type hybrid
[LSW3-GigabitEthernet0/0/1] stp disable
[LSW3-GigabitEthernet0/0/1] sep segment 3 edge secondary
[LSW3-GigabitEthernet0/0/1] quit
# Configure LSW4.
[LSW4] interface gigabitethernet 0/0/2
[LSW4-GigabitEthernet0/0/2] port link-type hybrid
[LSW4-GigabitEthernet0/0/2] stp disable
[LSW4-GigabitEthernet0/0/2] sep segment 1
[LSW4-GigabitEthernet0/0/2] quit
[LSW4] interface gigabitethernet 0/0/3
[LSW4-GigabitEthernet0/0/3] port link-type hybrid
[LSW4-GigabitEthernet0/0/3] stp disable
[LSW4-GigabitEthernet0/0/3] sep segment 1
[LSW4-GigabitEthernet0/0/3] quit
[LSW4] interface gigabitethernet 0/0/1
[LSW4-GigabitEthernet0/0/1] port link-type hybrid
[LSW4-GigabitEthernet0/0/1] stp disable
[LSW4-GigabitEthernet0/0/1] sep segment 3 edge primary
[LSW4-GigabitEthernet0/0/1] quit
# Configure LSW5.
[LSW5] interface gigabitethernet 0/0/1
[LSW5-GigabitEthernet0/0/1] port link-type hybrid
[LSW5-GigabitEthernet0/0/1] stp disable
[LSW5-GigabitEthernet0/0/1] sep segment 1
[LSW5-GigabitEthernet0/0/1] quit
[LSW5] interface gigabitethernet 0/0/3
[LSW5-GigabitEthernet0/0/3] port link-type hybrid
[LSW5-GigabitEthernet0/0/3] stp disable
[LSW5-GigabitEthernet0/0/3] sep segment 1
[LSW5-GigabitEthernet0/0/3] quit
# On LSW3, set the priority of GE0/0/4 to 128, which is the highest priority
among the interfaces so that GE0/0/4 will be blocked.
[LSW3] interface gigabitethernet 0/0/4
[LSW3-GigabitEthernet0/0/4] sep segment 1 priority 128
[LSW3-GigabitEthernet0/0/4] quit
NOTE
SEP sets the hop count of the primary edge interface to 1 and the hop count of the
secondary edge interface to 2. Hop counts of other interfaces increase by steps of 1 in
the downstream direction of the primary interface.
4. Configure the preemption mode.
# Configure delayed preemption on LSW1.
[LSW1] sep segment 1
[LSW1-sep-segment1] preempt delay 30
NOTE
– You must set the preemption delay when delayed preemption is used because
there is no default delay time.
– When the last faulty interface recovers, edge interfaces do not receive any fault
notification packet. If the primary edge interface does not receive any fault
notification packet, it starts the delay timer. After the delay timer expires, nodes in
the SEP segment start blocked interface preemption.
To implement delayed preemption in this example, simulate a port fault and then
rectify the fault. For example:
Run the shutdown command on GE0/0/2 of LSW2 to simulate an interface fault,
and then run the undo shutdown command on GE0/0/2 to rectify the fault.
# Configure manual preemption on LSW2.
[LSW2] sep segment 2
[LSW2-sep-segment2] preempt manual
# Configure LSW3.
[LSW3] sep segment 2
[LSW3-sep-segment2] tc-notify segment 1
[LSW3-sep-segment2] quit
# Configure LSW4.
[LSW4] sep segment 3
[LSW4-sep-segment3] tc-notify segment 1
[LSW4-sep-segment3] quit
NOTE
The topology change notification function is configured on edge devices between SEP
segments so that the upper-layer network can be notified of topology changes on the
lower-layer network.
Step 2 Configure the Layer 2 forwarding function on the CEs and LSW1 to LSW11.
For details about the configuration, see the configuration files.
Step 3 Verify the configuration.
After completing the preceding configurations, verify the configuration. LSW1 is
used as an example.
● Run the shutdown command on GE0/0/1 of LSW2 to simulate an interface
fault, and then run the display sep interface command on LSW3 to check
whether GE0/0/4 of LSW3 has switched from the Discarding state to the
Forwarding state.
<LSW3> display sep interface gigabitethernet 0/0/4
SEP segment 1
----------------------------------------------------------------
Interface Port Role Neighbor Status Port Status
----------------------------------------------------------------
GE0/0/4 common up forwarding
----End
Configuration Files
● LSW1 configuration file
#
sysname LSW1
#
vlan batch 10 100 200 300
#
sep segment 1
control-vlan 10
block port optimal
preempt delay 30
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10 100 200
stp disable
sep segment 1 edge primary
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid pvid vlan 300
port hybrid tagged vlan 100 200
port hybrid untagged vlan 300
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 10 100 200 300
stp disable
sep segment 1 edge secondary
#
return
● LSW2 configuration file
#
sysname LSW2
#
vlan batch 10 20 100 200
#
sep segment 1
control-vlan 10
protected-instance 0 to 48
sep segment 2
control-vlan 20
block port sysname LSW7 interface GigabitEthernet0/0/1
tc-notify segment 1
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10 100 200
stp disable
sep segment 1
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 20 200
stp disable
sep segment 2 edge primary
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 10 100 200
stp disable
sep segment 1
#
return
● LSW3 configuration file
#
sysname LSW3
#
vlan batch 10 20 30 100 200
#
sep segment 1
control-vlan 10
protected-instance 0 to 48
sep segment 2
control-vlan 20
tc-notify segment 1
protected-instance 0 to 48
sep segment 3
control-vlan 30
tc-notify segment 1
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 30 100
stp disable
sep segment 3 edge secondary
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 20 200
stp disable
sep segment 2 edge secondary
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 10 100 200
stp disable
sep segment 1
#
interface GigabitEthernet0/0/4
port link-type hybrid
#
return
● LSW6 configuration file
#
sysname LSW6
#
vlan batch 20 200
#
sep segment 2
control-vlan 20
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 20 200
stp disable
sep segment 2
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 20 200
stp disable
sep segment 2
#
return
● LSW7 configuration file
#
sysname LSW7
#
vlan batch 20 200
#
sep segment 2
control-vlan 20
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 20 200
stp disable
sep segment 2
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 20 200
stp disable
sep segment 2
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 200
#
return
● LSW8 configuration file
#
sysname LSW8
#
vlan batch 20 200
#
sep segment 2
control-vlan 20
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 20 200
stp disable
sep segment 2
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 20 200
stp disable
sep segment 2
#
return
● LSW9 configuration file
#
sysname LSW9
#
vlan batch 30 100
#
sep segment 3
control-vlan 30
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 30 100
stp disable
sep segment 3
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 30 100
stp disable
sep segment 3
#
return
● LSW10 configuration file
#
sysname LSW10
#
vlan batch 30 100
#
sep segment 3
control-vlan 30
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 30 100
stp disable
sep segment 3
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 30 100
stp disable
sep segment 3
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 100
#
return
● LSW11 configuration file
#
sysname LSW11
#
vlan batch 30 100
#
sep segment 3
control-vlan 30
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 30 100
stp disable
sep segment 3
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 30 100
stp disable
sep segment 3
#
return
● CE1 configuration file
#
sysname CE1
#
vlan batch 100
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 100
#
return
● CE2 configuration file
#
sysname CE2
#
vlan batch 200
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 200
#
return
Related Content
Videos
Configuring SEP
NOTE
In this example, devices at the aggregation layer run the MSTP protocol.
In Figure 17-20, multiple Layer 2 switching devices form a ring at the access layer,
and multiple Layer 3 devices form a ring at the aggregation layer. The two devices
where the access layer and the aggregation layer are intersected do not support
SEP. You can configure SEP at the access layer to implement redundancy
protection switching and configure the topology change notification function on
an edge device in a SEP segment. This function enables an upper-layer network to
detect topology changes in a lower-layer network in time.
● When there is no faulty link on the ring network, SEP can eliminate loops.
● When a link fails on the ring network, SEP can rapidly restore communication
between nodes.
● The topology change notification function must be configured on an edge
device in a SEP segment. This enables an upper-layer network to detect
topology changes in a lower-layer network in time.
After receiving a message indicating the topology change in a lower-layer
network, a device on an upper-layer network sends TC packets to instruct other
devices to delete original MAC addresses and learn new MAC addresses after the
topology of the lower-layer network changes. This ensures uninterrupted traffic
forwarding.
IP/MPLS Core
Core
GE0/0/2
GE0/0/3 GE0/0/3
GE0/0/2 PE4
Aggregation
PE3
GE0/0/1
GE0/0/1
MSTP
GE0/0/3
GE0/0/1 Do not Support SEP GE0/0/1
GE0/0/1 GE0/0/1
SEP
LSW1 Segment1 LSW2
GE0/0/2 GE0/0/2
GE0/0/2 GE0/0/1
Access
GE0/0/3 LSW3
GE0/0/1
CE
No-neighbor Primary Edge Port
No-neighbor Secondary Edge Port
VLAN100 Block Port(SEP)
Block Port(MSTP)
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic SEP functions.
a. Configure SEP segment 1 on LSW1 to LSW3 and configure VLAN 10 as
the control VLAN of SEP segment 1.
b. Add LSW1 to LSW3 to SEP segment 1 and configure interface roles on
the edge devices (LSW1 and LSW2) of the SEP segment.
NOTE
PE1 and PE2 do not support the SEP protocol; therefore, the interfaces of LSW1
and LSW2 connected to the PEs must be no-neighbor edge interfaces.
c. On the device where the no-neighbor primary edge interface is located,
specify the interface in the middle of the SEP segment as the interface to
block.
d. Configure manual preemption.
e. Configure the topology change notification function so that the upper-
layer network running MSTP can be notified of topology changes in the
SEP segment.
2. Configure basic MSTP functions.
a. Add LSW1, LSW2, PE1 to PE4 to an MST region RG1.
b. Create VLANs on LSW1, LSW2, PE1 to PE4 and add interfaces on the STP
ring to the VLANs.
c. Configure PE3 as the root bridge and PE4 as the backup root bridge.
3. Configure the Layer 2 forwarding function on CE and LSW1 to LSW3.
Procedure
Step 1 Configure basic SEP functions.
1. Configure SEP segment 1 on LSW1 to LSW3 and configure VLAN 10 as the
control VLAN of SEP segment 1.
# Configure LSW1.
<HUAWEI> system-view
[HUAWEI] sysname LSW1
[LSW1] sep segment 1
[LSW1-sep-segment1] control-vlan 10
[LSW1-sep-segment1] protected-instance all
[LSW1-sep-segment1] quit
# Configure LSW2.
<HUAWEI> system-view
[HUAWEI] sysname LSW2
[LSW2] sep segment 1
[LSW2-sep-segment1] control-vlan 10
[LSW2-sep-segment1] protected-instance all
[LSW2-sep-segment1] quit
# Configure LSW3.
<HUAWEI> system-view
[HUAWEI] sysname LSW3
[LSW3] sep segment 1
[LSW3-sep-segment1] control-vlan 10
[LSW3-sep-segment1] protected-instance all
[LSW3-sep-segment1] quit
NOTE
– The control VLAN must be a VLAN that has not been created or used, but the
configuration file automatically displays the command for creating the VLAN.
– Each SEP segment must be configured with a control VLAN. After an interface is
added to a SEP segment configured with a control VLAN, the interface will be
automatically added to the control VLAN.
2. Add LSW1 to LSW3 to SEP segment 1 and configure interface roles.
NOTE
# Configure LSW2.
[LSW2] interface gigabitethernet 0/0/1
[LSW2-GigabitEthernet0/0/1] port link-type hybrid
[LSW2-GigabitEthernet0/0/1] sep segment 1 edge no-neighbor secondary
[LSW2-GigabitEthernet0/0/1] quit
[LSW2] interface gigabitethernet 0/0/2
[LSW2-GigabitEthernet0/0/2] port link-type hybrid
[LSW2-GigabitEthernet0/0/2] stp disable
[LSW2-GigabitEthernet0/0/2] sep segment 1
[LSW2-GigabitEthernet0/0/2] quit
# Configure LSW3.
[LSW3] interface gigabitethernet 0/0/1
[LSW3-GigabitEthernet0/0/1] port link-type hybrid
[LSW3-GigabitEthernet0/0/1] stp disable
[LSW3-GigabitEthernet0/0/1] sep segment 1
[LSW3-GigabitEthernet0/0/1] quit
[LSW3] interface gigabitethernet 0/0/2
[LSW3-GigabitEthernet0/0/2] port link-type hybrid
[LSW3-GigabitEthernet0/0/2] stp disable
[LSW3-GigabitEthernet0/0/2] sep segment 1
[LSW3-GigabitEthernet0/0/2] quit
# Configure LSW2.
[LSW2] sep segment 1
[LSW2-sep-segment1] tc-notify stp
[LSW2-sep-segment1] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] stp region-configuration
[PE2-mst-region] region-name RG1
[PE2-mst-region] active region-configuration
[PE2-mst-region] quit
# Configure PE3.
<HUAWEI> system-view
[HUAWEI] sysname PE3
[PE3] stp region-configuration
[PE3-mst-region] region-name RG1
[PE3-mst-region] active region-configuration
[PE3-mst-region] quit
# Configure PE4.
<HUAWEI> system-view
[HUAWEI] sysname PE4
[PE4] stp region-configuration
[PE4-mst-region] region-name RG1
[PE4-mst-region] active region-configuration
[PE4-mst-region] quit
# Configure LSW1.
[LSW1] stp region-configuration
[LSW1-mst-region] region-name RG1
[LSW1-mst-region] active region-configuration
[LSW1-mst-region] quit
# Configure LSW2.
[LSW2] stp region-configuration
[LSW2-mst-region] region-name RG1
[LSW2-mst-region] active region-configuration
[LSW2-mst-region] quit
# On PE2, PE3, and PE4, create VLAN 100 and add GE0/0/1, GE0/0/2, and
GE0/0/3 to VLAN 100.
The configurations of PE2, PE3, and PE4 are similar to the configuration of
PE1. For details about the configuration, see the configuration files.
# On LSW1 and LSW2, create VLAN 100 and add GE0/0/1 to VLAN 100. The
configurations of LSW1 and LSW2 are similar to the configuration of PE1. For
details about the configuration, see the configuration files.
3. Enable MSTP.
# Configure PE1.
[PE1] stp enable
# Configure PE2.
[PE2] stp enable
# Configure PE3.
[PE3] stp enable
# Configure PE4.
[PE4] stp enable
# Configure LSW1.
[LSW1] stp enable
# Configure LSW2.
[LSW2] stp enable
4. Configure PE3 as the root bridge and PE4 as the backup root bridge.
# Set the priority of PE3 to 0 in MSTI0 to ensure that PE3 functions as the
root bridge.
[PE3] stp root primary
# Set the priority of PE4 to 4096 in MSTI0 to ensure that PE4 functions as the
backup root bridge.
[PE4] stp root secondary
Step 3 Configure the Layer 2 forwarding function on the CE and LSW1 to LSW3.
For details about the configuration, see the configuration files.
Step 4 Verify the configuration.
After the configurations are complete and network becomes stable, run the
following commands to verify the configuration. LSW1 is used as an example.
● Run the shutdown command on GE0/0/1 of LSW2 to simulate an interface
fault, and then run the display sep interface command on LSW3 to check
whether GE0/0/2 of LSW3 has switched from the Discarding state to the
Forwarding state.
<LSW3> display sep interface gigabitethernet 0/0/2
SEP segment 1
----------------------------------------------------------------
Interface Port Role Neighbor Status Port Status
----------------------------------------------------------------
GE0/0/2 common up forwarding
----End
Configuration Files
● LSW1 configuration file
#
sysname LSW1
#
vlan batch 10 100
#
stp region-configuration
region-name RG1
active region-configuration
#
sep segment 1
control-vlan 10
block port middle
tc-notify stp
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10 100
sep segment 1 edge no-neighbor primary
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 10 100
stp disable
sep segment 1
#
return
● LSW2 configuration file
#
sysname LSW2
#
vlan batch 10 100
#
stp region-configuration
region-name RG1
active region-configuration
#
sep segment 1
control-vlan 10
tc-notify stp
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10 100
sep segment 1 edge no-neighbor secondary
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 10 100
stp disable
sep segment 1
#
return
● LSW3 configuration file
#
sysname LSW3
#
vlan batch 10 100
#
sep segment 1
control-vlan 10
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10 100
stp disable
sep segment 1
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 10 100
stp disable
sep segment 1
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan vlan 100
#
return
● PE1 configuration file
#
sysname PE1
#
vlan batch 100
#
stp region-configuration
region-name RG1
active region-configuration
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 100
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 100
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 100
#
return
● PE2 configuration file
#
sysname PE2
#
vlan batch 100
#
stp region-configuration
region-name RG1
active region-configuration
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 100
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 100
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 100
#
return
● PE3 configuration file
#
sysname PE3
#
vlan batch 100 200
#
stp instance 0 root primary
#
stp region-configuration
region-name RG1
active region-configuration
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 100
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 100 200
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid pvid vlan 200
port hybrid tagged vlan 100
port hybrid untagged vlan 200
#
return
● PE4 configuration file
#
sysname PE4
#
vlan batch 100 200
#
stp instance 0 root secondary
#
stp region-configuration
region-name RG1
active region-configuration
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 100
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 100 200
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid pvid vlan 200
port hybrid tagged vlan 100
port hybrid untagged vlan 200
#
return
● CE configuration file
#
sysname CE
#
vlan batch 100
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 100
#
return
Related Content
Videos
Configuring SEP
Networking Requirements
Generally, redundant links are used to connect an Ethernet switching network to
an upper-layer 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 services may even be interrupted. SEP can be deployed on the
ring network to eliminate loops and restore communication if a link fault occurs.
In this example, you can configure SEP at the access layer to implement
redundancy protection switching and configure the topology change notification
function on an edge device in a SEP segment. This enables an upper-layer network
to detect topology changes in a lower-layer network in time.
Network
NPE1 NPE2
GE0/0/2
GE0/0/3 GE0/0/3
GE0/0/2 PE4
Aggregation
PE3
GE0/0/1
GE0/0/1
RRPP
GE0/0/3
GE0/0/1 GE0/0/1
GE0/0/1 GE0/0/1
SEP
LSW1 Segment1 LSW2
GE0/0/2 GE0/0/2
GE0/0/2 GE0/0/1
Access
LSW3
GE0/0/3
GE0/0/1
CE
Primary Edge Port
Secondary Edge Port
VLAN100 Block Port(SEP)
Block Port(RRPP)
In Figure 17-21, multiple Layer 2 switching devices at the access layer and
aggregation layer form a ring network to access the core layer. RRPP has been
configured at the aggregation layer to eliminate loops. In this case, SEP needs to
run at the access layer to implement the following functions:
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Configure basic SEP functions.
1. Configure SEP segment 1 on PE1, PE2, and LSW1 to LSW3 and configure
VLAN 10 as the control VLAN of SEP segment 1.
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] sep segment 1
[PE1-sep-segment1] control-vlan 10
[PE1-sep-segment1] protected-instance all
[PE1-sep-segment1] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] sep segment 1
[PE2-sep-segment1] control-vlan 10
[PE2-sep-segment1] protected-instance all
[PE2-sep-segment1] quit
# Configure LSW1.
<HUAWEI> system-view
[HUAWEI] sysname LSW1
[LSW1] sep segment 1
[LSW1-sep-segment1] control-vlan 10
[LSW1-sep-segment1] protected-instance all
[LSW1-sep-segment1] quit
# Configure LSW2.
<HUAWEI> system-view
[HUAWEI] sysname LSW2
[LSW2] sep segment 1
[LSW2-sep-segment1] control-vlan 10
[LSW2-sep-segment1] protected-instance all
[LSW2-sep-segment1] quit
# Configure LSW3.
<HUAWEI> system-view
[HUAWEI] sysname LSW3
[LSW3] sep segment 1
[LSW3-sep-segment1] control-vlan 10
[LSW3-sep-segment1] protected-instance all
[LSW3-sep-segment1] quit
2. Add PE1, PE2, and LSW1 to LSW3 to SEP segment 1 and configure interface
roles.
NOTE
# Configure LSW1.
[LSW1] interface gigabitethernet 0/0/1
[LSW1-GigabitEthernet0/0/1] port link-type trunk
[LSW1-GigabitEthernet0/0/1] stp disable
[LSW1-GigabitEthernet0/0/1] sep segment 1
[LSW1-GigabitEthernet0/0/1] quit
[LSW1] interface gigabitethernet 0/0/2
[LSW1-GigabitEthernet0/0/2] port link-type trunk
[LSW1-GigabitEthernet0/0/2] stp disable
[LSW1-GigabitEthernet0/0/2] sep segment 1
[LSW1-GigabitEthernet0/0/2] quit
# Configure LSW2.
[LSW2] interface gigabitethernet 0/0/1
[LSW2-GigabitEthernet0/0/1] port link-type trunk
[LSW2-GigabitEthernet0/0/1] stp disable
[LSW2-GigabitEthernet0/0/1] sep segment 1
[LSW2-GigabitEthernet0/0/1] quit
[LSW2] interface gigabitethernet 0/0/2
[LSW2-GigabitEthernet0/0/2] port link-type trunk
[LSW2-GigabitEthernet0/0/2] stp disable
[LSW2-GigabitEthernet0/0/2] sep segment 1
[LSW2-GigabitEthernet0/0/2] quit
# Configure LSW3.
[LSW3] interface gigabitethernet 0/0/1
[LSW3-GigabitEthernet0/0/1] port link-type trunk
[LSW3-GigabitEthernet0/0/1] stp disable
[LSW3-GigabitEthernet0/0/1] sep segment 1
[LSW3-GigabitEthernet0/0/1] quit
[LSW3] interface gigabitethernet 0/0/2
[LSW3-GigabitEthernet0/0/2] port link-type trunk
[LSW3-GigabitEthernet0/0/2] stp disable
[LSW3-GigabitEthernet0/0/2] sep segment 1
[LSW3-GigabitEthernet0/0/2] quit
# Configure PE2.
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type trunk
[PE2-GigabitEthernet0/0/1] stp disable
[PE2-GigabitEthernet0/0/1] sep segment 1 edge secondary
[PE2-GigabitEthernet0/0/1] quit
After completing the preceding configurations, run the display sep topology
command on PE1 to view the topology of the SEP segment. The command
output shows that the blocked interface is one of the two interfaces that
complete neighbor negotiations last.
[PE1] display sep topology
SEP segment 1
-------------------------------------------------------------------------
System Name Port Name Port Role Port Status Hop
-------------------------------------------------------------------------
PE1 GE0/0/1 primary forwarding 1
LSW1 GE0/0/1 common forwarding 2
LSW1 GE0/0/2 common forwarding 3
LSW3 GE0/0/2 common forwarding 4
LSW3 GE0/0/1 common forwarding 5
LSW2 GE0/0/2 common forwarding 6
LSW2 GE0/0/1 common forwarding 7
PE2 GE0/0/1 secondary discarding 8
[PE3-vlan100] quit
[PE3] interface gigabitethernet 0/0/1
[PE3-GigabitEthernet0/0/1] stp disable
[PE3-GigabitEthernet0/0/1] port link-type trunk
[PE3-GigabitEthernet0/0/1] port trunk allow-pass vlan 100
[PE3-GigabitEthernet0/0/1] quit
[PE3] interface gigabitethernet 0/0/2
[PE3-GigabitEthernet0/0/2] stp disable
[PE3-GigabitEthernet0/0/2] port link-type trunk
[PE3-GigabitEthernet0/0/2] port trunk allow-pass vlan 100
[PE3-GigabitEthernet0/0/2] quit
# Create VLAN 100 on PE4, and add GE 0/0/1 and GE 0/0/2 to VLAN 100.
[PE4] vlan 100
[PE4-vlan100] quit
[PE4] interface gigabitethernet 0/0/1
[PE4-GigabitEthernet0/0/1] stp disable
[PE4-GigabitEthernet0/0/1] port link-type trunk
[PE4-GigabitEthernet0/0/1] port trunk allow-pass vlan 100
[PE4-GigabitEthernet0/0/1] quit
[PE4] interface gigabitethernet 0/0/2
[PE4-GigabitEthernet0/0/2] stp disable
[PE4-GigabitEthernet0/0/2] port link-type trunk
[PE4-GigabitEthernet0/0/2] port trunk allow-pass vlan 100
[PE4-GigabitEthernet0/0/2] quit
3. Configure PE1 as the master node and PE2 to PE4 as transit nodes on the
major ring, and configure the primary and secondary interfaces of the major
ring.
# Configure PE1.
[PE1] rrpp domain 1
[PE1-rrpp-domain-region1] ring 1 node-mode master primary-port gigabitethernet0/0/2
secondary-port gigabitethernet0/0/3 level 0
[PE1-rrpp-domain-region1] ring 1 enable
# Configure PE2.
[PE2] rrpp domain 1
[PE2-rrpp-domain-region1] ring 1 node-mode transit primary-port gigabitethernet0/0/2
secondary-port gigabitethernet0/0/3 level 0
[PE2-rrpp-domain-region1] ring 1 enable
# Configure PE3.
[PE3] rrpp domain 1
[PE3-rrpp-domain-region1] ring 1 node-mode transit primary-port gigabitethernet0/0/1
secondary-port gigabitethernet0/0/2 level 0
[PE3-rrpp-domain-region1] ring 1 enable
# Configure PE4.
[PE4] rrpp domain 1
[PE4-rrpp-domain-region1] ring 1 node-mode transit primary-port gigabitethernet0/0/1
secondary-port gigabitethernet0/0/2 level 0
[PE4-rrpp-domain-region1] ring 1 enable
4. Enable RRPP.
# Configure PE1.
[PE1] rrpp enable
# Configure PE2.
[PE2] rrpp enable
# Configure PE3.
[PE3] rrpp enable
# Configure PE4.
[PE4] rrpp enable
After completing the preceding configurations, run the display rrpp brief or
display rrpp verbose domain command on PE1 to check the RRPP configuration.
[PE1] display rrpp brief
Abbreviations for Switch Node Mode :
M - Master , T - Transit , E - Edge , A - Assistant-Edge
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
Ring Ring Node Primary/Common Secondary/Edge Is
ID Level Mode Port Port Enabled
----------------------------------------------------------------------------
1 0 M GigabitEthernet0/0/2 GigabitEthernet0/0/3 Yes
The command output shows that RRPP is enabled on PE1. In domain 1, VLAN 5 is
the major control VLAN, VLAN 6 is the sub-control VLAN, Instance 1 is the
protected VLAN, and PE1 is the master node in major ring 1 with the primary and
secondary interfaces as GigabitEthernet0/0/2 and GigabitEthernet0/0/3
respectively.
[PE1] display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
RRPP Ring :1
Ring Level :0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/2 Port status: UP
Secondary port : GigabitEthernet0/0/3 Port status: BLOCKED
The command output shows that in domain 1, VLAN 5 is the major control VLAN,
VLAN 6 is the sub-control VLAN, Instance 1 is the protected VLAN, PE1 is the
master node in major ring 1 with the primary and secondary interfaces as
GigabitEthernet0/0/2 and GigabitEthernet0/0/3 respectively, and the node status is
Complete.
Step 3 Configure the Layer 2 forwarding function on the CE, LSW1 to LSW3, and PE1 to
PE4.
After the previous configurations, run the following commands to verify the
configuration when the network is stable. LSW1 is used as an example.
----------------------------------------------------------------
GE0/0/2 common up forwarding
----End
Configuration Files
● LSW1 configuration file
#
sysname LSW1
#
vlan batch 10 100
#
sep segment 1
control-vlan 10
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 100
stp disable
sep segment 1
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 100
stp disable
sep segment 1
#
return
stp disable
sep segment 1
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 100
stp disable
sep segment 1
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 100
#
return
● PE1 configuration file
#
sysname PE1
#
vlan batch 5 to 6 10 100
#
rrpp enable
#
stp region-configuration
instance 1 vlan 5 to 6 100
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode master primary-port GigabitEthernet 0/0/2 secondary-port GigabitEthernet 0/0/3
level 0
ring 1 enable
#
sep segment 1
control-vlan 10
block port middle
tc-notify rrpp
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 100
stp disable
sep segment 1 edge primary
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 5 to 6 100
stp disable
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 5 to 6 100
stp disable
#
return
● PE2 configuration file
#
sysname PE2
#
vlan batch 5 to 6 10 100
#
rrpp enable
#
stp region-configuration
instance 1 vlan 5 to 6 100
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet 0/0/2 secondary-port GigabitEthernet 0/0/3
level 0
ring 1 enable
#
sep segment 1
control-vlan 10
tc-notify rrpp
protected-instance 0 to 48
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 100
stp disable
sep segment 1 edge secondary
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 5 to 6 100
stp disable
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 5 to 6 100
stp disable
#
return
● PE3 configuration file
#
sysname PE3
#
vlan batch 5 to 6 100 200
#
rrpp enable
#
stp region-configuration
instance 1 vlan 5 to 6 100
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet 0/0/1 secondary-port GigabitEthernet 0/0/2
level 0
ring 1 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100
stp disable
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 5 to 6 100 200
stp disable
#
interface GigabitEthernet0/0/3
port link-type trunk
port default vlan 200
port trunk allow-pass vlan 5 to 6 100
#
return
● PE4 configuration file
#
sysname PE4
#
Related Content
Videos
Configuring SEP
Networking Requirements
On a closed ring network, two SEP segments are configured to process different
VLAN services, implement load balancing, and provide link backup.
In typical SEP networking, a physical ring can be configured with only one SEP
segment in which only one interface can be blocked. If an interface in a complete
SEP segment is blocked, all service data is transmitted only along the path where
the primary edge interface is located. The path where the secondary edge
interface is located remains idle, wasting bandwidth.
IP/MPLS Core
NPE1 NPE2
Core
/0/3 GE0/
0/3
GE0/0/2 GE0 GE0/0/2
LSW1 LSW4
GE0/0/1
GE0/0/1
Aggregation
P2 P1
GE0/0/1 GE0/0/1
LSW2 GE LSW3
0 /0/ /0/2
GE0/0/3 2 GE0 GE0/0/3
GE0/0/1 GE0/0/1
CE1 CE2
Access
Instance1: Instance2:
VLAN 100~300 VLAN 301~500
SEP Segment1
SEP Segment2
Primary Edge Port
Secondary Edge Port
Block Port
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic SEP functions.
a. Create two SEP segments and a control VLAN on LSW1 to LSW4.
Different SEP segments can use the same control VLAN.
b. Configure SEP protected instances, and set mappings between SEP
protected instances and user VLANs to ensure that topology changes
affect only corresponding VLANs.
c. Add all the devices on the ring network to the SEP segments, and
configure GE0/0/1 as the primary edge interface and GE0/0/3 as the
secondary edge interface on LSW1.
d. Configure an interface blocking mode on the device where the primary
edge interface resides.
e. Configure the preemption mode to ensure that the specified interface is
blocked when a fault is rectified.
2. Configure the Layer 2 forwarding function on CE1, CE2, and LSW1 to LSW4.
Procedure
Step 1 Configure basic SEP functions.
● Configure SEP segment 1 and control VLAN 10.
# Configure LSW1.
<HUAWEI> system-view
[HUAWEI] sysname LSW1
[LSW1] sep segment 1
[LSW1-sep-segment1] control-vlan 10
[LSW1-sep-segment1] quit
# Configure LSW2.
<HUAWEI> system-view
[HUAWEI] sysname LSW2
[LSW2] sep segment1
[LSW2-sep-segment1] control-vlan 10
[LSW2-sep-segment1] quit
# Configure LSW3.
<HUAWEI> system-view
[HUAWEI] sysname LSW3
[LSW3] sep segment 1
[LSW3-sep-segment1] control-vlan 10
[LSW3-sep-segment1] quit
# Configure LSW4.
<HUAWEI> system-view
[HUAWEI] sysname LSW4
[LSW4] sep segment 1
[LSW4-sep-segment1] control-vlan 10
[LSW4-sep-segment1] quit
● Configure SEP segment 2 and control VLAN 10.
# Configure LSW1.
[LSW1] sep segment 2
[LSW1-sep-segment2] control-vlan 10
[LSW1-sep-segment2] quit
# Configure LSW2.
[LSW2] sep segment2
[LSW2-sep-segment2] control-vlan 10
[LSW2-sep-segment2] quit
# Configure LSW3.
[LSW3] sep segment 2
[LSW3-sep-segment2] control-vlan 10
[LSW3-sep-segment2] quit
# Configure LSW4.
[LSW4] sep segment 2
[LSW4-sep-segment2] control-vlan 10
[LSW4-sep-segment2] quit
NOTE
Step 2 Configure SEP protected instances, and configure mappings between SEP
protected instances and user VLANs.
# Configure LSW1.
[LSW1] vlan batch 100 to 500
[LSW1] sep segment 1
[LSW1-sep-segment1] protected-instance 1
[LSW1-sep-segment1] quit
[LSW1] sep segment 2
[LSW1-sep-segment2] protected-instance 2
[LSW1-sep-segment2] quit
[LSW1] stp region-configuration
[LSW1-mst-region] instance 1 vlan 100 to 300
[LSW1-mst-region] instance 2 vlan 301 to 500
[LSW1-mst-region] active region-configuration
[LSW1-mst-region] quit
The configurations of LSW2 to LSW4 are similar to that of LSW1, and are not
mentioned here. For details, see the configuration files.
Step 3 Add all the devices on the ring network to the SEP segments and configure
interface roles.
NOTE
By default, STP is enabled on a Layer 2 interface. Before adding an interface to a SEP
segment, disable STP on the interface.
# On LSW1, configure GE0/0/1 as the primary edge interface and GE0/0/3 as the
secondary edge interface.
[LSW1] interface gigabitethernet 0/0/1
[LSW1-GigabitEthernet0/0/1] port link-type hybrid
[LSW1-GigabitEthernet0/0/1] stp disable
[LSW1-GigabitEthernet0/0/1] sep segment 1 edge primary
[LSW1-GigabitEthernet0/0/1] sep segment 2 edge primary
[LSW1-GigabitEthernet0/0/1] quit
[LSW1] interface gigabitethernet 0/0/3
[LSW1-GigabitEthernet0/0/3] port link-type hybrid
[LSW1-GigabitEthernet0/0/3] stp disable
[LSW1-GigabitEthernet0/0/3] sep segment 1 edge secondary
[LSW1-GigabitEthernet0/0/3] sep segment 2 edge secondary
[LSW1-GigabitEthernet0/0/3] quit
# Configure LSW2.
[LSW2] interface gigabitethernet 0/0/1
[LSW2-GigabitEthernet0/0/1] port link-type hybrid
[LSW2-GigabitEthernet0/0/1] stp disable
[LSW2-GigabitEthernet0/0/1] sep segment 1
[LSW2-GigabitEthernet0/0/1] sep segment 2
[LSW2-GigabitEthernet0/0/1] quit
[LSW2] interface gigabitethernet 0/0/2
[LSW2-GigabitEthernet0/0/2] port link-type hybrid
[LSW2-GigabitEthernet0/0/2] stp disable
[LSW2-GigabitEthernet0/0/2] sep segment 1
[LSW2-GigabitEthernet0/0/2] sep segment 2
[LSW2-GigabitEthernet0/0/2] quit
# Configure LSW3.
[LSW3] interface gigabitethernet 0/0/1
[LSW3-GigabitEthernet0/0/1] port link-type hybrid
[LSW3-GigabitEthernet0/0/1] stp disable
[LSW3-GigabitEthernet0/0/1] sep segment 1
[LSW3-GigabitEthernet0/0/1] sep segment 2
[LSW3-GigabitEthernet0/0/1] quit
[LSW3] interface gigabitethernet 0/0/2
[LSW3-GigabitEthernet0/0/2] port link-type hybrid
[LSW3-GigabitEthernet0/0/2] stp disable
[LSW3-GigabitEthernet0/0/2] sep segment 1
[LSW3-GigabitEthernet0/0/2] sep segment 2
[LSW3-GigabitEthernet0/0/2] quit
# Configure LSW4.
[LSW4] interface gigabitethernet 0/0/1
[LSW4-GigabitEthernet0/0/1] port link-type hybrid
[LSW4-GigabitEthernet0/0/1] stp disable
[LSW4-GigabitEthernet0/0/1] sep segment 1
[LSW4-GigabitEthernet0/0/1] sep segment 2
[LSW4-GigabitEthernet0/0/1] quit
[LSW4] interface gigabitethernet 0/0/3
[LSW4-GigabitEthernet0/0/3] port link-type hybrid
[LSW4-GigabitEthernet0/0/3] stp disable
[LSW4-GigabitEthernet0/0/3] sep segment 1
[LSW4-GigabitEthernet0/0/3] sep segment 2
[LSW4-GigabitEthernet0/0/3] quit
NOTE
Step 5 Configure the Layer 2 forwarding function on CE1, CE2, and LSW1 to LSW4.
The configuration details are not mentioned here. For details, see the
configuration files.
Step 6 Verify the configuration.
Simulate a fault, and then check whether the status of the blocked interface
changes from blocked to forwarding.
Run the shutdown command on GE0/0/1 of LSW2 to simulate an interface fault.
Run the display sep interface command on LSW3 to check whether the status of
GE0/0/1 in SEP segment 1 changes from blocked to forwarding.
[LSW3] display sep interface gigabitethernet 0/0/1
SEP segment 1
----------------------------------------------------------------
Interface Port Role Neighbor Status Port Status
----------------------------------------------------------------
GE0/0/1 common up forwarding
SEP segment 2
----------------------------------------------------------------
Interface Port Role Neighbor Status Port Status
----------------------------------------------------------------
GE0/0/1 common up forwarding
The preceding command output shows that the status of GE0/0/1 changes from
blocked to forwarding and the forwarding path change in SEP segment 1 does not
affect the forwarding path in SEP segment 2.
----End
Configuration Files
● LSW1 configuration file
#
sysname LSW1
#
vlan batch 10 100 to 500
#
stp region-configuration
instance 1 vlan 100 to 300
instance 2 vlan 301 to 500
active region-configuration
#
sep segment 1
control-vlan 10
block port sysname LSW3 interface GigabitEthernet0/0/1
preempt delay 15
protected-instance 1
sep segment 2
control-vlan 10
block port sysname LSW2 interface GigabitEthernet0/0/1
preempt delay 15
protected-instance 2
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10 100 to 500
stp disable
sep segment 1 edge primary
sep segment 2 edge primary
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 10 100 to 500
stp disable
sep segment 1 edge secondary
sep segment 2 edge secondary
#
return
● LSW2 configuration file
#
sysname LSW2
#
vlan batch 10 100 to 500
#
stp region-configuration
instance 1 vlan 100 to 300
instance 2 vlan 301 to 500
active region-configuration
#
sep segment 1
control-vlan 10
protected-instance 1
sep segment 2
control-vlan 10
protected-instance 2
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10 100 to 500
stp disable
sep segment 1
sep segment 2
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 10 100 to 500
stp disable
sep segment 1
sep segment 2
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 100 to 300
#
return
● LSW3 configuration file
#
sysname LSW3
#
vlan batch 10 100 to 500
#
stp region-configuration
instance 1 vlan 100 to 300
instance 2 vlan 301 to 500
active region-configuration
#
sep segment 1
control-vlan 10
protected-instance 1
sep segment 2
control-vlan 10
protected-instance 2
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10 100 to 500
stp disable
sep segment 1
sep segment 2
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 10 100 to 500
stp disable
sep segment 1
sep segment 2
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 301 to 500
#
return
● LSW4 configuration file
#
sysname LSW4
#
vlan batch 10 60 100 to 500
#
stp region-configuration
instance 1 vlan 100 to 300
instance 2 vlan 301 to 500
active region-configuration
#
sep segment 1
control-vlan 10
protected-instance 1
sep segment 2
control-vlan 10
protected-instance 2
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 10 100 to 500
stp disable
sep segment 1
sep segment 2
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 10 100 to 500
stp disable
sep segment 1
sep segment 2
#
return
● CE1 configuration file
#
sysname CE1
#
vlan batch 100 to 300
#
interface GigabitEthernet0/0/1
Related Content
Videos
Configuring SEP
18 RRPP Configuration
This chapter describes how to configure the Rapid Ring Protection Protocol (RRPP)
to prevent loops and implement fast convergence on ring networks.
Definition
The Rapid Ring Protection Protocol (RRPP) is a link layer protocol used to prevent
loops on an Ethernet ring network.
Once a network is established, RRPP-enabled devices discover and eliminate loops
on the network by blocking certain interfaces. If a network fault occurs, RRPP-
Purpose
The ring network topology is applied to metropolitan area networks (MANs) and
enterprise intranets to improve network reliability. If a fault occurs on a node or
on a link between nodes, data services are switched to the backup link to ensure
service. However, broadcast storms may occur on ring networks.
Many protocols can prevent broadcast storms on ring networks. However, if a fault
occurs on a ring network, most protocols are slow to switch data services to the
backup link. The network convergence is slow, causing service interruptions.
To shorten the convergence time and eliminate the impact of network scale on
convergence time, Huawei developed RRPP. Compared with other Ethernet ring
protocols, RRPP has the following advantages:
● RRPP can be applied to large networks because the convergence time is not
affected by the number of nodes on the ring network.
● RRPP prevents broadcast storms caused by data loops when an Ethernet ring
is complete.
● If a fault occurs on an Ethernet ring network, the backup link rapidly restores
the communication among the Ethernet ring network nodes.
Token ring The token ring was the first ring technology introduced to the
data communication field and applied in LANs.
The token ring does not have the self-healing capability.
RRPP Entities
A group of interconnected switches configured with the same domain ID and
control VLAN constitute an RRPP domain.
Figure 18-1 illustrates the entities in an RRPP domain.
C
E
RRPP Domain ID
An RRPP domain ID distinguishes an RRPP domain.
RRPP Ring
A physical RRPP ring uses an Ethernet ring topology. An RRPP domain comprises a
single ring or multiple interconnected rings. When multiple interconnected rings
exist, one ring is the major ring and the others are sub-rings.
An RRPP domain may have multiple sub-rings but only one major ring. The RRPP
domain in Figure 18-1 consists of a major ring and a sub-ring.
RRPP is applied to the networking of a single ring, intersecting rings, and tangent
rings. For details about different ring types, see Common RRPP Rings.
When an RRPP domain consists of a major ring and sub-rings, the RRPP domain is
configured with two control VLANs: a major control VLAN and a sub-control
VLAN. A major control VLAN belongs to the major ring, while a sub-control VLAN
belongs to a sub-ring. You only need to specify the major control VLAN. The VLAN
whose ID is one greater than the ID of the major control VLAN automatically
becomes the sub-control VLAN.
Protocol packets on the major ring are transmitted in the major control VLAN, and
RRPP packets on the sub-rings are transmitted in the sub-control VLAN. Protocol
packets on the sub-rings are transmitted as data packets on the major ring. For
example, in Figure 18-1, when the secondary interface of the master node on the
major ring is blocked, both data packets and protocol packets on the sub-ring
must be blocked. When the secondary interface is unblocked, both data packets
and protocol packets on the sub-ring are forwarded. Protocol packets on the sub-
ring are transmitted as data packets on the major ring, and protocol packets on
the major ring are only transmitted on the major ring.
Node
Each device on an RRPP ring is a node. Nodes on the RRPP ring are classified into
the following types:
● Master node
The master node determines how to handle topology changes. Each RRPP
ring must have only one master node.
Any device on an Ethernet ring can serve as the master node.
The master node can be in either Complete or Failed state. The master node
status indicates the RRPP ring status.
● Transit node
On an RRPP ring, all nodes except the master node are transit nodes. A transit
node monitors the status of its directly-connected links and notifies the
master node of link changes.
A transit node can be in LinkUp, LinkDown, or Preforwarding state.
– When the primary and secondary interfaces of a transit node are Up, the
transit node is in LinkUp state. The transit node can receive and forward
data packets and RRPP packets.
– When the primary or secondary interface of a transit node is Down, the
transit node is in LinkDown state.
The status of the RRPP ring on a node is the status of the node.
Interfaces
Interfaces are classified into the following types:
● Primary interface and secondary interface
On both the master node and transit node, one of the two interfaces
connected to an Ethernet ring is the primary interface, and the other is the
secondary interface. The interface roles depend on the configuration.
The primary and secondary interfaces on the master node provide different
functions:
– The master node sends Hello packets from its primary interface and
receives Hello packets on its secondary interface.
– Based on the network status, the master node blocks the secondary
interface to prevent loops or unblocks the secondary interface to ensure
communication among all the nodes on the ring.
The primary and secondary interfaces on a transit node provide the same
function.
● Common interface and edge interface
On an edge node or an assistant edge node, an interface shared by the major
ring and a sub-ring is called the common interface. An interface used only by
a sub-ring is called the edge interface.
The common interface is considered an interface on the major ring and
belongs to both the major control VLAN and sub-control VLAN. The edge
interface belongs only to the sub-control VLAN.
Single Ring
When only a single ring exists in the network topology, you can define one RRPP
domain and one RRPP ring. This topology is applicable to simple ring networks
and features a quick response to topology changes and short convergence time.
Domain 1
SwitchA SwitchB
Ring 1
Intersecting Rings
When two or more rings exist in the network topology, and multiple common
nodes exist between two neighboring rings, they are considered intersecting rings
and you need to define only one RRPP domain. Configure one ring as the major
ring and the remaining rings as sub-rings. This topology is applicable when the
master node on a sub-ring needs to be dual-homed to the major ring through the
edge node and assistant edge node to provide uplink backup.
SwitchA SwitchB
Edge Node
Master Node
SwitchE
Ring 1
Ring 2
Master Node
Tangent Rings
When two or more rings exist in the network topology and only one common
node exists between two neighboring rings, they are considered to be tangent
rings, and you need to configure the rings to belong to different RRPP domains.
This topology is applicable to large-scale networks that require domain-based
management.
SwitchA SwitchE
Transit Node
Transit Node
SwitchB
SwitchD
Ring 2
SwitchF
Master Node Ring 1
SwitchC Transit Node
SwitchG
Domain 2
Transit Node
Hello The master node sends Hello packets to check for loops on a
(HEALTH) network.
Although there are many different types of RRPP packets, they all have a similar
format. Figure 18-5 demonstrates the format of an RRPP packet.
● RRPP TYPE: indicates the type of the RRPP packet. The field occupies 8 bits.
The RRPP packet types and values are described as follows:
– HEALTH = 0x05
– COMPLETE-FLUSH-FDB = 0x06
– COMMON-FLUSH-FDB = 0x07
– LINK-DOWN = 0x08
– EDGE-HELLO = 0x0a
– MAJOR-FAULT = 0x0b
● DOMAIN_ID: indicates the ID of the RRPP domain to which the packet
belongs. The field occupies 16 bits.
● RING_ID: indicates the ID of the RRPP ring to which the packet belongs. The
field occupies 16 bits.
● SYSTEM_MAC_ADDR: indicates the bridge MAC address from which the
packet is sent. The field occupies 48 bits.
● HELLO_TIMER: indicates the timeout period (in seconds) of the Hello timer on
the node that sends the packet. The field occupies 16 bits.
● FAIL_TIMER: indicates the timeout period (in seconds) of the Fail timer on the
node that sends the packet. The field occupies 16 bits.
● LEVEL: indicates the level of the RRPP ring to which the packet belongs. The
field occupies 8 bits.
● HELLO-SEQ: indicates the sequence number of the Hello packet. The field
occupies 16 bits.
Network
Router1 Router2
Master Node
Block
P S
Polling Mechanism
The master node uses a polling mechanism to monitor the ring status and
perform operations by sending Hello packets.
Hello timer and Fail timer
The polling mechanism uses the Hello timer and Fail timer.
● The value of the Hello timer specifies the interval at which the master node
sends Hello packets from the primary interface.
● The value of the Fail timer specifies the maximum delay in which the primary
interface sends a Hello packet and the secondary interface receives the Hello
packet.
● The value of the Fail timer must be three times or larger the value of the
Hello timer.
The master node determines whether to unblock the secondary interface by
sending a Hello packet according to the value of the Hello timer and checking
whether the secondary interface receives the Hello packet within the delay
specified by the Fail timer.
Process of the polling mechanism
The process of the polling mechanism is as follows:
1. The master node periodically sends a Hello packet from its primary interface
based on the value of the Hello timer.
2. The Hello packet is transmitted along transit nodes on the ring, as shown in
Figure 18-6. The master node typically receives the Hello packet on its
secondary interface.
– If the secondary interface on the master node receives the Hello packet
before the Fail timer times out, the master node considers the ring
complete.
– If the secondary interface on the master node does not receive the Hello
packet after the Fail timer times out, the master node considers the ring
faulty.
Network
Router1 Router2
Interface2
SwitchB
Link Failure
SwitchA
Interface1 Master Node
P S
User
network
primary interface
secondary interface
Data Packet
LINK-DOWN
● When SwitchA and SwitchB detect the link failure, they send LinkDown
packets to the master node from Interface1 and Interface2 respectively.
● Upon receiving a LinkDown packet, the master node changes from Complete
state to Failed state and unblocks the secondary interface so that data
packets can pass through.
● When the network topology changes, the master node updates the
forwarding entries to ensure correct packet forwarding. In addition, the
master node sends a Common-Flush-FDB packet from the primary and
secondary interfaces to request that all transit nodes update the forwarding
entries.
Nodes on an RRPP ring monitor the link status of their interfaces. If a fault occurs
on a link, the status of the interface directly connected to the link becomes Down.
Upon detecting the Down state, the node immediately takes the following
measures:
● If the primary interface on the master node is Down, the master node detects
the link fault and immediately unblocks the secondary interface. In addition,
the master node sends a Common-Flush-FDB packet from the secondary
interface to request that all the transit nodes on the ring update their MAC
address entries and ARP entries.
● If the interface on a transit node is Down, the node sends a LinkDown packet
from its interface in Up state to the master node. When receiving the
LinkDown packet, the master node changes to Failed state and unblocks its
secondary interface. When the network topology changes, the master node
must update its MAC address entries and ARP entries to prevent incorrect
packet forwarding. In addition, the master node sends a Common-Flush-FDB
packet from its primary and secondary interfaces to request that all transit
nodes update their MAC address entries and ARP entries.
Polling mechanism
If the LinkDown packet is lost during transmission, the polling mechanism is used
on the master node.
The master node periodically sends Hello packets from its primary interface. The
packets are then transmitted through all transit nodes on the ring. If the
secondary interface on the master node does not receive the Hello packet from
the primary interface in the specified period, the master node considers the ring
faulty. The fault is processed in the same way as a fault actively reported by a
transit node. The master node changes to Failed state and unblocks the secondary
interface. In addition, the master node sends a Common-Flush-FDB packet from
its primary and secondary interfaces to request that all transit nodes update their
MAC address entries and ARP entries.
The LinkDown notification mechanism processes faults more quickly than the
polling mechanism, allowing RRPP to implement fast link switchover and
convergence.
Network
Router1 Router2
Master Node
Block
P S
User
network
primary interface
secondary interface
Data Packet
COMPLETE-FLUSH-FDB
LinkUp Timer
After the link recovers, traffic transmission paths are switched frequently if the link
status changes frequently on a ring. As a result, loop flapping occurs and system
performance deteriorates. To address this problem, a LinkUp timer is used to set
the period after which the faulty master node enters the Complete state. This
prevents transmission paths from changing frequently and reduces loop flapping
impact on system performance.
If a LinkUp timer is configured, the master node does not immediately enter
Complete state when its secondary interface receives a Hello message. Instead,
the master node triggers the LinkUp timer and performs the following operations:
● Before the LinkUp timer expires, the master node does not process the Hello
message received from the secondary interface and the RRPP ring topology
remains unchanged. If the link status changes (for example, the master node
receives a LinkDown packet or the link goes Down) the timer is closed.
● After the LinkUp timer expires, the master node processes the Hello message.
The master node blocks its secondary interface and requests all transit nodes
to update their forwarding entries. The RRPP ring is re-converged.
Network
Router1 Router2
SwitchD
Link Failure
Master Node
SwitchC
Block
P S
User
network primary interface
secondary interface
Data Flow1
Data Flow2
In Figure 18-9, traffic between SwitchC and SwitchD is forwarded along data flow
1 when the ring fails. After the fault is rectified, the RRPP ring recalculates the
topology. Traffic between SwitchC and SwitchD is switched to data flow 2.
● When no LinkUp timer is configured, if the recovered link is unstable and fails
again, the RRPP ring recalculates the topology. Traffic between SwitchC and
SwitchD is switched to data flow 1. This may cause frequent changes of traffic
transmission paths. As a result, traffic is lost and system performance
deteriorates.
● When a LinkUp timer is configured, traffic is not switched immediately when
the fault is rectified. If the recovered link fails again, traffic between SwitchC
and SwitchD is still transmitted along data flow 1.
A multi-ring RRPP network works in almost the same way as a single-ring RRPP
network. On a multiple-ring network:
● A transit node on the major ring unblocks the temporarily blocked interface
only when receiving a Complete-Flush-FDB packet sent from the major ring,
not from the sub-ring.
● The path status detection mechanism for sub-ring protocol packets on the
major ring is used on a network with multiple rings. For details, see Path
Status Detection Mechanism for Sub-Ring Protocol Packets on the Major
Ring.
● Ring groups are used to improve system performance. For details, see Ring
Group.
Network
Router1 Router2
Master Transit
Major Ring
Edge
Assistant-Edge
Block Block
Sub-Ring1 Sub-Ring2
P P
Sub S Sub
S
Master 1 Master2
PC1 PC2
Block MAJOR_FAULT packets
S Secondary Interface Possible ring if the Edge interfaces are not blocked
When the common link between the major ring and sub-ring is faulty and at least
one non-common link is faulty, the master node on each sub-ring unblocks its
secondary interface (S in Figure 18-10) because the secondary interface does not
receive Hello packets. In this case, broadcast loops (blue dashed lines in Figure
18-10) may occur between sub-rings. To prevent loops, the network deploys the
path status detection mechanism for sub-ring protocol packets on the major ring.
After this mechanism is configured, the edge node and assistant edge node detect
the path status. When the edge node detects that the path is interrupted, the
edge interfaces on the two sub-rings are blocked before the master nodes on the
two sub-rings unblock their secondary interfaces. This prevents loops between
sub-rings. The edge interfaces on the edge nodes of sub-ring 1 and sub-ring 2 are
blocked, preventing loops. If the edge port is blocked, device connectivity cannot
be ensured.
The specific procedure for preventing loops using the path status detection
mechanism for sub-ring protocol packets is as follows:
1. The edge node checks the path status of sub-ring protocol packets on the
major ring.
Network
Router1 Router2
Master
S Block
Major Ring
Interface1
Edge
Assistant
Interface2
Sub Ring
Block
S P
Master
EDGE-HELLO
Data Packet
Block
PC
P Primary Interface
S Secondary Interface
If the assistant edge node receives the Edge-Hello packets within the specified
period, the protocol packet path is normal; if the assistant edge node receives
no Edge-Hello packets within the specified period, the path is faulty.
2. The path is disconnected and the edge node blocks the edge interfaces.
Upon detecting that the sub-ring protocol packet path is disconnected, the
assistant edge node immediately sends a Major-Fault packet to the edge
node. After receiving the Major-Fault packet, the edge node blocks its edge
interfaces.
In Figure 18-12, the assistant node sends a Major-Fault packet to the edge
node from Interface3.
Network
Router1 Router2
P
Master
S
Major Ring
Edge
Assistant
Interface3 Block
Sub Ring
S P
Block Master
MAJOR-FAULT
Data Packet
Block
PC
P Primary Interface
S Secondary Interface
3. The master node on the sub-ring unblocks the secondary interface after the
Fail timer expires.
After the edge node blocks its edge interfaces, the path for sub-ring protocol
packets is disconnected because of the failure on the major ring. As a result,
the master node on the sub-ring cannot receive the Hello packet sent by the
master node within the specified period. The master node changes to Failed
state and unblocks the secondary interface.
In Figure 18-13, the edge node blocks its edge interfaces. The master node
on the sub-ring unblocks the secondary interface that is blocked in Figure
18-12.
Figure 18-13 Sub-ring disconnected due to the blocked path on the major
ring
Network
Router1 Router2
P
Master
S
Major Ring
Edge
Assistant
Interface3 Block
Sub Ring
S P
Master
Data Packet
Block
PC
P Primary Interface
S Secondary Interface
Network
Router1 Router2
P
Master
S
Major Ring
Edge
Assistant
Interface3 Block
Sub Ring
S P
Block Master
Hello
Data Packet
Block
PC
P Primary Interface
S Secondary Interface
Figure 18-15 Unblocking the edge interfaces on the edge node of the sub-
ring
Network
Router1 Router2
P
Master
S
Major Ring
Edge
Assistant
Interface3 Block
Sub Ring
S P
Block Master
Hello
Data Packet
Block
PC
P Primary Interface
S Secondary Interface
Ring Group
In RRPP multi-instance, sub-rings are grouped to reduce the number of received
and sent Edge-Hello packets, improving system performance.
In the path status detection mechanism for sub-ring protocol packets on the
major ring, the edge node on a sub-ring periodically sends Edge-Hello packets to
the two RRPP interfaces on the major ring to detect the completeness of the path
for sub-ring protocol packets.
In Figure 18-16, the edge nodes on multiple sub-rings (sub-ring 2 and sub-ring 3
in domain 1; sub-ring 2 and sub-ring 3 in domain 2) are the same device, and the
assistant edge nodes on the sub-rings are the same device. In addition, edge
nodes and assistant edge nodes connect to the major ring in the same link. The
Edge-Hello packets from edge nodes on the sub-rings arrive at assistant edge
nodes along the same path. In this case, the sub-rings that have the same edge
nodes and assistant edge nodes can be added into a ring group. A sub-ring in the
ring group is selected to send Edge-Hello packets to detect the path for sub-ring
protocol packets on the major ring. This reduces the number of received and sent
Edge-Hello packets and improves system performance.
Network
Router1 Router2
SwitchC SwitchD
Domain 1 Major ring
1
Domain 2 Major ring
1
Edge
Assistant
SwitchA SwitchB
SwitchE SwitchF
Master Master
PC1 PC2
domain 1
domain 2
A sub-ring in the ring group is selected to send the Edge-Hello packet in the
following procedure:
1. The sub-rings with the smallest domain ID are selected from all the activated
rings in the ring group on the edge node. In Figure 18-16, the sub-rings with
the smallest domain ID are ring 2 in domain 1 and ring 3 in domain 1.
2. The smallest ring ID is selected from the rings with the smallest domain ID.
The edge node on the ring with the smallest ring ID then sends Edge-Hello
packets. In Figure 18-16, the sub-ring with the smallest ring ID is Ring 2 in
Domain 1. Therefore, the edge node on Ring 2 in Domain 1 sends Edge-Hello
packets in the ring group formed by ring 2 in domain 1, ring 3 in domain 1,
ring 2 in domain 2, and ring 3 in domain 2.
3. When any sub-ring receives an Edge-Hello packet on all the activated rings in
the ring group where assistant edge nodes reside, the sub-ring notifies other
sub-rings of the packet.
When an RRPP ring is in Complete state, the master node blocks the secondary
interface, preventing all service packets from passing through. All service packets
are transmitted on the RRPP ring along one path. As a result, the link on the
secondary interface side of the master node becomes idle, wasting bandwidth. For
example, in Figure 18-17, the link between SwitchA and SwitchC is idle and does
not forward data.
VLAN 100-200
SwitchE
RRPP ring Backbone
network
VLAN 201-400
SwitchB
Block
In Figure 18-17, the devices (SwitchA, SwitchB, SwitchC, and SwitchD) support
multiple RRPP domains on one physical ring. An RRPP domain takes effect for
data from a protected VLAN associated with the domain. Therefore, you can
configure different protected VLANs for each domain. When the master node in a
domain blocks its secondary interface, data from protected VLANs in different
domains is transmitted through different paths. This allows for link backup and
traffic load balancing.
NOTE
RRPP only takes effect for data from protected VLANs. Loops may occur if data does not
belong to the protected VLANs.
In the example shown in Figure 18-18, two domains exist on the RRPP multi-
instance ring that consists of SwitchA, SwitchB, SwitchC, SwitchD, and SwitchE.
SwitchC is the master node in domain 2 and SwitchD is the master node in
domain 1.
Instance1:
VLAN 100 - 200
SwitchE
RRPP ring
Backbone
network
Instance2:
VLAN 201 - 400
SwitchB P
S(Block) Master1
SwitchD
Block
P Primary interface
S Secondary interface
Instance1:VLAN 100-200
Instance2:VLAN 201-400
When a node or link is faulty, each RRPP domain independently calculates the
topology and updates forwarding entries on each node.
In Figure 18-19, a fault occurs on the link between SwitchD and SwitchE. This
fault does not affect the transmission path for the packets in VLANs 100 to 200 in
domain 1, but the transmission path is blocked for the packets in VLANs 201 to
400 in Domain 2.
The master node SwitchC in domain 2 cannot receive Hello packets on the
secondary interface. As a result, SwitchC unblocks the secondary interface and
requests nodes in domain 2 to update their forwarding entries. After the topology
in domain 2 re-converges, the transmission path of the packets in VLANs 201 to
400 changes to SwitchB ->SwitchA ->SwitchC->SwitchE.
Instance1:
VLAN 100 - 200
SwitchE
RRPP ring Backbone
network
Instance2:
VLAN 201 - 400
SwitchB
P
S(Block) Master1
SwitchD
Block
P Primary interface
S Secondary interface
Instance1:VLAN 100-200
Instance2:VLAN 201-400
After the link between SwitchD and SwitchE recovers, SwitchC receives Hello
packets on the secondary interface. As a result, SwitchC blocks the secondary
interface and requests nodes in domain 2 to update their forwarding entries. After
the topology in domain 2 re-converges, the packets in VLANs 201 to 400 are
switched back to the original path SwitchB ->SwitchD ->SwitchE.
Transit 2
CE
Master
P
Core Net
CE Transit 1 S
BLOCK MSE/NPE
Data Flow
CE: Customer Edge
MSE: Multi Service Edge
Transit 3 NPE: Network Provider Edge
In Figure 18-20, Transit 1, Transit 2, Transit 3, and Master constitute a single RRPP
ring. Data traffic is transmitted along the path Transit 1 -> Transit 2 -> Master.
If RRPP detects a fault on the link between Transit 1 and Transit 2, Master
unblocks its secondary interface and immediately instructs other nodes on the ring
to re-learn MAC address entries and ARP entries. Traffic on the RRPP ring is then
switched to the path Transit 1 -> Transit 3 -> Master.
UPE PE-AGG
RRPP Transit 1
Domain2
Master
PE-AGG
UPE RRPP P IP/MPLS
Domain1 Core
UPE S
UPE Block NPE
RRPP Transit 2
Domain3
PE-AGG
PE-AGG: PE-Aggregation
NPE: Network Provider Edge
Master UPE: Underlayer Provider Edge
UPE
Tangent RRPP rings can be used in this scenario, as shown in Figure 18-21. The
aggregation layer and access layer are RRPP rings and the different layer's rings
are tangent.
UPE
PE-AGG
Edge Master
Sub PE-AGG
Ring 1
Master
Major P Core Net
Ring S
UPE Sub Block NPE
LANSwitch Ring 2
Assistant
PE-AGG PE-AGG: PE-Aggregation
Master NPE: Network Provider Edge
UPE: Underlayer Provider Edge
CE
Intersecting RRPP rings can be used in this scenario, as shown in Figure 18-22.
The aggregation layer is the RRPP major ring and the access layer is the RRPP sub-
ring.
Master
UPE1
RRPP Ring
UPE3
PE-AGG NPE
UPE2
Domain 2
ring
2
PE-AGG
Backbone
network
ring Master
3
Domain 2
Assistant
UPE
Master UPE
ring Block
CE Domain 1 ring
3 Domain 2 Instance1: VLAN 101-200
1
Instance2: VLAN 1-100
domain 1
domain 2
In Figure 18-24, four UPEs and one PE-AGG construct a ring and RRPP multi-
instance is configured on the ring. Traffic on the RRPP ring flows into the
backbone network through the PE-AGG.
Two RRPP rings are configured on the four UPEs and the PE-AGG: ring 1 in
domain 1 and ring 1 in domain 2. Domain 1 processes data in VLANs 101 to 200
and domain 2 processes data in VLANs 1 to 100.
Four RRPP rings are configured on the two CEs and two UPEs: ring 2 in domain 1,
ring 2 in domain 2, ring 3 in domain 1, and ring 3 in domain 2.
RRPP rings provide master/slave protection and load balancing for the Layer 2
services in VLANs 1 to 200. When all the nodes and links on the rings are working
properly, traffic sent to sub-rings is transmitted along different paths according to
the service VLAN, implementing load balancing.
However, CEs may not support RRPP multi-instance, like the example shown in
Figure 18-25. The major ring constructed by four UPEs and one PE-AGG belongs
to multiple domains; however, the sub-rings constructed by CEs and UPEs belong
to only one domain. Load balancing is not implemented on the sub-ring, and data
in all VLANs is transmitted along the same path on the sub-ring. After entering
the major ring, the traffic sent to sub-rings is transmitted along different paths
according to the service VLAN, implementing load balancing.
Domain 2
ring
2
PE-AGG
Backbone
network
ring Master
3
Domain 2
Assistant
UPE
Master UPE
Block
CE ring
Domain 2 Instance1: VLAN 101-200
1
Instance2: VLAN 1-100
domain 1
domain 2
UPE
ring
Master Domain 3
1
UPE Master
CE UPE UPE
ring UPE
Domain 2 Block
1
Instance1: VLAN 101-200
Instance2: VLAN 1-100
domain 1
domain 2
domain 3
Domain 1 processes data in VLANs 101 to 200, Domain 2 processes data in VLANs
1 to 100, and Domain 3 processes data in VLANs 1 to 200.
The RRPP ring on the left side implements master/slave protection and load
balancing for the Layer 2 services in VLANs 1 to 200. When all the nodes and links
on the RRPP rings are working properly, traffic sent to rings from CEs is
transmitted along different paths according to the service VLAN, implementing
traffic load balancing.
Traffic in VLANs 1 to 200 flows from the tangent node into the RRPP ring on the
right side.
e2
anc
inst
CE Backbone
network
PE-AGG
Master 1 Block
UPE P Primary interface
P S Secondary interface
S UPE Domain 1
Domain 2
Four UPEs and one PE-AGG construct a ring in two domains: ring 1 in domain 1
and ring 1 in domain 2. Domain 1 processes data in VLANs 101 to 200 and
domain 2 processes data in VLANs 1 to 100.
Domain 1 maps instance 1 and domain 2 maps instance 2. Services in VLANs 1 to
200 are sent from CEs.
Service VLANs processed in the two RRPP domains do not overlap and all service
VLANs are processed. Traffic in domain 1 and domain 2 is load balanced on the
RRPP ring.
PE-AGG
CE
Backbone
network
Master
UPE UPE
ring Block
Domain 2
1 Instance1: VLAN 101-200
Instance2: VLAN 1-100
domain 1
domain 2
Four UPEs and one PE-AGG construct a ring. After RRPP multi-instance on the ring
is enabled, traffic flows into the backbone network through the PE-AGG.
Nodes on the RRPP ring and the PE-AGG must support Smart Link.
NOTE
Only the S5720HI, S5720EI, S6720S-EI, and S6720EI support this function.
RRPP snooping notifies a VPLS network of changes on the RRPP ring. After RRPP
snooping is enabled on sub-interfaces or VLANIF interfaces, the VPLS network can
transparently transmit RRPP packets, detect changes on the RRPP ring, and update
forwarding entries, ensuring that traffic can be rapidly switched to a non-blocking
path.
In Figure 18-29, UPEs are connected as an RRPP ring to the VPLS network where
NPEs reside. NPEs are connected through a PW, and therefore cannot serve as
RRPP nodes to directly respond to RRPP packets. As a result, the VPLS network
cannot sense the status change of the RRPP ring. When the RRPP ring topology
changes, each node on the VPLS network forwards downstream data according to
the MAC address table generated before the RRPP ring topology changes. As a
result, the downstream traffic cannot be forwarded.
NPEB
GE0/0/1.100 GE0/0/2.100
NPED
GE RRPP ring
Control VLAN:100
P User VLAN:10~20
UPEA UPEB
S
data packet
hello packet
primary interface
P secondary interface
S
Figure 18-30 Network of RRPP and VPLS (when the RRPP ring is faulty)
NPEB
GE0/0/1.100 GE0/0/2.100
NPED
GE RRPP ring
Control VLAN:100
P User VLAN:10~20
UPEA UPEB
S
data packet
COMMON-FLUSH-FDB
primary interface
P
secondary interface
S
The original MAC address table is not cleared because NPED cannot process the
Common-Flush-FDB packet. If downstream service packets are still sent to UPEA,
NPED sends the packets to UPEA along the original path. This interrupts the
downstream traffic between NPED and NPEA. After UPEB clears the MAC address
table, the upstream service packets sent by UPEA are regarded as unknown
unicast packets and are forwarded to the VPLS network along the path UPEA ->
UPEB -> NPED. After re-learning the MAC address, NPED can forward the
downstream traffic destined to UPEA.
When the fault on the RRPP ring is recovered, the master node UPEA sends a
Complete-Flush-FDB packet to request that the transit nodes clear their MAC
address tables. The downstream traffic between NPED and UPEA is interrupted
because NPED cannot process the Complete-Flush-FDB packet.
Figure 18-31 demonstrates that after RRPP snooping is enabled on sub-interfaces
GE0/0/1.100 and GE0/0/2.100 of NPED, NPED can process the Common-Flush-FDB
and Complete-Flush-FDB packets.
Figure 18-31 Network of RRPP and VPLS (when RRPP snooping is enabled)
NPEB
GE0/0/1.100 GE0/0/2.100
RRPP snooping RRPP snooping
NPED
GE RRPP ring
Control VLAN:100
P User VLAN:10~20
UPEA UPEB
S
data packet
COMMON-FLUSH-FDB
P primary interface
S secondary interface
When the RRPP ring topology changes and NPED receives the Common-Flush-FDB
or Complete-Flush-FDB packet from the master node UPEA, NPED clears the MAC
address table of the VSI associated with sub-interfaces GE0/0/1.100 and
GE0/0/2.100. NPED then requests that other NPEs in this VSI clear their MAC
address tables.
If the downstream data packets are still sent to UPEA, the packets are regarded as
unknown unicast packets and are broadcast in the VLAN and sent to UPEA along
the path UPED -> UPEB -> NPEA because NPED cannot find mapping MAC
address entries. This ensures downstream traffic continuity.
Licensing Requirements
RRPP configuration commands are available only after the S1720GW, S1720GWR,
and S1720X have the license (WEB management to full management Electronic
RTU License) loaded and activated and the switches are restarted. RRPP
configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S2710SI V100R006(C03&C05)
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● Only the S5700HI, S5710HI, S5720EI, S5720HI, S5710EI, S6700EI, S6720S-EI,
and S6720EI support RRPP snooping.
● When you configure the list of protected VLANs, note the following points:
– Protected VLANs must be configured before you configure an RRPP ring.
– You can delete or change existing protected VLANs before configuring an
RRPP ring. The protected VLANs cannot be changed after the RRPP ring is
configured.
– In the same physical topology, the control VLAN in a domain cannot be
configured as a protected VLAN in another domain.
– The control VLAN must be included in the protected VLANs; otherwise,
the RRPP ring cannot be configured.
– The control VLAN can be mapped to other instances before the RRPP ring
is created. After the RRPP ring is created, the mapping cannot be
changed unless you delete the RRPP ring.
– When the mapping between instances and VLANs changes, the protected
VLANs in the RRPP domain also change.
– All the VLANs allowed by an RRPP interface must be configured as
protected VLANs.
Context
Data in different VLANs is transmitted on the RRPP ring, including data VLANs
and control VLANs. You need to configure an interface to allow data from these
VLANs to pass through, ensuring data transmission on the ring.
Procedure
Step 1 Run system-view
Step 4 Run port hybrid tagged vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all }
After the control-vlan command is use in the RRPP domain view to configure a
control VLAN and the ring node-mode command is configured, the interfaces on
the RRPP ring allow packets of the control VLAN to pass through. Therefore, you
need to specify only the IDs of data VLANs in this step.
NOTE
----End
Context
A group of interconnected switches configured with the same domain ID and
control VLAN constitute an RRPP domain. Different RRPP domains must be
configured with different domain IDs and control VLANs.
An RRPP domain has two control VLANs, that is, the major control VLAN and sub-
control VLAN. Protocol packets on the major ring are transmitted in the major
control VLAN, and RRPP packets on the sub-rings are transmitted in the sub-
control VLAN.
Procedure
Step 1 On each switch in an RRPP domain, run system-view
When creating an RRPP domain, specify the domain ID. If the domain to be
configured exists, the domain view is displayed.
After RRPP is configured on a device, you can run the description command to
configure the description of the RRPP domain, including the RPPP domain ID, to
facilitate maintenance.
An RRPP domain has two control VLANs, that is, the major control VLAN and sub-
control VLAN. You need to specify only the major control VLAN. The VLAN whose
ID is one greater than the ID of the major control VLAN becomes the sub-control
VLAN.
The control VLAN specified by vlan-id and the sub-control VLAN specified by vlan-
id plus one must be VLANs that have not been created or used.
After configuring a control VLAN for an RRPP domain, you cannot directly change
the control VLAN. To change the control VLAN, you need to delete the domain
and then configure a new control VLAN. You can also run the undo control-vlan
command to delete the control VLAN and then configure a new control VLAN. The
sub-control VLAN is deleted when the RRPP domain is deleted.
NOTE
----End
Context
You can map data in VLANs to an instance and configure the instance to the
protected VLAN so that the device can control data in VLANs based on RRPP.
Procedure
Step 1 Run system-view
NOTE
The control VLANs of the major ring and the sub-rings must be contained in the VLAN list.
To configure the mapping between an 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 instance. Otherwise, loops may occur.
If the stp mode (system view) command is used to configure the switch to work in VBST
mode, the static instance protected by RRPP cannot be directly deleted.
----End
Context
The device controls only data in the protected VLANs based on RRPP. Data out of
the protected VLANs may cause storms on the ring network.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run rrpp domain domain-id
The RRPP domain view is displayed.
Step 3 Run protected-vlan reference-instance { { instance-id1 [ to instance-id2 ] }
&<1-10> | all }
The list of protected VLANs in the RRPP domain is configured.
All the VLANs whose packets need to pass through an RRPP interface, including
the control VLANs and data VLANs, must be configured as protected VLANs.
NOTE
When you configure the list of protected VLANs, note the following points:
● Protected VLANs must be configured before you configure an RRPP ring.
● You can delete or change existing protected VLANs before configuring an RRPP ring. The
protected VLANs cannot be changed after the RRPP ring is configured.
● In the same physical topology, the control VLAN in a domain cannot be configured as a
protected VLAN in another domain.
● The control VLAN must be included in the protected VLANs; otherwise, the RRPP ring
cannot be configured.
● The control VLAN can be mapped to other instances before the RRPP ring is created.
After the RRPP ring is created, the mapping cannot be changed unless you delete the
RRPP ring.
● When the mapping between an instance and VLANs changes, the protected VLANs in
the RRPP domain also change.
● All the VLANs allowed by an RRPP interface must be configured as protected VLANs.
----End
Context
You need to manually add nodes to an RRPP ring and configure an interface role
for each node.
The RRPP ring can be activated only when both the RRPP ring and the RRPP
protocol are enabled on all the switches on an RRPP ring.
Prerequisites
STP has been disabled on the interfaces that need to be added to the RRPP ring.
(By default, STP is enabled on all interfaces of the device.)
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run rrpp domain domain-id
The RRPP domain view is displayed.
Step 3 Run ring ring-id node-mode { master | transit } primary-port interface-type
interface-number secondary-port interface-type interface-number level level-
value
An RRPP ring is created.
Level 0 indicates the major ring, and Level 1 indicates a sub-ring.
NOTE
● A domain contains only one major ring. Before creating a sub-ring, you must create the
major ring.
● The master node on the sub-ring cannot server as the edge node or the assistant edge
node.
● A maximum of 24 rings can be created on the S5720EI, S5720SI, S5720S-SI, S5730SI,
S5730S-EI, S6720SI, S6720S-SI, S5720HI, S6720LI, S6720S-LI, S6720S-EI, and S6720EI,
and 16 rings on other models.
● Before adding an interface to an RRPP ring, disable port security on the interface;
otherwise, loops cannot be prevented.
----End
Context
After the RRPP ring is enabled, you need to enable the RRPP protocol for devices
on the RRPP ring so that RRPP can work properly.
Procedure
Step 1 Run system-view
----End
Context
To reduce the number of received and sent Edge-Hello packets, you can use a ring
group, in which a group of sub-rings with the same configuration of edge nodes
or assistant edge nodes are added to the ring group.
Procedure
Step 1 On the edge node or assistant edge node, run system-view
The system view is displayed.
Step 2 Run rrpp ring-group ring-group-id
A ring group is created.
A ring group can be created only on an edge node or an assistant edge on a sub-
ring.
All the sub-rings in a ring group must be on nodes of the same type, for example,
all the sub-rings are located on edge nodes or assistant edge nodes.
Step 3 Run domain domain-id ring { ring-id1 [ to ring-id2 ] } &<1-10>
Sub-rings are added to the ring group.
Sub-rings in the same ring group share the same edge node, and the same
assistant edge node.
A sub-ring can belong to only one ring group.
When you add a sub-ring to a ring group or delete a sub-ring from the ring group,
note the following points:
● To add an activated sub-ring to a ring group, add the sub-ring to the ring
group on the assistant edge node, and then perform the same operation on
the edge node.
● To delete an activated sub-ring from a ring group, delete the sub-ring from
the ring group on the edge node, and then perform the same operation on
the assistant edge node.
----End
Context
The Hello timer and Fail timer are used when the master node sends and receives
RRPP packets. The value of the Hello timer specifies the interval at which the
master node sends Hello packets from the primary interface. The value of the Fail
timer specifies the maximum delay in which the primary interface on the master
node sends a Hello packet and the secondary interface receives the Hello packet.
You only need to set the values of the Hello timer and Fail timer on the master
node in an RRPP domain.
Procedure
Step 1 Run system-view
The values of the Hello timer and the Fail timer in an RRPP domain are set.
The value of the Fail timer must be no smaller than three times the value of the
Hello timer.
By default, the value of the Hello timer on an edge node is half of the value of the
Hello timer on the master node of the major ring.
The values of both the Hello timer and Fail timer must be set the same on each
node in an RRPP domain; otherwise, edge interfaces on the edge nodes may be
unstable.
It is recommended that the value of the Fail timer be configured based on the
actual networking. If the value of the Fail timer is incorrect, for example, the value
is too small, loops may occur.
----End
Context
After the value of the Link-Up timer is set, the RRPP link does not immediately
change its status but changes the status when the Link-Up timer times out. This
reduces flapping of the link status.
You only need to set the value of the Link-Up timer on the master node.
Procedure
Step 1 On the master node, run system-view
----End
Procedure
● Run the display stp region-configuration command to check the mapping
between MSTIs and VLANs.
● Run the display rrpp brief [ domain domain-id ] command to check
summary information about an RRPP domain.
● Run the display rrpp verbose domain domain-id [ ring ring-id ] command to
check detailed information about an RRPP domain.
● Run the display rrpp statistics domain domain-id [ ring ring-id ] command
to check the statistics on packets in an RRPP domain.
----End
Prerequisites
NOTE
Only the S5720HI, S5720EI, S6720S-EI, and S6720EI support this function.
RRPP snooping is a technology that notifies the VPLS network of changes in the
RRPP ring. After RRPP snooping is enabled on sub-interfaces or VLANIF interfaces,
the VPLS network can transparently transmit RRPP packets, detect changes on the
RRPP ring, and upgrade forwarding entries, ensuring that traffic can be rapidly
switched to a non-blocking path. Before configuring RRPP snooping, complete the
following tasks:
● Configuring a VPLS network
● Configuring RRPP
Context
When RRPP snooping is enabled on an interface, the status of the RRPP ring can
be detected through RRPP control packets. When the status of the RRPP ring
changes, the interface requests the VSI bound to the interface to update its MAC
address table.
NOTE
RRPP and RRPP snooping cannot be simultaneously configured on the same interface.
Configure RRPP snooping only on the node connecting the RRPP ring to the VPLS
network.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Entering the view of the interface to be enabled with RRPP snooping using the
following commands as required
● Run interface interface-type interface-number.subinterface-number
The sub-interface view is displayed.
● Run interface vlanif vlan-id
The VLANIF interface view is displayed.
Specifying that the sub-interface or VLANIF interface permits only the packets in
the control VLAN of the RRPP domain to pass through.
Step 3 Run rrpp snooping enable
RRPP snooping is enabled.
Before running this command, bind the sub-interface or VLANIF interface to the
VSI.
If the sub-interface or VLANIF interface is removed from the VSI, RRPP snooping is
automatically disabled on the interface.
After RRPP snooping is enabled on the sub-interface or VLANIF interface, the sub-
interface or VLANIF interface is automatically associated with the VSI.
By default, RRPP snooping is disabled.
----End
Context
If you associate an RRPP snooping-enabled sub-interface or VLANIF interface with
another VSI on the device, the interface notifies the associated VSI of changes of
the RRPP ring status. In this way, the VSI can immediately update the MAC
address table.
You only need to configure the VSI associated with RRPP snooping on the NPE
node connecting the RRPP ring to the VPLS network.
Procedure
Step 1 Run system-view
Step 2 Entering the view of the interface to be enabled with RRPP snooping using the
following commands as required
● Run interface interface-type interface-number.subinterface-number
The sub-interface view is displayed.
● Run interface vlanif vlan-id
The VLANIF interface view is displayed.
The VLANIF interface in this step must map the RRPP control VLAN. For
example, if the RRPP control VLAN ID is 100, the VLANIF interface here must
be VLANIF 100.
Step 3 Configuring the VSI associated with RRPP snooping on the sub-interface or
VLANIF interface using the following commands as required
● Run rrpp snooping vsi vsi-name
The VSI associated with RRPP snooping is configured on the sub-interface or
VLANIF interface.
● Run rrpp snooping all-vsi
VSIs that are bound to all the other sub-interfaces connected to the same
main interface are automatically associated on the sub-interface.
NOTE
The rrpp snooping vsi vsi-name command associates the interface with only one VSI at a
time. To associate the sub-interface or VLANIF interface with multiple VSIs, run this
command multiple times.
----End
Procedure
● Run the display rrpp snooping enable { all | interface vlanif interface-
number } command to check the interfaces that are enabled with RRPP
snooping.
● Run the display rrpp snooping vsi { all | interface vlanif interface-number }
command to check the VSIs associated with RRPP snooping.
----End
Context
You can set the RRPP statistics to 0 for collecting new statistics about RRPP
packets.
NOTICE
RRPP statistics cannot be restored after you clear them. Therefore, exercise caution
when you run the command.
Procedure
Step 1 Run the reset rrpp statistics domain domain-id [ ring ring-id ] command in the
user view to clear RRPP statistics.
----End
Networking Requirements
As shown in Figure 18-32, SwitchA, SwitchB, and SwitchC constitute a ring
network. The network is required to prevent loops when the ring is complete and
implement fast convergence to rapidly restore communication between nodes on
the ring when the ring fails. You can enable RRPP on SwitchA, SwitchB, and
SwitchC to meet this requirement.
GE0/0/2
GE0/0/1 GE0/0/1
Ring 1
GE0/0/2 GE0/0/2 SwitchC
GE0/0/1
SwitchA
Primary interface
Secondary interface
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Create an RRPP domain and its control VLAN.
# Configure SwitchA. The configurations on SwitchB and SwitchC are similar to
that on SwitchA and not mentioned here. For details, see the configuration files.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] rrpp domain 1
[SwitchA-rrpp-domain-region1] control-vlan 20
[SwitchA-rrpp-domain-region1] quit
Step 2 Map Instance 1 to control VLANs 20 and 21 and data VLANs 100 to 300.
# Configure SwitchA. The configurations on SwitchB and SwitchC are the same as
that of SwitchA and not mentioned here. For details, see the configuration files.
[SwitchA] vlan batch 100 to 300
[SwitchA] stp region-configuration
[SwitchA-mst-region] instance 1 vlan 20 21 100 to 300
[SwitchA-mst-region] active region-configuration
[SwitchA-mst-region] quit
Step 3 Configure the interfaces to be added to the RRPP ring as trunk interfaces, allow
data VLANs 100 to 300 to pass through the interfaces, and disable STP on the
interfaces.
# Configure SwitchA. The configurations on SwitchB and SwitchC are the same as
that ofSwitchA and not mentioned here. For details, see the configuration files.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type trunk
[SwitchA-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 to 300
[SwitchA-GigabitEthernet0/0/1] stp disable
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type trunk
[SwitchA-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 to 300
[SwitchA-GigabitEthernet0/0/2] stp disable
[SwitchA-GigabitEthernet0/0/2] quit
Step 4 Specify a protected VLAN, and create and enable an RRPP ring.
# Configure SwitchA.
[SwitchA] rrpp domain 1
[SwitchA-rrpp-domain-region1] protected-vlan reference-instance 1
[SwitchA-rrpp-domain-region1] ring 1 node-mode master primary-port gigabitethernet 0/0/1
secondary-port gigabitethernet 0/0/2 level 0
# Configure SwitchB.
[SwitchB] rrpp domain 1
[SwitchB-rrpp-domain-region1] protected-vlan reference-instance 1
[SwitchB-rrpp-domain-region1] ring 1 node-mode transit primary-port gigabitethernet 0/0/1 secondary-
port gigabitethernet 0/0/2 level 0
[SwitchB-rrpp-domain-region1] ring 1 enable
[SwitchB-rrpp-domain-region1] quit
# Configure SwitchC.
[SwitchC] rrpp domain 1
[SwitchC-rrpp-domain-region1] protected-vlan reference-instance 1
[SwitchC-rrpp-domain-region1] ring 1 node-mode transit primary-port gigabitethernet 0/0/1 secondary-
port gigabitethernet 0/0/2 level 0
[SwitchC-rrpp-domain-region1] ring 1 enable
[SwitchC-rrpp-domain-region1] quit
Domain Index : 1
Control VLAN : major 20 sub 21
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
The command output shows that RRPP is enabled on SwitchA, the major control
VLAN of domain 1 is VLAN 20 and the sub-control VLAN is VLAN 21, and SwitchA
is the master node on Ring 1. The primary interface is GigabitEthernet0/0/1 and
the secondary interface is GigabitEthernet0/0/2.
# Run the display rrpp verbose domain command on SwitchA. The command
output is as follows:
[SwitchA] display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 20 sub 21
RRPP Ring :1
Ring Level :0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/1 Port status: UP
Secondary port : GigabitEthernet0/0/2 Port status: BLOCKED
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 20 to 21 100 to 300
#
rrpp enable
#
stp region-configuration
instance 1 vlan 20 to 21 100 to 300
active region-configuration
#
rrpp domain 1
control-vlan 20
protected-vlan reference-instance 1
ring 1 node-mode master primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 1 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 to 21 100 to 300
stp disable
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 to 21 100 to 300
stp disable
#
return
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 to 21 100 to 300
stp disable
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 to 21 100 to 300
stp disable
#
return
Relevant Information
Video
Configure RRPP
Networking Requirements
Ethernet network uses two-layer rings: one is the aggregation layer between
aggregation devices PE-AGGs and the other is the access layer between PE-AGGs
and UPEs.
UPE1 PE-AGG2
Edge Master
Sub PE-AGG1
Ring 1
Master
Major P Core Net
Ring S
UPE Sub Block NPE
LANSwitch Ring 2
Assistant
PE-AGG: PE-Aggregation
PE-AGG3
Master NPE: Network Provider Edge
UPE: Underlayer Provider Edge
LANSwitch
As shown in Figure 18-33, the network is required to prevent loops when the ring
is complete and implement fast convergence to rapidly restore communication
between nodes on the ring when the ring fails. RRPP can meet this requirement.
RRPP supports multiple rings. You can configure the aggregation layer as the
major ring and the access layer as the sub-ring, simplifying the network
configuration.
As shown in Figure 18-34, SwitchB, SwitchA, SwitchD, and SwitchC map PE-AGG1,
PE-AGG2, PE-AGG3, and UPE1 in Figure 18-33 respectively. Figure 18-34 is used
as an example to describe how to configure intersecting RRPP rings with a single
instance in the RRPP version defined by Huawei.
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Configure SwitchB as the master node on the major ring.
# Configure Instance 1, and map it to the data VLANs and control VLANs allowed
by the RRPP interface.
[SwitchB] stp region-configuration
[SwitchB-mst-region] instance 1 vlan 2 to 11
[SwitchB-mst-region] active region-configuration
[SwitchB-mst-region] quit
# Configure the RRPP interface as a trunk interface to allow data from VLANs 2 to
9 to pass through and disable STP on the interface to be added to the RRPP ring.
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] port link-type trunk
[SwitchB-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[SwitchB-GigabitEthernet0/0/1] port trunk allow-pass vlan 2 to 9
[SwitchB-GigabitEthernet0/0/1] stp disable
[SwitchB-GigabitEthernet0/0/1] quit
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] port link-type trunk
[SwitchB-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[SwitchB-GigabitEthernet0/0/2] port trunk allow-pass vlan 2 to 9
[SwitchB-GigabitEthernet0/0/2] stp disable
[SwitchB-GigabitEthernet0/0/2] quit
# Configure the primary interface and secondary interface on the master node of
the major ring.
# Configure Instance 1, and map it to the data VLANs and control VLANs allowed
by the RRPP interface.
[SwitchC] stp region-configuration
[SwitchC-mst-region] instance 1 vlan 2 to 11
[SwitchC-mst-region] active region-configuration
[SwitchC-mst-region] quit
# Disable STP on the interface to be added to the RRPP ring and configure the
RRPP interface as a trunk interface to allow data from VLANs 2 to 9 to pass
through.
[SwitchC] interface gigabitethernet 0/0/1
[SwitchC-GigabitEthernet0/0/1] port link-type trunk
[SwitchC-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[SwitchC-GigabitEthernet0/0/1] port trunk allow-pass vlan 2 to 9
[SwitchC-GigabitEthernet0/0/1] stp disable
[SwitchC-GigabitEthernet0/0/1] quit
[SwitchC] interface gigabitethernet 0/0/2
[SwitchC-GigabitEthernet0/0/2] port link-type trunk
[SwitchC-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[SwitchC-GigabitEthernet0/0/2] port trunk allow-pass vlan 2 to 9
[SwitchC-GigabitEthernet0/0/2] stp disable
[SwitchC-GigabitEthernet0/0/2] quit
# Configure the primary interface and secondary interface on the master node of
the sub-ring.
[SwitchC] rrpp domain 1
[SwitchC-rrpp-domain-region1] ring 2 node-mode master primary-port gigabitethernet 0/0/1
secondary-port gigabitethernet 0/0/2 level 1
[SwitchC-rrpp-domain-region1] ring 2 enable
[SwitchC-rrpp-domain-region1] quit
Step 3 Configure SwitchA as the transit node on the major ring and the edge node on the
sub-ring.
# Create data VLANs 2 to 9 on SwitchA.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 2 to 9
# Configure Instance 1, and map it to the data VLANs and control VLANs allowed
by the RRPP interface.
# Disable STP on the interface to be added to the RRPP ring and configure the
RRPP interface as a trunk interface to allow data from VLANs 2 to 9 to pass
through.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type trunk
[SwitchA-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 2 to 9
[SwitchA-GigabitEthernet0/0/1] stp disable
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type trunk
[SwitchA-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 2 to 9
[SwitchA-GigabitEthernet0/0/2] stp disable
[SwitchA-GigabitEthernet0/0/2] quit
[SwitchA] interface gigabitethernet 0/0/3
[SwitchA-GigabitEthernet0/0/3] port link-type trunk
[SwitchA-GigabitEthernet0/0/3] undo port trunk allow-pass vlan 1
[SwitchA-GigabitEthernet0/0/3] port trunk allow-pass vlan 2 to 9
[SwitchA-GigabitEthernet0/0/3] stp disable
[SwitchA-GigabitEthernet0/0/3] quit
# Configure the primary interface and secondary interface on the transit node of
the major ring.
[SwitchA] rrpp domain 1
[SwitchA-rrpp-domain-region1] ring 1 node-mode transit primary-port gigabitethernet 0/0/2 secondary-
port gigabitethernet 0/0/1 level 0
[SwitchA-rrpp-domain-region1] ring 1 enable
[SwitchA-rrpp-domain-region1] quit
# Configure the common interface and edge interface on the edge node of the
sub-ring.
[SwitchA] rrpp domain 1
[SwitchA-rrpp-domain-region1] ring 2 node-mode edge common-port gigabitethernet 0/0/2 edge-port
gigabitethernet 0/0/3
[SwitchA-rrpp-domain-region1] ring 2 enable
[SwitchA-rrpp-domain-region1] quit
Step 4 Configure SwitchD as the transit node on the major ring and the assistant edge
node on the sub-ring.
# Create data VLANs 2 to 9 on SwitchD.
<HUAWEI> system-view
[HUAWEI] sysname SwitchD
[SwitchD] vlan batch 2 to 9
# Configure Instance 1, and map it to the data VLANs and control VLANs allowed
by the RRPP interface.
[SwitchD] stp region-configuration
[SwitchD-mst-region] instance 1 vlan 2 to 11
# Disable STP on the interface to be added to the RRPP ring, configure the RRPP
interface as a trunk interface, and configure the interfaces to allow service packets
of VLAN 2 to VLAN 9 to pass through.
[SwitchD] interface gigabitethernet 0/0/1
[SwitchD-GigabitEthernet0/0/1] port link-type trunk
[SwitchD-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[SwitchD-GigabitEthernet0/0/1] port trunk allow-pass vlan 2 to 9
[SwitchD-GigabitEthernet0/0/1] stp disable
[SwitchD-GigabitEthernet0/0/1] quit
[SwitchD] interface gigabitethernet 0/0/2
[SwitchD-GigabitEthernet0/0/2] port link-type trunk
[SwitchD-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[SwitchD-GigabitEthernet0/0/2] port trunk allow-pass vlan 2 to 9
[SwitchD-GigabitEthernet0/0/2] stp disable
[SwitchD-GigabitEthernet0/0/2] quit
[SwitchD] interface gigabitethernet 0/0/3
[SwitchD-GigabitEthernet0/0/3] port link-type trunk
[SwitchD-GigabitEthernet0/0/3] undo port trunk allow-pass vlan 1
[SwitchD-GigabitEthernet0/0/3] port trunk allow-pass vlan 2 to 9
[SwitchD-GigabitEthernet0/0/3] stp disable
[SwitchD-GigabitEthernet0/0/3] quit
# Configure the primary interface and secondary interface on the transit node of
the major ring.
[SwitchD] rrpp domain 1
[SwitchD-rrpp-domain-region1] ring 1 node-mode transit primary-port gigabitethernet 0/0/2
secondary-port gigabitethernet 0/0/1 level 0
[SwitchD-rrpp-domain-region1] ring 1 enable
[SwitchD-rrpp-domain-region1] quit
# Configure the common interface and edge interface on the assistant edge node
of the sub-ring.
[SwitchD] rrpp domain 1
[SwitchD-rrpp-domain-region1] ring 2 node-mode assistant-edge common-port gigabitethernet 0/0/2
edge-port gigabitethernet 0/0/3
[SwitchD-rrpp-domain-region1] ring 2 enable
[SwitchD-rrpp-domain-region1] quit
Domain Index : 1
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
The command output shows that RRPP is enabled on SwitchB. The major control
VLAN is VLAN 10, and the sub-control VLAN is VLAN 11; SwitchB is the master
node on the major ring, with GE0/0/1 as the primary interface and GE0/0/2 as the
secondary interface.
# Run the display rrpp verbose domain command on SwitchB. The command
output is as follows:
[SwitchB] display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
RRPP Ring :1
Ring Level :0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/1 Port status: UP
Secondary port : GigabitEthernet0/0/2 Port status: BLOCKED
The command output shows that the ring is in Complete state, and the secondary
interface on the master node is blocked.
# Run the display rrpp brief command on SwitchC. The command output is as
follows:
[SwitchC] display rrpp brief
Abbreviations for Switch Node Mode :
M - Master , T - Transit , E - Edge , A - Assistant-Edge
Domain Index : 1
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
You can find that RRPP is enabled on SwitchC. The major control VLAN is VLAN
10, and the sub-control VLAN is VLAN 11; SwitchC is the master node on the sub-
ring, with GE0/0/1 as the primary interface and GE0/0/2 as the secondary
interface.
# Run the display rrpp verbose domain command on SwitchC. The command
output is as follows:
[SwitchC] display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
RRPP Ring :2
Ring Level : 1
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/1 Port status: UP
Secondary port : GigabitEthernet0/0/2 Port status: BLOCKED
The command output shows that the sub-ring is in Complete state, and the
secondary interface on the master node of the sub-ring is blocked.
# Run the display rrpp brief command on SwitchA. The command output is as
follows:
[SwitchA] display rrpp brief
Abbreviations for Switch Node Mode :
M - Master , T - Transit , E - Edge , A - Assistant-Edge
Domain Index : 1
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
The command output shows that RRPP is enabled on SwitchA. The major control
VLAN is VLAN 10, and the sub-control VLAN is VLAN 11. SwitchA is the transit
node on the major ring. The primary interface is GE0/0/2 and the secondary
interface is GE0/0/1.
SwitchA is also the edge node on the sub-ring, with GE0/0/2 as the common
interface and GE0/0/3 as the edge interface.
# Run the display rrpp verbose domain command on SwitchA. The command
output is as follows:
[SwitchA] display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
RRPP Ring :1
Ring Level :0
Node Mode : Transit
RRPP Ring :2
Ring Level :1
Node Mode : Edge
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Common port : GigabitEthernet0/0/2 Port status: UP
Edge port : GigabitEthernet0/0/3 Port status: UP
# Run the display rrpp brief command on SwitchD. The command output is as
follows:
[SwitchD] display rrpp brief
Abbreviations for Switch Node Mode :
M - Master , T - Transit , E - Edge , A - Assistant-Edge
Domain Index : 1
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
The command output shows that RRPP is enabled on SwitchD. The major control
VLAN is VLAN 10, and the sub-control VLAN is VLAN 11. SwitchD is the transit
node on the major ring, with GE0/0/2 as the primary interface and GE0/0/1 as the
secondary interface. SwitchD is also the assistant edge node on the sub-ring, with
GE0/0/2 as the common interface and GE0/0/3 as the edge interface.
# Run the display rrpp verbose domain command on SwitchD. The command
output is as follows:
[SwitchD] display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
RRPP Ring :1
Ring Level :0
Node Mode : Transit
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/2 Port status: UP
Secondary port : GigabitEthernet0/0/1 Port status: UP
RRPP Ring :2
Ring Level :1
Node Mode : Assistant-edge
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Common port : GigabitEthernet0/0/2 Port status: UP
Edge port : GigabitEthernet0/0/3 Port status: UP
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 2 to 11
#
rrpp enable
#
stp region-configuration
instance 1 vlan 2 to 11
active region-configuration
#
rrpp domain 1
control-vlan 10
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet0/0/2 secondary-port GigabitEthernet0/0/1
level 0
ring 1 enable
ring 2 node-mode edge common-port GigabitEthernet0/0/2 edge-port GigabitEthernet0/0/3
ring 2 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 11
stp disable
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 11
stp disable
#
interface GigabitEthernet0/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 9 11
stp disable
#
return
Relevant Information
Video
Configure RRPP
Networking Requirements
Ethernet network uses two-layer rings:
UPE2 PE-AGG3
RRPP Transit 1
Domain2
Master
PE-AGG1
UPE RRPP P IP/MPLS
Domain1 Core
UPE S
UPE Block NPE
RRPP Transit 2
Domain3
PE-AGG2
Master PE-AGG: PE-Aggregation
UPE NPE: Network Provider Edge
UPE: Underlayer Provider Edge
LANSwitch LANSwitch
Master
UPE1
UPE2 PE-AGG3
RRPP Transit 1
Domain2
Master
PE-AGG1
UPE RRPP P IP/MPLS
Domain1 Core
UPE S
UPE Block NPE
RRPP Transit 2
Domain3
PE-AGG2
Master PE-AGG: PE-Aggregation
UPE NPE: Network Provider Edge
UPE: Underlayer Provider Edge
LANSwitch LANSwitch
As shown in Figure 18-35, the network is required to prevent loops when the ring
is complete and implement fast convergence to rapidly restore communication
between nodes on the ring when the ring fails. RRPP can meet this requirement.
RRPP supports multiple rings. You can configure the aggregation layer and access
layer as RRPP rings and the two rings are tangent, simplifying the network
configuration.
As shown in Figure 18-36, SwitchE, SwitchD, SwitchC, SwitchA, and SwitchB map
PE-AGG1, PE-AGG2, PE-AGG3, UPE 1, and UPE 2 in Figure 18-35 respectively.
Figure 18-36 is used as an example to describe how to configure tangent RRPP
rings with a single instance.
SwitchA SwitchE
GE0/0/2 GE0/0/1
GE0/0/1 GE0/0/2
SwitchB SwitchD
Configuration Roadmap
The configuration roadmap is as follows:
1. Create different RRPP domains and control VLANs to configure an RRPP ring.
2. Map the VLANs that need to pass through Ring 1 to Instance 1, including
data VLANs and control VLANs to configure protected VLANs.
Map the VLANs that need to pass through Ring 2 to Instance 2, including
data VLANs and control VLANs to configure protected VLANs.
3. Configure timers for different RRPP domains.
NOTE
You can configure two timers for tangent points because two tangent rings locate in
different domains.
4. Configure interfaces to be added to the RRPP domain on the devices so that
data can pass through the interfaces. Disable protocols that conflict with
RRPP, such as STP.
5. Configure protected VLANs and create RRPP rings in RRPP domains.
a. Configure Ring 2 in Domain 2 on SwitchA, SwitchB, and SwitchC.
b. Configure Ring 1 in Domain 1 on SwitchC, SwitchD, and SwitchE.
c. Configure SwitchA as the master node on Ring 2, and configure SwitchB
and SwitchC as transit nodes on Ring 2.
d. Configure SwitchE as the master node on Ring 1, and configure SwitchC
and SwitchD as transit nodes on Ring 1.
6. Enable the RRPP ring and RRPP protocol on devices to make RRPP take effect.
Procedure
Step 1 Configure instance 2, and map it to the data VLANs and control VLANs allowed by
the RRPP interface.
Step 2 Create RRPP domains and configure control VLANs and protected VLANs in the
domains.
Step 4 Configure the interfaces to be added to the RRPP ring as trunk interfaces and
disable STP on the interfaces.
# Configure SwitchB as a transit node on Ring 2 (major ring) and specify the
primary and secondary interfaces.
[SwitchB] rrpp domain 2
[SwitchB-rrpp-domain-region2] ring 2 node-mode transit primary-port gigabitethernet 0/0/1
secondary-port gigabitethernet 0/0/2 level 0
[SwitchB-rrpp-domain-region2] ring 2 enable
[SwitchB-rrpp-domain-region2] quit
# Configure SwitchC as a transit node on Ring 2 and specify the primary and
secondary interfaces.
[SwitchC] rrpp domain 2
[SwitchC-rrpp-domain-region2] ring 2 node-mode transit primary-port gigabitethernet 0/0/3
secondary-port gigabitethernet 0/0/4 level 0
[SwitchC-rrpp-domain-region2] ring 2 enable
[SwitchC-rrpp-domain-region2] quit
# Configure SwitchC as a transit node on Ring 1 and specify the primary and
secondary interfaces.
[SwitchC] rrpp domain 1
[SwitchC-rrpp-domain-region1] ring 1 node-mode transit primary-port gigabitethernet 0/0/1
secondary-port gigabitethernet 0/0/2 level 0
[SwitchC-rrpp-domain-region1] ring 1 enable
[SwitchC-rrpp-domain-region1] quit
# Configure SwitchD as a transit node on Ring 1 and specify the primary and
secondary interfaces.
[SwitchD] rrpp domain 1
[SwitchD-rrpp-domain-region1] ring 1 node-mode transit primary-port gigabitethernet 0/0/1
secondary-port gigabitethernet 0/0/2 level 0
[SwitchD-rrpp-domain-region1] ring 1 enable
[SwitchD-rrpp-domain-region1] quit
Domain Index : 1
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 1
Hello Timer : 2 sec(default is 1 sec) Fail Timer : 7 sec(default is 6 sec)
Domain Index : 2
Control VLAN : major 20 sub 21
Protected VLAN : Reference Instance 2
Hello Timer : 3 sec(default is 1 sec) Fail Timer : 10 sec(default is 6 sec)
The command output shows that RRPP is enabled on SwitchC. In Domain 1, the
major control VLAN is VLAN 10, and the sub-control VLAN is VLAN 11. SwitchC is
the transit node on the major ring, with GigabitEthernet0/0/1 as the primary
interface and GigabitEthernet0/0/2 as the secondary interface.
In Domain 2, the major control VLAN is VLAN 20, and the sub-control VLAN is
VLAN 21. SwitchC is a transit node on Ring 2. GigabitEthernet0/0/3 is the primary
interface and GigabitEthernet0/0/4 is the secondary interface.
Run the display rrpp verbose domain command on SwitchC. The command
output is as follows:
# Display detailed information about Domain 1 on SwitchC.
[SwitchC] display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 1
Hello Timer : 2 sec(default is 1 sec) Fail Timer : 7 sec(default is 6 sec)
RRPP Ring :1
Ring Level :0
Node Mode : Transit
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/1 Port status: UP
Secondary port : GigabitEthernet0/0/2 Port status: UP
RRPP Ring :2
Ring Level :0
Node Mode : Transit
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/3 Port status: UP
Secondary port : GigabitEthernet0/0/4 Port status: UP
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 20 to 21
#
rrpp enable
#
stp region-configuration
instance 2 vlan 20 to 21
active region-configuration
#
rrpp domain 2
control-vlan 20
protected-vlan reference-instance 2
timer hello-timer 3 fail-timer 10
ring 2 node-mode master primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 2 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 to 21
stp disable
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 to 21
stp disable
#
return
Relevant Information
Video
Configure RRPP
Networking Requirements
As shown in Figure 18-37, on a ring network, idle links are required to forward
data. In this way, data in different VLANs is forwarded along different paths,
improving network efficiency and implementing load balancing.
UPEB
GE0/0/1 GE0/0/2
CE 1
VLAN 100-300
PEAGG
GE0/0/1 Ring GE0/0/1
1 Master 1 Backbone
UPEA
Master 2 network
GE0/0/2 GE0/0/2
CE 2
VLAN 100-300
Domain 1 ring 1
GE0/0/2 GE0/0/1
Domain 2 ring 1
UPEC
Data Plan
Table 18-6 shows the mapping between protected VLANs and instances in
Domain 1 and Domain 2.
Table 18-7 shows the master node on each ring and the primary and secondary
interfaces on each master node.
Table 18-7 Master node and its primary and secondary interfaces
Configuration Roadmap
The configuration roadmap is as follows:
1. Create different RRPP domains and control VLANs.
2. Map the VLANs that need to pass through Ring 1 in Domain 1 to Instance 1,
including data VLANs and control VLANs.
Map the VLANs that need to pass through Ring 1 in Domain 2 to Instance 2,
including data VLANs and control VLANs.
3. Configure interfaces to be added to the RRPP domain on the devices so that
data can pass through the interfaces. Disable protocols that conflict with
RRPP, such as STP.
4. Configure protected VLANs and create RRPP rings in RRPP domains.
a. Add UPEA, UPEB, UPEC, and PEAGG to Ring 1 in Domain 1. Configure
PEAGG as the master node on Ring 1 in Domain 1 and configure UPEA,
UPEB, and UPEC as transit nodes.
b. Add UPEA, UPEB, UPEC, and PEAGG to Ring 1 in Domain 2. Configure
PEAGG as the master node on Ring 1 in Domain 2 and configure UPEA,
UPEB, and UPEC as transit nodes.
5. Enable the RRPP ring and RRPP protocol on devices to make RRPP take effect.
Procedure
Step 1 Create an RRPP domain and its control VLAN.
# Configure UPEA. The configurations on UPEB, UPEC, and PEAGG are similar to
that on UPEA and not mentioned here. For details, see the configuration files.
<HUAWEI> system-view
[HUAWEI] sysname UPEA
[UPEA] rrpp domain 1
[UPEA-rrpp-domain-region1] control-vlan 5
[UPEA-rrpp-domain-region1] quit
[UPEA] rrpp domain 2
[UPEA-rrpp-domain-region2] control-vlan 10
[UPEA-rrpp-domain-region2] quit
Step 2 Configure instances, and map it to the data VLANs and control VLANs allowed by
the RRPP interface.
# Configure UPEA. The configurations on UPEB, UPEC, and PEAGG are the same
as that of UPEA and not mentioned here. For details, see the configuration files.
[UPEA] vlan batch 100 to 300
[UPEA] stp region-configuration
[UPEA-mst-region] instance 1 vlan 5 6 100 to 200
[UPEA-mst-region] instance 2 vlan 10 11 201 to 300
[UPEA-mst-region] active region-configuration
[UPEA-mst-region] quit
# Configure UPEA. The configurations on UPEB, UPEC, and PEAGG are the same
as that of UPEA and not mentioned here. For details, see the configuration files.
[UPEA] interface gigabitethernet 0/0/1
[UPEA-GigabitEthernet0/0/1] port link-type trunk
[UPEA-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[UPEA-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 to 300
[UPEA-GigabitEthernet0/0/1] stp disable
[UPEA-GigabitEthernet0/0/1] quit
[UPEA] interface gigabitethernet 0/0/2
[UPEA-GigabitEthernet0/0/2] port link-type trunk
[UPEA-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[UPEA-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 to 300
[UPEA-GigabitEthernet0/0/2] stp disable
[UPEA-GigabitEthernet0/0/2] quit
Step 4 Specify a protected VLAN, and create and enable an RRPP ring.
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
In Domain 1, the major control VLAN is VLAN 5 and the protected VLANs are
VLANs mapping Instance 1. UPEA is a transit node on Ring 1. GigabitEthernet0/0/1
is the primary interface and GigabitEthernet0/0/2 is the secondary interface.
In Domain 2, the major control VLAN is VLAN 10 and the protected VLANs are
VLANs mapping Instance 2. UPEA is a transit node on Ring 1. GigabitEthernet0/0/1
is the primary interface and GigabitEthernet0/0/2 is the secondary interface.
# Run the display rrpp brief command on PEAGG. The command output is as
follows:
[PEAGG] display rrpp brief
Abbreviations for Switch Node Mode :
M - Master , T - Transit , E - Edge , A - Assistant-Edge
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
In Domain 1, the major control VLAN is VLAN 5, the protected VLAN is the VLAN
mapped to Instance 1, and the master node on Ring 1 is PEAGG.
GigabitEthernet0/0/1 is the primary interface and GigabitEthernet0/0/2 is the
secondary interface.
In Domain 2, the major control VLAN is VLAN 10, the protected VLAN is the VLAN
mapped to Instance 2, and the master node on Ring 1 is PEAGG.
GigabitEthernet0/0/2 is the primary interface and GigabitEthernet0/0/1 is the
secondary interface.
# Check detailed information about UPEA in Domain 1. Run the display rrpp
verbose domain command on UPEA. The command output is as follows:
[UPEA] display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
RRPP Ring :1
Ring Level :0
Node Mode : Transit
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/1 Port status: UP
Secondary port : GigabitEthernet0/0/2 Port status: UP
The command output shows that the control VLAN in Domain 1 is VLAN 5, and
the protected VLANs are the VLANs mapping Instance 1. UPEA is a transit node in
Domain 1 and is in LinkUp state.
# Check detailed information about UPEA in Domain 2.
[UPEA] display rrpp verbose domain 2
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
RRPP Ring :1
Ring Level :0
Node Mode : Transit
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/1 Port status: UP
Secondary port : GigabitEthernet0/0/2 Port status: UP
The command output shows that, in Domain 2, the control VLAN is VLAN 10 and
the protected VLAN is the VLAN mapped to Instance 2. UPEA is a transit node in
Domain 2 and is in LinkUp state.
Run the display rrpp verbose domain command on PEAGG. The command
output is as follows:
# Check detailed information about PEAGG in Domain 1.
[PEAGG] display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
RRPP Ring :1
Ring Level :0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/1 Port status: UP
Secondary port : GigabitEthernet0/0/2 Port status: BLOCKED
The command output shows that the control VLAN in Domain 1 is VLAN 5, and
the protected VLANs are the VLANs mapping Instance 1.
PEAGG is the master node in Domain 1 and is in Complete state.
The primary interface is GigabitEthernet0/0/1 and the secondary interface is
GigabitEthernet0/0/2.
RRPP Ring :1
Ring Level :0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/2 Port status: UP
Secondary port : GigabitEthernet0/0/1 Port status: BLOCKED
The command output shows that, in Domain 2, the control VLAN is VLAN 10, and
the protected VLAN is the VLAN mapped to Instance 2.
PEAGG is the master node in Domain 2 and is in Complete state.
The primary interface is GigabitEthernet0/0/2 and the secondary interface is
GigabitEthernet0/0/1.
----End
Configuration Files
● UPEA configuration file
#
sysname UPEA
#
vlan batch 5 to 6 10 to 11 100 to 300
#
rrpp enable
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 1 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 1 node-mode transit primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 1 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
return
Relevant Information
Video
Configure RRPP
Networking Requirements
As shown in Figure 18-38, on a ring network, idle links are required to forward
data. In this way, data in different VLANs is forwarded along different paths,
improving network efficiency and implementing load balancing.
Backbone
network
GE0/0/1 GE0/0/2
PEAGG
Master 1
GE0/0/1 Master 2 GE0/0/1
Master 1 Master 1
Master 2 GE0/0/2 GE0/0/1 Master 2
CE1 Domain 1 ring 2 Domain 1 ring 3
CE2
VLAN 100-300 VLAN 100-300
Domain 1
Domain 2
Data Plan
Table 18-8 shows the mapping between protected VLANs and instances in
Domain 1 and Domain 2.
Table 18-9 shows the master node on each ring and the primary and secondary
interfaces on each master node.
Table 18-9 Master node and its primary and secondary interfaces
Ring ID Master Node Primary Port Secondary Port Ring Type
Table 18-10 shows the edge nodes, assistant edge nodes, common interface, and
edge interfaces of the sub-rings.
Table 18-10 Edge nodes, assistant edge nodes, common interface, and edge
interfaces of the sub-rings
Ring Edge Common Edge Edge- Common Edge
ID Node Port Port Assistant Port Port
Node
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Configure instances, and map it to the data VLANs and control VLANs allowed by
the RRPP interface.
# Configure CE1. The configurations on CE2, UPEA, UPEB, UPEC, UPED, and
PEAGG are the same as that of CE1 and not mentioned here. For details, see the
configuration files.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] stp region-configuration
[CE1-mst-region] instance 1 vlan 5 6 100 to 200
[CE1-mst-region] instance 2 vlan 10 11 201 to 300
[CE1-mst-region] active region-configuration
[CE1-mst-region] quit
# Configure CE1. The configurations on CE2, UPEA, UPEB, UPEC, UPED, and
PEAGG are the same as that of CE1 and not mentioned here. For details, see the
configuration files.
[CE1] vlan batch 100 to 300
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type trunk
[CE1-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[CE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 to 300
[CE1-GigabitEthernet0/0/1] stp disable
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface gigabitethernet 0/0/2
[CE1-GigabitEthernet0/0/2] port link-type trunk
[CE1-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[CE1-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 to 300
[CE1-GigabitEthernet0/0/2] stp disable
[CE1-GigabitEthernet0/0/2] quit
Step 3 Create RRPP domains and configure protected VLANs and control VLANs.
# Configure CE1. The configurations on CE2, UPEA, UPEB, UPEC, UPED, and
PEAGG are the same as that of CE1 and not mentioned here. For details, see the
configuration files.
[CE1] rrpp domain 1
[CE1-rrpp-domain-region1] protected-vlan reference-instance 1
[CE1-rrpp-domain-region1] control-vlan 5
[CE1-rrpp-domain-region1] quit
[CE1] rrpp domain 2
[CE1-rrpp-domain-region2] protected-vlan reference-instance 2
[CE1-rrpp-domain-region2] control-vlan 10
[CE1-rrpp-domain-region2] quit
# Configure CE1 as the master node on Ring 2 in Domain 1, with GE0/0/1 as the
primary interface and GE0/0/2 as the secondary interface.
[CE1] rrpp domain 1
[CE1-rrpp-domain-region1] ring 2 node-mode master primary-port gigabitethernet 0/0/1 secondary-
port gigabitethernet 0/0/2 level 1
[CE1-rrpp-domain-region1] ring 2 enable
[CE1-rrpp-domain-region1] quit
# Configure CE1 as the master node on Ring 2 in Domain 2, with GE0/0/2 as the
primary interface and GE0/0/1 as the secondary interface.
[CE1] rrpp domain 2
[CE1-rrpp-domain-region2] ring 2 node-mode master primary-port gigabitethernet 0/0/2 secondary-
port gigabitethernet 0/0/1 level 1
[CE1-rrpp-domain-region2] ring 2 enable
[CE1-rrpp-domain-region2] quit
# Configure CE2 as the master node on Ring 3 in Domain 1, with GE0/0/1 as the
primary interface and GE0/0/2 as the secondary interface.
[CE2] rrpp domain 1
[CE2-rrpp-domain-region1] ring 3 node-mode master primary-port gigabitethernet 0/0/1 secondary-
port gigabitethernet 0/0/2 level 1
[CE2-rrpp-domain-region1] ring 3 enable
[CE2-rrpp-domain-region1] quit
# Configure CE2 as the master node on Ring 3 in Domain 2, with GE0/0/2 as the
primary interface and GE0/0/1 as the secondary interface.
[CE2] rrpp domain 2
[CE2-rrpp-domain-region2] ring 3 node-mode master primary-port gigabitethernet 0/0/2 secondary-
port gigabitethernet 0/0/1 level 1
[CE2-rrpp-domain-region2] ring 3 enable
[CE2-rrpp-domain-region2] quit
# Configure CE1. The configurations on CE2, UPEA, UPEB, UPEC, UPED, and
PEAGG are the same as that of CE1 and not mentioned here. For details, see the
configuration files.
[CE1] rrpp enable
# Create ring group 1 on UPEC, which consists of four sub-rings: Ring 2 in Domain
1, Ring 3 in Domain 1, Ring 2 in Domain 2, and Ring 3 in Domain 2.
[UPEC] rrpp ring-group 1
[UPEC-rrpp-ring-group1] domain 1 ring 2 to 3
[UPEC-rrpp-ring-group1] domain 2 ring 2 to 3
[UPEC-rrpp-ring-group1] quit
# Create ring group 1 on UPEB, which consists of four sub-rings: Ring 2 in Domain
1, Ring 3 in Domain 1, Ring 2 in Domain 2, and Ring 3 in Domain 2.
[UPEB] rrpp ring-group 1
[UPEB-rrpp-ring-group1] domain 1 ring 2 to 3
[UPEB-rrpp-ring-group1] domain 2 ring 2 to 3
[UPEB-rrpp-ring-group1] quit
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
On Ring 2, UPEB is the edge node. GE0/0/1 is the common interface and GE0/0/3
is the edge interface.
On Ring 3, UPEB is the edge node. GE0/0/1 is the common interface and GE0/0/4
is the edge interface.
In Domain 2:
The major control VLAN is VLAN 10, and the protected VLANs are the VLANs
mapped to Instance 2.
UPEB is a transit node on Ring 1. The primary interface is GE0/0/1 and the
secondary interface is GE0/0/2.
On Ring 2, UPEB is the edge node. GE0/0/1 is the common interface and GE0/0/3
is the edge interface.
On Ring 3, UPEB is the edge node. GE0/0/1 is the common interface and GE0/0/4
is the edge interface.
# Run the display rrpp brief command on PEAGG. The command output is as
follows:
[PEAGG] display rrpp brief
Abbreviations for Switch Node Mode :
M - Master , T - Transit , E - Edge , A - Assistant-Edge
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
The command output shows that RRPP is enabled on PEAGG, and the LinkUp
timer is 2 seconds.
In Domain 1, the major control VLAN is VLAN 5, the protected VLAN is the VLAN
mapped to Instance 1, and the master node on Ring 1 is PEAGG. The primary
interface is GE0/0/1 and the secondary interface is GE0/0/2.
In Domain 2, the major control VLAN is VLAN 10, the protected VLAN is the VLAN
mapped to Instance 2, and the master node on Ring 1 is PEAGG. The primary
interface is GE0/0/2 and the secondary interface is GE0/0/1.
Run the display rrpp verbose domain command on UPEB. The command output
is as follows:
RRPP Ring :1
Ring Level :0
Node Mode : Transit
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/1 Port status: UP
Secondary port : GigabitEthernet0/0/2 Port status: UP
RRPP Ring :2
Ring Level :1
Node Mode : Edge
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Common port : GigabitEthernet0/0/1 Port status: UP
Edge port : GigabitEthernet0/0/3 Port status: UP
RRPP Ring :3
Ring Level :1
Node Mode : Edge
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Common port : GigabitEthernet0/0/1 Port status: UP
Edge port : GigabitEthernet0/0/4 Port status: UP
The command output shows that the control VLAN in Domain 1 is VLAN 5, and
the protected VLANs are the VLANs mapping Instance 1.
UPEB is the edge node on Ring 2 in Domain 1 and is in LinkUp state. GE0/0/1 is
the common interface and GE0/0/3 is the edge interface.
UPEB is the edge node on Ring 3 in Domain 1 and is in LinkUp state. GE0/0/1 is
the common interface and GE0/0/4 is the edge interface.
RRPP Ring :1
Ring Level :0
Node Mode : Transit
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/1 Port status: UP
Secondary port : GigabitEthernet0/0/2 Port status: UP
RRPP Ring :2
Ring Level :1
Node Mode : Edge
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Common port : GigabitEthernet0/0/1 Port status: UP
Edge port : GigabitEthernet0/0/3 Port status: UP
RRPP Ring :3
Ring Level :1
Node Mode : Edge
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Common port : GigabitEthernet0/0/1 Port status: UP
Edge port : GigabitEthernet0/0/4 Port status: UP
You can find that, in Domain 2, the control VLAN is VLAN 10, and the protected
VLAN is the VLAN mapped to Instance 2.
UPEB is a transit node on Ring 1 in Domain 2 and is in LinkUp state.
UPEB is the edge node on Ring 2 in Domain 2 and is in LinkUp state. GE0/0/1 is
the common interface and GE0/0/3 is the edge interface.
UPEB is the edge node on Ring 3 in Domain 2 and is in LinkUp state. GE0/0/1 is
the common interface and GE0/0/4 is the edge interface.
Run the display rrpp verbose domain 1 command on PEAGG. The command
output is as follows:
# Check detailed information about PEAGG in Domain 1.
[PEAGG] display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
RRPP Ring :1
Ring Level :0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/1 Port status: UP
Secondary port : GigabitEthernet0/0/2 Port status: BLOCKED
The command output shows that the control VLAN in Domain 1 is VLAN 5, and
the protected VLANs are the VLANs mapping Instance 1.
PEAGG is the master node in Domain 1 and is in Complete state.
GE0/0/1 is the primary interface and GE0/0/2 is the secondary interface.
# Check detailed information about PEAGG in Domain 2.
[PEAGG] display rrpp verbose domain 2
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
RRPP Ring :1
Ring Level :0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/2 Port status: UP
Secondary port : GigabitEthernet0/0/1 Port status: BLOCKED
The command output shows that, in Domain 2, the control VLAN is VLAN 10, and
the protected VLAN is the VLAN mapped to Instance 2.
PEAGG is the master node in Domain 2 and is in Complete state.
GE0/0/2 is the primary interface and GE0/0/1 is the secondary interface.
Run the display rrpp ring-group command on UPEB to check the configuration of
the ring group.
# Check the configuration of ring group 1.
[UPEB] display rrpp ring-group 1
Ring Group 1:
domain 1 ring 2 to 3
domain 2 ring 2 to 3
domain 1 ring 2 send Edge-Hello packet
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 5 to 6 10 to 11 100 to 300
#
rrpp enable
rrpp linkup-delay-timer 1
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 2 node-mode master primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 1
ring 2 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 2 node-mode master primary-port GigabitEthernet0/0/2 secondary-port GigabitEthernet0/0/1
level 1
ring 2 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
return
● CE2 configuration file
#
sysname CE2
#
vlan batch 5 to 6 10 to 11 100 to 300
#
rrpp enable
rrpp linkup-delay-timer 1
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 3 node-mode master primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 1
ring 3 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 3 node-mode master primary-port GigabitEthernet0/0/2 secondary-port GigabitEthernet0/0/1
level 1
ring 3 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
return
#
sysname UPEB
#
vlan batch 5 to 6 10 to 11 100 to 300
#
rrpp enable
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 1 enable
ring 2 node-mode edge common-port GigabitEthernet0/0/1 edge-port GigabitEthernet0/0/3
ring 2 enable
ring 3 node-mode edge common-port GigabitEthernet0/0/1 edge-port GigabitEthernet0/0/4
ring 3 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 1 node-mode transit primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 1 enable
ring 2 node-mode edge common-port GigabitEthernet0/0/1 edge-port GigabitEthernet0/0/3
ring 2 enable
ring 3 node-mode edge common-port GigabitEthernet0/0/1 edge-port GigabitEthernet0/0/4
ring 3 enable
#
rrpp ring-group 1
domain 1 ring 2 to 3
domain 2 ring 2 to 3
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
interface GigabitEthernet0/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
interface GigabitEthernet0/0/4
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
return
● UPEC configuration file
#
sysname UPEC
#
vlan batch 5 to 6 10 to 11 100 to 300
#
rrpp enable
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 1 enable
ring 2 node-mode assistant-edge common-port GigabitEthernet0/0/2 edge-port GigabitEthernet0/0/4
ring 2 enable
ring 3 node-mode assistant-edge common-port GigabitEthernet0/0/2 edge-port GigabitEthernet0/0/3
ring 3 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 1 node-mode transit primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 1 enable
ring 2 node-mode assistant-edge common-port GigabitEthernet0/0/2 edge-port GigabitEthernet0/0/4
ring 2 enable
ring 3 node-mode assistant-edge common-port GigabitEthernet0/0/2 edge-port GigabitEthernet0/0/3
ring 3 enable
#
rrpp ring-group 1
domain 1 ring 2 to 3
domain 2 ring 2 to 3
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
interface GigabitEthernet0/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
interface GigabitEthernet0/0/4
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
return
● UPED configuration file
#
sysname UPED
#
vlan batch 5 to 6 10 to 11 100 to 300
#
rrpp enable
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 1 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 1 node-mode transit primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 1 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
return
Relevant Information
Video
Configure RRPP
Networking Requirements
As shown in Figure 18-39, on a ring network, idle links are required to forward
data. In this way, data in different VLANs is forwarded along different paths,
improving network efficiency and implementing load balancing.
Figure 18-39 Networking diagram of tangent RRPP rings with multiple instances
UPEB UPEE
GE0/0/1 GE0/0/2
GE0/0/1 GE0/0/2
Domain 1 ring 1
Data Plan
Table 18-11 shows the mapping between protected VLANs and instances in
Domain 1, Domain 2, and Domain 3.
Table 18-12 shows the master node on each ring, and its primary and secondary
interfaces.
Table 18-12 Master node and its primary and secondary interfaces
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Configure instances, and map it to the data VLANs and control VLANs allowed by
the RRPP interface.
# Configure UPEA. The configurations on UPEB, UPEC, UPED, UPEE, UPEF, and
UPEG are the same as that of UPEA and not mentioned here. For details, see the
configuration files.
<HUAWEI> system-view
[HUAWEI] sysname UPEA
[UPEA] stp region-configuration
[UPEA-mst-region] instance 1 vlan 5 6 100 to 200
[UPEA-mst-region] instance 2 vlan 10 11 201 to 300
[UPEA-mst-region] active region-configuration
[UPEA-mst-region] quit
# Configure UPEA. The configurations on UPEB, UPEC, UPED, UPEE, UPEF, and
UPEG are the same as that of UPEA and not mentioned here. For details, see the
configuration files.
[UPEA] vlan batch 100 to 300
[UPEA] interface gigabitethernet 0/0/1
[UPEA-GigabitEthernet0/0/1] port link-type trunk
[UPEA-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[UPEA-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 to 300
[UPEA-GigabitEthernet0/0/1] stp disable
[UPEA-GigabitEthernet0/0/1] quit
[UPEA] interface gigabitethernet 0/0/2
[UPEA-GigabitEthernet0/0/2] port link-type trunk
[UPEA-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[UPEA-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 to 300
[UPEA-GigabitEthernet0/0/2] stp disable
[UPEA-GigabitEthernet0/0/2] quit
Step 3 Create RRPP domains and configure protected VLANs and control VLANs.
# Configure UPEA. The configurations on UPEB, UPEC, UPED, UPEE, UPEF, and
UPEG are similar to that on UPEA and not mentioned here. For details, see the
configuration files.
[UPEA] rrpp domain 1
[UPEA-rrpp-domain-region1] protected-vlan reference-instance 1
[UPEA-rrpp-domain-region1] control-vlan 5
[UPEA-rrpp-domain-region1] quit
[UPEA] rrpp domain 2
[UPEA-rrpp-domain-region2] protected-vlan reference-instance 2
[UPEA-rrpp-domain-region2] control-vlan 10
[UPEA-rrpp-domain-region2] quit
# Configure UPED as the master node on Ring 1 in Domain 1 and specify GE0/0/1
as the primary interface and GE0/0/2 as the secondary interface on UPED.
[UPED] rrpp domain 1
[UPED-rrpp-domain-region1] ring 1 node-mode master primary-port gigabitethernet 0/0/1 secondary-
port gigabitethernet 0/0/2 level 0
[UPED-rrpp-domain-region1] ring 1 enable
[UPED-rrpp-domain-region1] quit
# Configure UPED as the master node on Ring 1 in Domain 2 and specify GE0/0/2
as the primary interface and GE0/0/1 as the secondary interface on UPED.
[UPED] rrpp domain 2
[UPED-rrpp-domain-region2] ring 1 node-mode master primary-port gigabitethernet 0/0/2 secondary-
port gigabitethernet 0/0/1 level 0
[UPED-rrpp-domain-region2] ring 1 enable
[UPED-rrpp-domain-region2] quit
# Configure UPEF as the master node on Ring 1 in Domain 3 and specify GE0/0/1
as the primary interface and GE0/0/2 as the secondary interface on UPEF.
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
Domain Index : 3
Control VLAN : major 20 sub 21
Protected VLAN : Reference Instance 1 to 3
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
RRPP Ring :1
Ring Level :0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/1 Port status: UP
Secondary port : GigabitEthernet0/0/2 Port status: BLOCKED
The command output shows that the control VLAN in Domain 1 is VLAN 5, and
the protected VLANs are the VLANs mapping Instance 1.
UPED is the master node in Domain 1 and is in Complete state.
The primary interface is GigabitEthernet0/0/1 and the secondary interface is
GigabitEthernet0/0/2.
# Check detailed information about UPED in Domain 2.
RRPP Ring :1
Ring Level :0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/2 Port status: UP
Secondary port : GigabitEthernet0/0/1 Port status: BLOCKED
The command output shows that, in Domain 2, the control VLAN is VLAN 10, and
the protected VLAN is the VLAN mapped to Instance 2.
UPED is the master node in Domain 2 and is in Complete state.
The primary interface is GigabitEthernet0/0/2 and the secondary interface is
GigabitEthernet0/0/1.
# Check detailed information about UPED in Domain 3.
[UPED] display rrpp verbose domain 3
Domain Index : 3
Control VLAN : major 20 sub 21
Protected VLAN : Reference Instance 1 to 3
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 6 sec(default is 6 sec)
RRPP Ring :1
Ring Level :0
Node Mode : Transit
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet0/0/3 Port status: UP
Secondary port : GigabitEthernet0/0/4 Port status: UP
The command output shows that, in Domain 3, the control VLAN is VLAN 20 and
the protected VLANs are the VLANs mapped to instances 1 to 3.
UPED is a transit node in Domain 3 and is in LinkUp state.
The primary interface is GigabitEthernet0/0/3 and the secondary interface is
GigabitEthernet0/0/4.
----End
Configuration Files
● UPEA configuration file
#
sysname UPEA
#
vlan batch 5 to 6 10 to 11 100 to 300
#
rrpp enable
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
rrpp enable
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 1 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 1 node-mode transit primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 1 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
return
● UPED configuration file
#
sysname UPED
#
vlan batch 5 to 6 10 to 11 20 to 21 100 to 300
#
rrpp enable
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
instance 3 vlan 20 to 21
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode master primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 1 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 1 node-mode master primary-port GigabitEthernet0/0/2 secondary-port GigabitEthernet0/0/1
level 0
ring 1 enable
rrpp domain 3
control-vlan 20
protected-vlan reference-instance 1 to 3
ring 1 node-mode transit primary-port GigabitEthernet0/0/3 secondary-port GigabitEthernet0/0/4
level 0
ring 1 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
protected-vlan reference-instance 1
ring 1 node-mode master primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 1 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 to 21 100 to 300
stp disable
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 to 21 100 to 300
stp disable
#
return
● UPEG configuration file
#
sysname UPEG
#
vlan batch 20 to 21 100 to 300
#
rrpp enable
#
stp region-configuration
instance 1 vlan 20 to 21 100 to 300
active region-configuration
#
rrpp domain 3
control-vlan 20
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet0/0/1 secondary-port GigabitEthernet0/0/2
level 0
ring 1 enable
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 to 21 100 to 300
stp disable
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 to 21 100 to 300
stp disable
#
return
Relevant Information
Video
Configure RRPP
Fault Description
After the RRPP configuration is complete, a loop occurs.
Procedure
Step 1 Check whether nodes are correctly configured on the RRPP ring.
Run the display this command in the RRPP domain view on nodes of the ring to
check RRPP configurations.
Check whether nodes on the RRPP ring are located in the same domain, whether
the control VLAN map the instance, and whether only one master node exists on
the RRPP ring.
● If a fault occurs in the preceding configurations, see 18 RRPP Configuration.
● If the preceding configurations are correct, go to step 2.
Step 2 Check whether the values of Fail timers are set the same on nodes of the RRPP
ring.
Run the display rrpp verbose domain domain-id command in any view to check
detailed information about the RRPP configuration.
If the values of the Fail timer are set different on nodes of the RRPP ring, see 18
RRPP Configuration.
----End
On some RRPP nodes, data VLANs are not added to the control VLAN instance,
causing a failure to block data VLANs. Consequently, a broadcast storm occurs.
The problem can be solved after the data VLANs are added to the control VLAN
instance.
Data packets are not blocked in the control VLAN though the control VLAN is
configured in the instance.
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. ERPSv2, fully compatible with ERPSv1, provides the
following enhanced functions:
● Multi-ring topologies, such as intersecting rings
● RAPS PDU transmission on virtual channels (VCs) and non-virtual-channels
(NVCs) in sub-rings
● Forced Switch (FS) and Manual Switch (MS)
● Revertive and non-revertive switching
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 19-1
describes ring network protocols supported by devices.
Ethernet networks demand faster protection switching. STP does not meet the
requirement for fast convergence. RRPP and SEP are Huawei proprietary ring
protocols, which cannot be used for communication between Huawei and non-
Huawei devices on a ring network.
ERPS, a standard ITU-T protocol, prevent loops on ring networks. It optimizes
detection and performs fast convergence. ERPS allows all ERPS-capable devices on
a ring network to communicate.
Benefits
● Prevents broadcast storms and implements fast traffic switchover on a
network where there are loops.
● Provides fast convergence and carrier-class reliability.
● Allows all ERPS-capable devices on a ring network to communicate.
port and controls common ports to switch the port status between Forwarding
and Discarding and eliminate loops. ERPS uses the control VLAN, data VLAN, and
Ethernet Ring Protection (ERP) instance.
On the network shown in Figure 19-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 SwitchC
SwitchB
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 19-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 19-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.
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 ERPS, 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.
● In revertive switching, the RPL owner port is re-blocked after the WTR timer
expires, and the RPL is blocked.
● In non-revertive switching, the WTR timer is not started, and the original
faulty link is still blocked.
ERPSv1 supports only revertive switching. ERPSv2 supports both revertive and non-
revertive switching.
In addition to FS and MS operations, ERPS also supports the clear operation. The
clear operation has the following functions:
● Clears an existing FS or MS operation.
● Triggers revertive switching before the WTR or WTB timer expires in the case
of revertive switching operations.
● Triggers revertive switching in the case of non-revertive switching operations.
● VC: RAPS PDUs in sub-rings are transmitted to the major ring through
interconnected nodes. The RPL owner port of the sub-ring blocks both RAPS
PDUs and data traffic.
Major Ring
Sub-Ring Sub-Ring
with virtual without
channel virtual
channel
Interconnection Node
By default, sub-rings use NVCs to transmit RAPS PDUs, except for the scenario
shown in Figure 19-4.
NOTE
On the network shown in Figure 19-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
discontiguous, 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 19-2 lists the advantages and disadvantages of RAPS PDU transmission
modes in sub-rings with VCs or NVCs.
Table 19-2 Comparison between RAPS PDU transmission modes in a sub-ring with
VCs or NVCs
...
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 19-6 shows the R-APS
Specific Information field format in ERPSv1. Figure
19-7 shows the R-APS Specific Information field
format in ERPSv2.
(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
RPL SwitchD
SwitchB
User
network
Blocked Interface
Data Flow
A Link Fails
As shown in Figure 19-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 19-9 ERPS single-ring networking (unblocking the RPL owner port and RPL
neighbor port if a link fails)
Network
Router1 Router2
SwitchA SwitchE
ERPS
SwitchB RPL
SwitchD
User
network Failed Link
Blocked Interface
Data Flow
switches do not receive any RAPS PDUs before the timer expires. At the same
time, SwitchD and SwitchE send RAPS (NR) messages to the other LSWs.
2. After receiving an RAPS (NR) message, SwitchC on which the RPL owner port
resides starts the WTR timer. After the WTR timer expires, SwitchC blocks the
RPL owner port and sends RAPS (NR, RB) messages.
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 19-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
SwitchB RPL
SwitchD
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.
A multi-ring network consists of one or more major rings and sub-rings. A sub-
ring can have a virtual channel (VC) or non-virtual channel (NVC), depending on
whether RAPS PDUs in the sub-ring will be transmitted to a major ring.
This section describes how ERPS is implemented on a multi-ring network where
sub-rings use NVCs when links are normal, when a link fails, and when the link
recovers.
Network
Router1 Router2
SwitchA SwitchE
Sub-Ring2
Sub-Ring1 RP
L SwitchC L
RP
SwitchF SwitchG
PC1 PC2
RPL owner
Data Flow
A Link Fails
As shown in Figure 19-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.
Figure 19-12 ERPS multi-ring networking (unblocking the RPL owner port if a link
fails)
Network
Router1 Router2
SwitchA SwitchE
Sub-Ring2
Sub-Ring1 RP
L L
RP SwitchC
SwitchG
PC1 PC2
Blocked Interface
Data Flow
Network
Router1 Router2
SwitchE
SwitchA
ERPS Ring2
ERPS Ring1
SwitchD
SwitchB
Interface2 Interface1
SwitchC
Ring1 Blocked Port
CE1 Ring2 Blocked Port
Data Flow1
VLAN 100-200 Data Flow2
and VLAN 300-
400
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 19-13, 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
SwitchE
SwitchA
ERPS SwitchD
SwitchB
RPL
RPL Owner
SwitchC
User User
network1 network3
User
network2
Blocked Port
Data Flow1
Data Flow2
Data Flow3
As shown in Figure 19-14, 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 configuration commands are available only after the S1720GW, S1720GWR,
and S1720X have the license (WEB management to full management Electronic
RTU License) loaded and activated and the switches are restarted. ERPS
configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S3700HI V200R001C00
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● V200R002 and earlier versions support only ERPSv1.
● Before adding a port to an ERPS ring, ensure that port security has been
disabled on the port. Otherwise, loops cannot be eliminated.
● Before adding a port to an ERPS ring, ensure that the Spanning Tree Protocol
(STP), Rapid Ring Protection Protocol (RRPP), Smart Ethernet Protection
(SEP), or Smart Link is not enabled on the port.
● The service loopback function and ERPS cannot be configured on an Eth-Trunk
simultaneously.
● The S6700EI does not support association between an ERPS interface and
Ethernet CFM.
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 description of the device is configured. The description can contain the ERPS
ring ID, which facilitate device maintenance in an ERPS ring.
By default, the description of an ERPS ring is the ERPS ring name, for example,
Ring 1.
----End
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 the stp mode (system view) command is used to set the STP working mode to
VLAN-based Spanning Tree (VBST), the ERP instance specified by the protected-
instance command must be the created static instance.
● 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 active region-configuration
The mapping between the ERP instance and the VLAN is activated.
----End
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
● A port can be added to at most two ERPS rings, but cannot be added to ERPS rings
configured with the same protected instance.
● 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.
● Before changing the port role, use the shutdown command to disable the port. When
the port role is changed, use the undo shutdown command to enable the port. This
prevents traffic interruptions.
● Before adding an interface to an ERPS ring, disable port security on the interface;
otherwise, loops cannot be prevented.
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), Rapid Ring Protection Protocol (RRPP), Smart
Ethernet Protection (SEP), 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 RRPP enabled, run the undo ring ring-id command in the
RRPP domain view to disable RRPP.
– If the port has SEP enabled, run the undo sep segment segment-id
command in the interface view to disable SEP.
– 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
The system view is displayed.
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 }
----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
The system view is displayed.
Step 2 Run erps ring ring-id
The ERPS ring view is displayed.
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.
----End
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 erps ring ring-id track cfm md md-name ma ma-name mep mep-id
remote-mep rmep-id
ERPS is associated with Ethernet CFM to fast detect link failures.
The association between ERPS and CFM takes effect only when the interface has
ERPS associated with CFM and has an interface-based MEP created using the mep
mep-id command.
----End
Follow-up Procedure
After ERPS is associated with Ethernet CFM, ensure that the maintenance entity
group level (MEL) value of Ring Auto Protection Switching (RAPS) Protocol Data
Units (PDUs) in ERPS rings is larger than the MEL value in CFM protocol packets.
Otherwise, Ethernet CFM cannot allow RAPS PDUs to pass through. The MEL
value can be used for interworking with other vendors' devices in an ERPS ring.
The same MEL value ensures smooth communication between devices.
You can run the raps-mel level-id command in the ERPS ring view to set the MEL
value in RAPS PDUs.
By default, the MEL in RAPS PDUs is 7.
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.
Step 2 Run erps ring ring-id
An ERPS ring is created and the ERPS ring view is displayed.
By default, an ERPS ring configured using the erps ring ring-id command is a
major ring.
Step 3 Run version v2
ERPSv2 is specified.
By default, ERPSv1 is used.
Before specifying ERPSv1 for an ERPSv2-enabled device, delete all ERPS
configurations that ERPSv1 does not support.
Step 4 (Optional) Run sub-ring
The ERPS ring is configured as a sub-ring.
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.
An ERPS ring that has a port cannot be configured as a sub-ring. Before
configuring an ERPS ring that has a port as a sub-ring, run the undo erps ring
command in the interface view or the undo port command in the ERPS ring view
to delete the port from the ERPS ring. Then run the sub-ring command to
configure the ERPS ring as a sub-ring.
Step 5 (Optional) Run virtual-channel { enable | disable }
The RAPS PDU transmission mode is specified in the sub-ring.
NOTE
If a virtual channel (VC) needs to be used, configure VCs on all nodes of a sub-ring and
intersecting point of the sub-ring and major ring.
By default, the description of an ERPS ring is the ERPS ring name, for example,
Ring 1.
----End
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 the stp mode (system view) command is used to set the STP working mode to
VLAN-based Spanning Tree (VBST), the ERP instance specified by the protected-
instance command must be the created static instance.
● 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 active region-configuration
The mapping between the ERP instance and the VLAN is activated.
----End
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), Rapid Ring Protection Protocol (RRPP), Smart
Ethernet Protection (SEP), 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 RRPP enabled, run the undo ring ring-id command in the
RRPP domain view to disable RRPP.
– If the port has SEP enabled, run the undo sep segment segment-id
command in the interface view to disable SEP.
– 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.
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.
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 erps ring ring-id [ rpl { owner | neighbour } ]
The current port is added to the ERPS ring and its role is configured.
----End
Procedure
Step 1 Run system-view
----End
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 Run interface interface-type interface-number
The interface view is displayed.
Step 6 Run erps ring ring-id protect-switch { force | manual }
The ERPS ring specified by ring ring-id must be the one to which the port belongs.
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
Before configuring association between ERPS and Ethernet CFM, configure basic
CFM functions on the port added to the ERPS ring. For details, see Configuring
Basic Ethernet CFM Functions in "CFM Configuration" in the S1720, S2700, S5700,
and S6720 V200R011C10 Configuration Guide - Reliability.
Procedure
Step 1 Run system-view
Step 3 Run erps ring ring-id track cfm md md-name ma ma-name mep mep-id
remote-mep rmep-id
The association between ERPS and CFM takes effect only when the interface has
ERPS associated with CFM and has an interface-based MEP created using the mep
mep-id command.
----End
Follow-up Procedure
After ERPS is associated with Ethernet CFM, ensure that the maintenance entity
group level (MEL) value of Ring Auto Protection Switching (RAPS) Protocol Data
Units (PDUs) in ERPS rings is larger than the MEL value in CFM protocol packets.
Otherwise, Ethernet CFM cannot allow RAPS PDUs to pass through. The MEL
value can be used for interworking with other vendors' devices in an ERPS ring.
The same MEL value ensures smooth communication between devices.
You can run the raps-mel level-id command in the ERPS ring view to set the MEL
value in RAPS PDUs.
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
Prerequisites
1. A routing protocol has been run on the PEs on the VPLS network to ensure
that they can communicate.
2. Basic MPLS capabilities have been configured on the VPLS network, and LDP
LSPs has been established.
3. VPLS connections have been established between each two PEs, and each
Ethernet sub-interface or VLANIF interface has been bound to a VSI.
4. Interfaces on CEs and PEs have been added to the ERPS ring.
Context
On the VPLS network shown in Figure 19-15, CEs are dual-homed to PEs.
However, PE3 receives two copies of CE1 traffic from both PE1 and PE2. To resolve
this problem, enable ERPS on CE1, CE2, PE1, and PE2 and configure CE2's
interface2 as an RPL owner port to block traffic from CE1. In this way, CE1's traffic
reaches PE3 over PE1 without traversing CE2, thereby preventing any duplicate
traffic or loops.
In Figure 19-15, the ERPS ring connects to a VPLS network through Ethernet sub-
interfaces or VLANIF interfaces. To ensure that the VPLS network can promptly
detect topology changes of the ERPS ring, enable topology change notification on
the main interface through which PE1 and PE2 access the ERPS ring.
Figure 19-15 Example for configuring ERPS over VPLS in scenarios where a CE is
dual-homed to PEs (through Ethernet sub-interfaces or VLANIF interfaces)
VPLS Network
CE1 PE1
interface1 interface1
interface2
interface2 interface1
ERPS PW
sub-ring PE3
PW interface2
interface2
RPL owner
Sub-interface
VLANIF interface
NOTE
Only the S5720EI, S5720HI, S6720EI, and S6720S-EI support this function.
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 erps vpls-subinterface enable
Topology change notification is enabled on the interface.
By default, the interface does not instruct VSI-bound sub-interfaces or VLANIF
interfaces to update MAC address entries promptly after the ERPS ring topology
changes.
After topology change notification is enabled on the interface, when the
forwarding status of the interface changes to Discarding, its VSI-bound sub-
interfaces or member interfaces of the VLANIF interface will change to the
Discarding state to prevent loops on the VPLS network on which a CE is dual-
homed to PEs.
----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 19-16 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
ERPS
GE0/0/2
GE0/0/1
SwitchA P2 GE0/0/2
SwitchB
GE0/0/1 P1
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
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type trunk
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type trunk
[SwitchA-GigabitEthernet0/0/2] quit
# Configure SwitchB.
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] port link-type trunk
[SwitchB-GigabitEthernet0/0/1] quit
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] port link-type trunk
[SwitchB-GigabitEthernet0/0/2] quit
# Configure SwitchC.
<HUAWEI> system-view
[HUAWEI] sysname SwitchC
[SwitchC] interface gigabitethernet 0/0/1
[SwitchC-GigabitEthernet0/0/1] port link-type trunk
[SwitchC-GigabitEthernet0/0/1] quit
[SwitchC] interface gigabitethernet 0/0/2
[SwitchC-GigabitEthernet0/0/2] port link-type trunk
[SwitchC-GigabitEthernet0/0/2] quit
# Configure SwitchD.
<HUAWEI> system-view
[HUAWEI] sysname SwitchD
[SwitchD] interface gigabitethernet 0/0/1
[SwitchD-GigabitEthernet0/0/1] port link-type trunk
[SwitchD-GigabitEthernet0/0/1] quit
[SwitchD] interface gigabitethernet 0/0/2
[SwitchD-GigabitEthernet0/0/2] port link-type trunk
[SwitchD-GigabitEthernet0/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] quit
[SwitchA] stp region-configuration
[SwitchA-mst-region] instance 1 vlan 10 100 to 200
[SwitchA-mst-region] active region-configuration
[SwitchA-mst-region] quit
[SwitchA] erps ring 2
[SwitchA-erps-ring2] control-vlan 20
[SwitchA-erps-ring2] protected-instance 2
[SwitchA-erps-ring2] quit
[SwitchA] stp region-configuration
# Configure SwitchB.
[SwitchB] erps ring 1
[SwitchB-erps-ring1] control-vlan 10
[SwitchB-erps-ring1] protected-instance 1
[SwitchB-erps-ring1] quit
[SwitchB] stp region-configuration
[SwitchB-mst-region] instance 1 vlan 10 100 to 200
[SwitchB-mst-region] active region-configuration
[SwitchB-mst-region] quit
[SwitchB] erps ring 2
[SwitchB-erps-ring2] control-vlan 20
[SwitchB-erps-ring2] protected-instance 2
[SwitchB-erps-ring2] quit
[SwitchB] stp region-configuration
[SwitchB-mst-region] instance 2 vlan 20 300 to 400
[SwitchB-mst-region] active region-configuration
[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] quit
[SwitchC] stp region-configuration
[SwitchC-mst-region] instance 1 vlan 10 100 to 200
[SwitchC-mst-region] active region-configuration
[SwitchC-mst-region] quit
[SwitchC] erps ring 2
[SwitchC-erps-ring2] control-vlan 20
[SwitchC-erps-ring2] protected-instance 2
[SwitchC-erps-ring2] quit
[SwitchC] stp region-configuration
[SwitchC-mst-region] instance 2 vlan 20 300 to 400
[SwitchC-mst-region] active region-configuration
[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] quit
[SwitchD] stp region-configuration
[SwitchD-mst-region] instance 1 vlan 10 100 to 200
[SwitchD-mst-region] active region-configuration
[SwitchD-mst-region] quit
[SwitchD] erps ring 2
[SwitchD-erps-ring2] control-vlan 20
[SwitchD-erps-ring2] protected-instance 2
[SwitchD-erps-ring2] quit
[SwitchD] stp region-configuration
[SwitchD-mst-region] instance 2 vlan 20 300 to 400
[SwitchD-mst-region] active region-configuration
[SwitchD-mst-region] quit
Step 3 Add Layer 2 ports to ERPS rings and specify port roles. Configure GE 0/0/1 on
SwitchA and GE 0/0/2 on SwitchB as their respective RPL owner ports.
# Configure SwitchA.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] stp disable
[SwitchA-GigabitEthernet0/0/1] erps ring 1
[SwitchA-GigabitEthernet0/0/1] erps ring 2 rpl owner
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] stp disable
[SwitchA-GigabitEthernet0/0/2] erps ring 1
[SwitchA-GigabitEthernet0/0/2] erps ring 2
[SwitchA-GigabitEthernet0/0/2] quit
# Configure SwitchB.
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] stp disable
[SwitchB-GigabitEthernet0/0/1] erps ring 1
[SwitchB-GigabitEthernet0/0/1] erps ring 2
[SwitchB-GigabitEthernet0/0/1] quit
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] stp disable
[SwitchB-GigabitEthernet0/0/2] erps ring 1 rpl owner
[SwitchB-GigabitEthernet0/0/2] erps ring 2
[SwitchB-GigabitEthernet0/0/2] quit
# Configure SwitchC.
[SwitchC] interface gigabitethernet 0/0/1
[SwitchC-GigabitEthernet0/0/1] stp disable
[SwitchC-GigabitEthernet0/0/1] erps ring 1
[SwitchC-GigabitEthernet0/0/1] erps ring 2
[SwitchC-GigabitEthernet0/0/1] quit
[SwitchC] interface gigabitethernet 0/0/2
[SwitchC-GigabitEthernet0/0/2] stp disable
[SwitchC-GigabitEthernet0/0/2] erps ring 1
[SwitchC-GigabitEthernet0/0/2] erps ring 2
[SwitchC-GigabitEthernet0/0/2] quit
# Configure SwitchD.
[SwitchD] interface gigabitethernet 0/0/1
[SwitchD-GigabitEthernet0/0/1] stp disable
[SwitchD-GigabitEthernet0/0/1] erps ring 1
[SwitchD-GigabitEthernet0/0/1] erps ring 2
[SwitchD-GigabitEthernet0/0/1] quit
[SwitchD] interface gigabitethernet 0/0/2
[SwitchD-GigabitEthernet0/0/2] stp disable
[SwitchD-GigabitEthernet0/0/2] erps ring 1
[SwitchD-GigabitEthernet0/0/2] erps ring 2
[SwitchD-GigabitEthernet0/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] quit
[SwitchA] erps ring 2
[SwitchA-erps-ring2] wtr-timer 6
[SwitchA-erps-ring2] guard-timer 100
[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] quit
[SwitchB] erps ring 2
[SwitchB-erps-ring2] wtr-timer 6
[SwitchB-erps-ring2] guard-timer 100
[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] quit
[SwitchC] erps ring 2
[SwitchC-erps-ring2] wtr-timer 6
[SwitchC-erps-ring2] guard-timer 100
[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] quit
[SwitchD] erps ring 2
[SwitchD-erps-ring2] wtr-timer 6
[SwitchD-erps-ring2] guard-timer 100
[SwitchD-erps-ring2] quit
# Configure SwitchA.
[SwitchA] vlan batch 100 to 200 300 to 400
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 to 200 300 to 400
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 to 200 300 to 400
[SwitchA-GigabitEthernet0/0/2] quit
# Configure SwitchB.
[SwitchB] vlan batch 100 to 200 300 to 400
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[SwitchB-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 to 200 300 to 400
[SwitchB-GigabitEthernet0/0/1] quit
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[SwitchB-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 to 200 300 to 400
[SwitchB-GigabitEthernet0/0/2] quit
# Configure SwitchC.
[SwitchC] vlan batch 100 to 200 300 to 400
[SwitchC] interface gigabitethernet 0/0/1
[SwitchC-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[SwitchC-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 to 200 300 to 400
[SwitchC-GigabitEthernet0/0/1] quit
[SwitchC] interface gigabitethernet 0/0/2
[SwitchC-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[SwitchC-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 to 200 300 to 400
[SwitchC-GigabitEthernet0/0/2] quit
# Configure SwitchD.
[SwitchD] vlan batch 100 to 200 300 to 400
[SwitchD] interface gigabitethernet 0/0/1
[SwitchD-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[SwitchD-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 to 200 300 to 400
[SwitchD-GigabitEthernet0/0/1] quit
[SwitchD] interface gigabitethernet 0/0/2
[SwitchD-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
# 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
--------------------------------------------------------------------------------
GE0/0/1 Common Forwarding Non-failed
GE0/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 :-
----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
active region-configuration
#
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 GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20 100 to 200 300 to 400
stp disable
erps ring 1
erps ring 2 rpl owner
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20 100 to 200 300 to 400
stp disable
erps ring 1
erps ring 2
#
return
guard-timer 100
erps ring 2
control-vlan 20
protected-instance 2
wtr-timer 6
guard-timer 100
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20 100 to 200 300 to 400
stp disable
erps ring 1
erps ring 2
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
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
active region-configuration
#
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 GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20 100 to 200 300 to 400
stp disable
erps ring 1
erps ring 2
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
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
active region-configuration
#
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 GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20 100 to 200 300 to 400
stp disable
erps ring 1
erps ring 2
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20 100 to 200 300 to 400
stp disable
erps ring 1
erps ring 2
#
return
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.
As shown in Figure 19-17, intersecting ERPS rings are used. SwitchA, SwitchB,
SwitchC, and SwitchD constitute the major ring, and SwitchA, LSW1, LSW2, LSW3,
and SwitchD constitute a sub-ring.
Network
Router1 Router2
GE0/0/2
GE0/0/3
GE0/0/1 GE0/0/3 GE0/0/1
GE0/0/1 GE0/0/2
LSW2 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 and LSW1 through
LSW3.
Procedure
Step 1 Configure the link type of all ports to be added to ERPS rings as trunk.
# Configure SwitchA. The configurations of SwitchB, SwitchC, SwitchD, LSW1,
LSW2, and LSW3 are similar to the configuration of SwitchA, and are not
mentioned here.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type trunk
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type trunk
[SwitchA-GigabitEthernet0/0/2] quit
[SwitchA] interface gigabitethernet 0/0/3
[SwitchA-GigabitEthernet0/0/3] port link-type trunk
[SwitchA-GigabitEthernet0/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 rings 1 and 2 to transmit data packets from VLANs 100 to
200.
# Configure SwitchA. The configurations of SwitchB, SwitchC, SwitchD, LSW1,
LSW2, and LSW3 are similar to the configuration of SwitchA, and are not
mentioned here.
[SwitchA] stp region-configuration
[SwitchA-mst-region] instance 1 vlan 10 20 100 to 200
[SwitchA-mst-region] active region-configuration
[SwitchA-mst-region] quit
[SwitchA] erps ring 1
[SwitchA-erps-ring1] control-vlan 10
[SwitchA-erps-ring1] protected-instance 1
[SwitchA-erps-ring1] quit
[SwitchA] erps ring 2
[SwitchA-erps-ring2] control-vlan 20
[SwitchA-erps-ring2] protected-instance 1
[SwitchA-erps-ring2] quit
Step 4 Add the ports to ERPS rings and specify port roles. Configure GE0/0/1 on SwitchB
and GE0/0/2 on LSW3 as their respective RPL owner ports.
# Configure SwitchA. The configurations of SwitchC, SwitchD, LSW1, and LSW2 are
similar to the configurations of SwitchA, and are not mentioned here.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] stp disable
[SwitchA-GigabitEthernet0/0/1] erps ring 2
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] stp disable
[SwitchA-GigabitEthernet0/0/2] erps ring 1
[SwitchA-GigabitEthernet0/0/2] quit
[SwitchA] interface gigabitethernet 0/0/3
[SwitchA-GigabitEthernet0/0/3] stp disable
[SwitchA-GigabitEthernet0/0/3] erps ring 1
[SwitchA-GigabitEthernet0/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] quit
[SwitchA] erps ring 2
[SwitchA-erps-ring2] tc-notify erps ring 1
[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] quit
[SwitchD] erps ring 2
[SwitchD-erps-ring2] tc-notify erps ring 1
[SwitchD-erps-ring2] quit
Step 6 Configure the Guard timers and WTR timers in the ERPS rings.
# Configure SwitchA. The configurations of SwitchB, SwitchC, SwitchD, LSW1,
LSW2, and LSW3 are similar to the configuration of SwitchA, and are not
mentioned here.
[SwitchA] erps ring 1
[SwitchA-erps-ring1] wtr-timer 6
[SwitchA-erps-ring1] guard-timer 100
[SwitchA-erps-ring1] quit
[SwitchA] erps ring 2
[SwitchA-erps-ring2] wtr-timer 6
[SwitchA-erps-ring2] guard-timer 100
[SwitchA-erps-ring2] quit
# Run the display erps verbose command to check detailed information about
the ERPS ring and ports added to the ERPS ring.
[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
--------------------------------------------------------------------------------
GE0/0/1 RPL Owner Discarding Non-failed
GE0/0/2 Common Forwarding Non-failed
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 10 20 100 to 200
#
stp region-configuration
instance 1 vlan 10 20 100 to 200
active region-configuration
#
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 1
wtr-timer 6
guard-timer 100
version v2
sub-ring
tc-notify erps ring 1
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 100 to 200
stp disable
erps ring 2
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100 to 200
stp disable
erps ring 1
#
interface GigabitEthernet0/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100 to 200
stp disable
erps ring 1
#
return
● SwitchB configuration file
#
sysname SwitchB
#
vlan batch 10 100 to 200
#
stp region-configuration
instance 1 vlan 10 100 to 200
active region-configuration
#
erps ring 1
control-vlan 10
protected-instance 1
wtr-timer 6
guard-timer 100
version v2
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100 to 200
stp disable
erps ring 1 rpl owner
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100 to 200
stp disable
erps ring 1
#
return
● SwitchC configuration file
#
sysname SwitchC
#
vlan batch 10 100 to 200
#
stp region-configuration
instance 1 vlan 10 100 to 200
active region-configuration
#
erps ring 1
control-vlan 10
protected-instance 1
wtr-timer 6
guard-timer 100
version v2
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100 to 200
stp disable
erps ring 1
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100 to 200
stp disable
erps ring 1
#
return
● SwitchD configuration file
#
sysname SwitchD
#
vlan batch 10 20 100 to 200
#
stp region-configuration
instance 1 vlan 10 20 100 to 200
active region-configuration
#
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 1
wtr-timer 6
guard-timer 100
version v2
sub-ring
tc-notify erps ring 1
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 100 to 200
stp disable
erps ring 2
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100 to 200
stp disable
erps ring 1
#
interface GigabitEthernet0/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100 to 200
stp disable
erps ring 1
#
return
● LSW1 configuration file
#
sysname LSW1
#
vlan batch 20 100 to 200
#
stp region-configuration
instance 1 vlan 20 100 to 200
active region-configuration
#
erps ring 2
control-vlan 20
protected-instance 1
wtr-timer 6
guard-timer 100
version v2
sub-ring
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 100 to 200
stp disable
erps ring 2
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 100 to 200
stp disable
erps ring 2
#
return
● LSW2 configuration file
#
sysname LSW2
#
vlan batch 20 100 to 200
#
stp region-configuration
instance 1 vlan 20 100 to 200
active region-configuration
#
erps ring 2
control-vlan 20
protected-instance 1
wtr-timer 6
guard-timer 100
version v2
sub-ring
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 100 to 200
stp disable
erps ring 2
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20 100 to 200
stp disable
erps ring 2
#
return
Networking Requirements
To configure ERPS over VPLS in scenarios where a CE is dual-homed to PEs, enable
ERPS on CE1, CE2, PE1, and PE2 and configure the ERPS sub-ring to access the
VPLS network in NVC mode. Using Ethernet sub-interfaces to access the VPLS
network must have the TC notification function enabled so that the VPLS network
can have ARP and MAC address entries updated promptly after receiving TC
packets. On the VPLS network shown in Figure 19-18, CEs are dual-homed to PEs
through Ethernet sub-interfaces. However, this networking will cause PE3 to
receive two copies of CE1 traffic from both PE1 and PE2. To resolve this problem,
enable ERPS on CE1, CE2, PE1, and PE2 and configure CE2's GE0/0/2 as an RPL
owner port to block traffic from CE1. In this way, CE1's traffic reaches PE3 over
PE1 without traversing CE2, thereby preventing any duplicate traffic or loops.
In Figure 19-18, the ERPS ring connects to a VPLS network through Ethernet sub-
interfaces.
GE0/0/2 GE0/0/1
ERPS PW PE3
sub-ring GE0/0/3.1
PW GE0/0/2
GE0/0/2
RPL owner
Sub-interface
NOTE
This section uses CE dual-homing scenarios as an example. The configurations of ERPS over
VPLS in CE single-homing scenarios are similar to those in CE dual-homing scenarios.
The IP addresses of the interfaces on PE1, PE2, and PE3 are listed in Table 19-8.
PE1 GE0/0/1.1 --
GE0/0/2 10.1.1.1/24
Loopback1 1.1.1.1/32
PE2 GE0/0/1.1 --
GE0/0/2 10.2.1.1/24
Loopback1 2.2.2.2/32
GE0/0/2 10.2.1.2/24
GE0/0/3.1 --
Loopback1 3.3.3.3/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Run an IGP protocol on the PEs to ensure that they can communicate on the
VPLS network.
2. Configure basic MPLS capabilities on the VPLS network, and establish LDP
LSPs.
3. Establish VPLS connections between every two PEs and bind each Ethernet
sub-interface to a VSI.
4. Configure ERPS, including:
– Enable ERPS on CE1, CE2, PE1, and PE2.
– Configure CE2's GE0/0/2 as an RPL owner port.
Data Preparation
To complete the configuration, you need the following data:
● Data needed for configuring OSPF: IP address of each interface, OSPF process
ID, and OSPF domain ID
● MPLS LSR ID (as the MPLS peer address)
● VSI name and VSI ID
● Names of the VSI-bound Ethernet sub-interfaces
● ERPS ring ID, control VLAN ID, and RPL owner port number
Procedure
Step 1 Assign an IP address to each interface and configure an IGP on the VPLS network
to allow PEs to communicate. This example uses OSPF as the IGP.
When configuring OSPF, advertise the 32-bit IP addresses of loopback interfaces,
which are used as LSR IDs, on the PEs.
For configuration details, see Configuration Files in this section.
Step 2 Configure basic MPLS capabilities on the MPLS backbone network, and set up LDP
LSPs among the PEs.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] mpls
[PE1-GigabitEthernet0/0/2] mpls ldp
[PE1-GigabitEthernet0/0/2] quit
# Configure PE2.
[PE2] mpls lsr-id 2.2.2.2
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface gigabitethernet 0/0/2
[PE2-GigabitEthernet0/0/2] mpls
[PE2-GigabitEthernet0/0/2] mpls ldp
[PE2-GigabitEthernet0/0/2] quit
# Configure PE3.
[PE3] mpls lsr-id 3.3.3.3
[PE3] mpls
[PE3-mpls] quit
[PE3] mpls ldp
[PE3-mpls-ldp] quit
[PE3] interface gigabitethernet 0/0/1
[PE3-GigabitEthernet0/0/1] mpls
[PE3-GigabitEthernet0/0/1] mpls ldp
[PE3-GigabitEthernet0/0/1] quit
[PE3] interface gigabitethernet 0/0/2
[PE3-GigabitEthernet0/0/2] mpls
[PE3-GigabitEthernet0/0/2] mpls ldp
[PE3-GigabitEthernet0/0/2] quit
# Configure PE1.
[PE1] mpls l2vpn
[PE1-l2vpn] quit
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
# Configure PE3.
[PE3] mpls l2vpn
[PE3-l2vpn] quit
# Configure PE1.
[PE1] vsi s1 static
[PE1-vsi-s1] pwsignal ldp
[PE1-vsi-s1-ldp] vsi-id 10
[PE1-vsi-s1-ldp] peer 3.3.3.3
[PE1-vsi-s1-ldp] quit
[PE1-vsi-s1] quit
[PE1] interface gigabitethernet 0/0/1.1
[PE1-GigabitEthernet0/0/1.1] shutdown
[PE1-GigabitEthernet0/0/1.1] dot1q termination vid 10
[PE1-GigabitEthernet0/0/1.1] l2 binding vsi s1
[PE1-GigabitEthernet0/0/1.1] undo shutdown
[PE1-GigabitEthernet0/0/1.1] quit
# Configure PE2.
[PE2] vsi s1 static
[PE2-vsi-s1] pwsignal ldp
[PE2-vsi-s1-ldp] vsi-id 10
[PE2-vsi-s1-ldp] peer 3.3.3.3
[PE2-vsi-s1-ldp] quit
[PE2-vsi-s1] quit
[PE2] interface gigabitethernet 0/0/1.1
[PE2-GigabitEthernet0/0/1.1] shutdown
[PE2-GigabitEthernet0/0/1.1] dot1q termination vid 10
[PE2-GigabitEthernet0/0/1.1] l2 binding vsi s1
[PE2-GigabitEthernet0/0/1.1] undo shutdown
[PE2-GigabitEthernet0/0/1.1] quit
# Configure PE3.
[PE3] vsi s1 static
[PE3-vsi-s1] pwsignal ldp
[PE3-vsi-s1-ldp] vsi-id 10
[PE3-vsi-s1-ldp] peer 1.1.1.1
[PE3-vsi-s1-ldp] peer 2.2.2.2
[PE3-vsi-s1-ldp] quit
[PE3-vsi-s1] quit
[PE3] interface gigabitethernet 0/0/3.1
[PE3-GigabitEthernet0/0/3.1] shutdown
[PE3-GigabitEthernet0/0/3.1] dot1q termination vid 10
[PE3-GigabitEthernet0/0/3.1] l2 binding vsi s1
[PE3-GigabitEthernet0/0/3.1] undo shutdown
[PE3-GigabitEthernet0/0/3.1] quit
# Configure PE2.
[PE2] erps ring 1
[PE2-erps-ring1] control-vlan 100
[PE2-erps-ring1] protected-instance 1
[PE2-erps-ring1] version v2
[PE2-erps-ring1] sub-ring
[PE2-erps-ring1] quit
[PE2] stp region-configuration
[PE2-mst-region] instance 1 vlan 10 100
[PE2-mst-region] active region-configuration
[PE2-mst-region] quit
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type trunk
[PE2-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[PE2-GigabitEthernet0/0/1] stp disable
[PE2-GigabitEthernet0/0/1] erps ring 1
# Configure CE1.
<Switch> system-view
[Switch] sysname CE1
[CE1] erps ring 1
[CE1-erps-ring1] control-vlan 100
[CE1-erps-ring1] protected-instance 1
[CE1-erps-ring1] version v2
[CE1-erps-ring1] sub-ring
[CE1-erps-ring1] quit
[CE1] stp region-configuration
[CE1-mst-region] instance 1 vlan 10 100
[CE1-mst-region] active region-configuration
[CE1-mst-region] quit
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type trunk
[CE1-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[CE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE1-GigabitEthernet0/0/1] stp disable
[CE1-GigabitEthernet0/0/1] erps ring 1
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface gigabitethernet 0/0/2
[CE1-GigabitEthernet0/0/2] port link-type trunk
[CE1-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[CE1-GigabitEthernet0/0/2] port trunk allow-pass vlan 10
[CE1-GigabitEthernet0/0/2] stp disable
[CE1-GigabitEthernet0/0/2] erps ring 1
[CE1-GigabitEthernet0/0/2] quit
# Configure CE2.
<Switch> system-view
[Switch] sysname CE2
[CE2] erps ring 1
[CE2-erps-ring1] control-vlan 100
[CE2-erps-ring1] protected-instance 1
[CE2-erps-ring1] version v2
[CE2-erps-ring1] sub-ring
[CE2-erps-ring1] quit
[CE2] stp region-configuration
[CE2-mst-region] instance 1 vlan 10 100
[CE2-mst-region] active region-configuration
[CE2-mst-region] quit
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type trunk
[CE2-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[CE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE2-GigabitEthernet0/0/1] stp disable
[CE2-GigabitEthernet0/0/1] erps ring 1
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface gigabitethernet 0/0/2
[CE2-GigabitEthernet0/0/2] port link-type trunk
[CE2-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[CE2-GigabitEthernet0/0/2] port trunk allow-pass vlan 10
[CE2-GigabitEthernet0/0/2] stp disable
[CE2-GigabitEthernet0/0/2] erps ring 1 rpl owner
[CE2-GigabitEthernet0/0/2] quit
Administrator VSI : no
Isolate Spoken : disable
VSI Index :2
PW Signaling : ldp
Member Discovery Style : static
PW MAC Learn Style : unqualify
Encapsulation Type : vlan
MTU : 1500
Diffserv Mode : uniform
Mpls Exp : --
DomainId : 255
Domain Name :
Ignore AcState : disable
P2P VSI : disable
Create Time : 0 days, 1 hours, 19 minutes, 38 seconds
VSI State : up
VSI ID : 10
*Peer Router ID : 1.1.1.1
Negotiation-vc-id : 10
primary or secondary : primary
ignore-standby-state : no
VC Label : 32891
Peer Type : dynamic
Session : up
Tunnel ID : 0x0000000001004c4b41
Broadcast Tunnel ID : --
Broad BackupTunnel ID : --
CKey :2
NKey : 1862271177
Stp Enable :0
PwIndex :1
Control Word : disable
BFD for PW : unavailable
*Peer Router ID : 2.2.2.2
Negotiation-vc-id : 10
primary or secondary : primary
ignore-standby-state : no
VC Label : 32892
Peer Type : dynamic
Session : up
Tunnel ID : 0x0000000001004c4b42
Broadcast Tunnel ID : --
Broad BackupTunnel ID : --
CKey :2
NKey : 1862271178
Stp Enable :0
PwIndex :2
Control Word : disable
BFD for PW : unavailable
**PW Information:
The command output also shows that the link between CE1 and CE2 is blocked.
[CE2] display erps
D : Discarding
F : Forwarding
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 100 5 200 (F)GE0/0/1 (D,R)GE0/0/2
--------------------------------------------------------------------------------
----End
Configuration Files
● PE1 configuration file
#
sysname PE1
#
vlan batch 100
#
stp region-configuration
instance 1 vlan 10 100
active region-configuration
#
erps ring 1
control-vlan 100
protected-instance 1
version v2
sub-ring
#
mpls lsr-id 1.1.1.1
#
mpls
#
mpls l2vpn
#
vsi s1 static
pwsignal ldp
vsi-id 10
peer 3.3.3.3
#
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 100
stp disable
erps ring 1
erps vpls-subinterface enable
#
interface GigabitEthernet0/0/1.1
dot1q termination vid 10
l2 binding vsi s1
#
interface GigabitEthernet0/0/2
undo portswitch
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.255
#
return
● PE2 configuration file
#
sysname PE2
#
vlan batch 100
#
stp region-configuration
instance 1 vlan 10 100
active region-configuration
#
erps ring 1
control-vlan 100
protected-instance 1
version v2
sub-ring
#
mpls lsr-id 2.2.2.2
#
mpls
#
mpls l2vpn
#
vsi s1 static
pwsignal ldp
vsi-id 10
peer 3.3.3.3
#
mpls ldp
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 100
stp disable
erps ring 1
erps vpls-subinterface enable
#
interface GigabitEthernet0/0/1.1
dot1q termination vid 10
l2 binding vsi s1
#
interface GigabitEthernet0/0/2
undo portswitch
ip address 10.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.2.1.0 0.0.0.255
#
return
#
sysname CE1
#
vlan batch 10 100
#
stp region-configuration
instance 1 vlan 10 100
active region-configuration
#
erps ring 1
control-vlan 100
protected-instance 1
version v2
sub-ring
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100
stp disable
erps ring 1
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100
stp disable
erps ring 1
#
return
Networking Requirements
To configure ERPS over VPLS in scenarios where a CE is dual-homed to PEs, enable
ERPS on CE1, CE2, PE1, and PE2 and configure the ERPS sub-ring to access the
VPLS network in NVC mode. Using VLANIF interfaces to access the VPLS network
must have the TC notification function enabled so that the VPLS network can have
ARP and MAC address entries updated promptly after receiving TC packets. On the
VPLS network shown in Figure 19-19, CEs are dual-homed to PEs. However, this
networking will cause PE3 to receive two copies of CE1 traffic from both PE1 and
PE2. To resolve this problem, enable ERPS on CE1, CE2, PE1, and PE2 and
configure CE2's GE0/0/2 as an RPL owner port to block traffic from CE1. In this
way, CE1's traffic reaches PE3 over PE1 without traversing CE2, thereby preventing
any duplicate traffic or loops.
In Figure 19-19, the ERPS ring connects to a VPLS ring through VLANIF interfaces.
Figure 19-19 Configuring ERPS over VPLS in scenarios where CE1 is dual-homed
to PE1 and PE2 through VLANIF interfaces
VPLS Network
CE1 PE1
GE0/0/1 VLANIF10
GE0/0/2
GE0/0/2 GE0/0/1
ERPS PW PE3
sub-ring VLANIF10
PW GE0/0/2
GE0/0/2
RPL owner
Sub-interface
NOTE
This section uses CE dual-homing scenarios as an example. The configurations of ERPS over
VPLS in CE single-homing scenarios are similar to those in CE dual-homing scenarios.
The IP addresses of the interfaces on PE1, PE2, and PE3 are listed in Table 19-9.
PE1 GE0/0/1 --
GE0/0/2 10.1.1.1/24
Loopback1 1.1.1.1/32
PE2 GE0/0/1 --
GE0/0/2 10.2.1.1/24
Loopback1 2.2.2.2/32
GE0/0/2 10.2.1.2/24
GE0/0/3 --
Loopback1 3.3.3.3/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Run an IGP protocol on the PEs to ensure that they can communicate on the
VPLS network.
2. Configure basic MPLS capabilities on the VPLS network, and establish LDP
LSPs.
3. Establish VPLS connections between each two PEs and bind each VLANIF
interface to a VSI.
4. Configure ERPS, including:
– Enable ERPS on CE1, CE2, PE1, and PE2.
– Configure CE2's GE0/0/2 as an RPL owner port.
Data Preparation
To complete the configuration, you need the following data:
● Data needed for configuring OSPF: IP address of each interface, OSPF process
ID, and OSPF domain ID
● MPLS LSR ID (as the MPLS peer address)
● VSI name and VSI ID
● VSI-bound VLANIF interfaces
● ERPS ring ID, control VLAN ID, and RPL owner port number
Procedure
Step 1 Assign an IP address to each interface and configure an IGP on the VPLS network
to allow PEs to communicate. This example uses OSPF as the IGP.
When configuring OSPF, advertise the 32-bit IP addresses of loopback interfaces,
which are used as LSR IDs, on the PEs.
For configuration details, see Configuration Files in this section.
Step 2 Configure basic MPLS capabilities on the MPLS backbone network, and set up LDP
LSPs among the PEs.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] mpls
[PE1-GigabitEthernet0/0/2] mpls ldp
[PE1-GigabitEthernet0/0/2] quit
# Configure PE2.
[PE2] mpls lsr-id 2.2.2.2
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface gigabitethernet 0/0/2
[PE2-GigabitEthernet0/0/2] mpls
[PE2-GigabitEthernet0/0/2] mpls ldp
[PE2-GigabitEthernet0/0/2] quit
# Configure PE3.
[PE3] mpls lsr-id 3.3.3.3
[PE3] mpls
[PE3-mpls] quit
[PE3] mpls ldp
[PE3-mpls-ldp] quit
[PE3] interface gigabitethernet 0/0/1
[PE3-GigabitEthernet0/0/1] mpls
[PE3-GigabitEthernet0/0/1] mpls ldp
[PE3-GigabitEthernet0/0/1] quit
[PE3] interface gigabitethernet 0/0/2
[PE3-GigabitEthernet0/0/2] mpls
[PE3-GigabitEthernet0/0/2] mpls ldp
[PE3-GigabitEthernet0/0/2] quit
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
# Configure PE3.
[PE3] mpls l2vpn
[PE3-l2vpn] quit
# Configure PE2.
[PE2] vsi s1 static
[PE2-vsi-s1] pwsignal ldp
[PE2-vsi-s1-ldp] vsi-id 10
[PE2-vsi-s1-ldp] peer 3.3.3.3
[PE2-vsi-s1-ldp] quit
[PE2-vsi-s1] quit
[PE2] vlan 10
[PE2-vlan10] quit
[PE2] interface vlanif10
[PE2-Vlanif10] l2 binding vsi s1
[PE2-Vlanif10] quit
# Configure PE3.
[PE3] vsi s1 static
[PE3-vsi-s1] pwsignal ldp
[PE3-vsi-s1-ldp] vsi-id 10
[PE3-vsi-s1-ldp] peer 1.1.1.1
[PE3-vsi-s1-ldp] peer 2.2.2.2
[PE3-vsi-s1-ldp] quit
[PE3-vsi-s1] quit
[PE3] vlan 10
[PE3-vlan10] quit
[PE3] interface gigabitethernet 0/0/3
[PE3-GigabitEthernet0/0/3] port link-type trunk
[PE3-GigabitEthernet0/0/3] port trunk allow-pass vlan 10
[PE3-GigabitEthernet0/0/3] quit
[PE3] interface vlanif10
[PE3-Vlanif10] l2 binding vsi s1
[PE3-Vlanif10] quit
# Configure PE2.
[PE2] erps ring 1
[PE2-erps-ring1] control-vlan 100
[PE2-erps-ring1] protected-instance 1
[PE2-erps-ring1] version v2
[PE2-erps-ring1] sub-ring
[PE2-erps-ring1] quit
[PE2] stp region-configuration
[PE2-mst-region] instance 1 vlan 10 100
[PE2-mst-region] active region-configuration
[PE2-mst-region] quit
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type trunk
[PE2-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[PE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[PE2-GigabitEthernet0/0/1] stp disable
[PE2-GigabitEthernet0/0/1] erps ring 1
[PE1-GigabitEthernet0/0/1] erps vpls-subinterface enable
[PE2-GigabitEthernet0/0/1] quit
# Configure CE1.
<Switch> system-view
[Switch] sysname CE1
[CE1] erps ring 1
[CE1-erps-ring1] control-vlan 100
[CE1-erps-ring1] protected-instance 1
[CE1-erps-ring1] version v2
[CE1-erps-ring1] sub-ring
[CE1-erps-ring1] quit
[CE1] stp region-configuration
[CE1-mst-region] instance 1 vlan 10 100
[CE1-mst-region] active region-configuration
[CE1-mst-region] quit
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type trunk
[CE1-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[CE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE1-GigabitEthernet0/0/1] stp disable
[CE1-GigabitEthernet0/0/1] erps ring 1
[CE1-GigabitEthernet0/0/1] quit
[CE1] interface gigabitethernet 0/0/2
[CE1-GigabitEthernet0/0/2] port link-type trunk
[CE1-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[CE1-GigabitEthernet0/0/2] port trunk allow-pass vlan 10
[CE1-GigabitEthernet0/0/2] stp disable
[CE1-GigabitEthernet0/0/2] erps ring 1
[CE1-GigabitEthernet0/0/2] quit
# Configure CE2.
<Switch> system-view
[Switch] sysname CE2
[CE2] erps ring 1
[CE2-erps-ring1] control-vlan 100
[CE2-erps-ring1] protected-instance 1
[CE2-erps-ring1] version v2
[CE2-erps-ring1] sub-ring
[CE2-erps-ring1] quit
[CE2] stp region-configuration
[CE2-mst-region] instance 1 vlan 10 100
[CE2-mst-region] active region-configuration
[CE2-mst-region] quit
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type trunk
[CE2-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[CE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE2-GigabitEthernet0/0/1] stp disable
[CE2-GigabitEthernet0/0/1] erps ring 1
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface gigabitethernet 0/0/2
[CE2-GigabitEthernet0/0/2] port link-type trunk
[CE2-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[CE2-GigabitEthernet0/0/2] port trunk allow-pass vlan 10
[CE2-GigabitEthernet0/0/2] stp disable
[CE2-GigabitEthernet0/0/2] erps ring 1 rpl owner
[CE2-GigabitEthernet0/0/2] quit
After completing the configuration, run the display vsi name s1 verbose
command on PE3. The command output shows that PE3 has established PWs with
PE1 (1.1.1.1) and PE2 (2.2.2.2).
[PE3] display vsi name s1 verbose
***VSI Name : s1
Administrator VSI : no
Isolate Spoken : disable
VSI Index :2
PW Signaling : ldp
Member Discovery Style : static
PW MAC Learn Style : unqualify
Encapsulation Type : vlan
MTU : 1500
Diffserv Mode : uniform
Mpls Exp : --
DomainId : 255
Domain Name :
Ignore AcState : disable
P2P VSI : disable
Create Time : 0 days, 1 hours, 19 minutes, 38 seconds
VSI State : up
VSI ID : 10
*Peer Router ID : 1.1.1.1
Negotiation-vc-id : 10
primary or secondary : primary
ignore-standby-state : no
VC Label : 32891
Peer Type : dynamic
Session : up
Tunnel ID : 0x0000000001004c4b41
Broadcast Tunnel ID : --
Broad BackupTunnel ID : --
CKey :2
NKey : 1862271177
Stp Enable :0
PwIndex :1
Control Word : disable
BFD for PW : unavailable
*Peer Router ID : 2.2.2.2
Negotiation-vc-id : 10
primary or secondary : primary
ignore-standby-state : no
VC Label : 32892
Peer Type : dynamic
Session : up
Tunnel ID : 0x0000000001004c4b42
Broadcast Tunnel ID : --
Broad BackupTunnel ID : --
CKey :2
NKey : 1862271178
Stp Enable :0
PwIndex :2
Control Word : disable
BFD for PW : unavailable
**PW Information:
Broad BackupTunnel ID : --
Ckey :2
Nkey : 1862271177
Main PW Token : 0x0
Slave PW Token : 0x0
Tnl Type : ldp
OutInterface : LDP LSP
Backup OutInterface : --
Stp Enable :0
PW Last Up Time : 2016/06/14 17:35:12
PW Total Up Time : 0 days, 1 hours, 19 minutes, 38 seconds
*Peer Ip Address : 2.2.2.2
PW State : up
Local VC Label : 32892
Remote VC Label : 32893
Remote Control Word : disable
PW Type : label
Local VCCV : alert lsp-ping bfd
Remote VCCV : alert lsp-ping bfd
Tunnel ID : 0x0000000001004c4b42
Broadcast Tunnel ID : --
Broad BackupTunnel ID : --
Ckey :2
Nkey : 1862271178
Main PW Token : 0x0
Slave PW Token : 0x0
Tnl Type : ldp
OutInterface : LDP LSP
Backup OutInterface : --
Stp Enable :0
PW Last Up Time : 2016/06/14 10:35:45
PW Total Up Time : 0 days, 1 hours, 19 minutes, 45 seconds
The command output also shows that the link between CE1 and CE2 is blocked.
[CE2] display erps
D : Discarding
F : Forwarding
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 100 5 200 (F)GE0/0/1 (D,R)GE0/0/2
--------------------------------------------------------------------------------
----End
Configuration Files
● PE1 configuration file
#
sysname PE1
#
vlan batch 10 100
#
stp region-configuration
instance 1 vlan 10 100
active region-configuration
#
erps ring 1
control-vlan 100
protected-instance 1
version v2
sub-ring
#
mpls lsr-id 1.1.1.1
#
mpls
#
mpls l2vpn
#
vsi s1 static
pwsignal ldp
vsi-id 10
peer 3.3.3.3
#
mpls ldp
#
interface Vlanif10
l2 binding vsi s1
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100
stp disable
erps ring 1
erps vpls-subinterface enable
#
interface GigabitEthernet0/0/2
undo portswitch
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.255
#
return
● PE2 configuration file
#
sysname PE2
#
vlan batch 10 100
#
stp region-configuration
instance 1 vlan 10 100
active region-configuration
#
erps ring 1
control-vlan 100
protected-instance 1
version v2
sub-ring
#
mpls lsr-id 2.2.2.2
#
mpls
#
mpls l2vpn
#
vsi s1 static
pwsignal ldp
vsi-id 10
peer 3.3.3.3
#
mpls ldp
#
interface Vlanif10
l2 binding vsi s1
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100
stp disable
erps ring 1
erps vpls-subinterface enable
#
interface GigabitEthernet0/0/2
undo portswitch
ip address 10.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.2.1.0 0.0.0.255
#
return
● PE3 configuration file
#
sysname PE3
#
vlan batch 10
#
mpls lsr-id 3.3.3.3
#
mpls
#
mpls l2vpn
#
vsi s1 static
pwsignal ldp
vsi-id 10
peer 1.1.1.1
peer 2.2.2.2
#
mpls ldp
#
interface Vlanif10
l2 binding vsi s1
suppression enable percent
broadcast-suppression percent 1
multicast-suppression percent 1
unknown-unicast-suppression percent 1
#
interface GigabitEthernet0/0/1
undo portswitch
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/2
undo portswitch
ip address 10.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.1.0 0.0.0.255
#
return
● CE1 configuration file
#
sysname CE1
#
vlan batch 10 100
#
stp region-configuration
instance 1 vlan 10 100
active region-configuration
#
erps ring 1
control-vlan 100
protected-instance 1
version v2
sub-ring
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100
stp disable
erps ring 1
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100
stp disable
erps ring 1
#
return
● CE2 configuration file
#
sysname CE1
#
vlan batch 10 100
#
stp region-configuration
instance 1 vlan 10 100
active region-configuration
#
erps ring 1
control-vlan 100
protected-instance 1
version v2
sub-ring
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100
stp disable
erps ring 1
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 100
stp disable
erps ring 1 rpl owner
#
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
20 LBDT Configuration
NOTE
LBDT can only detect loops on a single node, but cannot eliminate loops in the same
manner as ring network technologies including ERPS, RRPP, SEP, Smart Link, STP, RSTP,
MSTP, and VBST.
Detection Packet
LBDT periodically sends detection packets on an interface to check whether the
packets return to the local device to determine whether loops occur on the
interface, on the downstream network or device, or between two device interfaces.
The following conditions must be met:
● Detection packets sent from an interface are sent back to the local device
when a loop occurs on an interface, or network connected to the interface.
● The system identifies detection packets sent from the local device, and
detection packets that the interface sends.
Detection packets sent from a device carry the device's MAC address and
outbound interface number. The device can identify the packets sent by itself as
well as the source interface. The packets also carry the broadcast or multicast
destination MAC address to ensure that the packets can be sent back to the local
device when a loop occurs on the interface or network connected to the interface.
Figure 20-1 shows the format of LBDT packets.
DMAC The destination MAC address of a tagged packet is all Fs; the
destination MAC address of an untagged packet is a BPDU MAC
address, broadcast MAC address (all Fs), or multicast MAC
address.
The broadcast destination MAC address, multicast destination
MAC address, or BPDU MAC address ensures that the detection
packet can be sent back to the local device when a loop occurs
on the interface or network connected to the interface.
SMAC Source MAC address. The value is the system MAC address of the
device, which identifies packets sent from the local device.
802.1Q Tag Tag Protocol Identifier (TPID). The value of the TPID is 0x8100,
representing the 802.1Q tagged frame.
LBDT sends both tagged and untagged detection packets, so it can detect loops
based on interfaces and VLANs.
Trap The device only sends a trap to Select this action when only traps
the NMS and records a log. need to be reported without
affecting traffic forwarding on the
interface.
This action cannot suppress
broadcast storms.
Block The device sends a trap to the Select this action when the
NMS, blocks the interface, and interface needs to be disabled
allows only BPDUs to pass from forwarding data packets and
through. needs to forward BPDUs such as
Link Layer Discovery Protocol Data
Units (LLDPDUs).
This action can suppress broadcast
storms.
Shutdo The device sends a trap to the Select this action to prevent
wn NMS and shuts down the broadcast storms when the
interface. interface does not participate in
any calculation or forwarding.
This action can suppress broadcast
storms.
No The device sends a trap to the Select this action when the
learnin NMS and disables the interface interface needs to process data
g from learning new MAC packets and send them to the
addresses. correct link.
This action cannot suppress
broadcast storms.
Quitvl The device sends a trap to the Select this action when loops in a
an NMS and removes the interface VLAN need to be eliminated
from the VLAN where the loop without affecting traffic
occurs. forwarding in other VLANs.
This action can suppress broadcast
storms.
LBDT can only detect loops on a single node, but cannot eliminate loops on the
entire network. After a loop is detected, you are advised to eliminate the loop
immediately.
NOTE
● The interface that is disabled by LBDT cannot be restored after the recovery time.
● After the LBDT action of an interface is changed, the interface is restored. Then the
changed LBDT action is taken when a loop is detected.
● When VLAN-based LBDT is configured on an interface:
● If detection of this VLAN is canceled, the interface is restored automatically.
● If GVRP is not enabled on the interface and the interface is removed from the
VLAN manually, the interface is restored automatically.
● If GVRP is enabled on the interface, the interface is manually removed from the
VLAN or dynamically removed from the VLAN through GVRP, and the action to be
taken is not shutdown, the interface can be restored automatically.
● If GVRP is enabled on the interface, the interface is manually removed from the
VLAN or dynamically removed from the VLAN through GVRP, and the action to be
taken is shutdown, the interface cannot be restored automatically. In the alarm
periodically reported by the device, information about the VLAN where loops are
detected is empty. You must run the shutdown and undo shutdown commands to
manually restore the interface or run the restart command to enable the interface
again.
Tx Rx
You can configure LBDT on the interface of the Switch to detect loopbacks. When
detecting a loopback on the interface, the Switch reports a trap and records a log,
and takes a preconfigured action (such as Shutdown, Block, No learning, or
Quitvlan) on the interface to reduce the impact of the loopback on the Switch.
When the Switch detects that the loopback is eliminated on the interface, the
interface can be restored. However, the interface shut down cannot be restored.
Interface1
Interface1
You can configure LBDT on Interface1 of the Switch to detect whether a loop
occurs on the downstream network or device. When detecting a loop on the
downstream network or device, the Switch reports a trap and records a log, and
takes a preconfigured action (such as Shutdown, Block, No learning, or
Quitvlan) on the interface to reduce the impact of the loop on the Switch. When
the Switch detects that the loop is eliminated on the downstream network or
device, the interface can be restored. However, the interface shut down cannot be
restored.
Switch
Interface1 Interface2
You can configure LBDT on Interface1 and Interface2 of the Switch to detect
whether a loop occurs on the local network or between two device interfaces.
When detecting a loop, the Switch reports a trap and records a log, and takes
preconfigured actions (such as Shutdown, Block, No learning, or Quitvlan) on
Interface1 and Interface2 to reduce the impact of the loop on the Switch. When
the Switch detects that the loop is eliminated on the local network or between
two interfaces, Interface1 or Interface2 can be restored. However, the interface
shut down cannot be restored.
Licensing Requirements
LBDT configuration commands are available only after the S1720GW, S1720GWR,
and S1720X have the license (WEB management to full management Electronic
RTU License) loaded and activated and the switches are restarted. LBDT
configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S2710SI V100R006(C03&C05)
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● In V200R008C00 and earlier versions, LBDT does not take effect in dynamic
VLANs. In V200R008C00 and later versions, the LBDT-enabled switch can
detect loops in dynamic VLANs, but the Quitvlan action is invalid for dynamic
VLANs.
● LBDT requires that the device should 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 cannot be configured on an Eth-Trunk or its member interfaces.
● The blocked ports of LBDT cannot block GVRP packets. To ensure that GVRP
runs normally and prevent GVRP loops, do not enable GVRP on the blocked
port of LBDT.
● The S2700SI and S2710SI support only detection of self-loops on an interface,
and do not support detection loops on the downstream device or between
interfaces.
Context
The switch joins VLAN 1 by default, and the PVID of all interfaces is VLAN 1.
When an interface changes from Down to Up, a loop may occur. You can
configure automatic LBDT to detect loops in the VLAN specified by the PVID on an
interface. When the switch is enabled with MAC address flapping detection, if
MAC address flapping is detected in a VLAN, automatic LBDT is triggered to detect
loops in the VLAN.
Procedure
Step 1 Run system-view
NOTE
----End
Follow-up Procedure
To enable LBDT triggered by MAC address flapping, first configure MAC address
flapping detection. For details on how to configure MAC address flapping
detection, see 3.9 Configuring MAC Address Flapping Detection.
By default, global MAC address flapping detection is enabled. The switch detects
MAC address flapping in all VLANs.
NOTE
The quitvlan action that is configured using this command takes effect only in the scenario
where automatic LBDT is triggered to detect a loop between interfaces in the VLAN where
MAC address flapping is detected. The trap action is used in the scenario where automatic
LBDT is triggered to detect a loop on the downstream network or device in the VLAN
where MAC address flapping is detected.
Context
An LBDT-enabled interface sends LBDT packets at intervals. A shorter interval
indicates that the system sends more LBDT packets in a given period and detects
loops more accurately. However, more system resources are consumed and system
performance is affected. You can adjust the interval for sending LBDT packets
according to actual networking to balance system performance and LBDT
accuracy.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run loopback-detect packet-interval packet-interval-time
The interval for sending LBDT packets is set.
By default, the interval for sending LBDT packets is 5s.
----End
Context
An LBDT-enabled interface periodically sends LBDT packets to detect loops. After a
loop is detected, an action configured by the loopback-detect action command is
taken on the interface. In addition, the system counts the time. After the
configured recovery time expires, the system attempts to restore the problematic
interface. If the device does not receive detection packets from the problematic
interface within the next recovery time, it considers that the loop is eliminated on
the interface and restores 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 recovery-time recovery-time
The interface recovery time after a loop is removed is set.
By default, the interface recovery time is three times the interval for sending LBDT
packets.
NOTE
It is recommended that the interface recovery time be three times the packet sending
interval at least. If the packet sending interval has been set to a small value, the interface
recovery time should be at least 10 seconds longer than the packet sending interval.
----End
NOTICE
● LBDT needs to send a large number of LBDT packets to detect loops, occupying
system resources. Therefore, disable LBDT if loops do not need to be detected.
● The blocked ports of LBDT cannot block GVRP packets. To ensure that GVRP
runs normally and prevent GVRP loops, do not enable GVRP on the blocked
port of LBDT.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run the following commands as required.
● Enable LBDT on all interfaces.
Run the loopback-detect enable command to enable LBDT on all interfaces.
When LBDT needs to be configured on most interfaces, perform this
operation. This operation simplifies the configuration.
● Enable LBDT on an interface.
a. Run the interface interface-type interface-number command to enter the
interface view.
b. Run the loopback-detect enable command to enable LBDT on the
interface.
By default, LBDT is disabled on an interface.
Step 3 Run the following commands as required.
If LBDT Detecting Loopbacks on an Interface is required, skip this step.
If Detecting a Loop on the Downstream Network or Device or Detecting a
Loop Between Two Device Interfaces is required, perform this step.
● Configuring LBDT in a specified VLAN
a. Run interface interface-type interface-number
The interface view is displayed.
b. Select either of the following configurations to add the VLAN where
loops need to be detected.
▪ Access interface
1) Run port link-type access
The link type of the interface is configured as access.
▪ Hybrid interface
1) Run port link-type hybrid
The link type of the interface is configured as hybrid.
2) Run port hybrid tagged vlan { { vlan-id1 [ to vlan-
id2 ] }&<1-10> | all } or port hybrid untagged vlan { { vlan-id1
[ to vlan-id2 ] }&<1-10> | all }
The hybrid interface is added to the VLAN where loops need to
be detected.
▪ Trunk interface
1) Run port link-type trunk
The link type of the interface is configured as trunk.
2) Run port trunk allow-pass vlan { { vlan-id1 [ to vlan-
id2 ] }&<1-10> | all }
The trunk interface is added to the VLAN where loops need to
be detected.
c. Run loopback-detect packet vlan { vlan-id1 [ to vlan-id2 ] } &<1-8>
Configure LBDT in a specified VLAN.
By default, LBDT is disabled in a VLAN.
NOTE
– An interface sends tagged LBDT packets only when the specified VLAN has been
created.
– When the PVID of the interface in the loop is the detected VLAN ID or the
interface joins the detected VLAN in untagged mode, VLAN tags of LBDT packets
are removed. As a result, the packet priority changes and the system may fail to
detect loops.
● Configuring the destination MAC address of untagged LBDT packets
Run the loopback-detect untagged mac-address mac-address command to
set the destination MAC address of untagged LBDT packets.
By default, the destination MAC address of untagged LBDT packets is 0180-
C200-000A.
Do not configure the destination MAC address of untagged LBDT packets as
the destination MAC address of other protocols. You are advised to set the
destination MAC address of untagged LBDT packets to a broadcast MAC
address (all Fs).
----End
Context
An LBDT-enabled interface sends LBDT packets at intervals. A shorter interval
indicates that the system sends more LBDT packets in a given period and detects
loops more accurately. However, more system resources are consumed and system
performance is affected. You can adjust the interval for sending LBDT packets
according to actual networking to balance system performance and LBDT
accuracy.
Procedure
Step 1 Run system-view
----End
Context
By default, when a loop on an interface or the network connected to the interface,
the device does not take any action on the interface. In this case, the interface
needs to be shut down to prevent the impact of the loopback on the device and
entire network.
You can preconfigure an action to be taken after LBDT detects a loop. After
detecting a loop, the device takes the preconfigured action on the interface to
prevent the impact of the loop on the device and entire network.
The device provides the following actions after LBDT detects a loop:
● Trap: The device reports a trap to the NMS and records a log, but does not
take any action on the interface.
● Block: The device isolates an interface where a loop occurs from other
interfaces, and can forward only BPDUs.
● No learning: The interface is disabled from learning MAC addresses.
● Shutdown: The device shuts down the interface.
● Quitvlan: The interface is removed from the VLAN where a loop occurs.
For details about the actions, see Action Taken After a Loop Is Detected. You can
configure one of the actions according to actual networking.
Procedure
Step 1 Run system-view
NOTE
● When the Quitvlan action is used, the configuration file remains unchanged.
● The LBDT action and MAC address flapping action affect each other, and cannot be
configured simultaneously.
● The Quitvlan action of LBDT conflicts with dynamic removal from VLANs (for example,
GVRP and HVRP), and cannot be configured simultaneously.
----End
Context
An LBDT-enabled interface periodically sends LBDT packets to detect loops. After a
loop is detected, an action configured by the loopback-detect action command is
taken on the interface. In addition, the system counts the time. After the
configured recovery time expires, the system attempts to restore the problematic
interface. If the device does not receive detection packets from the problematic
interface within the next recovery time, it considers that the loop is eliminated on
the interface and restores 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 recovery-time recovery-time
The interface recovery time after a loop is removed is set.
By default, the interface recovery time is three times the interval for sending LBDT
packets.
NOTE
● It is recommended that the interface recovery time be three times the packet sending
interval at least. If the packet sending interval has been set to a small value, the
interface recovery time should be at least 10 seconds longer than the packet sending
interval.
● Automatic recovery is valid for Trap, Quitvlan, Block, and No learning. After a loop is
eliminated, the shutdown interface cannot be restored automatically. You must run the
shutdown and undo shutdown commands or run the restart command to restore the
interface.
----End
Procedure
● Run the display loopback-detect command to check the LBDT configuration
and status of LBDT-enabled interfaces.
----End
Networking Requirements
As shown in Figure 20-5, aggregation switch SwitchA on an enterprise network
connects to a new access switch SwitchB. To prevent a loopback from occurring
between the Tx and Rx ends of GE0/0/1 due to incorrect fiber connection or high
voltage damage, SwitchA is required to detect loopbacks on GE0/0/1. Furthermore,
it is required that the interface be blocked to reduce the impact of the loopback
on the network when a loopback is detected, and the interface be restored after
the loopback is removed.
GE0/0/1
Tx Rx
GE0/0/1
SwitchB
Configuration Roadmap
To detect loopbacks on downlink interface GE0/0/1 of SwitchA, configure LBDT on
GE0/0/1 of SwitchA. The configuration roadmap is as follows:
1. Enable LBDT on GE0/0/1 of SwitchA to detect loopbacks.
2. Configure an action taken after a loopback is detected and set the recovery
time. After a loopback is detected, the system blocks the interface to reduce
the impact of the loopback on the network. After a loop is eliminated, the
system restores the interface.
Procedure
Step 1 Enable LBDT on an interface.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] loopback-detect enable
[SwitchA-GigabitEthernet0/0/1] quit
Step 2 Configure an action taken after a loopback is detected and set the recovery time.
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] loopback-detect action block
[SwitchA-GigabitEthernet0/0/1] loopback-detect recovery-time 30
[SwitchA-GigabitEthernet0/0/1] quit
----End
Configuration Files
SwitchA configuration file
#
sysname SwitchA
#
interface GigabitEthernet0/0/1
loopback-detect recovery-time 30
loopback-detect enable
loopback-detect action block
#
return
Networking Requirements
As shown in Figure 20-6, a new department of an enterprise connects to
aggregation switch Switch, and this department belongs to VLAN 100. Loops may
occur due to incorrect connections or configurations. As a result, communication
on the Switch and uplink network may be affected.
It is required that the Switch should detect loops on the new network to prevent
the impact of loops on the Switch and connected network.
Figure 20-6 Networking for configuring LBDT to detect loops on the downstream
network
Switch
GE0/0/1
New department
VLAN 100
Configuration Roadmap
The new department network has only VLAN 100, so configure LBDT on the
Switch to detect loops. The configuration roadmap is as follows:
1. Enable LBDT on the GE0/0/1 of the Switch to detect loops in a specified VLAN
so that loops on the downstream network can be detected.
2. Set LBDT parameters so that the Switch can immediately shut down GE0/0/1
after a loop is detected. This prevents the impact of the loop on the Switch
and connected network.
NOTE
Procedure
Step 1 Enable LBDT on the interface.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] loopback-detect enable
[Switch-GigabitEthernet0/0/1] quit
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 100
#
loopback-detect packet-interval 10
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 100
loopback-detect packet vlan 100
loopback-detect enable
#
return
Networking Requirements
As shown in Figure 20-7, a small-scale enterprise uses Layer 2 networking and
belongs to VLAN 100. Because employees often move, the network topology
changes frequently. Loops may occur due to incorrect connections or
configurations during the change. As a result, broadcast storms may occur and
affect communication of the Switch and entire network.
The requirements are as follows: The Switch detects loops. When a loop exists, the
interface is blocked to reduce the impact of the loop on the Switch and network.
When the loop is eliminated, the interface can be restored.
Figure 20-7 Networking for configuring LBDT to detect loops on the local network
Switch
GE0/0/1 GE0/0/2
VLAN 100
Configuration Roadmap
To detect loops on the network where the Switch is deployed, configure LBDT on
GE0/0/1 and GE0/0/2 of the Switch. In this example, untagged LBDT packets sent
by the Switch will be discarded by other switches on the network. As a result, the
packets cannot be sent back to the Switch, and LBDT fails. Therefore, LBDT is
configured in a specified VLAN. The configuration roadmap is as follows:
1. Enable LBDT on an interface and configure the Switch to detect loops in
VLAN 100 to implement LBDT on the network where the Switch is deployed.
2. Configure an action taken after a loop is detected and set the recovery time.
After a loop is detected, the Switch blocks the interface to reduce the impact
of the loop on the network. After a loop is eliminated, the Switch restores the
interface.
NOTE
Procedure
Step 1 Enable LBDT on an interface.
<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] loopback-detect enable
[Switch-GigabitEthernet0/0/1] quit
[Switch] interface gigabitethernet 0/0/2
[Switch-GigabitEthernet0/0/2] loopback-detect enable
[Switch-GigabitEthernet0/0/2] quit
Step 3 Configure an action taken after a loop is detected and set the recovery time.
[Switch] interface gigabitethernet 0/0/1
[Switch-GigabitEthernet0/0/1] loopback-detect action block
[Switch-GigabitEthernet0/0/1] loopback-detect recovery-time 30
[Switch-GigabitEthernet0/0/1] quit
[Switch] interface gigabitethernet 0/0/2
[Switch-GigabitEthernet0/0/2] loopback-detect action block
[Switch-GigabitEthernet0/0/2] loopback-detect recovery-time 30
[Switch-GigabitEthernet0/0/2] quit
----End
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 100
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 100
loopback-detect recovery-time 30
loopback-detect packet vlan 100
loopback-detect enable
loopback-detect action block
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 100
loopback-detect recovery-time 30
loopback-detect packet vlan 100
loopback-detect enable
loopback-detect action block
#
return
Definition
Layer 2 protocol transparent transmission 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 user networks can be located at two sides of ISP networks. In Figure 21-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 21-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.
ISP
PE1 network PE2
CE1 CE2
User A
User A
network1
network2
To transparently transmit Layer 2 protocol packets on the ISP network, ensure that
the following requirements are met:
● All branches of a user network can receive Layer 2 protocol packets from
other branches.
● Layer 2 protocol packets of a user network cannot be processed by the CPU of
devices on the ISP network.
● Layer 2 protocol packets from different user networks must be isolated and
not affect each other.
● Interface-based
● VLAN-based
● QinQ-based
● VPLS-based
ISP Network
BPDU Tunnel
PE1 PE2
In Figure 21-2, each PE interface connects to one user network. These user
networks do not belong to the same LAN. If BPDUs received from user networks
do not carry any VLAN tag, the PE must identify the LAN that the BPDUs come
from. BPDUs of a user network on LAN-A must be sent to other user networks on
LAN-A. In addition, BPDUs must not be processed by devices on the ISP network.
a. Add the interfaces that connect to the same user network to the same
VLAN on the switch of the ISP network. After receiving and identifying
the Layer 2 protocol packet (such as a BPDU of the STP protocol) from
the user network, the switch on the ISP network adds the default VLAN
ID of the interface to the Layer 2 protocol packet. This method applies to
all modes of Layer 2 protocol transparent transmission.
b. 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 based on the mapping between the
specified destination multicast MAC address and the Layer 2 protocol.
c. Internal nodes on the ISP network forward the packet as a common
Layer 2 packet through the ISP network.
d. 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 1 PE 2
ISP Network
BPDU Tunnel
LAN-A LAN-A
MSTP MSTP
The QinQ protocol is a Layer 2 tunneling protocol based on IEEE 802.1Q. QinQ
technology improves VLAN utilization by adding another 802.1Q tag to a packet,
allowing services on a private VLAN to be transparently transmitted to the public
network.
LAN-B LAN-B
MSTP MSTP
PE-VLAN20:CE-VLAN 100~199
ISP Network
PE1 PE2
CE-VLAN 100 BPDU Tunnel CE-VLAN 100
BPDU Tunnel
CE-VLAN 200 CE-VLAN 200
PE-VLAN30:CE-VLAN 200~299
LAN-A LAN-A
MSTP MSTP
In Figure 21-4, PEs add outer VLAN ID 20 to Layer 2 protocol packets of VLAN
100 to VLAN 199, add outer VLAN ID 30 to Layer 2 protocol packets of VLAN 200
to VLAN 299, and forward the packets to other devices on the ISP network. In this
way, Layer 2 protocol packets of different user networks can be transparently
transmitted on the ISP network and carrier VLAN IDs are conserved.
VPLS Network
BPDU Tunnel
PE1 PE2
LAN-A
LAN-A
MSTP
MSTP
You can configure Layer 2 protocol transparent transmission on PEs, so that MSTP
packets are not sent to the CPUs of PEs for processing. This prevents PEs from
participating in spanning tree calculation.
ISP
PE1 network PE2
CE1 CE2
User A
User A
network1
network2
Licensing Requirements
Configuration commands of Layer 2 protocol transparent transmission are
available only after the S1720GW, S1720GWR, and S1720X have the license (WEB
management to full management Electronic RTU License) loaded and activated
and the switches are restarted. Configuration commands of Layer 2 protocol
transparent transmission on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
S5710-C-LI V200R001C00
S5730SI V200R011C10
S5730S-EI V200R011C10
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● When the default CPCAR value is used, the device transparently transmits a
maximum of 10 Layer 2 protocol packets per second. Excess packets are
discarded.
● On the S5700HI, if the VLANIF interface configured based on a PVID is bound
to a VSI, interfaces corresponding to this PVID cannot forward Layer 2
protocol BPDUs.
● In V200R005 and later versions, when PVST+ packets need to be transparently
transmitted, disable VBST on the interface. Otherwise, PVST+ packets cannot
be transparently transmitted.
● Do not replace the destination MAC addresses of SSTP, STP, GVRP, and GMRP
packets with the same multicast MAC address.
● When configuring Layer 2 protocol transparent transmission, do not use any
of 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. By default, on the S2720EI and S2750EI, 0100-0CCC-CCCC and
0100-0CCC-CCCD are not destination MAC addresses of BPDU packets.
– Common multicast MAC addresses that have been used on the device
● To transparently transmit BPDUs such as DLDP and EFM packets on a physical
interface, the L2PT tunnel egress cannot be the Eth-Trunk. Otherwise, BPDU
negotiation may be abnormal.
● When an interface is enabled to transparently transmit the packets of a
certain protocol, these packets do not participate in protocol processing. For
example, after an interface is enabled to transparently transmit STP packets,
the interface does not participate in STP calculation. Therefore, you are
Pre-configuration Tasks
Before configuring interface-based Layer 2 protocol transparent transmission,
complete the following task:
● Set link layer protocol parameters and IP addresses for interfaces to ensure
that the link layer protocol on the interfaces is Up.
● Use the bpdu enable command to enable the interfaces to send BPDUs to
the CPU.
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 Layer 2 protocol characteristics on the PE. Layer 2 protocol
characteristics 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 Layer 2 protocol characteristics, 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 addresses 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 switch
Perform the following operations on PEs.
Procedure
Step 1 Run system-view
----End
Context
You can configure Layer 2 protocol transparent transmission on the device to
replace:
● Default multicast MAC address of Layer 2 protocol packets that can be
identified by PEs with another multicast MAC address. This mode can be used
to transparently transmit Layer 2 protocol packets of only STP, RSTP, and
MSTP.
● Original multicast MAC address of Layer 2 protocol packets with a specified
multicast MAC address. This mode can be used to transparently transmit all
types of Layer 2 protocol packets.
Perform either of the following operations on PEs based on the Layer 2 protocol
type and the required transparent transmission mode.
Procedure
● Replace the default multicast MAC address of Layer 2 protocols that can be
identified by PEs with another multicast MAC address.
a. Run system-view
NOTE
Do not replace the destination MAC addresses of SSTP, STP, GVRP, and GMRP
packets with the same multicast MAC address.
When configuring Layer 2 protocol transparent transmission, 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 addresses of Smart Link packets: 010F-E200-0004
● Special multicast MAC addresses: 0100-0CCC-CCCC and 0100-0CCC-CCCD.
By default, on the S2750EI, 0100-0CCC-CCCC and 0100-0CCC-CCCD are not
destination MAC addresses of BPDU packets.
● Common multicast MAC addresses that have been used on the switch
----End
Context
Perform the following operations on PEs based on the required Layer 2 protocol
transparent transmission 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.
----End
Procedure
● Run the display l2protocol-tunnel group-mac { all | protocol-type | user-
defined-protocol protocol-name } command to check transparent
transmission information of specified or all Layer 2 protocol packets.
----End
Pre-configuration Tasks
Before configuring VLAN-based Layer 2 protocol transparent transmission,
complete the following task:
● Set link layer protocol parameters and IP addresses for interfaces to ensure
that the link layer protocol on the interfaces is Up.
● Use the bpdu enable command to enable the interfaces to send BPDUs to
the CPU.
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 Layer 2 protocol characteristics on the PE. Layer 2 protocol
characteristics 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 Layer 2 protocol characteristics, 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
You can configure Layer 2 protocol transparent transmission on the device to
replace:
● Default multicast MAC address of Layer 2 protocol packets that can be
identified by PEs with another multicast MAC address. This mode can be used
to transparently transmit Layer 2 protocol packets of only STP, RSTP, and
MSTP.
● Original multicast MAC address of Layer 2 protocol packets with a specified
multicast MAC address. This mode can be used to transparently transmit all
types of Layer 2 protocol packets.
Perform either of the following operations on PEs based on the Layer 2 protocol
type and the required transparent transmission mode.
Procedure
● Replace the default multicast MAC address of Layer 2 protocols that can be
identified by PEs with another multicast MAC address.
a. Run system-view
NOTE
Do not replace the destination MAC addresses of SSTP, STP, GVRP, and GMRP
packets with the same multicast MAC address.
When configuring Layer 2 protocol transparent transmission, 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 addresses of Smart Link packets: 010F-E200-0004
● Special multicast MAC addresses: 0100-0CCC-CCCC and 0100-0CCC-CCCD.
By default, on the S2750EI, 0100-0CCC-CCCC and 0100-0CCC-CCCD are not
destination MAC addresses of BPDU packets.
● Common multicast MAC addresses that have been used on the switch
----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
Step 4 Run port hybrid tagged vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }
NOTE
● The range of VLAN IDs specified in this step must include VLAN IDs of Layer 2 protocol
packets from user networks.
● The VLAN for VLAN-based Layer 2 protocol transparent transmission must be the static
VLAN, and cannot be the VLAN dynamically created by GVRP and VCMP.
----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 QinQ-based Layer 2 protocol transparent transmission,
complete the following task:
● Set link layer protocol parameters and IP addresses for interfaces to ensure
that the link layer protocol on the interfaces is Up.
● Use the bpdu enable command to enable the interfaces to send BPDUs to
the CPU.
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 Layer 2 protocol characteristics on the PE. Layer 2 protocol
characteristics 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 Layer 2 protocol characteristics, 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 addresses 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 switch
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 |
----End
Context
You can configure the following Layer 2 protocol transparent transmission modes:
● Configure the device to replace the default multicast MAC address of Layer 2
protocol packets that can be identified by PEs with another multicast MAC
address. This mode can be used to transparently transmit Layer 2 protocol
packets of only STP, RSTP, and MSTP.
● Configure the device to replace the original multicast MAC address of Layer 2
protocol packets with a specified multicast MAC address. This mode can be
used to transparently transmit all types of Layer 2 protocol packets.
Perform either of the following operations on PEs based on the Layer 2 protocol
type and the required transparent transmission mode.
Procedure
● Replace the default multicast MAC address of Layer 2 protocols that can be
identified by PEs with another multicast MAC address.
a. Run system-view
The system view is displayed.
b. Run bpdu-tunnel stp bridge role provider
The PE is configured as a provider.
Only the S1720X, S1720X-E, S6720LI, S6720S-LI, S5730SI, S5730S-EI, S6720SI,
S6720S-SI, S5720SI and S5720S-SI support this configuration.
● Replace the original multicast MAC address of Layer 2 protocol packets from
user networks with a specified multicast MAC address.
a. Run system-view
The system view is displayed.
b. (Optional) Run bpdu mac-address mac-address [ mac-address-mask ]
The specific MAC address is configured as the BPDU MAC address.
NOTE
When configuring Layer 2 protocol transparent transmission, 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 addresses of Smart Link packets: 010F-E200-0004
● Special multicast MAC addresses: 0100-0CCC-CCCC and 0100-0CCC-CCCD. By
default, on the S2750EI, 0100-0CCC-CCCC and 0100-0CCC-CCCD are not
destination MAC addresses of BPDU packets.
● Common multicast MAC addresses that have been used on the switch
----End
Context
Perform the following operations on PEs based on the required Layer 2 protocol
transparent transmission 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 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 untagged vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }
The interface is added to specified VLANs in untagged mode.
Step 5 Run qinq vlan-translation enable
VLAN translation is enabled on the interface.
The interface is configured to add an outer VLAN tag to Layer 2 protocol packets.
NOTE
● The outer VLAN tag (vlan-id3) specified in the port vlan-stacking command must be
included in the VLAN range specified in the port hybrid untagged vlancommand.
----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 VPLS-based Layer 2 protocol transparent transmission, deploy
VPLS-based L2VPN on PEs and the backbone network. For details, see VPLS
Configuration in S1720, S2700, S5700, and S6720 V200R011C10 Configuration
Guide - VPN.
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 Layer 2 protocol characteristics on the PE. Layer 2 protocol
characteristics 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 Layer 2 protocol characteristics, 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 addresses 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 switch
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 |
llc dsap dsap-value ssap ssap-value } ] group-mac { group-mac | default-group-
mac }
Characteristic information about a Layer 2 protocol is defined.
----End
Context
You can configure Layer 2 protocol transparent transmission on the device to
replace:
● Default multicast MAC address of Layer 2 protocol packets that can be
identified by PEs with another multicast MAC address. This mode can be used
to transparently transmit Layer 2 protocol packets of only STP, RSTP, and
MSTP.
● Original multicast MAC address of Layer 2 protocol packets with a specified
multicast MAC address. This mode can be used to transparently transmit all
types of Layer 2 protocol packets.
Perform either of the following operations on PEs based on the Layer 2 protocol
type and the required transparent transmission mode.
Procedure
● Replace the default multicast MAC address of Layer 2 protocols that can be
identified by PEs with another multicast MAC address.
a. Run system-view
The system view is displayed.
NOTE
Do not replace the destination MAC addresses of SSTP, STP, GVRP, and GMRP
packets with the same multicast MAC address.
When configuring Layer 2 protocol transparent transmission, 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 addresses of Smart Link packets: 010F-E200-0004
● Special multicast MAC addresses: 0100-0CCC-CCCC and 0100-0CCC-CCCD.
By default, on the S2750EI, 0100-0CCC-CCCC and 0100-0CCC-CCCD are not
destination MAC addresses of BPDU packets.
● Common multicast MAC addresses that have been used on the switch
----End
Context
Perform the following operations on PEs according to the type of Layer 2 protocol
packets to be transparently transmitted.
Procedure
● Configure Layer 2 protocol transparent transmission when Ethernet interfaces
are connected to the VPLS network.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The Ethernet interface view is displayed.
c. Run undo portswitch
The Ethernet interface is switched from Layer 2 mode to Layer 3 mode.
NOTE
● If the remote PE is configured to receive tagged packets only, run the mpls
l2vpn default vlan command to configure the default VLAN of the main
interface before binding the local Ethernet interface to the VSI.
● If the remote PE is configured to receive double-tagged packets only, run the
mpls l2vpn vlan-stacking stack-vlan command to configure the stacked
VLAN of the main interface before binding the local Ethernet interface to the
VSI.
e. Run l2protocol-tunnel { all | protocol-type | user-defined-protocol
protocol-name } enable
VPLS-based Layer 2 protocol transparent transmission is enabled on the
interface.
● Configure Layer 2 protocol transparent transmission when Ethernet sub-
interfaces are connected to the VPLS network.
a. Run system-view
----End
----End
Networking Requirements
In Figure 21-7, the CEs are edge devices on two private networks (located in
different areas) of an enterprise. The PEs 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 only STP run on the private networks so that
spanning trees can be generated correctly.
GE0/0/1 GE0/0/1
CE1
CE2
User A User A
network1 network2
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Enable STP on CEs.
# Configure CE1.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] vlan 100
[CE1-vlan100] quit
[CE1] stp enable
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type hybrid
[CE1-GigabitEthernet0/0/1] port hybrid pvid vlan 100
[CE1-GigabitEthernet0/0/1] port hybrid untagged vlan 100
[CE1-GigabitEthernet0/0/1] quit
# Configure CE2.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan 100
[CE2-vlan100] quit
[CE2] stp enable
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type hybrid
[CE2-GigabitEthernet0/0/1] port hybrid pvid vlan 100
[CE2-GigabitEthernet0/0/1] port hybrid untagged vlan 100
[CE2-GigabitEthernet0/0/1] quit
Step 2 Add GE0/0/1 on PE1 and PE2 to VLAN 100 and enable Layer 2 protocol
transparent transmission on PEs.
# Configure PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] vlan 100
[PE1-vlan100] quit
[PE1] interface gigabitethernet 0/0/1
[PE1-GigabitEthernet0/0/1] port link-type hybrid
[PE1-GigabitEthernet0/0/1] port hybrid pvid vlan 100
[PE1-GigabitEthernet0/0/1] port hybrid untagged vlan 100
[PE1-GigabitEthernet0/0/1] l2protocol-tunnel stp enable
[PE1-GigabitEthernet0/0/1] quit
[PE1] interface GigabitEthernet 0/0/2
[PE1-GigabitEthernet0/0/2] port link-type trunk
[PE1-GigabitEthernet0/0/2] port trunk allow-pass vlan 100
[PE1-GigabitEthernet0/0/2] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] vlan 100
[PE2-vlan100] quit
[PE2] interface gigabitethernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type hybrid
[PE2-GigabitEthernet0/0/1] port hybrid pvid vlan 100
[PE2-GigabitEthernet0/0/1] port hybrid untagged vlan 100
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-0100-0100
# Configure PE2.
[PE2] l2protocol-tunnel stp group-mac 0100-0100-0100
# After 30s, run the display stp 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. GE0/0/1 on CE1 is the root port and GE0/0/1 on CE2 is the designated port.
[CE1] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 ROOT FORWARDING NONE
[CE2] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 DESI FORWARDING NONE
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 100
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
return
#
sysname CE2
#
vlan batch 100
#
stp instance 0 priority 4096
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
return
● PE1 configuration file
#
sysname PE1
#
vlan batch 100
#
l2protocol-tunnel stp group-mac 0100-0100-0100
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 100
port hybrid untagged vlan 100
l2protocol-tunnel stp enable
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 100
#
return
● PE2 configuration file
#
sysname PE2
#
vlan batch 100
#
l2protocol-tunnel stp group-mac 0100-0100-0100
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid pvid vlan 100
port hybrid untagged vlan 100
l2protocol-tunnel stp enable
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 100
#
return
Networking Requirements
In Figure 21-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 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 only STP run 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 BPDUs 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 transparent transmission on PEs so
that STP BPDUs 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
[CE1] stp enable
# Configure CE2.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] stp enable
# Configure CE3.
<HUAWEI> system-view
[HUAWEI] sysname CE3
[CE3] stp enable
# Configure CE4.
<HUAWEI> system-view
[HUAWEI] sysname CE4
[CE4] stp enable
Step 2 Configure CE1 and CE2 to send STP BPDUs with VLAN tag 100 to PEs, and
configure CE3 and CE4 to send STP BPDUs with VLAN tag 200 to PEs.
# Configure CE1.
[CE1] vlan 100
[CE1-vlan100] quit
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type hybrid
[CE1-GigabitEthernet0/0/1] port hybrid tagged vlan 100
[CE1-GigabitEthernet0/0/1] stp bpdu vlan 100
[CE1-GigabitEthernet0/0/1] quit
# Configure CE2.
[CE2] vlan 100
[CE2-vlan100] quit
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type hybrid
[CE2-GigabitEthernet0/0/1] port hybrid tagged vlan 100
[CE2-GigabitEthernet0/0/1] stp bpdu vlan 100
[CE2-GigabitEthernet0/0/1] quit
# Configure CE3.
[CE3] vlan 200
[CE3-vlan200] quit
[CE3] interface gigabitethernet 0/0/1
[CE3-GigabitEthernet0/0/1] port link-type hybrid
[CE3-GigabitEthernet0/0/1] port hybrid tagged vlan 200
[CE3-GigabitEthernet0/0/1] stp bpdu vlan 200
[CE3-GigabitEthernet0/0/1] quit
# Configure CE4.
[CE4] vlan 200
[CE4-vlan200] quit
[CE4] interface gigabitethernet 0/0/1
[CE4-GigabitEthernet0/0/1] port link-type hybrid
[CE4-GigabitEthernet0/0/1] port hybrid tagged vlan 200
[CE4-GigabitEthernet0/0/1] stp bpdu vlan 200
[CE4-GigabitEthernet0/0/1] quit
Step 3 Configure PE interfaces to transparently transmit STP BPDUs 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 gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] port link-type hybrid
[PE1-GigabitEthernet0/0/2] port hybrid tagged vlan 100
[PE1-GigabitEthernet0/0/2] l2protocol-tunnel stp vlan 100
[PE1-GigabitEthernet0/0/2] quit
[PE1] interface gigabitethernet 0/0/3
[PE1-GigabitEthernet0/0/3] port link-type hybrid
[PE1-GigabitEthernet0/0/3] port hybrid tagged vlan 200
[PE1-GigabitEthernet0/0/3] l2protocol-tunnel stp vlan 200
[PE1-GigabitEthernet0/0/3] quit
[PE1] interface GigabitEthernet 0/0/1
[PE1-GigabitEthernet0/0/1] port link-type trunk
[PE1-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 200
[PE1-GigabitEthernet0/0/1] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] vlan 100
[PE2-vlan100] quit
[PE2] vlan 200
[PE2-vlan200] quit
[PE2] interface gigabitethernet 0/0/2
[PE2-GigabitEthernet0/0/2] port link-type hybrid
[PE2-GigabitEthernet0/0/2] port hybrid tagged vlan 100
[PE2-GigabitEthernet0/0/2] l2protocol-tunnel stp vlan 100
[PE2-GigabitEthernet0/0/2] quit
[PE2] interface gigabitethernet 0/0/3
[PE2-GigabitEthernet0/0/3] port link-type hybrid
[PE2-GigabitEthernet0/0/3] port hybrid tagged vlan 200
[PE2-GigabitEthernet0/0/3] l2protocol-tunnel stp vlan 200
[PE2-GigabitEthernet0/0/3] quit
[PE2] interface GigabitEthernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type trunk
[PE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 200
[PE2-GigabitEthernet0/0/1] quit
Step 4 Configure PEs to replace the destination MAC address of STP BPDUs received from
CEs.
# Configure PE1.
[PE1] l2protocol-tunnel stp group-mac 0100-0100-0100
# Configure PE2.
[PE2] l2protocol-tunnel stp group-mac 0100-0100-0100
Step 5 Configure CE2 and CE4 to the priority of a switching device is 4096.
# Configure CE2.
[CE2] stp priority 4096
# Configure CE4.
[CE4] stp priority 4096
# After 30s, run the display stp command on CE1 and CE2 to view the root in the
MSTP region. You can see that a spanning tree is calculated between CE1 and CE2.
GE0/0/1 on CE1 is the root port and GE0/0/1 on CE2 is the designated port.
[CE1] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 ROOT FORWARDING NONE
# After 30s, run the display stp command on CE3 and CE4 to view the root in the
MSTP region. You can see that a spanning tree is calculated between CE3 and CE4.
GE0/0/1 on CE3 is the root port and GE0/0/1 on CE4 is the designated port.
[CE3] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 ROOT FORWARDING NONE
[CE4] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 DESI FORWARDING NONE
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 100
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 100
stp bpdu vlan 100
#
return
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 200
stp bpdu vlan 200
#
return
● PE1 configuration file
#
sysname PE1
#
vlan batch 100 200
#
l2protocol-tunnel stp group-mac 0100-0100-0100
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100 200
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 100
l2protocol-tunnel stp vlan 100
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 200
l2protocol-tunnel stp vlan 200
#
return
● PE2 configuration file
#
sysname PE2
#
vlan batch 100 200
#
l2protocol-tunnel stp group-mac 0100-0100-0100
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100 200
#
interface GigabitEthernet0/0/2
port link-type hybrid
port hybrid tagged vlan 100
l2protocol-tunnel stp vlan 100
#
interface GigabitEthernet0/0/3
port link-type hybrid
port hybrid tagged vlan 200
l2protocol-tunnel stp vlan 200
#
return
Networking Requirements
In Figure 21-9, 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 only STP run on the private networks so that
spanning trees can be generated correctly.
Because of shortage of public VLAN resources, VLAN IDs on carrier networks must
be saved.
User A User A
VLAN100 VLAN100
GE0/0/1
GE0/0/1
GE0/0/2 GE0/0/2
CE1 CE2
GE0/0/1 ISP GE0/0/1
PE1 PE2
Network
CE3 GE0/0/3 GE0/0/3 CE4
GE0/0/1 GE0/0/1
User B User B
VLAN200 VLAN200
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Enable STP on CEs.
# Configure CE1.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] stp enable
# Configure CE2.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] stp enable
# Configure CE3.
<HUAWEI> system-view
[HUAWEI] sysname CE3
[CE3] stp enable
# Configure CE4.
<HUAWEI> system-view
[HUAWEI] sysname CE4
[CE4] stp enable
Step 2 Configure CE1 and CE2 to send STP BPDUs with VLAN tag 100 to PEs, and
configure CE3 and CE4 to send STP BPDUs with VLAN tag 200 to PEs.
# Configure CE1.
[CE1] vlan 100
[CE1-vlan100] quit
[CE1] interface gigabitethernet 0/0/1
[CE1-GigabitEthernet0/0/1] port link-type hybrid
[CE1-GigabitEthernet0/0/1] port hybrid tagged vlan 100
[CE1-GigabitEthernet0/0/1] stp bpdu vlan 100
[CE1-GigabitEthernet0/0/1] quit
# Configure CE2.
[CE2] vlan 100
[CE2-vlan100] quit
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type hybrid
[CE2-GigabitEthernet0/0/1] port hybrid tagged vlan 100
[CE2-GigabitEthernet0/0/1] stp bpdu vlan 100
[CE2-GigabitEthernet0/0/1] quit
# Configure CE3.
[CE3] vlan 200
[CE3-vlan200] quit
[CE3] interface gigabitethernet 0/0/1
[CE3-GigabitEthernet0/0/1] port link-type hybrid
[CE3-GigabitEthernet0/0/1] port hybrid tagged vlan 200
[CE3-GigabitEthernet0/0/1] stp bpdu vlan 200
[CE3-GigabitEthernet0/0/1] quit
# Configure CE4.
[CE4] vlan 200
[CE4-vlan200] quit
[CE4] interface gigabitethernet 0/0/1
[CE4-GigabitEthernet0/0/1] port link-type hybrid
[CE4-GigabitEthernet0/0/1] port hybrid tagged vlan 200
[CE4-GigabitEthernet0/0/1] stp bpdu vlan 200
[CE4-GigabitEthernet0/0/1] quit
# Configure PE2.
<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] vlan 10
[PE2-vlan10] quit
[PE2] interface gigabitethernet 0/0/2
[PE2-GigabitEthernet0/0/2] port link-type hybrid
[PE2-GigabitEthernet0/0/2] qinq vlan-translation enable
[PE2-GigabitEthernet0/0/2] port hybrid untagged vlan 10
[PE2-GigabitEthernet0/0/2] port vlan-stacking vlan 100 stack-vlan 10
[PE2-GigabitEthernet0/0/2] l2protocol-tunnel stp vlan 10
[PE2-GigabitEthernet0/0/2] quit
[PE2] interface gigabitethernet 0/0/3
[PE2-GigabitEthernet0/0/3] port link-type hybrid
[PE2-GigabitEthernet0/0/3] qinq vlan-translation enable
[PE2-GigabitEthernet0/0/3] port hybrid untagged vlan 10
[PE2-GigabitEthernet0/0/3] port vlan-stacking vlan 200 stack-vlan 10
[PE2-GigabitEthernet0/0/3] l2protocol-tunnel stp vlan 10
[PE2-GigabitEthernet0/0/3] quit
[PE2] interface GigabitEthernet 0/0/1
[PE2-GigabitEthernet0/0/1] port link-type trunk
[PE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[PE2-GigabitEthernet0/0/1] quit
Step 4 Configure PEs to replace the destination MAC address of STP BPDUs received from
CEs.
# Configure PE1.
[PE1] l2protocol-tunnel stp group-mac 0100-0100-0100
# Configure PE2.
[PE2] l2protocol-tunnel stp group-mac 0100-0100-0100
Step 5 Configure CE2 and CE4 to the priority of a switching device is 4096.
# Configure CE2.
[CE2] stp priority 4096
# Configure CE4.
[CE4] stp priority 4096
# After 30s, run the display stp command on CE1 and CE2 to view the root in the
MSTP region. You can see that a spanning tree is calculated between CE1 and CE2.
GE0/0/1 on CE1 is the root port and GE0/0/1 on CE2 is the designated port.
[CE1] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 ROOT FORWARDING NONE
[CE2] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 DESI FORWARDING NONE
# After 30s, run the display stp command on CE3 and CE4 to view the root in the
MSTP region. You can see that a spanning tree is calculated between CE3 and CE4.
GE0/0/1 on CE3 is the root port and GE0/0/1 on CE4 is the designated port.
[CE3] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 ROOT FORWARDING NONE
[CE4] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 DESI FORWARDING NONE
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 100
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 100
stp bpdu vlan 100
#
return
Networking Requirements
In Figure 21-10, CEs are located on two networks of an enterprise, and PE1 and
PE2 are edge devices of the carrier network. The two networks of the enterprise
are Layer 2 networks, and VPLS is used on the carrier network to construct an
L2VPN to implement Layer 2 interconnection. STP is used to prevent loops on the
Layer 2 network, and STP is required to run on enterprise networks to generate
correct spanning trees.
GE0/0/1 GE0/0/2
PE1 PE2
GE0/0/2 GE0/0/1
GE0/0/1 P GE0/0/2
GE0/0/1 GE0/0/1
CE1
CE2
User A User A
network1 network2
- Loopback1 - 1.1.1.1/32
- GigabitEthernet0/0 GigabitEthernet0/0 -
/2 /2.1
- Loopback1 - 3.3.3.3/32
- Loopback1 - 2.2.2.2/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Use VPLS to build an L2VPN between PE1 and PE2.
2. Configure STP on CEs to prevent loops on the Layer 2 network.
3. Create termination sub-interfaces on interfaces of CEs connected to PEs and
bind sub-interfaces to VSIs so that CEs can be connected to the L2VPN.
4. Configure VPLS-based Layer 2 protocol transparent transmission on PEs so
that STP BPDUs are not sent to the CPU of PEs for processing.
NOTE
Procedure
Step 1 Configure a VPLS-based L2VPN between PEs.
1. Configure VLANs that interfaces belong to and IP addresses for VLANIF
interfaces according to Figure 21-10.
# Configure CE1.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] vlan batch 10
# Configure CE2.
<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] vlan batch 10
[CE2] interface gigabitethernet 0/0/1
[CE2-GigabitEthernet0/0/1] port link-type trunk
[CE2-GigabitEthernet0/0/1] port trunk allow-pass vlan 10
[CE2-GigabitEthernet0/0/1] quit
[CE2] interface vlanif 10
[CE2-Vlanif10] ip address 10.1.1.2 24
[CE2-Vlanif10] quit
# Configure PE1. The configurations of PE2 and P device are similar to the
configuration of PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] vlan batch 20
[PE1] interface gigabitethernet 0/0/2
[PE1-GigabitEthernet0/0/2] port link-type hybrid
[PE1-GigabitEthernet0/0/2] port hybrid pvid vlan 20
[PE1-GigabitEthernet0/0/2] port hybrid tagged vlan 20
[PE1-GigabitEthernet0/0/2] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 4.4.4.4 24
[PE1-Vlanif20] quit
# Configure PE2.
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] mpls
[PE2-Vlanif30] mpls ldp
[PE2-Vlanif30] quit
After the configuration is complete, run the display mpls ldp session
command on PE1, P, and PE2. You can see that the peer relationship is set up
between PE1 and P, and between P and PE2. The status of the peer
relationship is Operational. Run the display mpls lsp command to check the
LSP status. The display on PE1 is used as an example.
[PE1] display mpls ldp session
# Configure PE2.
[PE2] mpls ldp remote-peer 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] remote-ip 1.1.1.1
[PE2-mpls-ldp-remote-1.1.1.1] quit
After the configuration is complete, run the display mpls ldp session
command on PE1 or PE2. The command output shows that Status of the peer
relationship between PE1 and PE2 is Operational, indicating that the peer
relationship has been established. The display on PE1 is used as an example.
[PE1] display mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
A '*' before a session means the session is being deleted.
------------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
------------------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 0000:15:29 3717/3717
3.3.3.3:0 Operational DU Passive 0000:00:00 2/2
------------------------------------------------------------------------------
TOTAL: 2 session(s) Found.
5. Enable MPLS L2VPN on the PEs.
# Configure PE1.
[PE1] mpls l2vpn
[PE1-l2vpn] quit
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
6. Configure a VSI on the PEs.
# Configure PE1.
[PE1] vsi a2 static
[PE1-vsi-a2] pwsignal ldp
[PE1-vsi-a2-ldp] vsi-id 2
[PE1-vsi-a2-ldp] peer 3.3.3.3
[PE1-vsi-a2-ldp] quit
[PE1-vsi-a2] quit
# Configure PE2.
[PE2] vsi a2 static
[PE2-vsi-a2] pwsignal ldp
[PE2-vsi-a2-ldp] vsi-id 2
[PE2-vsi-a2-ldp] peer 1.1.1.1
[PE2-vsi-a2-ldp] quit
[PE2-vsi-a2] quit
# Configure CE2.
Step 3 Bind access-side sub-interfaces on PE1 and PE2 to VSIs and enable Layer 2
protocol transparent transmission.
# Configure PE1.
[PE1] vcmp role silent
[PE1] interface gigabitethernet0/0/1
[PE1-GigabitEthernet0/0/1] port link-type hybrid
[PE1-GigabitEthernet0/0/1] quit
[PE1] interface gigabitethernet0/0/1.1
[PE1-GigabitEthernet0/0/1.1] dot1q termination vid 10
[PE1-GigabitEthernet0/0/1.1] l2 binding vsi a2
[PE1-GigabitEthernet0/0/1.1] l2protocol-tunnel stp enable
[PE1-GigabitEthernet0/0/1.1] quit
# Configure PE2.
[PE2] vcmp role silent
[PE2] interface gigabitethernet0/0/2
[PE2-GigabitEthernet0/0/2] port link-type hybrid
[PE2-GigabitEthernet0/0/2] quit
[PE2] interface gigabitethernet0/0/2.1
[PE2-GigabitEthernet0/0/2.1] dot1q termination vid 10
[PE2-GigabitEthernet0/0/2.1] l2 binding vsi a2
[PE2-GigabitEthernet0/0/2.1] l2protocol-tunnel stp enable
[PE2-GigabitEthernet0/0/2.1] quit
Step 4 Configure PEs to replace the destination MAC address of STP BPDUs received from
CEs.
# Configure PE1.
[PE1] l2protocol-tunnel stp group-mac 0100-0100-0100
# Configure PE2.
[PE2] l2protocol-tunnel stp group-mac 0100-0100-0100
# Wait for 30s and run the display stp command on CE1 and CE2 to check the
root in the MST region. A spanning tree is calculated between CE1 and CE2.
GE0/0/1 on CE1 is the root port, and GE0/0/1 on CE2 is the designated port.
[CE1] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 ROOT FORWARDING NONE
----End
Configuration Files
● CE1 configuration file
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
● To transparently transmit tagged BPDUs, run the port default vlan command
on the outbound interface of the BPDUs.
NOTE
The S2700 enables the BPDU function globally rather than on interfaces.
The S3700, S5700, and S6700 need to enable the BPDU function on only interfaces.