Professional Documents
Culture Documents
01-10 MSTP Configuration
01-10 MSTP Configuration
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.
STP refers to STP defined in IEEE 802.1D, the Rapid Spanning Tree Protocol (RSTP)
defined in IEEE 802.1w, and the Multiple Spanning Tree Protocol (MSTP) defined
in IEEE 802.1s.
MSTP is compatible with RSTP and STP, and RSTP is compatible with STP. STP,
RSTP, and MSTP all prevent broadcast storms and achieve redundancy. Table 10-1
compares STP, RSTP, and MSTP.
Purpose
After a spanning tree protocol is configured on an Ethernet switching network, it
calculates the network topology and implements the following functions to
remove network loops:
● Loop cut-off: The potential loops on the network are cut off by blocking
redundant links.
● Link redundancy: If an active path becomes faulty, a redundant link can be
activated to ensure network connectivity.
In addition to the above functions, MSTP also ensures faster convergence than STP
and can load balance among multiple VLANs.
ServerC ServerA
(VLAN 3) VLAN 3 VLAN 2 (VLAN 2)
VLAN 2 VLAN 3
S2 S5
S3 S6
Spanning tree (root bridge: S6)
On the LAN shown in Figure 10-1, STP or RSTP is enabled. The broken line
represents the spanning tree. S6 is the root bridge. The links between S1 and S4
and between S2 and S5 are blocked. VLAN packets are transmitted using the
corresponding links marked with "VLAN 2" or "VLAN 3."
Server A and Server B belong to VLAN 2 but they cannot communicate with each
other because the link between S2 and S5 is blocked and the link between S3 and
S6 denies packets from VLAN 2.
To overcome this issue that is present in STP and RSTP, the IEEE released 802.1s in
2002, defining the Multiple Spanning Tree Protocol (MSTP). In addition to
implementing fast convergence, MSTP also provides multiple paths to load
balance VLAN traffic.
MSTP divides a switching network into multiple regions, known as Multiple
Spanning Tree (MST) regions. Each MST region has multiple spanning trees,
known as Multiple Spanning Tree Instances (MSTIs), that are independent of each
other.
NOTE
ServerC ServerA
(VLAN 3) VLAN 3 VLAN 2 (VLAN 2)
VLAN 2 VLAN 3
S2 S5
S3 S6
Spanning tree (root bridge: S4)
Spanning tree (root bridge: S6)
On the network shown in Figure 10-2, MSTP maps VLANs to MSTIs in the VLAN
mapping table. Each VLAN can be mapped to only one MSTI. This means that
traffic of a VLAN can be transmitted in only one MSTI. An MSTI, however, can
correspond to multiple VLANs.
In this manner, devices within the same VLAN can communicate with each other;
packets of different VLANs are load balanced along different paths.
MSTP Network
MSTI
MSTI1
1
MSTI2 MSTI0 MSTI2 MSTI0
MST Region MST Region
MSTI1
MSTI2 MSTI0
MST Region
MST Region
An MST region contains multiple switching devices and network segments
between these devices. The switching devices in one MST region have the
following characteristics:
● MSTP-enabled
● Same region name
● Same VLAN-MSTI mappings
● Same MSTP revision level
A LAN can comprise several MST regions that are directly or indirectly connected.
Multiple switching devices can be grouped into an MST region by using MSTP
configuration commands.
On the network shown in Figure 10-4, the MST region D0 contains the switching
devices S1, S2, S3, and S4, and has three MSTIs.
D0
MSTI1
AP1 Master Bridge Root switch: S3
S1
MSTI2
Root switch: S2
S2 S3 MSTI0 (IST)
Root switch: S1
Mapping table:
S4 VLAN 1 MSTI 1
VLAN 2, VLAN 3 MSTI 2
Other VLANs MSTI 0
Regional Root
Regional roots are classified into Internal Spanning Tree (IST) and MSTI regional
roots.
In the regions B0, C0, and D0 on the network shown in Figure 10-6, the switching
devices closest to the Common and Internal Spanning Tree (CIST) root are IST
regional roots.
An MST region can contain multiple spanning trees, each called an MSTI. An MSTI
regional root is the root of the MSTI. On the network shown in Figure 10-5, each
MSTI has its own regional root.
MST Region
VLAN VLA
N10
10&20&30 &20
VLAN 20&30
30
VLAN VLAN VLAN
10&30 VLAN 10&30
20
VLAN 10
Root
Root
MSTIs are independent of each other. An MSTI can correspond to one or more
VLANs, but a VLAN can be mapped to only one MSTI.
Master Bridge
The master bridge is the IST master, which is the switching device closest to the
CIST root in a region, for example, S1 shown in Figure 10-4.
If an MST region contains the CIST root, the CIST root is the master bridge of the
region.
CIST Root
A0
CIST Root
D0
Region Root B0
Region Root
C0
Region Root
IST
CST
On the network shown in Figure 10-6, the CIST root is the root bridge of the CIST.
The CIST root is a device in A0.
CST
A Common Spanning Tree (CST) connects all the MST regions on a switching
network.
If each MST region is considered a node, the CST is calculated by STP or RSTP
based on all the nodes.
On the network shown in Figure 10-6, the MST regions are connected to form a
CST.
IST
An IST resides within an MST region and has the MSTI ID of 0. An IST is a segment
of the CIST in an MST region.
On the network shown in Figure 10-6, the switching devices in an MST region are
connected to form an IST.
CIST
A CIST, calculated by STP or RSTP, connects all the switching devices on a
switching network.
On the network shown in Figure 10-6, the ISTs and the CST form a complete
spanning tree, the CIST.
SST
A Single Spanning Tree (SST) is formed in either of the following situations:
● A switching device running STP or RSTP belongs to only one spanning tree.
● An MST region has only one switching device.
On the network shown in Figure 10-6, the switching device in B0 forms an SST.
Port Role
In addition to the port types in RSTP (root ports, designated ports, alternate ports,
backup ports, and edge ports), MSTP has two other port types: master ports and
regional edge ports.
The functions of root ports, designated ports, alternate ports, backup ports, and
edge ports have been defined in RSTP. Table 10-2 lists all port roles in MSTP.
NOTE
Root A root port is the non-root bridge port closest to the root bridge.
port Root bridges do not have root ports.
Root ports are responsible for sending data to root bridges.
On the network shown in Figure 10-7, S1 is the root; CP1 is the root
port on S3; BP1 is the root port on S2.
Port Description
Role
Master A master port provides the shortest path from an MST region to the
port CIST root.
BPDUs of an MST region are sent to the CIST root through the
master port.
Master ports are special regional edge ports, functioning as root
ports on ISTs or CISTs and functioning as master ports in MSTIs.
On the network shown in Figure 10-8, S1, S2, S3, and S4 form an
MST region. AP1 on S1, being the nearest port in the region to the
CIST root, is the master port.
Regional A regional edge port is located at the edge of an MST region and
edge connects to another MST region or an SST.
port During MSTP calculation, the roles of a regional edge port in the
MSTI and the CIST instance are the same. As such, if the regional
edge port is the master port in the CIST instance, it is the master
port in all the MSTIs in the region.
On the network shown in Figure 10-8, AP1, DP1, and DP2 in an MST
region are directly connected to other regions, and therefore they are
all regional edge ports of the MST region.
AP1 is a master port in the CIST. Therefore, AP1 is the master port in
every MSTI in the MST region.
Edge An edge port is located at the edge of an MST region and does not
port connect to any switching device.
Generally, edge ports are directly connected to terminals.
After MSTP is enabled on a port, edge port detection is started
automatically. If the port fails to receive BPDU packets within (2 x
Hello Timer + 1) seconds, the port is set to an edge port. Otherwise,
the port is set to a non-edge port.
Figure 10-7 Root port, designated port, alternate port, and backup port
S1
Root
AP2 AP3
CP1 BP1
S3 S2
Root port
Designated port
Alternate port
Backup port
AP1
Master
S1
S2 S3
S4
Blocked
Port Description
State
Forwardi A port in the Forwarding state can send and receive BPDUs as well
ng as forward user traffic.
Learning A port in the Learning state learns MAC addresses from user traffic
to build a MAC address table.
In the Learning state, the port can send and receive BPDUs, but not
forward user traffic.
There is no direct link between the port state and the port role. Table 10-4 lists
the supported port states for each port role.
Table 10-5 shows differences in the protocol version and type between TCN
BPDUs, configuration BPDUs (defined by STP), RST BPDUs (defined by RSTP), and
MST BPDUs (defined by MSTP).
The first 36 bytes of an intra-region or inter-region MST BPDU are the same as
those of an RST BPDU.
Fields from the 37th byte of an MST BPDU are MSTP-specific. The field MSTI
Configuration Messages consists of configuration messages of multiple MSTIs.
Table 10-6 lists the major information carried in an MST BPDU.
CIST External 4 Indicates the total path cost from the MST
Path Cost region where the switching device resides to the
MST region where the CIST root switching device
resides. This value is calculated based on link
bandwidth.
CIST Internal 4 Indicates the total path cost from the local port
Root Path to the IST master. This value is calculated based
Cost on link bandwidth.
After a switching device becomes the root, it sends BPDUs at Hello intervals. Non-
root switching devices adopt the Hello Time value set for the root.
Huawei network devices allow the maximum number of BPDUs sent by a port at a
Hello interval to be configured as needed.
The greater the Hello Time value, the more BPDUs sent at a Hello interval. Setting
the Hello Time to a proper value limits the number of BPDUs sent by a port at a
Hello interval. This helps prevent network topology flapping and avoid excessive
use of bandwidth resources by BPDUs.
MSTP Principle
MSTP can divide the entire Layer 2 network into multiple MST regions and
calculate the CST. In an MST region, multiple spanning trees are calculated, each
of which is called an MSTI. Of these MSTIs, MSTI 0 is also known as the internal
spanning tree (IST). Like STP, MSTP uses configuration messages to calculate
spanning trees, but the configuration messages are MSTP-specific.
Vectors
Both MSTIs and the CIST are calculated based on vectors, which are carried in
MST BPDUs. Therefore, switching devices exchange MST BPDUs to calculate MSTIs
and the CIST.
Root ID Identifies the root switching device for the CIST. The root
ID consists of the priority value (16 bits) and MAC
address (48 bits).
The priority value is the priority of MSTI 0.
External root Indicates the path cost from a CIST regional root to the
path cost root. ERPCs saved on all switching devices in an MST
(ERPC) region are the same. If the CIST root is in an MST region,
ERPCs saved on all switching devices in the MST region
are 0s.
Regional root Identifies the MSTI regional root. The regional root ID
ID consists of the priority value (16 bits) and MAC address
(48 bits).
The priority value is the priority of MSTI 0.
Internal root Indicates the path cost from the local bridge to the
path cost regional root. The IRPC saved on a regional edge port is
(IRPC) greater than the IRPC saved on a non-regional edge port.
Receiving port Identifies the port receiving the BPDU. The port ID
ID consists of the priority value (4 bits) and port number (12
bits). The priority value must be a multiple of 16.
CIST Calculation
After completing the configuration message comparison, the switching device with
the highest priority on the entire network is selected as the CIST root. MSTP
calculates an IST for each MST region, and calculates a CST to interconnect MST
regions. On the CST, each MST region is considered a switching device. The CST
and ISTs constitute a CIST for the entire network.
MSTI Calculation
In an MST region, MSTP calculates an MSTI for each VLAN based on mappings
between VLANs and MSTIs. Each MSTI is calculated independently. The calculation
process is similar to the process in which STP calculates a spanning tree. For
details, see 9.2.4 STP Topology Calculation.
MSTIs have the following characteristics:
● The spanning tree is calculated independently for each MSTI, and spanning
trees of MSTIs are independent of each other.
● Spanning trees of MSTIs can have different roots and topologies.
● Each MSTI sends BPDUs in its spanning tree.
● The topology of each MSTI is configured by commands.
● A port can be configured with different parameters for different MSTIs.
● A port can play different roles or have different states in different MSTIs.
On an MSTP-aware network, a VLAN packet is forwarded along the following
paths:
● Along an MSTI (in an MST region)
● Along a CST (between MST regions)
Sends a proposal so
that the port can
rapidly enter the
Forwarding state The root port blocks all
the other non-edge ports
Sends an agreement
The root port enters
The designated Sends an agreement the Forwarding state
port enters the
Forwarding state
Root port
Designated port
Background
The following describes the network shown in Figure 10-11:
● UPEs are deployed at the aggregation layer and are running MSTP.
● UPE1 and UPE2 are connected by a Layer 2 link.
● Multiple rings are connected to UPE1 and UPE2 through different ports.
● Switching devices on the rings reside at the access layer and are running STP
or RSTP. In addition, UPE1 and UPE2 work for different carriers, so they need
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
STP/RSTP
S1
Access
S4
S2 S3
On the network shown in Figure 10-11, switching devices and UPEs construct
multiple Layer 2 rings. STP must be enabled on these rings to prevent loops. UPE1
and UPE2 are connected to multiple access rings that are independent of each
other. The spanning tree protocol cannot calculate a single spanning tree for all
switching devices. Instead, the spanning tree protocol must be enabled on each
ring to calculate a separate spanning tree.
MSTP supports MSTIs, but these MSTIs must belong to one MST region in which
devices must have the same configurations. If the devices belong to different
regions, MSTP calculates the spanning tree based on only one instance. Assume
that devices on the network belong to different regions, and only one spanning
tree is calculated in one instance. In this case, the status change of any device on
the network affects the stability of the entire network. On the network shown in
Figure 10-11, the switching devices connected to UPEs support only STP or RSTP
but not MSTP. When MSTP-enabled UPEs receive RST BPDUs from the switching
devices, the UPEs consider that they and switching devices belong to different
regions. As a result, only one spanning tree is calculated for the rings composed of
UPEs and switching devices, and the rings affect each other.
NOTE
In addition to applying to MSTP, MSTP multi-process also applies to RSTP and STP.
Purpose
On the network shown in Figure 10-11, MSTP multi-process is configured to
implement the following:
● Allows STP to work under far more networking conditions.
To help a network running different spanning tree protocols run properly, you
can bind different spanning tree protocols to different processes. In this
manner, every process calculates a separate spanning tree.
● Improves the networking reliability. For a network composed of many Layer 2
access devices, using MSTP multi-process reduces the adverse effect of a
single node failure on the entire network.
The topology is calculated for each process. If a device fails, only the topology
corresponding to the process to which the device belongs changes.
● Reduces the network administrator workload during network expansion,
facilitating operations and maintenance (O&M).
To expand a network, all you need to do is configure new processes, connect
the processes to the existing network, and keep the existing MSTP processes
unchanged. If device expansion is performed in a process, only this process
needs to be modified.
● Implements separate Layer 2 port management
An MSTP process manages parts of ports on a device. Layer 2 ports on a
device are separately managed by multiple MSTP processes.
Implementation
● Public link status
On the network shown in Figure 10-11, the public link between UPE1 and
UPE2 is a Layer 2 link running MSTP and is different from the links
connecting switching devices to UPEs. This difference lies in the fact that ports
on the links connecting switching devices to UPEs only participate in the
calculation for a single access ring and a single MSTP process. The ports on
the public link, on the other hand, need to participate in the calculation for
multiple access rings and MSTP processes. Therefore, the UPEs must identify
the process from which MST BPDUs are sent.
A port on the public link participates in the calculation for multiple MSTP
processes, and obtains different states. As a result, the port cannot determine
its state.
To prevent these problems from occurring, it is defined that a port on a public
link always adopts its state in MSTP process 0 when participating in the
calculation for multiple MSTP processes.
NOTE
After a device starts, MSTP process 0 exists by default, and MSTP configurations in the
system view and interface view belong to this process.
The device is incompatible with non-standard STP, RSTP, and MSTP, for example, PVST
+. It transparently forwards PVST+ packets in a VLAN as common data packets.
● Reliability
On the network shown in Figure 10-12, after the topology of a ring changes,
the MSTP multi-process mechanism helps UPEs flood a topology change (TC)
packet to all devices on the ring and prevent the TC packet from being
flooded to devices on the other ring. UPE1 and UPE2 update MAC address
and ARP entries on the ports corresponding to the changed spanning tree.
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
STP/RSTP
Access
S1 S4
S2 S3
Topology change
On the network shown in Figure 10-13, if the public link between UPE1 and
UPE2 fails, multiple switching devices that are connected to the UPEs will
unblock their blocked ports.
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
STP/RSTP
S1
Access
S4
S2 S3
Assume that UPE1 is configured with the highest priority, UPE2 with the
second highest priority, and switching devices with default or lower priorities.
After the link between UPE1 and UPE2 fails, the blocked ports on switching
devices no longer receive packets of higher priorities. For this reason, these
ports re-perform state machine calculation. If the calculation changes the
blocked ports to designated ports, a permanent loop occurs, as shown in
Figure 10-14.
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
STP/RSTP
Access
S1 S4
S2 S3
Topology change
● Solutions
To prevent a loop between access rings, use either of the following solutions:
– Configure an Eth-Trunk between UPE1 and UPE2.
An Eth-Trunk is used as the public link between UPE1 and UPE2 to
improve link reliability, as shown in Figure 10-15.
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
Eth-Trunk
STP/RSTP
S1
Access
S4
S2 S3
MPLS/IP Core
Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
Root
protection
S1
Access
S4
STP/RSTP
S2 S3
On the light blue ring shown in Figure 10-16, UPE1 is configured with
the highest priority, UPE2 with the second highest priority, and switching
devices with default or lower priorities. In addition, root protection is
enabled on UPE2.
Assume that a port on S1 is blocked. When the public link between UPE1
and UPE2 fails, the blocked port on S1 begins to calculate the state
machine because it no longer receives BPDUs of higher priorities. After
the calculation, the blocked port becomes the designated port and
performs P/A negotiation with the downstream device.
After S1, which is directly connected to UPE2, sends BPDUs of higher
priorities to the UPE2 port enabled with root protection, the port is
blocked. From then on, the port remains blocked because it continues
receiving BPDUs of higher priorities. In this manner, no loop will occur.
MST Region
S1 S2
All VLANs
VLANs
S3 20 & 40 S4
In Figure 10-17, S1 and S2 are devices at the aggregation layer; S3 and S4 are
devices at the access layer. Traffic from VLAN 10 and VLAN 30 is terminated by
aggregation devices, and traffic from VLAN 40 is terminated by access devices.
Therefore, S1 and S2 can be configured as the roots of MSTI 1 and MSTI 3, and S3
can be configured as the root of MSTI 4.
Core
MPLS/IP Core
UPE4 UPE3
Aggregation
MSTP
UPE1 UPE2
STP/RSTP
S1 S4
Access
S2 S3
Licensing Requirements
MSTP is a basic function of the switch, and as such is controlled by the license for
basic software functions. The license for basic software functions has been loaded
and activated before delivery. You do not need to manually activate it.
Version Requirements
CE9860EI V200R020C00
CE8860EI V100R006C00
CE8861EI/CE8868EI V200R005C10
CE8850-32CQ-EI V200R002C50
CE8850-64CQ-EI V200R005C00
CE7850EI V100R003C00
CE7855EI V200R001C00
CE6810EI V100R003C00
CE6810-48S4Q-LI/CE6810-48S- V100R003C10
LI
CE6810-32T16S4Q-LI/ V100R005C10
CE6810-24S2Q-LI
CE6850EI V100R001C00
CE6850-48S6Q-HI V100R005C00
CE6850-48T6Q-HI/CE6850U-HI/ V100R005C10
CE6851HI
CE6855HI V200R001C00
CE6856HI V200R002C50
CE6857EI V200R005C10
CE6860EI V200R002C50
CE6865EI V200R005C00
CE6870-24S6CQ-EI V200R001C00
CE6870-48S6CQ-EI V200R001C00
CE6870-48T6CQ-EI V200R002C50
CE6875-48S4CQ-EI V200R003C00
CE6880EI V200R002C50
CE6881K V200R019C10
CE6881E V200R019C10
CE6863K V200R019C10
CE5810EI V100R002C00
CE5850EI V100R001C00
CE5850HI V100R003C00
CE5855EI V100R005C10
CE5880EI V200R005C10
CE5881 V200R020C00
NOTE
For details about the mapping between software versions and switch models, see the
Hardware Query Tool.
Feature Limitations
● On networks that run STP, RSTP, MSTP, or VLAN-based Spanning Tree (VBST),
configure an optimal core switch as the root bridge to ensure stability of the
STP Layer 2 network. Otherwise, new access devices may trigger an STP root
bridge change, causing short service interruptions.
● When MSTP is enabled on a ring network, MSTP immediately starts spanning
tree calculation. Parameters such as the device priority and port priority affect
spanning tree calculation, and changing these parameters may cause network
flapping. To ensure fast and stable spanning tree calculation, perform basic
configurations on the switch and interfaces before enabling MSTP.
● When MSTP multi-instance is configured, more MSTIs indicate longer MSTP
BPDUs. MSTP BPDUs are sent independently in each MSTP process. When
MSTP multi-process is configured, the number of outgoing MSTP BPDUs
increases. When MSTP multi-instance and multi-process are configured, the
default CPCAR of STP cannot meet requirements. You need to increase the
default CPCAR of STP. If the default CPCAR of STP is not increased, MSTP
BPDUs may be discarded.
● BPDU protection takes effect for only the manually configured edge ports.
● Loop protection and root protection cannot be configured on the same
interface together.
● In versions earlier than V200R001C00, STP cannot be configured on a user-
side interface of a VXLAN tunnel. Starting from V200R001C00, STP can be
configured on a user-side interface of a VXLAN tunnel that accesses the
VXLAN as a VLAN. In V200R002C50 and later versions, STP can be configured
on a user-side interface of a VXLAN tunnel when the device is deployed to
provide VXLAN access through a Layer 2 sub-interface or to provide VLAN
access.
● For CE6870EI, In V200R001C00, the bpdu bridge enable command is not
supported on the VXLAN network. To enable BPDU packets to traverse the
VXLAN network, run the undo mac-address bpdu [ mac-address [ mac-
address-mask ] ] command in the system view. In this command, mac-address
specifies the MAC address of BPDU packets that need to traverse the VXLAN
network.
For CE switches excluding CE5880EI, CE6875EI, CE6880EI, CE6870EI in versions
earlier than V200R001C00, if the bpdu bridge enable command is configured
on an access-side port on the VXLAN network connected to an STP network,
BPDU packets cannot traverse the VXLAN network. This causes loops on the
STP network. In V200R001C00 and later versions, the bpdu bridge enable
command is not supported on the VXLAN network. If this command is
configured in a version earlier than V200R001C00, it will be deleted from the
device configurations after an upgrade to V200R001C00 or a later version. To
enable BPDU packets to traverse the VXLAN network, run the undo mac-
address bpdu [ mac-address [ mac-address-mask ] ] command in the system
view. In this command, mac-address specifies the MAC address of BPDU
packets that need to traverse the VXLAN network.
Context
Before configuring basic MSTP functions, set the working mode of a switching
device to MSTP. MSTP is compatible with STP and RSTP.
Procedure
Step 1 Run system-view
The working mode of the switching device is set to MSTP. By default, the working
mode is MSTP.
MSTP can recognize RSTP BPDUs and, conversely, RSTP can recognize MSTP
BPDUs. However, MSTP and STP cannot recognize each other's BPDUs. To enable
devices running different spanning tree protocols to interwork with each other,
interfaces of an MSTP-enabled switch connected to devices running STP
automatically transition to STP mode; other interfaces continue to work in MSTP
mode.
----End
NOTE
Two switching devices belong to the same MST region when they have the same:
● MST region name
● VLAN-to-MSTI mapping
● Revision level of the MST region
Perform the following steps on a switching device that needs to join an MST
region.
Procedure
● Configure the name of an MST region.
a. Run system-view
The system view is displayed.
b. Run stp region-configuration
The MST region view is displayed.
c. Run region-name name
The name of an MST region is configured.
By default, the name of an MST region is the MAC address of the
management network interface on the MPU of the switching device.
d. (Optional) Run check region-configuration
The device is configured to check the MST region name.
e. Run commit
The configuration is committed.
● Configure the mapping between MSTIs and VLANs.
You can configure the mapping between MSTIs and VLANs in the MST region
view and VLAN instance view.
Configure the mapping between an MSTI and VLANs in the MST region view.
a. Run system-view
The system view is displayed.
NOTE
A VLAN can be mapped to only one MSTI. If you map a VLAN that has already
been mapped to an MSTI to another MSTI, the original mapping will be deleted.
d. (Optional) Run check region-configuration
The device is configured to check the mapping between the MSTI and
VLANs.
e. Run commit
Configure the mapping between an MSTI and VLANs in the VLAN instance
view.
a. Run system-view
By default, all VLANs in the VLAN instance view are mapped to MSTI 0.
NOTE
NOTE
On networks that run STP/RSTP/MSTP/VBST, configure an optimal core switch as the root
bridge to ensure stability of the STP Layer 2 network. Otherwise, new access devices may
trigger STP root bridge switching, causing short service interruptions.
Procedure
● Perform the following operations on the device to be used as the root bridge.
a. Run system-view
The system view is displayed.
b. Run stp [ instance instance-id ] root primary
The device is configured as the root bridge.
By default, a switching device does not function as the root bridge. After
the configuration is complete, the priority value of the device is 0 and this
value cannot be changed.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp [ instance instance-id ] priority priority
A priority is set for the switching device in an MSTI.
The default priority value of the switching device is 32768.
If instance-id is not specified, a priority is set for the switching device in MSTI 0.
NOTE
If the stp [ instance instance-id ] root primary or stp [ instance instance-id ] root
secondary command has been executed to configure the device as the root bridge or
secondary root bridge, to change the device priority, run the undo stp [ instance instance-
id ] root command to disable the root bridge or secondary root bridge function and run the
stp [ instance instance-id ] priority priority command to set a priority.
----End
Path costs of ports are an important metric used in spanning tree calculation and
determine root port selection in an MSTI. The port with the lowest path cost to
the root bridge is selected as the root port. Load balancing of VLAN traffic can be
achieved by setting different path costs for a port in different MSTIs.
If loops occur on a network, it is recommended that you set a large path cost for
ports with low link rates.
Procedure
Step 1 Run system-view
By default, the IEEE 802.1t standard (dot1t) is used to calculate the path cost.
All switching devices on a network must use the same path cost calculation
method.
● When the Huawei calculation method is used, cost ranges from 1 to 200000.
● When the IEEE 802.1d standard method is used, cost ranges from 1 to 65535.
● When the IEEE 802.1t standard method is used, cost ranges from 1 to
200000000.
● If an Eth-Trunk interface is specified as the member interface of an M-LAG
configured in V-STP mode, the path cost of the Eth-Trunk interface is fixed at
2000.
----End
Context
During spanning tree calculation, port priorities in MSTIs determine which ports
are selected as designated ports and which ports are blocked. To specify a port as
blocked, set the port priority to a value greater than the default value.
Procedure
Step 1 Run system-view
----End
Context
MSTP must be enabled for basic MSTP functions to take effect.
Procedure
Step 1 Run system-view
NOTE
After MSTP is enabled on a port, edge port detection is started automatically. If the port fails to
receive BPDU packets within (2 x Hello Timer + 1) seconds, the port is set to an edge port.
Otherwise, the port is set to a non-edge port.
----End
Follow-up Procedure
If the topology of a spanning tree changes, the forwarding paths to associated
VLANs are changed. On the switching device, therefore, the ARP entries
corresponding to these VLANs need to be updated. MSTP processes ARP entries in
either fast or normal mode.
To specify which mode is used for STP/RSTP convergence, run the stp converge
{ fast | normal } command in the system view.
By default, the normal MSTP convergence mode is used. If fast mode is used, ARP
entries are frequently deleted. This causes high CPU usage on the device (reaching
100%) and results in frequent network flapping. Therefore, using normal mode is
recommended.
Procedure
● Run the display stp [ process process-id ] [ instance instance-id ] [ interface
interface-type interface-number | slot slot-id ] [ brief ] command to view
spanning-tree status and statistics.
● Run the display stp region-configuration command to view configurations
of activated MST regions.
● Run the display stp region-configuration digest command to view the
digest configurations of activated MST regions.
----End
Pre-configuration Tasks
MSTP ensures that spanning trees in rings are calculated independently. After
MSTP multi-process is enabled, each MSTP process can manage certain ports on a
device. Each Layer 2 interface can be managed by multiple MSTP processes.
Before configuring MSTP multi-process, complete and activate the MST region
configuration.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp process process-id
An MSTP process is created and the MSTP process view is displayed.
Step 3 Run stp mode mstp
A working mode is configured for the MSTP process.
The default mode is MSTP.
NOTE
● A default MSTP process with the ID 0 is established when a device starts. MSTP
configurations in the system view and interface view belong to this process. The default
working mode of this process is MSTP.
● To add an interface to an MSTP process whose ID is not 0, run the stp process
command and then the stp binding process command.
----End
● The link shared by multiple access rings is called a shared link. Interfaces on
this shared link participate in MSTP calculation in multiple access rings and
MSTP processes.
Procedure
● Adding an interface on an access link to an MSTP process
a. Run system-view
NOTE
In an MSTP process where there are multiple shared links, run the stp enable
command in the MSTP multi-instance view. On an interface that is added to an
MSTP process in link-share mode, run the stp enable command in the interface
view.
d. Run commit
----End
NOTE
On networks that run STP/RSTP/MSTP/VBST, configure an optimal core switch as the root
bridge to ensure stability of the STP Layer 2 network. Otherwise, new access devices may
trigger STP root bridge switching, causing short service interruptions.
Procedure
● Perform the following operations on the device to be used as the root bridge.
a. Run system-view
By default, a switching device does not function as the root bridge. After
the configuration is complete, the priority value of the device is 0 and this
value cannot be changed.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp process process-id
The MSTP process view is displayed.
Step 3 Run stp [ instance instance-id ] priority priority
A priority is set for the switching device in an MSTI.
The default priority value of the switching device is 32768.
If instance is not specified, a priority is set for the switching device in MSTI 0.
NOTE
● To configure a switching device as the primary root bridge, run the stp [ instance
instance-id ] root primary command directly. The priority value of this switching device
is 0.
● To configure a switching device as the secondary root bridge, run the stp [ instance
instance-id ] root secondary command. The priority value of this switching device is
4096.
In an MSTI, a switching device cannot act as the primary root bridge and secondary root
bridge at the same time.
● If the stp [ instance instance-id ] root primary or stp [ instance instance-id ] root
secondary command has been executed to configure the device as the root bridge or
secondary root bridge, to change the device priority, run the undo stp [ instance
instance-id ] root command to disable the root bridge or secondary root bridge function
and run the stp [ instance instance-id ] priority priority command to set a priority.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp pathcost-standard { dot1d-1998 | dot1t | legacy }
A path cost calculation method is configured.
By default, the IEEE 802.1t standard (dot1t) is used to calculate the path cost.
All switching devices on a network must use the same path cost calculation
method.
Step 3 Run interface interface-type interface-number
The Ethernet interface view is displayed.
Step 4 Run stp binding process process-id
The port is bound to an MSTP process.
● When the Huawei calculation method is used, cost ranges from 1 to 200000.
● When the IEEE 802.1d standard method is used, cost ranges from 1 to 65535.
● When the IEEE 802.1t standard method is used, cost ranges from 1 to
200000000.
● If an Eth-Trunk interface is specified as the member interface of an M-LAG
configured in V-STP mode, the path cost of the Eth-Trunk interface is fixed at
2000.
----End
Context
During spanning tree calculation, port priorities in MSTIs determine which ports
are selected as designated ports and which ports are blocked. To specify a port as
blocked, set the port priority to a value greater than the default value.
Procedure
Step 1 Run system-view
Step 4 Run stp [ process process-id ] instance instance-id port priority priority
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp process process-id
The view of a created MSTP process is displayed.
Step 3 Run stp tc-notify process 0
TC notification is enabled in the MSTP process.
After the stp tc-notify process 0 command is run, the current MSTP process
notifies the MSTIs in MSTP process 0 to update MAC entries and ARP entries after
receiving a TC-BPDU. This prevents services from being interrupted.
Step 4 Run commit
The configuration is committed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stp process process-id
The view of a created MSTP process is displayed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Run stp process process-id
The MSTP process view is displayed.
NOTE
● RSTP uses a single spanning tree instance on the entire network. As a result,
performance deterioration cannot be prevented when the network scale
grows. Therefore, the network diameter cannot be larger than 7.
● It is recommended that you run the stp bridge-diameter diameter command
to set the network diameter. The switching device then calculates the optimal
Forward Delay timer value, Hello timer value, and Max Age timer value based
on the configured network diameter.
----End
Context
If a device does not receive any BPDUs from the upstream device within the
timeout interval, the device considers the upstream device to have failed and
recalculates the spanning tree.
Sometimes, a device cannot receive the BPDU from the upstream device within
the timeout interval because the upstream device is temporarily busy. In this case,
recalculating the spanning tree will waste network resources. This can be avoided
by increasing the timeout interval. However, only set a long timeout interval if the
network is relatively stable.
Procedure
Step 1 Run system-view
NOTE
The timeout interval is set, specifying how long the upstream device waits for
BPDUs.
----End
Context
There are three timers used in spanning tree calculation: Forward Delay, Hello
Time, and Max Age. These timers can be configured to affect STP convergence.
However, you are not advised to directly change these timers. Instead, it is
recommended that you set the network diameter so that the spanning tree
protocol automatically adjusts these timers in accordance with the network scale.
Devices on a ring network must use the same values of Forward Delay, Hello
Time, and Max Age.
NOTICE
To prevent frequent network flapping, make sure that the Hello Time, Forward
Delay, and Max Age timer values conform to the following formulas:
● 2 x (Forward Delay - 1.0 second) ≥ Max Age
● Max Age ≥ 2 x (Hello Time + 1.0 second)
Procedure
Step 1 Run system-view
NOTE
----End
Root bridge
SwitchA SwitchB
After Eth-Trunk1
configuration Eth-Trunk2
Root bridge
Alternate port
Root port
Designated port
The maximum number of connections affects only the path cost of an Eth-Trunk
interface participating in spanning tree calculation, and does not affect the actual
bandwidth of the Eth-Trunk link. The actual bandwidth for an Eth-Trunk link
depends on the number of active member interfaces in the Eth-Trunk.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Step 3 Run max bandwidth-affected-linknumber link-number
The maximum number of connections affecting the Eth-Trunk bandwidth is set.
By default, the upper threshold for the number of interfaces that determine the
bandwidth of an Eth-Trunk is 8 on the CE5810EI, 64 on CE6880EI and CE5880EI,
and 16 on other models (excluding the CE6870EI and CE6875EI). For the CE6870EI
and CE6875EI, the upper threshold for the number of interfaces that determine
the bandwidth of an Eth-Trunk depends on the maximum number of configured
LAGs. In an SVF system, the maximum number of connections affecting the
bandwidth of an Eth-Trunk is 8.
Step 4 Run commit
The configuration is committed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of the Ethernet interface participating in STP calculation is displayed.
Step 3 Run stp point-to-point { auto | force-false | force-true }
The link type is configured for the interface.
By default, an interface automatically determines whether to connect to a P2P
link. The P2P link supports rapid network convergence.
Step 4 Run commit
The configuration is committed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of the Ethernet interface that participates in spanning tree calculation is
displayed.
Step 3 Run stp transmit-limit packet-number
The maximum number of BPDUs sent by a port in a specified period is set.
By default, the maximum transmission rate of BPDUs on an interface is the value
configured by the stp transmit-limit (system view) command. If the stp
If the same maximum transmission rate of BPDUs needs to be set for each interface on a
device, run the stp transmit-limit (system view) command. The stp transmit-limit
(interface view) command takes precedence over the stp transmit-limit (system view)
command. If the stp transmit-limit (interface view) command is configured on an
interface, the stp transmit-limit (system view) command does not take effect on that
interface.
----End
Procedure
● Changing to the MSTP mode in the interface view
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The view of the Ethernet interface that participates in spanning tree
calculation is displayed.
c. Run stp mcheck
The device is changed to the MSTP mode.
d. Run commit
The configuration is committed.
● Changing to the MSTP mode in the system view
a. Run system-view
The system view is displayed.
b. (Optional) Run stp process process-id
The MSTP process view is displayed.
NOTE
NOTICE
After all ports are configured as edge ports and BPDU filter ports in the system
view, the ports do not send BPDUs or negotiate the STP status with directly
connected ports on the peer device. All ports are in Forwarding state, which may
cause loops on the network and lead to broadcast storms. Exercise caution when
you configure a port as an edge port and BPDU filter port.
After a port is configured as an edge port and BPDU filter port in the interface
view, the port does not process or send BPDUs. The port cannot negotiate the STP
status with the directly connected port on the peer device. Exercise caution when
you configure a port as an edge port and BPDU filter port.
Procedure
● Configuring all ports as edge ports and BPDU filter ports in the system view
a. Run system-view
The system view is displayed.
b. Run stp edged-port default
All ports are configured as edge ports.
By default, all ports are non-edge ports.
c. Run stp bpdu-filter default
All ports are configured as BPDU filter ports.
----End
Context
To communicate with each other on a Layer 2 network running MSTP, switching
devices exchange MST BPDUs, each of which has a field that indicates the number
of remaining hops. The number of remaining hops differs depending on the role of
the switching device, as outlined below:
● The number of remaining hops in a BPDU sent by the root bridge equals the
maximum number of hops.
● The number of remaining hops in a BPDU sent by a non-root bridge equals
the maximum number of hops minus the number of hops from the non-root
bridge to the root bridge.
From the above information, it can be seen that the maximum number of hops of
a spanning tree in an MST region determines the network scale. The stp max-
hops command can be used to set the maximum number of hops in an MST
region so that the network scale of a spanning tree can be controlled.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Run stp process process-id
The MSTP process view is displayed.
NOTE
----End
NOTE
BPDU protection is only valid for the edge port manually configured by the stp edged-port
or stp edged-port default command, and is invalid for the edge port configured by the
automatic detection function.
Procedure
Step 1 Run system-view
NOTE
----End
Follow-up Procedure
After BPDU protection is configured, the edge port that receives BPDUs will enter
the Error-Down state and keeps its attributes. The device records the status of an
interface as Error-Down when it detects that a fault occurs. The interface in Error-
Down state cannot receive or send packets and the interface indicator is off. You
can run the display error-down recovery command to check information about
all interfaces in Error-Down state on the device.
When the interface is in Error-Down state, check the cause. You can use the
following modes to restore the interface status:
● Manual (after interfaces enter the Error-Down state)
When there are few interfaces in Error-Down state, run the shutdown and
undo shutdown commands in the interface view or run the restart command
to restore the interface.
● Auto (before interfaces enter the Error-Down state)
If there are many interfaces in Error-Down state, the manual mode brings in
heavy workload and the configuration of some interfaces may be ignored. To
prevent this problem, run the error-down auto-recovery cause bpdu-
protection interval interval-value command in the system view to enable an
interface in Error-Down state to go Up and set a recovery delay. You can run
the display error-down recovery command to view automatic recovery
information about the interface.
NOTE
This mode is invalid for the interface that has entered the Error-Down state, and is valid
only for the interface that enters the Error-Down state after the error-down auto-recovery
cause bpdu-protection interval interval-value command is run.
Context
If attackers forge TC BPDUs to attack a switching device, the switching device
receives a large number of TC BPDUs within a short period. If MAC address entries
and ARP entries are deleted frequently, the switching device is heavily burdened,
causing potential risks to the network.
Procedure
Step 1 Run system-view
NOTE
NOTE
● There are two TC protection parameters: time period during which the device processes
the maximum number of TC BPDUs and the maximum number of TC BPDUs processed
within the time period. For example, if the time period is set to 10 seconds and the
maximum number of TC BPDUs is set to 5, the device processes only the first five TC
BPDUs within 10 seconds and processes the other TC BPDUs together 10 seconds later.
● The device processes only the maximum number of TC BPDUs configured by the stp tc-
protection threshold command within the time period configured by the stp tc-
protection interval command. Other packets are processed after a delay, so spanning
tree convergence speed may slow down.
----End
NOTE
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of the Ethernet interface that participates in spanning tree calculation is
displayed.
Step 3 (Optional) Run stp binding process process-id
The port is bound to an MSTP process.
NOTE
----End
NOTE
An alternate port is a backup port for a root port. If a switching device has an alternate
port, configure loop protection on both the root port and the alternate port.
Perform the following steps on the root port and alternate port on a switching
device in an MST region.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The Ethernet interface view is displayed.
Step 3 (Optional) Run stp binding process process-id
The port is bound to an MSTP process.
NOTE
----End
Context
Share-link protection is used in scenarios where a switching device is dual-homed
to a network.
When a shared link fails, share-link protection forcibly changes the working mode
of a local switching device to RSTP. This function can be used together with root
protection to avoid network loops.
Procedure
Step 1 Run system-view
----End
Procedure
● Run the display stp [ process process-id ] [ instance instance-id ] [ interface
interface-type interface-number | slot slot-id ] [ brief ] command to view
spanning-tree status and statistics.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The Ethernet interface view is displayed.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The Ethernet interface view is displayed.
Step 3 Run stp compliance { auto | dot1s | legacy }
The MSTP protocol packet format is configured on the interface.
The auto mode is used by default.
Step 4 Run commit
The configuration is committed.
----End
Procedure
Step 1 Run system-view
----End
Procedure
● Run the display stp [ process process-id ] [ instance instance-id ] [ interface
interface-type interface-number | slot slot-id ] [ brief ] command to view
spanning-tree status and statistics.
----End
Context
NOTICE
Procedure
● Run the reset stp [ interface interface-type interface-number ] statistics
command to clear spanning-tree statistics.
----End
Procedure
● Run the display stp [ process process-id ] [ instance instance-id ] topology-
change command to view the statistics about MSTP topology changes.
In the case of a non-zero process, the stp process process-id command must
be used to create a process before the display stp [ process process-id ]
[ instance instance-id ] topology-change command is used.
● Run the display stp [ process process-id ] [ instance instance-id ] [ interface
interface-type interface-number | slot slot-id ] tc-bpdu statistics command
to view the statistics about Topology Change/Topology Change Notification
(TC/TCN) packets.
In the case of a non-zero process, the stp process process-id command must
be used to create a process before the display stp [ process process-id ]
[ instance instance-id ] [ interface interface-type interface-number | slot
slot-id ] tc-bpdu statistics command is used.
----End
Network
RG1
10GE1/0/2
SwitchA SwitchB
10GE1/0/2
10GE1/0/1 10GE1/0/1
10GE1/0/3 10GE1/0/3
10GE1/0/2
SwitchC SwitchD
10GE1/0/2
10GE1/0/1 10GE1/0/1
Server1 Server2
VLAN2~10 MSTI1
VLAN11~20 MSTI2
MSTI1:
Root Switch:SwitchA
Blocked port
MSTI2:
Root Switch:SwitchB
Blocked port
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic MSTP functions on the switching device on the ring network.
2. Configure protection functions to protect devices or links. You can configure
root protection on the designated port of the root bridge.
Procedure
Step 1 Configure basic MSTP functions.
1. Configure SwitchA, SwitchB, SwitchC, and SwitchD in the same MST region
named RG1 and create MSTI 1 and MSTI 2.
NOTE
Two switching devices belong to the same MST region when they have the same:
– Name of the MST region
– Mapping between VLANs and MSTIs
A VLAN cannot be mapped to multiple MSTIs. If you map a VLAN that has
already been mapped to an MSTI to another MSTI, the original mapping will be
deleted.
– Revision level of the MST region
# Configure an MST region on SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] stp region-configuration
[~SwitchA-mst-region] region-name RG1
[*SwitchA-mst-region] instance 1 vlan 2 to 10
[*SwitchA-mst-region] instance 2 vlan 11 to 20
[*SwitchA-mst-region] commit
[~SwitchA-mst-region] quit
# Configure an MST region on SwitchB.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] stp region-configuration
[~SwitchB-mst-region] region-name RG1
[*SwitchB-mst-region] instance 1 vlan 2 to 10
[*SwitchB-mst-region] instance 2 vlan 11 to 20
[*SwitchB-mst-region] commit
[~SwitchB-mst-region] quit
# Configure an MST region on SwitchC.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchC
[*HUAWEI] commit
[~SwitchC] stp region-configuration
[~SwitchC-mst-region] region-name RG1
[*SwitchC-mst-region] instance 1 vlan 2 to 10
[*SwitchC-mst-region] instance 2 vlan 11 to 20
[*SwitchC-mst-region] commit
[~SwitchC-mst-region] quit
# Configure an MST region on SwitchD.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchD
[*HUAWEI] commit
[~SwitchD] stp region-configuration
[~SwitchD-mst-region] region-name RG1
[*SwitchD-mst-region] instance 1 vlan 2 to 10
[*SwitchD-mst-region] instance 2 vlan 11 to 20
[*SwitchD-mst-region] commit
[~SwitchD-mst-region] quit
2. In the MST region RG1, configure the root bridge and secondary root bridge
in MSTI 1 and MSTI 2.
3. Set the path costs of the ports to be blocked in MSTI 1 and MSTI 2 to be
greater than the default value.
NOTE
– The path cost values depend on path cost calculation methods. This example uses
the Huawei proprietary calculation method as an example to set the path cost to
20000 for the ports to be blocked. If another path cost calculation method is used,
see stp pathcost-standard.
– All switching devices on a network must use the same path cost calculation
method.
# Configure SwitchA to use Huawei proprietary calculation method to
calculate the path cost.
[~SwitchA] stp pathcost-standard legacy
[*SwitchA] commit
Step 2 Configure root protection on the designated port of the root bridge.
# Enable root protection on 10GE1/0/1 of SwitchA.
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] stp root-protection
[*SwitchA-10GE1/0/1] commit
[~SwitchA-10GE1/0/1] quit
After the preceding configurations are complete and the network topology
becomes stable, perform the following operations to verify the configuration.
NOTE
MSTI 1 and MSTI 2 are used as examples. You do not need to check the interface status in
MSTI 0.
# Run the display stp brief command on SwitchA to view the status and
protection mode on the ports. Output similar to the following is displayed:
[~SwitchA] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 DESI forwarding root 2 disable
0 10GE1/0/2 DESI forwarding none 2 disable
1 10GE1/0/1 DESI forwarding root 2 disable
1 10GE1/0/2 DESI forwarding none 2 disable
2 10GE1/0/1 DESI forwarding root 2 disable
2 10GE1/0/2 ROOT forwarding none 2 disable
In MSTI 1, 10GE1/0/1 and 10GE1/0/2 are designated ports because SwitchA is the
root bridge. In MSTI 2, 10GE1/0/1 on SwitchA is the designated port and
10GE1/0/2 is the root port.
# Run the display stp brief command on SwitchB. Output similar to the following
is displayed:
[~SwitchB] display stp brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/1 DESI forwarding root 2 disable
0 10GE1/0/2 ROOT forwarding none 2 disable
1 10GE1/0/1 DESI forwarding root 2 disable
1 10GE1/0/2 ROOT forwarding none 2 disable
2 10GE1/0/1 DESI forwarding root 2 disable
2 10GE1/0/2 DESI forwarding none 2 disable
In MSTI 2, 10GE1/0/1 and 10GE1/0/2 are designated ports because SwitchB is the
root bridge. In MSTI 1, 10GE1/0/1 on SwitchB is the designated port and
10GE1/0/2 is the root port.
# Run the display stp interface brief command on SwitchC. Output similar to the
following is displayed:
[~SwitchC] display stp interface 10ge 1/0/3 brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/3 ROOT forwarding none 2 disable
1 10GE1/0/3 ROOT forwarding none 2 disable
2 10GE1/0/3 ROOT forwarding none 2 disable
[~SwitchC] display stp interface 10ge 1/0/2 brief
MSTID Port Role STP State Protection Cost Edged
0 10GE1/0/2 DESI forwarding none 2 disable
1 10GE1/0/2 DESI forwarding none 2 disable
2 10GE1/0/2 ALTE discarding none 20000 disable
----End
Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
vlan batch 2 to 20
#
stp instance 1 root primary
stp instance 2 root secondary
stp pathcost-standard legacy
#
stp region-configuration
region-name RG1
instance 1 vlan 2 to 10
instance 2 vlan 11 to 20
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 20
stp root-protection
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 20
#
return
● SwitchB configuration file
#
sysname SwitchB
#
vlan batch 2 to 20
#
stp instance 1 root secondary
stp instance 2 root primary
stp pathcost-standard legacy
#
stp region-configuration
region-name RG1
instance 1 vlan 2 to 10
instance 2 vlan 11 to 20
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 20
stp root-protection
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 20
#
return
● SwitchC configuration file
#
sysname SwitchC
#
vlan batch 2 to 20
#
stp pathcost-standard legacy
#
stp region-configuration
region-name RG1
instance 1 vlan 2 to 10
instance 2 vlan 11 to 20
#
interface 10GE1/0/1
port default vlan 2
stp disable
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 20
stp instance 2 cost 20000
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 20
#
return