Download as pdf or txt
Download as pdf or txt
You are on page 1of 75

CloudEngine 8800, 7800, 6800, and 5800 Series

Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

10 MSTP Configuration

This chapter describes the concepts and configuration procedure of the Multiple
Spanning Tree Protocol (MSTP), and provides configuration examples.

10.1 Overview of MSTP


10.2 Understanding MSTP
10.3 Application Scenarios for MSTP
10.4 Summary of MSTP Configuration Tasks
10.5 Licensing Requirements and Limitations for MSTP
10.6 Default Settings for MSTP
10.7 Configuring Basic MSTP Functions
10.8 Configuring MSTP Multi-Process
10.9 Configuring MSTP Parameters on an Interface
10.10 Configuring MSTP Protection Functions
10.11 Configuring MSTP Interoperation Between Huawei Devices and Non-Huawei
Devices
10.12 Maintaining MSTP
10.13 Configuration Examples for MSTP

10.1 Overview of MSTP


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 rendering the MAC address
table unstable. As a result, the communication quality deteriorates, and the
communication service may even be interrupted. The Spanning Tree Protocol
(STP) is introduced to solve this problem.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 515


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

STP refers to STP defined in IEEE 802.1D, the Rapid Spanning Tree Protocol (RSTP)
defined in IEEE 802.1w, and the Multiple Spanning Tree Protocol (MSTP) defined
in IEEE 802.1s.
MSTP is compatible with RSTP and STP, and RSTP is compatible with STP. STP,
RSTP, and MSTP all prevent broadcast storms and achieve redundancy. Table 10-1
compares STP, RSTP, and MSTP.

Table 10-1 Comparison between STP, RSTP, and MSTP


Spanning Characteristics Usage Scenario
Tree
Protocol

STP ● In an STP region, a loop-free STP or RSTP is used when all


tree is generated. VLANs share one spanning tree.
● Route convergence is slow. In this situation, users or services
do not need to be differentiated.
RSTP ● In an RSTP region, a loop-
free tree is generated.
● RSTP allows fast convergence
of the network topology.

MSTP ● In an MSTP region, multiple MSTP is used when traffic in


loop-free trees are different VLANs is forwarded
generated. through different spanning trees
● MSTP achieves fast that are independent of each
convergence of the network other to implement load
topology. balancing. In this situation, users
or services are distinguished by
● MSTP implements load VLANs.
balancing among VLANs.
Traffic in different VLANs is
transmitted along different
paths.

Purpose
After a spanning tree protocol is configured on an Ethernet switching network, it
calculates the network topology and implements the following functions to
remove network loops:
● Loop cut-off: The potential loops on the network are cut off by blocking
redundant links.
● Link redundancy: If an active path becomes faulty, a redundant link can be
activated to ensure network connectivity.
In addition to the above functions, MSTP also ensures faster convergence than STP
and can load balance among multiple VLANs.

10.2 Understanding MSTP

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 516


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

10.2.1 MSTP Background


RSTP is an enhancement to STP, implementing faster convergence of the network
topology. However, RSTP and STP have a common problem: All VLANs on a LAN
use one spanning tree, and VLAN-based load balancing cannot be performed.
Once a link is blocked, it will no longer transmit traffic, wasting bandwidth and
causing the forwarding of packets from certain VLANs to fail.

Figure 10-1 STP/RSTP defect


S1 S4
VLAN 3 VLAN 2 VLAN 3 VLAN 2

ServerC ServerA
(VLAN 3) VLAN 3 VLAN 2 (VLAN 2)

VLAN 2 VLAN 3
S2 S5

ServerB VLAN 2 VLAN 2 ServerD


(VLAN 2) VLAN 3 VLAN 3 (VLAN 3)
VLAN 3
VLAN 2 VLAN 3

S3 S6
Spanning tree (root bridge: S6)

On the LAN shown in Figure 10-1, STP or RSTP is enabled. The broken line
represents the spanning tree. S6 is the root bridge. The links between S1 and S4
and between S2 and S5 are blocked. VLAN packets are transmitted using the
corresponding links marked with "VLAN 2" or "VLAN 3."
Server A and Server B belong to VLAN 2 but they cannot communicate with each
other because the link between S2 and S5 is blocked and the link between S3 and
S6 denies packets from VLAN 2.
To overcome this issue that is present in STP and RSTP, the IEEE released 802.1s in
2002, defining the Multiple Spanning Tree Protocol (MSTP). In addition to
implementing fast convergence, MSTP also provides multiple paths to load
balance VLAN traffic.
MSTP divides a switching network into multiple regions, known as Multiple
Spanning Tree (MST) regions. Each MST region has multiple spanning trees,
known as Multiple Spanning Tree Instances (MSTIs), that are independent of each
other.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 517


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

NOTE

An instance is a collection of VLANs. Binding multiple VLANs to an instance saves


communication cost and reduces resource usage. The topology of each MSTI is calculated
independently from other MSTIs, and traffic can be balanced among MSTIs. Multiple VLANs
that have the same topology can be mapped to one instance. Whether a port forwards
packets from a VLAN depends on the port status in the MSTI.

Figure 10-2 Multiple spanning trees in an MST region


S1 S4
VLAN 3 VLAN 2 VLAN 3 VLAN 2

ServerC ServerA
(VLAN 3) VLAN 3 VLAN 2 (VLAN 2)

VLAN 2 VLAN 3
S2 S5

ServerB VLAN 2 VLAN 2 ServerD


(VLAN 2) VLAN 3 VLAN 3 (VLAN 3)
VLAN 3
VLAN 2 VLAN 3

S3 S6
Spanning tree (root bridge: S4)
Spanning tree (root bridge: S6)

On the network shown in Figure 10-2, MSTP maps VLANs to MSTIs in the VLAN
mapping table. Each VLAN can be mapped to only one MSTI. This means that
traffic of a VLAN can be transmitted in only one MSTI. An MSTI, however, can
correspond to multiple VLANs.

Two spanning trees are calculated:


● MSTI 1 uses S4 as the root bridge to forward packets of VLAN 2.
● MSTI 2 uses S6 as the root bridge to forward packets of VLAN 3.

In this manner, devices within the same VLAN can communicate with each other;
packets of different VLANs are load balanced along different paths.

10.2.2 Basic Concepts of MSTP

MSTP Network Hierarchy


As shown in Figure 10-3, the MSTP network consists of one or more MST regions,
each of which contains one or more MSTIs. An MSTI is a tree network consisting
of switching devices running STP, RSTP, or MSTP.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 518


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Figure 10-3 MSTP network hierarchy

MSTP Network

MSTI
MSTI1
1
MSTI2 MSTI0 MSTI2 MSTI0
MST Region MST Region

MSTI1

MSTI2 MSTI0
MST Region

MST Region
An MST region contains multiple switching devices and network segments
between these devices. The switching devices in one MST region have the
following characteristics:
● MSTP-enabled
● Same region name
● Same VLAN-MSTI mappings
● Same MSTP revision level
A LAN can comprise several MST regions that are directly or indirectly connected.
Multiple switching devices can be grouped into an MST region by using MSTP
configuration commands.
On the network shown in Figure 10-4, the MST region D0 contains the switching
devices S1, S2, S3, and S4, and has three MSTIs.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 519


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Figure 10-4 MST region

D0
MSTI1
AP1 Master Bridge Root switch: S3
S1
MSTI2
Root switch: S2

S2 S3 MSTI0 (IST)
Root switch: S1

Mapping table:
S4 VLAN 1 MSTI 1
VLAN 2, VLAN 3 MSTI 2
Other VLANs MSTI 0

VLAN Mapping Table


The VLAN mapping table is an attribute of the MST region. It describes mappings
between VLANs and MSTIs.
On the network shown in Figure 10-4, the mappings in the VLAN mapping table
of the MST region D0 are as follows:
● VLAN 1 is mapped to MSTI 1.
● VLAN 2 and VLAN 3 are mapped to MSTI 2.
● Other VLANs are mapped to MSTI 0.

Regional Root
Regional roots are classified into Internal Spanning Tree (IST) and MSTI regional
roots.
In the regions B0, C0, and D0 on the network shown in Figure 10-6, the switching
devices closest to the Common and Internal Spanning Tree (CIST) root are IST
regional roots.
An MST region can contain multiple spanning trees, each called an MSTI. An MSTI
regional root is the root of the MSTI. On the network shown in Figure 10-5, each
MSTI has its own regional root.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 520


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Figure 10-5 MSTI

MST Region
VLAN VLA
N10
10&20&30 &20
VLAN 20&30

30
VLAN VLAN VLAN
10&30 VLAN 10&30
20

VLAN 10

Root

Root

MSTI MSTI MSTI Root


corresponding to corresponding to corresponding to
VLAN 10 VLAN 20 VLAN 30
MSTI links
MSTI links blocked by the protocol

MSTIs are independent of each other. An MSTI can correspond to one or more
VLANs, but a VLAN can be mapped to only one MSTI.

Master Bridge
The master bridge is the IST master, which is the switching device closest to the
CIST root in a region, for example, S1 shown in Figure 10-4.
If an MST region contains the CIST root, the CIST root is the master bridge of the
region.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 521


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

CIST Root

Figure 10-6 MSTP network

A0
CIST Root

D0
Region Root B0

Region Root

C0
Region Root

IST
CST

On the network shown in Figure 10-6, the CIST root is the root bridge of the CIST.
The CIST root is a device in A0.

CST
A Common Spanning Tree (CST) connects all the MST regions on a switching
network.

If each MST region is considered a node, the CST is calculated by STP or RSTP
based on all the nodes.

On the network shown in Figure 10-6, the MST regions are connected to form a
CST.

IST
An IST resides within an MST region and has the MSTI ID of 0. An IST is a segment
of the CIST in an MST region.

On the network shown in Figure 10-6, the switching devices in an MST region are
connected to form an IST.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 522


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

CIST
A CIST, calculated by STP or RSTP, connects all the switching devices on a
switching network.
On the network shown in Figure 10-6, the ISTs and the CST form a complete
spanning tree, the CIST.

SST
A Single Spanning Tree (SST) is formed in either of the following situations:
● A switching device running STP or RSTP belongs to only one spanning tree.
● An MST region has only one switching device.
On the network shown in Figure 10-6, the switching device in B0 forms an SST.

Port Role
In addition to the port types in RSTP (root ports, designated ports, alternate ports,
backup ports, and edge ports), MSTP has two other port types: master ports and
regional edge ports.
The functions of root ports, designated ports, alternate ports, backup ports, and
edge ports have been defined in RSTP. Table 10-2 lists all port roles in MSTP.

NOTE

Except edge ports, all ports participate in MSTP calculation.


A port can play different roles in different spanning tree instances.

Table 10-2 Port roles


Port Description
Role

Root A root port is the non-root bridge port closest to the root bridge.
port Root bridges do not have root ports.
Root ports are responsible for sending data to root bridges.
On the network shown in Figure 10-7, S1 is the root; CP1 is the root
port on S3; BP1 is the root port on S2.

Designat The designated port on a switching device forwards BPDUs to the


ed port downstream switching device.
On the network shown in Figure 10-7, AP2 and AP3 are designated
ports on S1; CP2 is a designated port on S3.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 523


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Port Description
Role

Alternat An alternate port serves the following functions:


e port ● From the perspective of sending BPDUs, an alternate port is
blocked after it receives a BPDU sent by another bridge.
● From the perspective of user traffic, an alternate port provides an
alternate path to the root bridge. This path is different from that
provided by the root port.
On the network shown in Figure 10-7, BP2 is an alternate port.

Backup A backup port serves the following functions:


port ● From the perspective of sending BPDUs, a backup port is blocked
after it receives a BPDU sent by itself.
● From the perspective of user traffic, a backup port provides a
backup/redundant path to a segment to which a designated port
is already connected.
On the network shown in Figure 10-7, CP3 is a backup port.

Master A master port provides the shortest path from an MST region to the
port CIST root.
BPDUs of an MST region are sent to the CIST root through the
master port.
Master ports are special regional edge ports, functioning as root
ports on ISTs or CISTs and functioning as master ports in MSTIs.
On the network shown in Figure 10-8, S1, S2, S3, and S4 form an
MST region. AP1 on S1, being the nearest port in the region to the
CIST root, is the master port.

Regional A regional edge port is located at the edge of an MST region and
edge connects to another MST region or an SST.
port During MSTP calculation, the roles of a regional edge port in the
MSTI and the CIST instance are the same. As such, if the regional
edge port is the master port in the CIST instance, it is the master
port in all the MSTIs in the region.
On the network shown in Figure 10-8, AP1, DP1, and DP2 in an MST
region are directly connected to other regions, and therefore they are
all regional edge ports of the MST region.
AP1 is a master port in the CIST. Therefore, AP1 is the master port in
every MSTI in the MST region.

Edge An edge port is located at the edge of an MST region and does not
port connect to any switching device.
Generally, edge ports are directly connected to terminals.
After MSTP is enabled on a port, edge port detection is started
automatically. If the port fails to receive BPDU packets within (2 x
Hello Timer + 1) seconds, the port is set to an edge port. Otherwise,
the port is set to a non-edge port.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 524


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Figure 10-7 Root port, designated port, alternate port, and backup port
S1
Root
AP2 AP3

CP1 BP1
S3 S2

CP2 CP3 BP2

Root port
Designated port
Alternate port
Backup port

Figure 10-8 Master port and regional edge port


Connection to the
CIST root

AP1
Master

S1

S2 S3

S4

DP1 DP2 MST Region

Blocked

MSTP Port States


Table 10-3 lists the MSTP port states, which are the same as the RSTP port states.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 525


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Table 10-3 Port states

Port Description
State

Forwardi A port in the Forwarding state can send and receive BPDUs as well
ng as forward user traffic.

Learning A port in the Learning state learns MAC addresses from user traffic
to build a MAC address table.
In the Learning state, the port can send and receive BPDUs, but not
forward user traffic.

Discardi A port in the Discarding state can only receive BPDUs.


ng

There is no direct link between the port state and the port role. Table 10-4 lists
the supported port states for each port role.

Table 10-4 Supported port states for each port role

Port Root Port/ Designated Regional Alternate Backup


State Master Port Edge Port Port Port
Port

Forwar Supported Supported Supported Not Not


ding supported supported

Learnin Supported Supported Supported Not Not


g supported supported

Discardi Supported Supported Supported Supported Supported


ng

10.2.3 MST BPDUs


MSTP calculates spanning trees using Multiple Spanning Tree Bridge Protocol Data
Units (MST BPDUs). MST BPDUs are transmitted to calculate spanning tree
topologies, maintain network topologies, and convey topology changes.

Table 10-5 shows differences in the protocol version and type between TCN
BPDUs, configuration BPDUs (defined by STP), RST BPDUs (defined by RSTP), and
MST BPDUs (defined by MSTP).

Table 10-5 Differences between BPDUs

Protocol Version Type Name

0 0x00 Configuration BPDU

0 0x80 TCN BPDU

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 526


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Protocol Version Type Name

2 0x02 RST BPDU

3 0x02 MST BPDU

MST BPDU Format


Figure 10-9 shows the MST BPDU format.

Figure 10-9 MST BPDU format


Octet
Protocol Identifier 1-2
Protocol Version Identifier 3
BPDU Type 4
CIST Flags 5
CIST Root Identifier 6-13
CIST External Path Cost 14-17
CIST Regional Root Identifier 18-25
CIST Port Identifier 26-27
Message Age 28-29
Max Age 30-31
Hello Time 32-33
Forward Delay 34-35
Version 1 Length=0 36
Version 3 Length 37-38
MST Configuration Identifier 39-89
MST 90-93
CIST Internal Root Path Cost
special
CIST Bridge Identifier 94-101
fields
CIST Remaining Hops 102
MSTI Configuration Messages 103-39+Version
(may be absent) 3 Length

The first 36 bytes of an intra-region or inter-region MST BPDU are the same as
those of an RST BPDU.
Fields from the 37th byte of an MST BPDU are MSTP-specific. The field MSTI
Configuration Messages consists of configuration messages of multiple MSTIs.
Table 10-6 lists the major information carried in an MST BPDU.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 527


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Table 10-6 Major information carried in an MST BPDU


Field Bytes Description

Protocol 2 Indicates the protocol identifier.


Identifier

Protocol 1 Indicates the protocol version identifier. 0


Version indicates STP; 2 indicates RSTP; 3 indicates
Identifier MSTP.

BPDU Type 1 Indicates the BPDU type:


● 0x00: Configuration BPDU for STP
● 0x80: TCN BPDU for STP
● 0x02: RST BPDU or MST BPDU

CIST Flags 1 Indicates the CIST flags.

CIST Root 8 Indicates the CIST root switching device ID.


Identifier

CIST External 4 Indicates the total path cost from the MST
Path Cost region where the switching device resides to the
MST region where the CIST root switching device
resides. This value is calculated based on link
bandwidth.

CIST 8 Indicates the ID of the regional root switching


Regional device on the CIST, that is, the IST master ID. If
Root the root is in this region, the CIST Regional Root
Identifier Identifier is the same as the CIST Root Identifier.

CIST Port 2 Indicates the ID of the designated port in the


Identifier IST.

Message Age 2 Indicates the lifecycle of the BPDU.

Max Age 2 Indicates the maximum lifecycle of the BPDU. If


the Max Age timer expires, it is considered that
the link to the root fails.

Hello Time 2 Indicates the Hello timer value. The default


value is 2 seconds.

Forward 2 Indicates the forwarding delay timer. The default


Delay value is 15 seconds.

Version 1 1 Indicates the BPDUv1 length, which has a fixed


Length value of 0.

Version 3 2 Indicates the BPDUv3 length.


Length

MST 51 Indicates the MST configuration identifier, which


Configuratio has four fields.
n Identifier

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 528


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Field Bytes Description

CIST Internal 4 Indicates the total path cost from the local port
Root Path to the IST master. This value is calculated based
Cost on link bandwidth.

CIST Bridge 8 Indicates the ID of the designated switching


Identifier device on the CIST.

CIST 1 Indicates the remaining hops of the BPDU in the


Remaining CIST.
Hops

MSTI 16 Indicates an MSTI configuration message. Each


Configuratio MSTI configuration message occupies 16 bytes.
n Messages If there are n MSTIs, MSTI configuration
(may be messages occupy n x 16 bytes.
absent)

Configurable MST BPDU Formats


Currently, devices of most vendors support two MST BPDU formats:
● dot1s: BPDU format defined in IEEE 802.1s.
● legacy: private BPDU format.
There is a possible issue if a port transmits either dot1s or legacy BPDUs by
default. That is, the user needs to identify the format of BPDUs sent by the peer,
and then run a command to configure the port to support the peer BPDU format.
If the configuration is incorrect, a loop will likely occur due to incorrect MSTP
calculation.
On Huawei network devices, this issue can be overcome by using the stp
compliance command. This command configures a port to automatically adjust
the MST BPDU format. With this function, the port automatically adopts the peer
BPDU format. The following MST BPDU formats are supported by Huawei network
devices:
● auto
● dot1s
● legacy
In addition to dot1s and legacy formats, the auto mode allows a port to
automatically change to the BPDU format used by the peer based on BPDUs
received from the peer. In this manner, the two ports use the same BPDU format.
In auto mode, a port uses the dot1s BPDU format by default, and changes format
according to the peer after receiving BPDUs from the peer.

Configurable Maximum Number of BPDUs Sent by a Port at a Hello Interval


BPDUs are sent at Hello intervals to maintain the spanning tree. If a switching
device does not receive any BPDU during a certain period of time, the spanning
tree will be re-calculated.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 529


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

After a switching device becomes the root, it sends BPDUs at Hello intervals. Non-
root switching devices adopt the Hello Time value set for the root.

Huawei network devices allow the maximum number of BPDUs sent by a port at a
Hello interval to be configured as needed.

The greater the Hello Time value, the more BPDUs sent at a Hello interval. Setting
the Hello Time to a proper value limits the number of BPDUs sent by a port at a
Hello interval. This helps prevent network topology flapping and avoid excessive
use of bandwidth resources by BPDUs.

10.2.4 MSTP Topology Calculation

MSTP Principle
MSTP can divide the entire Layer 2 network into multiple MST regions and
calculate the CST. In an MST region, multiple spanning trees are calculated, each
of which is called an MSTI. Of these MSTIs, MSTI 0 is also known as the internal
spanning tree (IST). Like STP, MSTP uses configuration messages to calculate
spanning trees, but the configuration messages are MSTP-specific.

Vectors
Both MSTIs and the CIST are calculated based on vectors, which are carried in
MST BPDUs. Therefore, switching devices exchange MST BPDUs to calculate MSTIs
and the CIST.

● Vectors are described as follows:


– The following vectors participate in the CIST calculation:
{ root ID, external root path cost, regional root ID, internal root path cost,
designated switching device ID, designated port ID, receiving port ID }
– The following vectors participate in the MSTI calculation:
{ regional root ID, internal root path cost, designated switching device ID,
designated port ID, receiving port ID }
The vectors in braces are in descending order of priority, from left to right.
Table 10-7 describes the vectors.

Table 10-7 Vector description

Vector Name Description

Root ID Identifies the root switching device for the CIST. The root
ID consists of the priority value (16 bits) and MAC
address (48 bits).
The priority value is the priority of MSTI 0.

External root Indicates the path cost from a CIST regional root to the
path cost root. ERPCs saved on all switching devices in an MST
(ERPC) region are the same. If the CIST root is in an MST region,
ERPCs saved on all switching devices in the MST region
are 0s.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 530


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Vector Name Description

Regional root Identifies the MSTI regional root. The regional root ID
ID consists of the priority value (16 bits) and MAC address
(48 bits).
The priority value is the priority of MSTI 0.

Internal root Indicates the path cost from the local bridge to the
path cost regional root. The IRPC saved on a regional edge port is
(IRPC) greater than the IRPC saved on a non-regional edge port.

Designated Identifies the nearest upstream bridge on the path from


switching the local bridge to the regional root. If the local bridge is
device ID the root or the regional root, this ID is the local bridge ID.

Designated Identifies the port on the designated switching device


port ID connected to the root port on the local bridge. The 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 port ID
ID consists of the priority value (4 bits) and port number (12
bits). The priority value must be a multiple of 16.

● The vector s are compared as follows:


For a vector, the smaller the priority value, the higher the priority.
If the priority of a vector carried in the configuration message of a BPDU
received by a port is higher than that in the configuration message saved on
the port, the port replaces the saved configuration message with the received
one. In addition, the port updates the global configuration message saved on
the device.
If the priority of a vector carried in the configuration message of a BPDU
received on a port is lower than that in the configuration message saved on
the port, the port discards the BPDU.
If the priority of a vector carried in the configuration message of a BPDU
received on a port is equal to that in the configuration message saved on the
port, the next vector is compared until one is found to be higher or lower. If
they are all equal, the port discards the BPDU.
Vectors are compared in the following order: root IDs, ERPCs, regional root
IDs, IRPCs, designated switching device IDs, designated port IDs, receiving port
IDs.

CIST Calculation
After completing the configuration message comparison, the switching device with
the highest priority on the entire network is selected as the CIST root. MSTP
calculates an IST for each MST region, and calculates a CST to interconnect MST
regions. On the CST, each MST region is considered a switching device. The CST
and ISTs constitute a CIST for the entire network.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 531


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

MSTI Calculation
In an MST region, MSTP calculates an MSTI for each VLAN based on mappings
between VLANs and MSTIs. Each MSTI is calculated independently. The calculation
process is similar to the process in which STP calculates a spanning tree. For
details, see 9.2.4 STP Topology Calculation.
MSTIs have the following characteristics:
● The spanning tree is calculated independently for each MSTI, and spanning
trees of MSTIs are independent of each other.
● Spanning trees of MSTIs can have different roots and topologies.
● Each MSTI sends BPDUs in its spanning tree.
● The topology of each MSTI is configured by commands.
● A port can be configured with different parameters for different MSTIs.
● A port can play different roles or have different states in different MSTIs.
On an MSTP-aware network, a VLAN packet is forwarded along the following
paths:
● Along an MSTI (in an MST region)
● Along a CST (between MST regions)

MSTP Response to Topology Changes


MSTP topology changes are processed in the manner similar to that in RSTP. For
details about how RSTP processes topology changes, see 9.2.6 Technical Details
of RSTP.

10.2.5 MSTP Fast Convergence


MSTP supports both ordinary and enhanced Proposal/Agreement (P/A)
mechanisms:
● Ordinary P/A
The ordinary P/A mechanism supported by MSTP is implemented in the same
manner as that supported by RSTP. For details about the P/A mechanism
supported by RSTP, see 9.2.6 Technical Details of RSTP.
● Enhanced P/A

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 532


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Figure 10-10 Enhanced P/A mechanism


Upstream Downstream
device device

Sends a proposal so
that the port can
rapidly enter the
Forwarding state The root port blocks all
the other non-edge ports
Sends an agreement
The root port enters
The designated Sends an agreement the Forwarding state
port enters the
Forwarding state
Root port
Designated port

As shown in Figure 10-10, in MSTP, the P/A mechanism works as follows:


a. The upstream device sends a proposal to the downstream device,
indicating that the port connecting to the downstream device wants to
enter the Forwarding state as soon as possible. After receiving this BPDU,
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 sends an agreement. After receiving this BPDU, the
root port enters the Forwarding state.
c. The downstream device replies with an agreement. After receiving this
BPDU, the upstream device sets the port connected to the downstream
device as a designated port, and the designated port transitions to the
Forwarding state.

By default, Huawei network devices use the fast transition mechanism in


enhanced mode. To enable a Huawei network device to communicate with a
third-party device that uses the fast transition mechanism in common mode,
configure the Proposal/Agreement mechanism on the Huawei network device so
that it works in common mode.

10.2.6 MSTP Multi-Process

Background
The following describes the network shown in Figure 10-11:

● UPEs are deployed at the aggregation layer and are running MSTP.
● UPE1 and UPE2 are connected by a Layer 2 link.
● Multiple rings are connected to UPE1 and UPE2 through different ports.
● Switching devices on the rings reside at the access layer and are running STP
or RSTP. In addition, UPE1 and UPE2 work for different carriers, so they need

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 533


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

to reside on different spanning trees whose topology changes do not affect


each other.

Figure 10-11 Application with both MSTP and STP/RSTP

MPLS/IP Core

Core
UPE4 UPE3

Aggregation
MSTP

UPE1 UPE2

STP/RSTP

S1
Access

S4

S2 S3

On the network shown in Figure 10-11, switching devices and UPEs construct
multiple Layer 2 rings. STP must be enabled on these rings to prevent loops. UPE1
and UPE2 are connected to multiple access rings that are independent of each
other. The spanning tree protocol cannot calculate a single spanning tree for all
switching devices. Instead, the spanning tree protocol must be enabled on each
ring to calculate a separate spanning tree.

MSTP supports MSTIs, but these MSTIs must belong to one MST region in which
devices must have the same configurations. If the devices belong to different
regions, MSTP calculates the spanning tree based on only one instance. Assume
that devices on the network belong to different regions, and only one spanning
tree is calculated in one instance. In this case, the status change of any device on
the network affects the stability of the entire network. On the network shown in
Figure 10-11, the switching devices connected to UPEs support only STP or RSTP
but not MSTP. When MSTP-enabled UPEs receive RST BPDUs from the switching
devices, the UPEs consider that they and switching devices belong to different
regions. As a result, only one spanning tree is calculated for the rings composed of
UPEs and switching devices, and the rings affect each other.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 534


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

To prevent this problem, MSTP multi-process is introduced. MSTP multi-process is


an enhancement to MSTP, allowing ports on switching devices to be bound to
different processes. MSTP calculation is performed based on processes. In this
manner, only ports that are bound to a process participate in the MSTP calculation
for this process. With MSTP multi-process, spanning trees of different processes
are calculated independently and do not affect each other. The network shown in
Figure 10-11 can be divided into multiple MSTP processes by using MSTP multi-
process. Each process controls a ring composed of switching devices. The MSTP
processes have the same functions and support MSTIs. The MSTP calculation for
one process does not affect the MSTP calculation for another process.

NOTE

In addition to applying to MSTP, MSTP multi-process also applies to RSTP and STP.

Purpose
On the network shown in Figure 10-11, MSTP multi-process is configured to
implement the following:
● Allows STP to work under far more networking conditions.
To help a network running different spanning tree protocols run properly, you
can bind different spanning tree protocols to different processes. In this
manner, every process calculates a separate spanning tree.
● Improves the networking reliability. For a network composed of many Layer 2
access devices, using MSTP multi-process reduces the adverse effect of a
single node failure on the entire network.
The topology is calculated for each process. If a device fails, only the topology
corresponding to the process to which the device belongs changes.
● Reduces the network administrator workload during network expansion,
facilitating operations and maintenance (O&M).
To expand a network, all you need to do is configure new processes, connect
the processes to the existing network, and keep the existing MSTP processes
unchanged. If device expansion is performed in a process, only this process
needs to be modified.
● Implements separate Layer 2 port management
An MSTP process manages parts of ports on a device. Layer 2 ports on a
device are separately managed by multiple MSTP processes.

Implementation
● Public link status
On the network shown in Figure 10-11, the public link between UPE1 and
UPE2 is a Layer 2 link running MSTP and is different from the links
connecting switching devices to UPEs. This difference lies in the fact that ports
on the links connecting switching devices to UPEs only participate in the
calculation for a single access ring and a single MSTP process. The ports on
the public link, on the other hand, need to participate in the calculation for
multiple access rings and MSTP processes. Therefore, the UPEs must identify
the process from which MST BPDUs are sent.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 535


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

A port on the public link participates in the calculation for multiple MSTP
processes, and obtains different states. As a result, the port cannot determine
its state.
To prevent these problems from occurring, it is defined that a port on a public
link always adopts its state in MSTP process 0 when participating in the
calculation for multiple MSTP processes.
NOTE

After a device starts, MSTP process 0 exists by default, and MSTP configurations in the
system view and interface view belong to this process.
The device is incompatible with non-standard STP, RSTP, and MSTP, for example, PVST
+. It transparently forwards PVST+ packets in a VLAN as common data packets.
● Reliability
On the network shown in Figure 10-12, after the topology of a ring changes,
the MSTP multi-process mechanism helps UPEs flood a topology change (TC)
packet to all devices on the ring and prevent the TC packet from being
flooded to devices on the other ring. UPE1 and UPE2 update MAC address
and ARP entries on the ports corresponding to the changed spanning tree.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 536


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Figure 10-12 MSTP multi-process topology change

MPLS/IP Core

Core
UPE4 UPE3

Aggregation
MSTP

UPE1 UPE2

STP/RSTP

Access
S1 S4

S2 S3

Topology change

Flood for STP/RSTP TC in access layer


Flood for STP/RSTP TC in aggregation layer

On the network shown in Figure 10-13, if the public link between UPE1 and
UPE2 fails, multiple switching devices that are connected to the UPEs will
unblock their blocked ports.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 537


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Figure 10-13 Public link fault

MPLS/IP Core

Core
UPE4 UPE3

Aggregation
MSTP

UPE1 UPE2

STP/RSTP

S1

Access
S4

S2 S3

Assume that UPE1 is configured with the highest priority, UPE2 with the
second highest priority, and switching devices with default or lower priorities.
After the link between UPE1 and UPE2 fails, the blocked ports on switching
devices no longer receive packets of higher priorities. For this reason, these
ports re-perform state machine calculation. If the calculation changes the
blocked ports to designated ports, a permanent loop occurs, as shown in
Figure 10-14.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 538


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Figure 10-14 Loop between access rings

MPLS/IP Core

Core
UPE4 UPE3

Aggregation
MSTP

UPE1 UPE2

STP/RSTP

Access
S1 S4

S2 S3

Topology change

Flood for STP/RSTP TC in access layer


Flood for STP/RSTP TC in aggregation layer

● Solutions
To prevent a loop between access rings, use either of the following solutions:
– Configure an Eth-Trunk between UPE1 and UPE2.
An Eth-Trunk is used as the public link between UPE1 and UPE2 to
improve link reliability, as shown in Figure 10-15.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 539


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Figure 10-15 Eth-Trunk

MPLS/IP Core

Core
UPE4 UPE3

Aggregation
MSTP

UPE1 UPE2
Eth-Trunk

STP/RSTP

S1

Access
S4

S2 S3

– Configure root protection between UPE1 and UPE2.


If all physical links between UPE1 and UPE2 fail, configuring an Eth-Trunk
cannot prevent the loop. In this case, root protection can be configured to
prevent the loop shown in Figure 10-14.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 540


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Figure 10-16 MSTP multi-process with root protection

MPLS/IP Core

Core
UPE4 UPE3

Aggregation
MSTP

UPE1 UPE2

Root
protection

S1

Access
S4
STP/RSTP

S2 S3

On the light blue ring shown in Figure 10-16, UPE1 is configured with
the highest priority, UPE2 with the second highest priority, and switching
devices with default or lower priorities. In addition, root protection is
enabled on UPE2.
Assume that a port on S1 is blocked. When the public link between UPE1
and UPE2 fails, the blocked port on S1 begins to calculate the state
machine because it no longer receives BPDUs of higher priorities. After
the calculation, the blocked port becomes the designated port and
performs P/A negotiation with the downstream device.
After S1, which is directly connected to UPE2, sends BPDUs of higher
priorities to the UPE2 port enabled with root protection, the port is
blocked. From then on, the port remains blocked because it continues
receiving BPDUs of higher priorities. In this manner, no loop will occur.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 541


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

10.3 Application Scenarios for MSTP


Application of MSTP

Figure 10-17 Networking diagram for a typical MSTP application

MST Region
S1 S2
All VLANs

VLANs VLANs VLANs VLANs


10 & 20 10 & 20 20 & 30 20 & 30

VLANs
S3 20 & 40 S4

MSTP allows packets in different VLANs to be forwarded by using different


spanning tree instances, as shown in Figure 10-17. The configurations are as
follows:

● All devices on the network belong to the same MST region.


● VLAN 10 packets are forwarded within MSTI 1; VLAN 30 packets are
forwarded within MSTI 3; VLAN 40 packets are forwarded within MSTI 4;
VLAN 20 packets are forwarded within MSTI 0.

In Figure 10-17, S1 and S2 are devices at the aggregation layer; S3 and S4 are
devices at the access layer. Traffic from VLAN 10 and VLAN 30 is terminated by
aggregation devices, and traffic from VLAN 40 is terminated by access devices.
Therefore, S1 and S2 can be configured as the roots of MSTI 1 and MSTI 3, and S3
can be configured as the root of MSTI 4.

Application of MSTP Multi-process


On the network shown in Figure 10-18, the UPEs are connected to each other
through Layer 2 links and enabled with MSTP. The rings connected to the UPEs
must be independent of each other. The devices on the rings connected to the
UPEs support only RSTP, not MSTP.

After MSTP multi-process is enabled, each MSTP process corresponds to a ring


connected to the UPE. The spanning tree protocol on each ring calculates a tree
independently.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 542


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Figure 10-18 Application with both MSTP and STP/RSTP

Core
MPLS/IP Core

UPE4 UPE3

Aggregation
MSTP

UPE1 UPE2

STP/RSTP

S1 S4

Access

S2 S3

10.4 Summary of MSTP Configuration Tasks


Table 10-8 lists the MSTP configuration tasks.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 543


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Table 10-8 MSTP configuration tasks

Item Description Task

Configuring Basic MSTP MSTP is configured on 10.7 Configuring Basic


Functions switching devices to trim MSTP Functions
a ring network to a loop-
free network. Devices
start spanning tree
calculation after the
working mode is set and
MSTP is enabled. Use
any of the following
methods if you need to
intervene in the
spanning tree
calculation:
● Manually configure
the root bridge and
secondary root bridge.
● Set a priority for a
switching device in an
MSTI.
● Set the path cost for a
port in an MSTI.
● Set a priority for a
port in an MSTI.

Configuring MSTP Multi- On a network deployed 10.8 Configuring MSTP


Process with Layer 2 single- Multi-Process
access rings and multi-
access rings, configure
multiple MSTP processes
so that spanning trees of
different processes are
calculated independently
and do not affect each
other.

Configuring MSTP Proper MSTP parameter 10.9 Configuring MSTP


Parameters on an settings achieve rapid Parameters on an
Interface convergence. Interface

Configuring MSTP One or more MSTP 10.10 Configuring


Protection Functions protection functions can MSTP Protection
be configured. Functions

Configuring MSTP To communicate with a 10.11 Configuring


Interoperation Between non-Huawei device, set MSTP Interoperation
Huawei Devices and proper parameters on Between Huawei
Non-Huawei Devices the MSTP-enabled Devices and Non-
Huawei device. Huawei Devices

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 544


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

10.5 Licensing Requirements and Limitations for MSTP

Involved Network Elements


Other network elements are not required.

Licensing Requirements
MSTP is a basic function of the switch, and as such is controlled by the license for
basic software functions. The license for basic software functions has been loaded
and activated before delivery. You do not need to manually activate it.

Version Requirements

Table 10-9 Products and minimum version supporting MSTP

Product Minimum Version Required

CE9860EI V200R020C00

CE8860EI V100R006C00

CE8861EI/CE8868EI V200R005C10

CE8850-32CQ-EI V200R002C50

CE8850-64CQ-EI V200R005C00

CE7850EI V100R003C00

CE7855EI V200R001C00

CE6810EI V100R003C00

CE6810-48S4Q-LI/CE6810-48S- V100R003C10
LI

CE6810-32T16S4Q-LI/ V100R005C10
CE6810-24S2Q-LI

CE6850EI V100R001C00

CE6850-48S6Q-HI V100R005C00

CE6850-48T6Q-HI/CE6850U-HI/ V100R005C10
CE6851HI

CE6855HI V200R001C00

CE6856HI V200R002C50

CE6857EI V200R005C10

CE6860EI V200R002C50

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 545


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Product Minimum Version Required

CE6865EI V200R005C00

CE6870-24S6CQ-EI V200R001C00

CE6870-48S6CQ-EI V200R001C00

CE6870-48T6CQ-EI V200R002C50

CE6875-48S4CQ-EI V200R003C00

CE6880EI V200R002C50

CE6881, CE6820, CE6863 V200R005C20

CE6881K V200R019C10

CE6881E V200R019C10

CE6863K V200R019C10

CE5810EI V100R002C00

CE5850EI V100R001C00

CE5850HI V100R003C00

CE5855EI V100R005C10

CE5880EI V200R005C10

CE5881 V200R020C00

NOTE

For details about the mapping between software versions and switch models, see the
Hardware Query Tool.

Feature Limitations
● On networks that run STP, RSTP, MSTP, or VLAN-based Spanning Tree (VBST),
configure an optimal core switch as the root bridge to ensure stability of the
STP Layer 2 network. Otherwise, new access devices may trigger an STP root
bridge change, causing short service interruptions.
● When MSTP is enabled on a ring network, MSTP immediately starts spanning
tree calculation. Parameters such as the device priority and port priority affect
spanning tree calculation, and changing these parameters may cause network
flapping. To ensure fast and stable spanning tree calculation, perform basic
configurations on the switch and interfaces before enabling MSTP.
● When MSTP multi-instance is configured, more MSTIs indicate longer MSTP
BPDUs. MSTP BPDUs are sent independently in each MSTP process. When
MSTP multi-process is configured, the number of outgoing MSTP BPDUs
increases. When MSTP multi-instance and multi-process are configured, the
default CPCAR of STP cannot meet requirements. You need to increase the

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 546


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

default CPCAR of STP. If the default CPCAR of STP is not increased, MSTP
BPDUs may be discarded.
● BPDU protection takes effect for only the manually configured edge ports.
● Loop protection and root protection cannot be configured on the same
interface together.
● In versions earlier than V200R001C00, STP cannot be configured on a user-
side interface of a VXLAN tunnel. Starting from V200R001C00, STP can be
configured on a user-side interface of a VXLAN tunnel that accesses the
VXLAN as a VLAN. In V200R002C50 and later versions, STP can be configured
on a user-side interface of a VXLAN tunnel when the device is deployed to
provide VXLAN access through a Layer 2 sub-interface or to provide VLAN
access.
● For CE6870EI, In V200R001C00, the bpdu bridge enable command is not
supported on the VXLAN network. To enable BPDU packets to traverse the
VXLAN network, run the undo mac-address bpdu [ mac-address [ mac-
address-mask ] ] command in the system view. In this command, mac-address
specifies the MAC address of BPDU packets that need to traverse the VXLAN
network.
For CE switches excluding CE5880EI, CE6875EI, CE6880EI, CE6870EI in versions
earlier than V200R001C00, if the bpdu bridge enable command is configured
on an access-side port on the VXLAN network connected to an STP network,
BPDU packets cannot traverse the VXLAN network. This causes loops on the
STP network. In V200R001C00 and later versions, the bpdu bridge enable
command is not supported on the VXLAN network. If this command is
configured in a version earlier than V200R001C00, it will be deleted from the
device configurations after an upgrade to V200R001C00 or a later version. To
enable BPDU packets to traverse the VXLAN network, run the undo mac-
address bpdu [ mac-address [ mac-address-mask ] ] command in the system
view. In this command, mac-address specifies the MAC address of BPDU
packets that need to traverse the VXLAN network.

10.6 Default Settings for MSTP


Parameter Default Setting

Working mode MSTP

MSTP status MSTP is enabled globally and on an interface.

Switching device priority 32768

Port priority 128

Algorithm used to calculate dot1t (IEEE 802.1t)


the path cost

Forward Delay Time 1500 centiseconds

Hello Time 200 centiseconds

Max Age Time 2000 centiseconds

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 547


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

10.7 Configuring Basic MSTP Functions


Context
MSTP divides a switching network into multiple regions, each of which has
multiple spanning trees that are independent of each other. MSTP isolates traffic
from different VLANs and load-balances VLAN traffic.

MSTP is configured on switching devices to trim a ring network into a loop-free


network. Devices start spanning tree calculation after the working mode is set and
MSTP is enabled. Use any of the following methods if you need to intervene in the
spanning tree calculation:

● Manually configure the root bridge and secondary root bridge.


● Set a priority for a switching device in an MSTI. The lower the numerical
value, the higher the priority of the switching device and the more likely the
switching device will become a root bridge.
● Set the path cost for a port in an MSTI. The lower the numerical value, the
smaller the cost of the path from the port to the root bridge and the more
likely the port will become a root port (assuming the same calculation
method is used).
● Set a priority for a port in an MSTI. The lower the numerical value, the more
likely the port will become a designated port.

10.7.1 Configuring the MSTP Mode

Context
Before configuring basic MSTP functions, set the working mode of a switching
device to MSTP. MSTP is compatible with STP and RSTP.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run stp mode mstp

The working mode of the switching device is set to MSTP. By default, the working
mode is MSTP.

MSTP can recognize RSTP BPDUs and, conversely, RSTP can recognize MSTP
BPDUs. However, MSTP and STP cannot recognize each other's BPDUs. To enable
devices running different spanning tree protocols to interwork with each other,
interfaces of an MSTP-enabled switch connected to devices running STP
automatically transition to STP mode; other interfaces continue to work in MSTP
mode.

Step 3 Run commit

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 548


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

The configuration is committed.

----End

10.7.2 Configuring an MST Region


Context
An MST region contains multiple directly connected switching devices and network
segments between these devices. These switching devices run MSTP and have the
same MST region name, VLAN-to-MSTI mapping table, and MSTP revision level.
One switching network can have multiple MST regions. You can group multiple
switching devices into one MST region using MSTP commands.

NOTE

Two switching devices belong to the same MST region when they have the same:
● MST region name
● VLAN-to-MSTI mapping
● Revision level of the MST region

Perform the following steps on a switching device that needs to join an MST
region.

Procedure
● Configure the name of an MST region.
a. Run system-view
The system view is displayed.
b. Run stp region-configuration
The MST region view is displayed.
c. Run region-name name
The name of an MST region is configured.
By default, the name of an MST region is the MAC address of the
management network interface on the MPU of the switching device.
d. (Optional) Run check region-configuration
The device is configured to check the MST region name.
e. Run commit
The configuration is committed.
● Configure the mapping between MSTIs and VLANs.
You can configure the mapping between MSTIs and VLANs in the MST region
view and VLAN instance view.
Configure the mapping between an MSTI and VLANs in the MST region view.
a. Run system-view
The system view is displayed.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 549


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

b. Run stp region-configuration

The MST region view is displayed.


c. Run instance instance-id vlan { vlan-id1 [ to vlan-id2 ] }&<1-10>

The mapping between the MSTI and VLANs is configured.

By default, all VLANs in an MST region are mapped to MSTI 0.

NOTE

A VLAN can be mapped to only one MSTI. If you map a VLAN that has already
been mapped to an MSTI to another MSTI, the original mapping will be deleted.
d. (Optional) Run check region-configuration

The device is configured to check the mapping between the MSTI and
VLANs.
e. Run commit

The configuration is committed.

Configure the mapping between an MSTI and VLANs in the VLAN instance
view.

a. Run system-view

The system view is displayed.


b. Run vlan instance

The VLAN instance view is displayed.


c. Run instance instance-id vlan { vlan-id1 [ to vlan-id2 ] }&<1-10>

The mapping between VLANs and an MSTI is configured.

By default, all VLANs in the VLAN instance view are mapped to MSTI 0.

NOTE

The vlan instance and stp region-configuration commands cannot be used


together. If the mappings between VLANs and MSTIs have been configured by
the stp region-configuration command, you must delete the configured
mapping before using the vlan instance command.
d. (Optional) Run check vlan instance mapping

The configuration is checked.


e. Run commit

The configuration is committed.


● (Optional) Configure the revision level of the MST region.
a. Run system-view

The system view is displayed.


b. Run stp region-configuration

The MST region view is displayed.


c. Run revision-level level

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 550


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

The MSTP revision level of the MST region is configured.


By default, the revision level of an MST region is 0.
If the MSTP revision level of the MST region where a switching device
resides is not 0, perform this operation.
d. (Optional) Run check region-configuration
The device is configured to check the MSTP revision level of the MST
region.
e. Run commit
The configuration is committed.
----End

10.7.3 (Optional) Configuring the Root Bridge and Secondary


Root Bridge
Context
The root bridge can be calculated by MSTP or manually configured along with the
secondary root bridge. Manually configuring the root bridge and secondary root
bridge is recommended.
● A switch can function as a root bridge or a secondary root bridge of more
than one spanning tree. It can also function as the root bridge or secondary
root bridge of another spanning tree. However, in a particular spanning tree,
it cannot function as both the root bridge and secondary root bridge.
● In a spanning tree, there can only be one root bridge. When two or more root
bridges are specified in a spanning tree, the device with the smallest MAC
address is used as the root bridge.
● There can be multiple secondary root bridges in a spanning tree. If the root
bridge fails or is powered off and no new root bridge is specified, the
secondary root bridge with smallest MAC address will become the root bridge
of the spanning tree.

NOTE

On networks that run STP/RSTP/MSTP/VBST, configure an optimal core switch as the root
bridge to ensure stability of the STP Layer 2 network. Otherwise, new access devices may
trigger STP root bridge switching, causing short service interruptions.

Procedure
● Perform the following operations on the device to be used as the root bridge.
a. Run system-view
The system view is displayed.
b. Run stp [ instance instance-id ] root primary
The device is configured as the root bridge.
By default, a switching device does not function as the root bridge. After
the configuration is complete, the priority value of the device is 0 and this
value cannot be changed.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 551


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

If instance is not specified, the device in MSTI 0 is a root bridge.


c. Run commit
The configuration is committed.
● 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 [ instance instance-id ] root secondary
The device is configured as the secondary root bridge.
By default, a switching device does not function as the secondary root
bridge. After the configuration is complete, the priority value of the
device is 4096 and this value cannot be changed.
If instance is not specified, the device in MSTI 0 is a secondary root
bridge.
c. Run commit
The configuration is committed.
----End

10.7.4 (Optional) Configuring a Priority for a Switching


Device in an MSTI
Context
In an MSTI, there is only one root bridge, which is the logical center of the MSTI.
To ensure that a high-performance device is selected as the root bridge, set a low
priority (higher numerical value) for low-performance switching devices, and set a
high priority (lower numerical value) for high-performance switching devices.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp [ instance instance-id ] priority priority
A priority is set for the switching device in an MSTI.
The default priority value of the switching device is 32768.
If instance-id is not specified, a priority is set for the switching device in MSTI 0.

NOTE

If the stp [ instance instance-id ] root primary or stp [ instance instance-id ] root
secondary command has been executed to configure the device as the root bridge or
secondary root bridge, to change the device priority, run the undo stp [ instance instance-
id ] root command to disable the root bridge or secondary root bridge function and run the
stp [ instance instance-id ] priority priority command to set a priority.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 552


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Step 3 Run commit

The configuration is committed.

----End

10.7.5 (Optional) Configuring a Path Cost of a Port in an MSTI


Context
A path cost is port-specific and is used by MSTP to select a link on which to
forward traffic.

Path costs of ports are an important metric used in spanning tree calculation and
determine root port selection in an MSTI. The port with the lowest path cost to
the root bridge is selected as the root port. Load balancing of VLAN traffic can be
achieved by setting different path costs for a port in different MSTIs.

If loops occur on a network, it is recommended that you set a large path cost for
ports with low link rates.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run stp pathcost-standard { dot1d-1998 | dot1t | legacy }

A path cost calculation method is configured.

By default, the IEEE 802.1t standard (dot1t) is used to calculate the path cost.

All switching devices on a network must use the same path cost calculation
method.

Step 3 Run interface interface-type interface-number

The Ethernet interface view is displayed.

Step 4 Run stp [ process process-id ] [ instance instance-id ] cost cost

A path cost is set for the port in the current MSTI.

● When the Huawei calculation method is used, cost ranges from 1 to 200000.
● When the IEEE 802.1d standard method is used, cost ranges from 1 to 65535.
● When the IEEE 802.1t standard method is used, cost ranges from 1 to
200000000.
● If an Eth-Trunk interface is specified as the member interface of an M-LAG
configured in V-STP mode, the path cost of the Eth-Trunk interface is fixed at
2000.

Step 5 Run commit

The configuration is committed.

----End

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 553


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

10.7.6 (Optional) Configuring a Port Priority in an MSTI

Context
During spanning tree calculation, port priorities in MSTIs determine which ports
are selected as designated ports and which ports are blocked. To specify a port as
blocked, set the port priority to a value greater than the default value.

Procedure
Step 1 Run system-view

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 value range of the priority is from 0 to 240, in increments of 16.

Step 4 Run commit

The configuration is committed.

----End

10.7.7 Enabling MSTP

Context
MSTP must be enabled for basic MSTP functions to take effect.

Enabling MSTP immediately triggers spanning tree calculation on the network.


Therefore, before enabling MSTP, perform basic configurations on switching
devices to avoid network flapping, which may occur upon changes to parameters
such as device priority and interface priority.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run stp enable

MSTP is enabled on the switching device.

By default, the MSTP function is enabled on the device.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 554


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

NOTE

After MSTP is enabled on a port, edge port detection is started automatically. If the port fails to
receive BPDU packets within (2 x Hello Timer + 1) seconds, the port is set to an edge port.
Otherwise, the port is set to a non-edge port.

Step 3 Run commit

The configuration is committed.

----End

Follow-up Procedure
If the topology of a spanning tree changes, the forwarding paths to associated
VLANs are changed. On the switching device, therefore, the ARP entries
corresponding to these VLANs need to be updated. MSTP processes ARP entries in
either fast or normal mode.

● 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 switching
device 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.

To specify which mode is used for STP/RSTP convergence, run the stp converge
{ fast | normal } command in the system view.

By default, the normal MSTP convergence mode is used. If fast mode is used, ARP
entries are frequently deleted. This causes high CPU usage on the device (reaching
100%) and results in frequent network flapping. Therefore, using normal mode is
recommended.

10.7.8 Verifying the Basic MSTP Configuration

Procedure
● Run the display stp [ process process-id ] [ instance instance-id ] [ interface
interface-type interface-number | slot slot-id ] [ brief ] command to view
spanning-tree status and statistics.
● Run the display stp region-configuration command to view configurations
of activated MST regions.
● Run the display stp region-configuration digest command to view the
digest configurations of activated MST regions.

----End

10.8 Configuring MSTP Multi-Process


On a network deployed with Layer 2 single-access rings and multi-access rings,
configure multiple MSTP processes so that spanning trees of different processes
are calculated independently and do not affect each other.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 555


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

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.

10.8.1 Creating an MSTP Process


Context
A process ID uniquely identifies an MSTP process. After the ports on an MSTP-
enabled device are bound to different processes, the device 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
The system view is displayed.
Step 2 Run stp process process-id
An MSTP process is created and the MSTP process view is displayed.
Step 3 Run stp mode mstp
A working mode is configured for the MSTP process.
The default mode is MSTP.

NOTE

● A default MSTP process with the ID 0 is established when a device starts. MSTP
configurations in the system view and interface view belong to this process. The default
working mode of this process is MSTP.
● To add an interface to an MSTP process whose ID is not 0, run the stp process
command and then the stp binding process command.

Step 4 Run commit


The configuration is committed.

----End

10.8.2 Adding an Interface to an MSTP Process


Context
After being added to MSTP processes, interfaces can participate in MSTP
calculation. Interfaces can be added to one of the following two types of link:
● The links connecting MSTP-enabled devices and access rings are called access
links.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 556


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

● The link shared by multiple access rings is called a shared link. Interfaces on
this shared link participate in MSTP calculation in multiple access rings and
MSTP processes.

Procedure
● Adding an interface on an access link to an MSTP process
a. Run system-view

The system view is displayed.


b. Run interface interface-type interface-number

The Ethernet interface view is displayed.

The interface specified in this command must be the interface that


connects the device and the access ring.
c. Run stp binding process process-id

The interface is added to the specified MSTP process.


d. Run commit

The configuration is committed.


● Adding an interface on a shared link to an MSTP process
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.

The interface specified in this command must be an interface on the


shared link between the devices configured with MSTP multi-process. It
cannot be an interface that connects an access ring and device.
c. Run stp binding process process-id1 [ to process-id2 ] link-share

The interface is added to multiple MSTP processes to complete MSTP


calculation.

NOTE

In an MSTP process where there are multiple shared links, run the stp enable
command in the MSTP multi-instance view. On an interface that is added to an
MSTP process in link-share mode, run the stp enable command in the interface
view.
d. Run commit

The configuration is committed.

----End

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 557


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

10.8.3 (Optional) Configuring the Root Bridge and Secondary


Root Bridge
Context
The root bridge can be calculated by MSTP or manually configured along with the
secondary root bridge. Manually configuring the root bridge and secondary root
bridge is recommended.
● A switch can function as a root bridge or a secondary root bridge of more
than one spanning tree. However, in a particular spanning tree, it cannot
function as both the root bridge and secondary root bridge.
● In a spanning tree, there can only be one root bridge. When two or more root
bridges are specified in a spanning tree, the device with the smallest MAC
address is used as the root bridge.
● There can be multiple secondary root bridges in a spanning tree. If the root
bridge fails or is powered off and no new root bridge is specified, the
secondary root bridge with smallest MAC address will become the root bridge
of the spanning tree.

NOTE

On networks that run STP/RSTP/MSTP/VBST, configure an optimal core switch as the root
bridge to ensure stability of the STP Layer 2 network. Otherwise, new access devices may
trigger STP root bridge switching, causing short service interruptions.

Procedure
● Perform the following operations on the device to be used as the root bridge.
a. Run system-view

The system view is displayed.


b. Run stp 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 switching device does not function as the root bridge. After
the configuration is complete, the priority value of the device is 0 and this
value cannot be changed.

If instance is not specified, the device in MSTI 0 is a root bridge.


d. Run commit

The configuration is committed.


● 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

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 558


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

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 switching device does not function as the secondary root
bridge. After the configuration is complete, the priority value of the
device is 4096 and this value cannot be changed.
If instance is not specified, the device in MSTI 0 is a secondary root
bridge.
d. Run commit
The configuration is committed.
----End

10.8.4 (Optional) Configuring a Priority for a Switching


Device in an MSTI
Context
In an MSTI, there is only one root bridge, which is the logical center of the MSTI.
To ensure that a high-performance device is selected as the root bridge, set a low
priority (higher numerical value) for low-performance switching devices, and set a
high priority (lower numerical value) for high-performance switching devices.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp process process-id
The MSTP process view is displayed.
Step 3 Run stp [ instance instance-id ] priority priority
A priority is set for the switching device in an MSTI.
The default priority value of the switching device is 32768.
If instance is not specified, a priority is set for the switching device in MSTI 0.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 559


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

NOTE

● To configure a switching device as the primary root bridge, run the stp [ instance
instance-id ] root primary command directly. The priority value of this switching device
is 0.
● To configure a switching device as the secondary root bridge, run the stp [ instance
instance-id ] root secondary command. The priority value of this switching device is
4096.
In an MSTI, a switching device cannot act as the primary root bridge and secondary root
bridge at the same time.
● If the stp [ instance instance-id ] root primary or stp [ instance instance-id ] root
secondary command has been executed to configure the device as the root bridge or
secondary root bridge, to change the device priority, run the undo stp [ instance
instance-id ] root command to disable the root bridge or secondary root bridge function
and run the stp [ instance instance-id ] priority priority command to set a priority.

Step 4 Run commit


The configuration is committed.

----End

10.8.5 (Optional) Configuring a Path Cost of a Port in an MSTI


Context
A path cost is port-specific and is used by MSTP to select a link on which to
forward traffic.
Path costs of ports are an important metric used in spanning tree calculation and
determine root port selection in an MSTI. The port with the lowest path cost to
the root bridge is selected as the root port. Load balancing of VLAN traffic can be
achieved by setting different path costs for a port in different MSTIs.
If loops occur on a network, it is recommended that you set a large path cost for
ports with low link rates. MSTP then blocks these ports.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp pathcost-standard { dot1d-1998 | dot1t | legacy }
A path cost calculation method is configured.
By default, the IEEE 802.1t standard (dot1t) is used to calculate the path cost.
All switching devices on a network must use the same path cost calculation
method.
Step 3 Run interface interface-type interface-number
The Ethernet interface view is displayed.
Step 4 Run stp binding process process-id
The port is bound to an MSTP process.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 560


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Step 5 Run stp [ process process-id ] instance instance-id cost cost

A path cost is set for the port in the current MSTI.

● When the Huawei calculation method is used, cost ranges from 1 to 200000.
● When the IEEE 802.1d standard method is used, cost ranges from 1 to 65535.
● When the IEEE 802.1t standard method is used, cost ranges from 1 to
200000000.
● If an Eth-Trunk interface is specified as the member interface of an M-LAG
configured in V-STP mode, the path cost of the Eth-Trunk interface is fixed at
2000.

Step 6 Run commit

The configuration is committed.

----End

10.8.6 (Optional) Configuring a Port Priority in an MSTI

Context
During spanning tree calculation, port priorities in MSTIs determine which ports
are selected as designated ports and which ports are blocked. To specify a port as
blocked, set the port priority to a value greater than the default value.

Procedure
Step 1 Run system-view

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 value range of the priority is from 0 to 240, in increments of 16.

Step 5 Run commit

The configuration is committed.

----End

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 561


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

10.8.7 Configuring TC Notification in MSTP Multi-process


Context
After the TC notification function is configured for MSTP multi-process, an MSTP
process can notify the MSTIs in other specified MSTP processes to update MAC
address entries and ARP entries after receiving a TC-BPDU. This ensures service
continuity. To configure the TC notification function for MSTP multi-process,
perform the following procedure on the devices connected to access rings.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp process process-id
The view of a created MSTP process is displayed.
Step 3 Run stp tc-notify process 0
TC notification is enabled in the MSTP process.
After the stp tc-notify process 0 command is run, the current MSTP process
notifies the MSTIs in MSTP process 0 to update MAC entries and ARP entries after
receiving a TC-BPDU. This prevents services from being interrupted.
Step 4 Run commit
The configuration is committed.

----End

10.8.8 Enabling MSTP


Context
After MSTP multi-process is enabled on the switching device, you must enable
MSTP in the MSTP process view so that the MSTP configuration can take effect in
the MSTP process.
Enabling MSTP immediately triggers spanning tree calculation on the network.
Therefore, before enabling MSTP, perform basic configurations on switching
devices to avoid network flapping, which may occur upon changes to parameters
such as device priority and interface priority.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp process process-id
The view of a created MSTP process is displayed.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 562


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Step 3 Run stp enable


MSTP is enabled in the MSTP process.
By default, MSTP is disabled in an MSTP process.
Step 4 Run commit
The configuration is committed.

----End

10.8.9 Verifying the MSTP Multi-Process Configuration


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

10.9 Configuring MSTP Parameters on an Interface


Pre-configuration Tasks
Before configuring MSTP parameters that affect route convergence, configure
MSTP or MSTP multi-process.

10.9.1 Setting the MSTP Network Diameter


Context
Any two terminals on a switching network are connected through a specific path
along multiple devices. The network diameter is the maximum number of devices
between any two terminals.
An improper network diameter may cause slow network convergence and affect
communication on the network. To speed up convergence, run the stp bridge-
diameter command to set an appropriate network diameter based on the
network scale. Running this command also allows the switch to calculate the
optimal Forward Delay timer value, Hello timer value, and Max Age timer value
based on the configured network diameter.
It is recommended that all devices be configured with the same network diameter.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Run stp process process-id
The MSTP process view is displayed.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 563


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

NOTE

Skip this step if you perform configurations in the MSTP process 0.

Step 3 Run stp bridge-diameter diameter

The network diameter is configured.

By default, the network diameter is 7.

● RSTP uses a single spanning tree instance on the entire network. As a result,
performance deterioration cannot be prevented when the network scale
grows. Therefore, the network diameter cannot be larger than 7.
● It is recommended that you run the stp bridge-diameter diameter command
to set the network diameter. The switching device then calculates the optimal
Forward Delay timer value, Hello timer value, and Max Age timer value based
on the configured network diameter.

Step 4 Run commit

The configuration is committed.

----End

10.9.2 Setting the MSTP Timeout Interval

Context
If a device does not receive any BPDUs from the upstream device within the
timeout interval, the device considers the upstream device to have failed and
recalculates the spanning tree.

Sometimes, a device cannot receive the BPDU from the upstream device within
the timeout interval because the upstream device is temporarily busy. In this case,
recalculating the spanning tree will waste network resources. This can be avoided
by increasing the timeout interval. However, only set a long timeout interval if the
network is relatively stable.

The timeout interval is calculated as follows:

Timeout interval = Hello Time x 3 x Timer Factor

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

Skip this step if you perform configurations in the MSTP process 0.

Step 3 Run stp timer-factor factor

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 564


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

The timeout interval is set, specifying how long the upstream device waits for
BPDUs.

By default, the timeout interval is 9 times the Hello timer value.

Step 4 Run commit

The configuration is committed.

----End

10.9.3 Setting the Values of MSTP Timers

Context
There are three timers used in spanning tree calculation: Forward Delay, Hello
Time, and Max Age. These timers can be configured to affect STP convergence.
However, you are not advised to directly change these timers. Instead, it is
recommended that you set the network diameter so that the spanning tree
protocol automatically adjusts these timers in accordance with the network scale.

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 for the new configuration
BPDU to spread throughout the entire network. As a result, the original
blocked port may be unblocked before a new port is blocked, creating a loop
on the network. The purpose of the Forward Delay timer is 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 an interval of Hello
Time x 3 x Timer Factor, the device recalculates the spanning tree.
● Max Age: determines whether a BPDU has timed out. A 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.

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.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 565


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Step 2 (Optional) Run stp process process-id


The MSTP process view is displayed.

NOTE

Skip this step if you perform configurations in the MSTP process 0.

Step 3 Set Forward Delay, Hello Time, and Max Age.


1. Run stp timer forward-delay forward-delay
The value of Forward Delay of the switching device is set.
By default, the value of Forward Delay of the switching device is 1500
centiseconds.
2. Run stp timer hello hello-time
The value of Hello Time of the switching device is set.
By default, the value of Hello Time of the switching device is 200
centiseconds.
3. Run stp timer max-age max-age
The value of Max Age of the switching device is set.
By default, the value of Max Age of the switching device is 2000 centiseconds.
Step 4 Run commit
The configuration is committed.

----End

10.9.4 Configuring the Maximum Number of Connections in


an Eth-Trunk that Affects Spanning Tree Calculation
Context
Path costs are a major factor in spanning tree calculation and changing path costs
triggers 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.
In Figure 10-19, SwitchA and SwitchB 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
SwitchA is selected as the root bridge.
● Eth-Trunk 1 has higher bandwidth than Eth-Trunk 2. After STP calculation,
Eth-Trunk 1 on SwitchB 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, after the two devices perform spanning tree recalculation, Eth-
Trunk 1 on SwitchB becomes the alternate port and Eth-Trunk 2 becomes the
root port.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 566


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Figure 10-19 Configuring the maximum number of connections in an Eth-Trunk


SwitchA SwitchB
Before Eth-Trunk1
configuration Eth-Trunk2

Root bridge

SwitchA SwitchB
After Eth-Trunk1
configuration Eth-Trunk2

Root bridge
Alternate port
Root port
Designated port

The maximum number of connections affects only the path cost of an Eth-Trunk
interface participating in spanning tree calculation, and does not affect the actual
bandwidth of the Eth-Trunk link. The actual bandwidth for an Eth-Trunk link
depends on the number of active member interfaces in the Eth-Trunk.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Step 3 Run max bandwidth-affected-linknumber link-number
The maximum number of connections affecting the Eth-Trunk bandwidth is set.
By default, the upper threshold for the number of interfaces that determine the
bandwidth of an Eth-Trunk is 8 on the CE5810EI, 64 on CE6880EI and CE5880EI,
and 16 on other models (excluding the CE6870EI and CE6875EI). For the CE6870EI
and CE6875EI, the upper threshold for the number of interfaces that determine
the bandwidth of an Eth-Trunk depends on the maximum number of configured
LAGs. In an SVF system, the maximum number of connections affecting the
bandwidth of an Eth-Trunk is 8.
Step 4 Run commit
The configuration is committed.

----End

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 567


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

10.9.5 Setting the Link Type of a Port


Context
Rapid convergence can be achieved on a P2P link. That is, 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
The view of the Ethernet interface participating in STP calculation is displayed.
Step 3 Run stp point-to-point { auto | force-false | force-true }
The link type is configured for the interface.
By default, an interface automatically determines whether to connect to a P2P
link. The P2P link supports rapid network convergence.
Step 4 Run commit
The configuration is committed.

----End

10.9.6 Setting the Maximum Transmission Rate of an Interface


Context
A larger value of packet-number indicates more BPDUs sent within a hello
interval and therefore more system resources occupied. Setting an appropriate
value of packet-number prevents excess bandwidth usage when route flapping
occurs.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of the Ethernet interface that participates in spanning tree calculation is
displayed.
Step 3 Run stp transmit-limit packet-number
The maximum number of BPDUs sent by a port in a specified period is set.
By default, the maximum transmission rate of BPDUs on an interface is the value
configured by the stp transmit-limit (system view) command. If the stp

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 568


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

transmit-limit (system view) command is not configured, an interface sends a


maximum of six BPDUs per Hello Time interval.
NOTE

If the same maximum transmission rate of BPDUs needs to be set for each interface on a
device, run the stp transmit-limit (system view) command. The stp transmit-limit
(interface view) command takes precedence over the stp transmit-limit (system view)
command. If the stp transmit-limit (interface view) command is configured on an
interface, the stp transmit-limit (system view) command does not take effect on that
interface.

Step 4 Run commit


The configuration is committed.

----End

10.9.7 Changing to the MSTP Mode


Context
If an interface on an MSTP-enabled device is connected to an STP-enabled device,
the interface changes to the STP-compatible mode.
If the STP-enabled device is changed to MSTP mode, or if it is powered off or
disconnected from the MSTP-enabled device, the interface will not automatically
change to MSTP mode. In this case, use the stp mcheck command to configure
the interface to change to the MSTP mode.

Procedure
● Changing to the MSTP mode in the interface view
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The view of the Ethernet interface that participates in spanning tree
calculation is displayed.
c. Run stp mcheck
The device is changed to the MSTP mode.
d. Run commit
The configuration is committed.
● Changing to the MSTP mode in the system view
a. Run system-view
The system view is displayed.
b. (Optional) Run stp process process-id
The MSTP process view is displayed.

NOTE

Skip this step if you perform configurations in the MSTP process 0.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 569


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

c. Run stp mcheck


The device is changed to the MSTP mode.
d. Run commit
The configuration is committed.
----End

10.9.8 Configuring a Port as an Edge Port and BPDU Filter


Port
Context
If a designated port is located at the edge of a network and is directly connected
to terminal devices, this port is called an edge port.
An edge port does not receive or process configuration BPDUs and does not
participate in MSTP calculation. It can transit from Disable to Forwarding without
any delay.
After a designated port is configured as an edge port, the port can still send
BPDUs. Then BPDUs are sent to other networks, causing flapping on other
networks. To prevent a port from processing and sending BPDUs, after configuring
the port as an edge port, configure it as a BPDU filter port.

NOTICE

After all ports are configured as edge ports and BPDU filter ports in the system
view, the ports do not send BPDUs or negotiate the STP status with directly
connected ports on the peer device. All ports are in Forwarding state, which may
cause loops on the network and lead to broadcast storms. Exercise caution when
you configure a port as an edge port and BPDU filter port.
After a port is configured as an edge port and BPDU filter port in the interface
view, the port does not process or send BPDUs. The port cannot negotiate the STP
status with the directly connected port on the peer device. Exercise caution when
you configure a port as an edge port and BPDU filter port.

Procedure
● Configuring all ports as edge ports and BPDU filter ports in the system view
a. Run system-view
The system view is displayed.
b. Run stp edged-port default
All ports are configured as edge ports.
By default, all ports are non-edge ports.
c. Run stp bpdu-filter default
All ports are configured as BPDU filter ports.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 570


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

By default, a port is a non-BPDU filter port.


d. Run commit

The configuration is committed.


● Configuring a port as an edge port and BPDU filter port in the interface view
a. Run system-view

The system view is displayed.


b. Run interface interface-type interface-number

The view of the Ethernet interface that participates in spanning tree


calculation is displayed.
c. (Optional) Run stp edged-port enable

The port is configured as an edge port.

By default, all ports are non-edge ports.


d. Run stp bpdu-filter enable

The port is configured as a BPDU filter port.

By default, a port is a non-BPDU filter port.


e. Run commit

The configuration is committed.

----End

10.9.9 Setting the Maximum Number of Hops in an MST


Region

Context
To communicate with each other on a Layer 2 network running MSTP, switching
devices exchange MST BPDUs, each of which has a field that indicates the number
of remaining hops. The number of remaining hops differs depending on the role of
the switching device, as outlined below:
● The number of remaining hops in a BPDU sent by the root bridge equals the
maximum number of hops.
● The number of remaining hops in a BPDU sent by a non-root bridge equals
the maximum number of hops minus the number of hops from the non-root
bridge to the root bridge.

If a switching device receives a BPDU in which the number of remaining hops is 0,


the switching device will discard the BPDU.

From the above information, it can be seen that the maximum number of hops of
a spanning tree in an MST region determines the network scale. The stp max-
hops command can be used to set the maximum number of hops in an MST
region so that the network scale of a spanning tree can be controlled.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 571


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

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

Skip this step if you perform configurations in the MSTP process 0.

Step 3 Run stp max-hops hop


The maximum number of hops in an MST region is set.
By default, the maximum number of hops of the spanning tree in an MST region
is 20.
Step 4 Run commit
The configuration is committed.

----End

10.9.10 Verifying the Configuration of MSTP Parameters on an


Interface
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

10.10 Configuring MSTP Protection Functions


Pre-configuration Tasks
Before configuring MSTP protection functions, configure MSTP or MSTP multi-
process.

10.10.1 Configuring BPDU Protection on a Switching Device


Context
Edge ports are directly connected to user terminals and, in most cases, will not
receive BPDUs. However, attackers may send pseudo BPDUs to attack the
switching device with edge ports. In this case, if the edge ports receive the BPDUs,
they are then configured as non-edge ports and spanning tree recalculation is
triggered. Network flapping then occurs. Such attacks can be mitigated using
BPDU protection on switching devices with edge ports.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 572


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

NOTE

BPDU protection is only valid for the edge port manually configured by the stp edged-port
or stp edged-port default command, and is invalid for the edge port configured by the
automatic detection function.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 (Optional) Run stp process process-id

The MSTP process view is displayed.

NOTE

Skip this step if you perform configurations in the MSTP process 0.

Step 3 Run stp bpdu-protection

BPDU protection is enabled on the switching device.

By default, BPDU protection is disabled on a switching device.

Step 4 Run commit

The configuration is committed.

----End

Follow-up Procedure
After BPDU protection is configured, the edge port that receives BPDUs will enter
the Error-Down state and keeps its attributes. The device records the status of an
interface as Error-Down when it detects that a fault occurs. The interface in Error-
Down state cannot receive or send packets and the interface indicator is off. You
can run the display error-down recovery command to check information about
all interfaces in Error-Down state on the device.

When the interface is in Error-Down state, check the cause. You can use the
following modes to restore the interface status:
● Manual (after interfaces enter the Error-Down state)
When there are few interfaces in Error-Down state, run the shutdown and
undo shutdown commands in the interface view or run the restart command
to restore the interface.
● Auto (before interfaces enter the Error-Down state)
If there are many interfaces in Error-Down state, the manual mode brings in
heavy workload and the configuration of some interfaces may be ignored. To
prevent this problem, run the error-down auto-recovery cause bpdu-
protection interval interval-value command in the system view to enable an
interface in Error-Down state to go Up and set a recovery delay. You can run
the display error-down recovery command to view automatic recovery
information about the interface.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 573


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

NOTE

This mode is invalid for the interface that has entered the Error-Down state, and is valid
only for the interface that enters the Error-Down state after the error-down auto-recovery
cause bpdu-protection interval interval-value command is run.

10.10.2 Configuring TC Protection on a Switching Device

Context
If attackers forge TC BPDUs to attack a switching device, the switching device
receives a large number of TC BPDUs within a short period. If MAC address entries
and ARP entries are deleted frequently, the switching device is heavily burdened,
causing potential risks to the network.

TC protection is used to suppress TC BPDUs. This function allows you to configure


the number of TC BPDUs processed by a switching device within a given period.
Once the number of TC BPDUs received by a switching device exceeds the
specified threshold within a given period, the switching device handles only the
specified number of TC BPDUs. The processing of excess TC BPDUs is delayed until
after the specified period expires. This protects the switching device from
becoming overburdened with frequently deleting MAC entries and ARP entries.

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

Skip this step if you perform configurations in the MSTP process 0.

Step 3 Run stp tc-protection

TC protection is enabled in the MSTP process.

By default, TC protection is disabled on a switching device.

Step 4 Run either or both of the following commands to configure TC protection


parameters.
● To set the time period during which the device processes the maximum
number of TC BPDUs, run stp tc-protection interval interval-value.
By default, the time period is the Hello Time.
● To set the maximum number of TC BPDUs that the device processes within a
specified period, run stp tc-protection threshold threshold.
By default, a device processes one TC BPDU within a specified period.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 574


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

NOTE

● There are two TC protection parameters: time period during which the device processes
the maximum number of TC BPDUs and the maximum number of TC BPDUs processed
within the time period. For example, if the time period is set to 10 seconds and the
maximum number of TC BPDUs is set to 5, the device processes only the first five TC
BPDUs within 10 seconds and processes the other TC BPDUs together 10 seconds later.
● The device processes only the maximum number of TC BPDUs configured by the stp tc-
protection threshold command within the time period configured by the stp tc-
protection interval command. Other packets are processed after a delay, so spanning
tree convergence speed may slow down.

Step 5 Run commit


The configuration is committed.

----End

10.10.3 Configuring Root Protection on an Interface


Context
If a root bridge receives BPDUs with a higher priority than its own due to incorrect
configurations or malicious attacks on the network, the legitimate root bridge will
no longer be able to serve as the root bridge and the network topology will be
changed, triggering spanning tree recalculation. This may also result in traffic that
should be transmitted over high-speed links being transmitted over low-speed
links, leading to congestion on the network. The root protection function on a
switch prevents this from happening by preserving the role of the designated port
in order to protect the root bridge.

NOTE

Root protection takes effect only on designated ports.

Perform the following steps on the root bridge in an MST region.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of the Ethernet interface that participates in spanning tree calculation is
displayed.
Step 3 (Optional) Run stp binding process process-id
The port is bound to an MSTP process.

NOTE

Skip this step if the interface belongs to process 0.

Step 4 Run stp root-protection


Root protection is configured on the switching device.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 575


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

By default, root protection is disabled.


Step 5 Run commit
The configuration is committed.

----End

10.10.4 Configuring Loop Protection on an Interface


Context
To maintain the status of root ports and blocked ports on a network running
MSTP, a switching device receives BPDUs from an upstream switching device. If the
switching device cannot receive these BPDUs because of link congestion or
unidirectional-link failure, the switching device re-selects a root port. The original
root port becomes a designated port and the original blocked ports change to the
Forwarding state. This may create loops on the network. To prevent this issue from
occurring, configure loop protection.
With loop protection enabled, if the root port or alternate port does not receive
BPDUs from the upstream device for a long period, the switch 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
remains blocked and becomes the designated port. This prevents loops from
occurring. After the link congestion subsides or unidirectional link failures are
rectified, the port receives BPDUs for negotiation and reverts to its original role
and status.

NOTE

An alternate port is a backup port for a root port. If a switching device has an alternate
port, configure loop protection on both the root port and the alternate port.

Perform the following steps on the root port and alternate port on a switching
device in an MST region.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The Ethernet interface view is displayed.
Step 3 (Optional) Run stp binding process process-id
The port is bound to an MSTP process.

NOTE

Skip this step if the interface belongs to process 0.

Step 4 Run stp loop-protection


Loop protection for the root port is configured on the switching device.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 576


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

By default, loop protection is disabled.

Root protection and loop protection cannot be configured together.

Step 5 Run commit

The configuration is committed.

----End

10.10.5 Configuring Share-Link Protection on a Switching


Device

Context
Share-link protection is used in scenarios where a switching device is dual-homed
to a network.

When a shared link fails, share-link protection forcibly changes the working mode
of a local switching device to RSTP. This function can be used together with root
protection to avoid network loops.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run stp process process-id

The MSTP process view is displayed.

Step 3 Run stp link-share-protection

Share-link protection is enabled.

Step 4 Run commit

The configuration is committed.

----End

10.10.6 Verifying the Configuration of MSTP Protection


Functions

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

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 577


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

10.11 Configuring MSTP Interoperation Between


Huawei Devices and Non-Huawei Devices

10.11.1 Configuring a Proposal/Agreement Mechanism


Context
The rapid transition mechanism is also called the Proposal/Agreement mechanism.
All switching devices support the following modes:
● Enhanced mode: The current interface includes the root port calculation when
it computes the synchronization flag bit. The following describes the Proposal/
Agreement mechanism in enhanced mode:
– An upstream device sends a Proposal message to a downstream device,
requesting rapid status 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.
– 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.
– The downstream device responds to the Proposal message with an
Agreement message. After receiving the 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 current interface ignores the root port when it computes
the synchronization flag bit. The following describes the Proposal/Agreement
mechanism in common mode:
– An upstream device sends a Proposal message to a downstream device,
requesting rapid status 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. The root port then transitions to
the Forwarding state.
– The downstream device responds to the Proposal message with an
Agreement message. After receiving the message, the upstream device
sets the port connected to the downstream device as a designated port.
The designated port then transitions to the Forwarding state.
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
The system view is displayed.
Step 2 Run interface interface-type interface-number
The Ethernet interface view is displayed.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 578


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Step 3 Run stp no-agreement-check


The common rapid transition mechanism is configured.
By default, the interface uses the enhanced rapid transition mechanism.
Step 4 Run commit
The configuration is committed.

----End

10.11.2 Configuring the MSTP Protocol Packet Format on an


Interface
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 auto mode. In auto mode, a switching
device changes the MSTP protocol packet format to match that of the received
MSTP protocol packet so that the switching device can communicate with the peer
device.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The Ethernet interface view is displayed.
Step 3 Run stp compliance { auto | dot1s | legacy }
The MSTP protocol packet format is configured on the interface.
The auto mode is used by default.
Step 4 Run commit
The configuration is committed.

----End

10.11.3 Enabling the Digest Snooping Function


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 switching device in an MST region to enable the
digest snooping function.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 579


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

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 config-digest-snoop

The digest snooping function is enabled.

Step 4 Run commit

The configuration is committed.

----End

10.11.4 Verifying the Configuration of MSTP Interoperation


Between Huawei Devices and Non-Huawei Devices

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

10.12 Maintaining MSTP

10.12.1 Clearing MSTP Statistics

Context

NOTICE

MSTP statistics cannot be restored after being cleared.

Procedure
● Run the reset stp [ interface interface-type interface-number ] statistics
command to clear spanning-tree statistics.

----End

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 580


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

10.12.2 Monitoring the Statistics About MSTP Topology


Changes
The statistics about MSTP topology changes can be viewed. If the statistics
increase, network flapping occurs.

Procedure
● Run the display stp [ process process-id ] [ instance instance-id ] topology-
change command to view the statistics about MSTP topology changes.
In the case of a non-zero process, the stp process process-id command must
be used to create a process before the display stp [ process process-id ]
[ instance instance-id ] topology-change command is used.
● Run the display stp [ process process-id ] [ instance instance-id ] [ interface
interface-type interface-number | slot slot-id ] tc-bpdu statistics command
to view the statistics about Topology Change/Topology Change Notification
(TC/TCN) packets.
In the case of a non-zero process, the stp process process-id command must
be used to create a process before the display stp [ process process-id ]
[ instance instance-id ] [ interface interface-type interface-number | slot
slot-id ] tc-bpdu statistics command is used.
----End

10.13 Configuration Examples for MSTP


This section only provides configuration examples for individual features. For
details about multi-feature configuration examples, feature-specific configuration
examples, interoperation examples, protocol or hardware replacement examples,
and industry application examples, see the Typical Configuration Examples.

10.13.1 Example for Configuring MSTP


Networking Requirements
To implement redundancy on a complex network, network designers tend to
deploy multiple physical links between two devices, one of which is the master
and the others are the backup. Loops occur, causing broadcast storms or
damaging MAC addresses. After the network is planned, deploy MSTP on the
network to prevent loops. MSTP blocks redundant links and prunes a network into
a tree topology free from loops.
On the network shown in Figure 10-20, SwitchA, SwitchB, SwitchC, and SwitchD
run MSTP. To load balance traffic from VLANs 2 to 10 and VLANs 11 to 20, use
MSTP multi-instance. You can configure a VLAN mapping table to associate
VLANs with MSTIs.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 581


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

Figure 10-20 Networking diagram of MSTP configuration

Network

RG1
10GE1/0/2
SwitchA SwitchB
10GE1/0/2
10GE1/0/1 10GE1/0/1

10GE1/0/3 10GE1/0/3
10GE1/0/2
SwitchC SwitchD
10GE1/0/2
10GE1/0/1 10GE1/0/1

Server1 Server2

VLAN2~10 MSTI1
VLAN11~20 MSTI2

MSTI1:

Root Switch:SwitchA
Blocked port

MSTI2:

Root Switch:SwitchB
Blocked port

Configuration Roadmap
The configuration roadmap is as follows:

1. Configure basic MSTP functions on the switching device on the ring network.
2. Configure protection functions to protect devices or links. You can configure
root protection on the designated port of the root bridge.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 582


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

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 switching devices belong to the same MST region when they have the same:
– Name of the MST region
– Mapping between VLANs and MSTIs
A VLAN cannot be mapped to multiple MSTIs. If you map a VLAN that has
already been mapped to an MSTI to another MSTI, the original mapping will be
deleted.
– Revision level of the MST region
# Configure an MST region on SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] stp region-configuration
[~SwitchA-mst-region] region-name RG1
[*SwitchA-mst-region] instance 1 vlan 2 to 10
[*SwitchA-mst-region] instance 2 vlan 11 to 20
[*SwitchA-mst-region] commit
[~SwitchA-mst-region] quit
# Configure an MST region on SwitchB.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] stp region-configuration
[~SwitchB-mst-region] region-name RG1
[*SwitchB-mst-region] instance 1 vlan 2 to 10
[*SwitchB-mst-region] instance 2 vlan 11 to 20
[*SwitchB-mst-region] commit
[~SwitchB-mst-region] quit
# Configure an MST region on SwitchC.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchC
[*HUAWEI] commit
[~SwitchC] stp region-configuration
[~SwitchC-mst-region] region-name RG1
[*SwitchC-mst-region] instance 1 vlan 2 to 10
[*SwitchC-mst-region] instance 2 vlan 11 to 20
[*SwitchC-mst-region] commit
[~SwitchC-mst-region] quit
# Configure an MST region on SwitchD.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchD
[*HUAWEI] commit
[~SwitchD] stp region-configuration
[~SwitchD-mst-region] region-name RG1
[*SwitchD-mst-region] instance 1 vlan 2 to 10
[*SwitchD-mst-region] instance 2 vlan 11 to 20
[*SwitchD-mst-region] commit
[~SwitchD-mst-region] quit
2. In the MST region RG1, configure the root bridge and secondary root bridge
in MSTI 1 and MSTI 2.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 583


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

– Configure the root bridge and secondary root bridge in MSTI 1.


# Configure SwitchA as the root bridge in MSTI 1.
[~SwitchA] stp instance 1 root primary
[*SwitchA] commit

# Configure SwitchB as the secondary root bridge in MSTI 1.


[~SwitchB] stp instance 1 root secondary
[*SwitchB] commit

– Configure the root bridge and secondary root bridge in MSTI 2.


# Configure SwitchB as the root bridge in MSTI 2.
[~SwitchB] stp instance 2 root primary
[*SwitchB] commit

# Configure SwitchA as the secondary root bridge in MSTI 2.


[~SwitchA] stp instance 2 root secondary
[*SwitchA] commit

3. Set the path costs of the ports to be blocked in MSTI 1 and MSTI 2 to be
greater than the default value.
NOTE

– The path cost values depend on path cost calculation methods. This example uses
the Huawei proprietary calculation method as an example to set the path cost to
20000 for the ports to be blocked. If another path cost calculation method is used,
see stp pathcost-standard.
– All switching devices on a network must use the same path cost calculation
method.
# Configure SwitchA to use Huawei proprietary calculation method to
calculate the path cost.
[~SwitchA] stp pathcost-standard legacy
[*SwitchA] commit

# Configure SwitchB to use Huawei proprietary calculation method to


calculate the path cost.
[~SwitchB] stp pathcost-standard legacy
[*SwitchB] commit

# Configure SwitchC to use Huawei proprietary calculation method to


calculate the path cost, and set the path cost of 10GE1/0/2 in MSTI 2 to
20000.
[~SwitchC] stp pathcost-standard legacy
[*SwitchC] interface 10ge 1/0/2
[*SwitchC-10GE1/0/2] stp instance 2 cost 20000
[*SwitchC-10GE1/0/2] commit
[~SwitchC-10GE1/0/2] quit

# Configure SwitchD to use Huawei proprietary calculation method to


calculate the path cost, and set the path cost of 10GE1/0/2 in MSTI 1 to
20000.
[~SwitchD] stp pathcost-standard legacy
[*SwitchD] interface 10ge 1/0/2
[*SwitchD-10GE1/0/2] stp instance 1 cost 20000
[*SwitchD-10GE1/0/2] commit
[~SwitchD-10GE1/0/2] quit

4. Enable MSTP to eliminate loops.


– Enable MSTP globally.
# Enable MSTP on SwitchA.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 584


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

[~SwitchA] stp enable


[*SwitchA] commit
# Enable MSTP on SwitchB.
[~SwitchB] stp enable
[*SwitchB] commit
# Enable MSTP on SwitchC.
[~SwitchC] stp enable
[*SwitchC] commit
# Enable MSTP on SwitchD.
[~SwitchD] stp enable
[*SwitchD] commit
– Disable MSTP on the interface connected to terminals.
# Disable STP on 10GE1/0/1 of SwitchC.
[~SwitchC] interface 10ge 1/0/1
[~SwitchC-10GE1/0/1] stp disable
[*SwitchC-10GE1/0/1] commit
[~SwitchC-10GE1/0/1] quit
# Disable STP on 10GE1/0/1 of SwitchD.
[~SwitchD] interface 10ge 1/0/1
[~SwitchD-10GE1/0/1] stp disable
[*SwitchD-10GE1/0/1] commit
[~SwitchD-10GE1/0/1] quit

Step 2 Configure root protection on the designated port of the root bridge.
# Enable root protection on 10GE1/0/1 of SwitchA.
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] stp root-protection
[*SwitchA-10GE1/0/1] commit
[~SwitchA-10GE1/0/1] quit

# Enable root protection on 10GE1/0/1 of SwitchB.


[~SwitchB] interface 10ge 1/0/1
[~SwitchB-10GE1/0/1] stp root-protection
[*SwitchB-10GE1/0/1] commit
[~SwitchB-10GE1/0/1] quit

Step 3 Configure Layer 2 forwarding on devices on the ring network.


● Create VLANs 2 to 20 on SwitchA, SwitchB, SwitchC, and SwitchD.
# Create VLANs 2 to 20 on SwitchA.
[~SwitchA] vlan batch 2 to 20
[*SwitchA] commit
# Create VLANs 2 to 20 on SwitchB.
[~SwitchB] vlan batch 2 to 20
[*SwitchB] commit
# Create VLANs 2 to 20 on SwitchC.
[~SwitchC] vlan batch 2 to 20
[*SwitchC] commit
# Create VLANs 2 to 20 on SwitchD.
[~SwitchD] vlan batch 2 to 20
[*SwitchD] commit
● Add ports on switching devices to VLANs.
# Add 10GE1/0/1 on SwitchA to VLANs 2 to 20.
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] port link-type trunk

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 585


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 2 to 20


[*SwitchA-10GE1/0/1] commit
[~SwitchA-10GE1/0/1] quit

# Add 10GE1/0/2 on SwitchA to VLANs 2 to 20.


[~SwitchA] interface 10ge 1/0/2
[~SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 2 to 20
[*SwitchA-10GE1/0/2] commit
[~SwitchA-10GE1/0/2] quit

# Add 10GE1/0/1 on SwitchB to VLANs 2 to 20.


[~SwitchB] interface 10ge 1/0/1
[~SwitchB-10GE1/0/1] port link-type trunk
[*SwitchB-10GE1/0/1] port trunk allow-pass vlan 2 to 20
[*SwitchB-10GE1/0/1] commit
[~SwitchB-10GE1/0/1] quit

# Add 10GE1/0/2 on SwitchB to VLANs 2 to 20.


[~SwitchB] interface 10ge 1/0/2
[~SwitchB-10GE1/0/2] port link-type trunk
[*SwitchB-10GE1/0/2] port trunk allow-pass vlan 2 to 20
[*SwitchB-10GE1/0/2] commit
[~SwitchB-10GE1/0/2] quit

# Add 10GE1/0/1 on SwitchC to VLAN 2.


[~SwitchC] interface 10ge 1/0/1
[~SwitchC-10GE1/0/1] port link-type access
[*SwitchC-10GE1/0/1] port default vlan 2
[*SwitchC-10GE1/0/1] commit
[~SwitchC-10GE1/0/1] quit

# Add 10GE1/0/2 on SwitchC to VLANs 2 to 20.


[~SwitchC] interface 10ge 1/0/2
[~SwitchC-10GE1/0/2] port link-type trunk
[*SwitchC-10GE1/0/2] port trunk allow-pass vlan 2 to 20
[*SwitchC-10GE1/0/2] commit
[~SwitchC-10GE1/0/2] quit

# Add 10GE1/0/3 on SwitchC to VLANs 2 to 20.


[~SwitchC] interface 10ge 1/0/3
[~SwitchC-10GE1/0/3] port link-type trunk
[*SwitchC-10GE1/0/3] port trunk allow-pass vlan 2 to 20
[*SwitchC-10GE1/0/3] commit
[~SwitchC-10GE1/0/3] quit

# Add 10GE1/0/1 on SwitchD to VLAN 11.


[~SwitchD] interface 10ge 1/0/1
[~SwitchD-10GE1/0/1] port link-type access
[*SwitchD-10GE1/0/1] port default vlan 11
[*SwitchD-10GE1/0/1] commit
[~SwitchD-10GE1/0/1] quit

# Add 10GE1/0/2 on SwitchD to VLANs 2 to 20.


[~SwitchD] interface 10ge 1/0/2
[~SwitchD-10GE1/0/2] port link-type trunk
[*SwitchD-10GE1/0/2] port trunk allow-pass vlan 2 to 20
[*SwitchD-10GE1/0/2] commit
[~SwitchD-10GE1/0/2] quit

# Add 10GE1/0/3 on SwitchD to VLANs 2 to 20.


[~SwitchD] interface 10ge 1/0/3
[~SwitchD-10GE1/0/3] port link-type trunk
[*SwitchD-10GE1/0/3] port trunk allow-pass vlan 2 to 20
[*SwitchD-10GE1/0/3] commit
[~SwitchD-10GE1/0/3] quit

Step 4 Verify the configuration.

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 586


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

After the preceding configurations are complete and the network topology
becomes stable, perform the following operations to verify the configuration.

NOTE

MSTI 1 and MSTI 2 are used as examples. You do not need to check the interface status in
MSTI 0.

# Run the display stp brief command on SwitchA to view the status and
protection mode on the ports. Output similar to the following is displayed:
[~SwitchA] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 DESI forwarding root 2 disable
0 10GE1/0/2 DESI forwarding none 2 disable
1 10GE1/0/1 DESI forwarding root 2 disable
1 10GE1/0/2 DESI forwarding none 2 disable
2 10GE1/0/1 DESI forwarding root 2 disable
2 10GE1/0/2 ROOT forwarding none 2 disable

In MSTI 1, 10GE1/0/1 and 10GE1/0/2 are designated ports because SwitchA is the
root bridge. In MSTI 2, 10GE1/0/1 on SwitchA is the designated port and
10GE1/0/2 is the root port.
# Run the display stp brief command on SwitchB. Output similar to the following
is displayed:
[~SwitchB] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 DESI forwarding root 2 disable
0 10GE1/0/2 ROOT forwarding none 2 disable
1 10GE1/0/1 DESI forwarding root 2 disable
1 10GE1/0/2 ROOT forwarding none 2 disable
2 10GE1/0/1 DESI forwarding root 2 disable
2 10GE1/0/2 DESI forwarding none 2 disable

In MSTI 2, 10GE1/0/1 and 10GE1/0/2 are designated ports because SwitchB is the
root bridge. In MSTI 1, 10GE1/0/1 on SwitchB is the designated port and
10GE1/0/2 is the root port.
# Run the display stp interface brief command on SwitchC. Output similar to the
following is displayed:
[~SwitchC] display stp interface 10ge 1/0/3 brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/3 ROOT forwarding none 2 disable
1 10GE1/0/3 ROOT forwarding none 2 disable
2 10GE1/0/3 ROOT forwarding none 2 disable
[~SwitchC] display stp interface 10ge 1/0/2 brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/2 DESI forwarding none 2 disable
1 10GE1/0/2 DESI forwarding none 2 disable
2 10GE1/0/2 ALTE discarding none 20000 disable

10GE1/0/3 on SwitchC is the root port in MSTI 1 and MSTI 2. 10GE1/0/2 on


SwitchC is the designated port in MSTI 1 but is blocked in MSTI 2.
# Run the display stp interface brief command on SwitchD. Output similar to the
following is displayed:
[~SwitchD] display stp interface 10ge 1/0/3 brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/3 ALTE discarding none 2 disable
1 10GE1/0/3 ROOT forwarding none 2 disable
2 10GE1/0/3 ROOT forwarding none 2 disable

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 587


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

[~SwitchD] display stp interface 10ge 1/0/2 brief


MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/2 ROOT forwarding none 2 disable
1 10GE1/0/2 ALTE discarding none 20000 disable
2 10GE1/0/2 DESI forwarding none 2 disable

10GE1/0/3 on SwitchD is the root port in MSTI 1 and MSTI 2. 10GE1/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
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 20
stp root-protection
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 20
#
return
● SwitchB configuration file
#
sysname SwitchB
#
vlan batch 2 to 20
#
stp instance 1 root secondary
stp instance 2 root primary
stp pathcost-standard legacy
#
stp region-configuration
region-name RG1
instance 1 vlan 2 to 10
instance 2 vlan 11 to 20
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 20
stp root-protection
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 20
#
return
● SwitchC configuration file
#
sysname SwitchC

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 588


CloudEngine 8800, 7800, 6800, and 5800 Series
Switches
Configuration Guide - Ethernet Switching 10 MSTP Configuration

#
vlan batch 2 to 20
#
stp pathcost-standard legacy
#
stp region-configuration
region-name RG1
instance 1 vlan 2 to 10
instance 2 vlan 11 to 20
#
interface 10GE1/0/1
port default vlan 2
stp disable
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 20
stp instance 2 cost 20000
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 20
#
return

● SwitchD configuration file


#
sysname SwitchD
#
vlan batch 2 to 20
#
stp pathcost-standard legacy
#
stp region-configuration
region-name RG1
instance 1 vlan 2 to 10
instance 2 vlan 11 to 20
#
interface 10GE1/0/1
port default vlan 11
stp disable
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 20
stp instance 1 cost 20000
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 20
#
return

Issue 09 (2021-06-03) Copyright © Huawei Technologies Co., Ltd. 589

You might also like