MSTP Ingles
MSTP Ingles
9 MSTP Configuration
9.1 MSTP Overview
9.1.1 MSTP Introduction
9.1.2 MSTP Features Supported by the S3700
9.2 Configuring Basic MSTP Functions
9.2.1 Establishing the Configuration Task
9.2.2 Configuring the MSTP Mode
9.2.3 Configuring and Activating an MST Region
9.2.4 (Optional) Setting a Priority for a Switching Device in an MSTI
9.2.5 (Optional) Setting a Path Cost of a Port in an MSTI
9.2.6 (Optional) Setting a Port Priority in an MSTI
9.2.7 Enabling MSTP
9.2.8 Checking the Configuration
9.3 Configuring MSTP Parameters on an Interface
9.3.1 Establishing the Configuration Task
9.3.2 Configuring System Parameters
9.3.3 Configuring Port Parameters
9.3.4 Checking the Configuration
9.4 Configuring MSTP Protection Functions
9.4.1 Establishing the Configuration Task
9.4.2 Configuring BPDU Protection on a Switching Device
9.4.3 Configuring TC Protection on a Switching Device
9.4.4 Configuring Root Protection on an Interface
9.4.5 Configuring Loop Protection on an Interface
9.4.6 Checking the Configuration
9.5 Configuring MSTP Interoperability Between Huawei Devices and Non-Huawei Devices
9.5.1 Establishing the Configuration Task
9.5.2 Configuring a Proposal/Agreement Mechanism
9.5.3 Configuring the MSTP Protocol Packet Format on an Interface
9.5.4 Enabling the Digest Snooping Function
9.5.5 Checking the Configuration
9.6 Maintaining MSTP
9.6.1 Clearing MSTP Statistics
9.7 Configuration Examples
9.7.1 Example for Configuring Basic MSTP Functions
9 MSTP Configuration
The Multiple Spanning Tree Protocol (MSTP) trims a ring network into a loop-free tree
network. It prevents replication and circular propagation of packets, provides multiple
redundant paths for Virtual LAN (VLAN) data traffic, and enables load balancing.
Background
STP and RSTP are used in a LAN to prevent loops. The devices running STP/RSTP
discover loops on the network by exchanging information with each other and trim the ring
topology into a loop-free tree topology by blocking a certain interface. Replication and
circular propagation of packets are thus prevented on the network and the processing
performance of devices is improved by avoiding repeated packets on the network.
STP and RSTP both have a defect: All VLANs on a LAN use one spanning tree, and thus
inter-VLAN load balancing cannot be performed. Once a link is blocked, the link will no
longer transmit traffic, wasting bandwidth and causing a failure in forwarding certain
VLAN packets.
To fix the defect of STP and RSTP, the IEEE released the 802.1s standard in 2002, defining
MSTP. MSTP compatible with STP and RSTP implements rapid convergence and provides
multiple paths to load balance VLAN traffic.
Table 9-1 shows the comparison between STP, RSTP, and MSTP.
Table 9-1 Comparison between STP, RSTP, and MSTP
is provided to confirm
topology convergence.
Thus, rapid convergence
is implemented.
MSTP implements load
balancing among
VLANs. Traffic in
different VLANs is
transmitted along
different paths.
Introduction
On a complex network, loops are inevitable. With the requirement for network redundancy
backup, network designers tend to deploy multiple physical links between two devices, one
of which is the master and the others are the backup. Loops are likely or bound to occur in
such a situation.
Loops will cause broadcast storms, thereby exhausting network resources and paralyzing
the network. Loops also cause flapping of MAC address tables and thus damages MAC
address entries.
MSTP, compatible with STP and RSTP, isolates service traffic and user traffic by using
multiple instances and provides multiple paths to load balance VLAN traffic.
If MSTP is deployed in the LAN shown in Figure 9-1, MSTIs are generated, as shown
in Figure 9-1.
Figure 9-1 Multiple spanning trees in an MST region
MSTI 1 uses Switch D as the root switching device to forward packets of VLAN 2.
MSTI 2 uses Switch F as the root switching device to forward packets of VLAN 3.
Devices within the same VLAN can communicate with each other and packets of different
VLANs are load-balanced along different paths.
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.
CIST root
Figure 9-4 MSTP network
On the network shown in Figure 9-4, the CIST root is the root bridge of a CIST.
The CIST root is a device in A0.
CST
A Common Spanning Tree (CST) connects all the MST regions on a switching
network.
Each MST region can be considered a node. A CST is calculated by using STP or
RSTP based on all the nodes.
As shown in Figure 9-4, the MST regions are connected to form a CST.
IST
An IST resides within an MST region.
An IST is a special MSTI with the MSTI ID of 0, called MSTI 0.
An IST is a segment of the CIST in an MST region.
As shown in Figure 9-4, the switching devices in an MST region are connected to
form an IST.
CIST
A CIST, calculated by using STP or RSTP, connects all the switching devices on a
switching network.
As shown in Figure 9-4, the ISTs and the CST form a complete spanning tree, that
is, 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.
As shown in Figure 9-4, the switching device in B0 is an SST.
Port roles
Compared with RSTP, MSTP has two additional port types. MSTP ports can be
root ports, designated ports, alternate ports, backup ports, edge ports, 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 9-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 MSTIs.
Root port A root port is the non-root bridge port closest to the root bridge. Root bridges do
not have root ports.
Root ports are responsible for sending data to root bridges.
As shown in Figure 9-5, S1 is the root; CP1 is the root port on S3; BP1 is the root
port on S2; DP1 is the root port on S4.
Designated The designated port on a switching device forwards bridge protocol data units
port (BPDUs) to the downstream switching device.
As shown in Figure 9-5, AP2 and AP3 are designated ports on S1; BP2 is a
designated port on S2; CP2 is a designated port on S3.
Alternate From the perspective of sending BPDUs, an alternate port is blocked after a
port BPDU sent by another switching devices is received.
From the perspective of user traffic, an alternate port provides an alternate path
to the root bridge. This path is different than using the root port.
As shown in Figure 9-5, BP2 and AP4 are alternate ports.
Backup From the perspective of sending BPDUs, a backup port is blocked after a
port BPDU sent by itself is received.
From the perspective of user traffic, a backup port provides a
backup/redundant path to a segment where a designated port already connects.
As shown in Figure 9-5, CP3 is a backup port.
Master A master port is on the shortest path connecting MST regions to the CIST root.
port BPDUs of an MST region are sent to the CIST root through the master port.
Master ports are special regional edge ports, functioning as root ports on ISTs or
CISTs and master ports in instances.
As shown in Figure 9-5, 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.
Port Roles Description
Regional A regional edge port is located at the edge of an MST region and connects to
edge port another MST region or an SST.
During MSTP calculation, the roles of a regional edge port in the MSTI and the
CIST instance are the same. 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.
As shown in Figure 9-5, AP1, DP2, and DP3 in an MST region are directly
connected to other regions, and therefore they are all regional edge ports of the
MST region.
As shown in Figure 9-5, AP1 is a regional edge port and also a master port in the
CIST. Therefore, AP1 is the master port in every MSTI in the MST region.
Edge port An edge port is located at the edge of an MST region and does not connect to any
switching device.
Generally, edge ports are directly connected to terminals.
As shown in Figure 9-5, BP3 is an edge port.
Port status
Table 9-3 lists the MSTP port status, which is the same as the RSTP port status.
Table 9-3 Port status
Forwarding A port in the Forwarding state can send and receive BPDUs as well as forward
Port Status Description
user traffic.
Learning This is a transition state. A port in the Learning state learns MAC addresses from
user traffic to construct a MAC address table.
In the Learning state, the port can send and receive BPDUs, but cannot forward
user traffic.
There is no necessary link between the port status and the port role. Table 9-4 lists
the relationships between port roles and port status.
Table 9-4 Relationships between port roles and port status
Port Status Root Designated Regional Edge Alternate Port Backup Port
Port/Master Port Port
Port
Root protection Due to incorrect To address this issue, the root protection
configurations or malicious function can be configured to protect the root
attacks on the network, a root bridge by preserving the role of the designated
bridge may receive BPDUs port. With this function, when the designated
with a higher priority. port receives RST BPDUs with a higher priority,
Consequently, the legitimate the port enters the Discarding state and does not
root bridge is no longer able to forward the BPDUs. If the port does not receive
serve as the root bridge, and any RST BPDUs with a higher priority for a
the network topology is certain period (double the Forward Delay), the
illegitimately changed, port transitions to the Forwarding state.
triggering spanning tree
recalculation. This may
transfer traffic from high-
speed links to low-speed links,
causing traffic congestion.
Loop A root port or an alternate port The loop protection function can be used to
protection will age if link congestion or a prevent such network loops. If the root port or
one-way link failure occurs. alternate port cannot receive RST BPDUs from
After the root port ages, a the upstream switching device, the root port is
switching device may re-select blocked and the switching device notifies the
a root port incorrectly and NMS that the port enters the Discarding state.
MSTP Scenario Configuration Impact
Protection
after the alternate port ages, The blocked port remains in the Blocked state
the port enters the Forwarding and no longer forwards packets. This prevents
state. Loops may occur in such loops on the network. The root port restores the
a situation. Forwarding state after new RST BPDUs are
received.
NOTE:
The S3700 does not support the Per-VLAN Spanning Tree (PVST) protocol and cannot process PVST
packets. You can configure the S3700 to transparently transmit PVST packets. For details, see 11 Layer 2
Protocol Transparent Transmission Configuration.
NOTE:
If the current device supports MSTP, configuring MSTP is recommended.
Pre-configuration Tasks
Before configuring basic MSTP functions, complete the following task:
Connecting interfaces and setting physical parameters for the interfaces to ensure
that the physical status of the interfaces is Up
Configuring VLAN features of the ports
Data Preparation
To configure basic MSTP functions, you need the following data.
No. Data
3 (Optional) ID of an MSTI
Procedure
1. Run:
system-view
Context
An MST region contains multiple switching devices and network segments between them.
These switching devices are directly connected and have the same region name, same
VLAN-to-instance mapping, same configuration revision number after MSTP is enabled.
One switching network can have multiple MST regions and multiple switching devices can
be grouped into one MST region by using MSTP configuration commands.
CAUTION:
Two switching devices belong to the same MST region when they have the same:
Name of the MST region
Mapping between VLANs and MSTIs
Revision level of the MST region
Do as follows on a switching device that needs to join an MST region:
Procedure
1. Run:
system-view
NOTE:
The instance instance-id vlan { vlan-id1 [ to vlan-id2 ] }&<1-10> command is recommended
because VLAN-to-instance mapping assignments cannot meet actual mapping requirements.
In the command, vlan-mapping modulo indicates that the formula (VLAN ID-1)%modulo+1
is used. In the formula, (VLAN ID-1)%modulo means the remainder of (VLAN ID-1) divided
by the value of modulo. This formula is used to map a VLAN to the corresponding MSTI. The
calculation result of the formula is ID of the mapping MSTI.
5. (Optional) Run:
revision-level level
NOTE:
The change of related MST region configurations (especially change of the VLAN mapping
table) causes the recalculation of spanning trees and the route flapping in a network. Therefore,
after an MST region name, VLAN-to-instance mappings, and an MSTP revision number is
configured, activating the MST region is necessary. You can run the check region-configuration
command in the MST region view to check whether region configurations are correct. After
confirming that region configurations are correct, run the active region-configuration command to
activate MST region configurations.
6. Run:
active region-configuration
MST region configurations are activated so that the configured region name,
VLAN-to-instance mappings, and revision number can take effect.
If this step is not done, the preceding configurations cannot take effect.
If you have changed MST region configurations on the switching device after
MSTP starts, run the active region-configuration command to activate the MST
region so that the changed configurations can take effect.
Context
In an MSTI, there is only one root bridge and it is the logic center of the MSTI. In root
bridge selection, the switching device with high performance and network hierarchy is
generally selected as a root bridge; however, the priority of such a device may be not that
high. Thus setting a high priority for the switching device is necessary so that the device
can function as a root bridge.
Other devices with low performance and network hierarchy are not fit to be a root bridge.
Therefore, set low priorities for these devices.
CAUTION:
If an S3700 is configured as the root switch or secondary root switch, the priority of
the S3700 cannot be set. If you want to set the priority of the S3700, you must disable the
root switch or secondary root switch.
Procedure
1. Run:
system-view
NOTE:
To configure a switching device as a primary root bridge, you can 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 a 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 a primary root bridge and a secondary root
bridge at the same time.
Context
A path cost is port-specific, which is used by MSTP as a reference to select a link.
Path costs of a port are an important basis for calculating spanning trees. If you set different
path costs for a port in different MSTIs, you can make VLAN traffic be transmitted along
different physical links and thus carry out VLAN load balancing.
On a network where loops occur, you are recommended to set a relatively large path cost
for the port at a low link rate. MSTP puts the port with the large path cost in the Blocking
state and blocks the link where this port resides.
Procedure
1. Run:
system-view
Context
In spanning tree calculation, priorities of ports on switching devices in MSTIs determine
designated port selection.
If you expect to block a port on a switching device in an MSTI to eliminate loops, set the
port priority value to be larger than the default value. This port will be blocked in
designated port selection.
Procedure
1. Run:
system-view
Context
After MSTP is enabled on a ring network, MSTP immediately calculates spanning trees on
the network. Configurations on the switching device, such as, the switching device priority
and port priority, will affect spanning tree calculation. Any change of the configurations
may cause network flapping. Therefore, to ensure rapid and stable spanning tree
calculation, perform basic configurations on the switching device and its ports and enable
MSTP.
Procedure
1. Run:
system-view
Prerequisites
All configurations of basic MSTP functions are complete.
Procedure
Run the display stp [ instance instance-id ][ interface { interface-type interface-
number } ] [ 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.
Applicable Environment
In some specific networks, MSTP parameters will affect the speed of network convergence.
Configuring proper MSTP parameters is required.
NOTE:
The default parameters also can be used to complete MSTP rapid convergence. Therefore, the configuration
procedures and steps in this command task are all optional.
Pre-configuration Tasks
Before configuring MSTP parameters, complete the following task:
Configuring basic MSTP functions
Data Preparation
To configure MSTP parameters, you need the following data.
No. Data
1 Network diameter
2 Hello time, forwarding delay time, maximum aging time, and timeout period for waiting
for BPDUs from the upstream (3 x hello time x time factor)
9 Whether auto recovery needs to be configured for an edge port being shut down
The timeout period for waiting for BPDUs from the upstream of a switching
device is set.
By default, the timeout period of a switching device is 9 times as long as the
Hello time.
4. (Optional) To set the Forward Delay period, Hello time, and Max Age period,
perform the following operations:
Run the stp timer forward-delay forward-delay command to set the Forward
Delay period for a switching device.
The default Forward Delay period of a switching device is 1500, in
centiseconds.
Run the stp timer hello hello-time command to set the Hello time for a
switching device.
The default Hello time of a switching device is 200, in centiseconds.
Run the stp timer max-age max-age command to set the Max Age period for
a switching device.
The default Max Age period of a switching device is 2000, in centiseconds.
5. NOTE:
6. The values of the Hello time, Forward Delay period, and Max Age period must comply with the
following formulas. Otherwise, networking flapping occurs.
2 × (Forward Delay - 1.0 second) >= Max Age
Max Age >= 2 × (Hello Time + 1.0 second)
7. Run:
stp max-hops hop
MCheck is enabled.
On a switching device running MSTP, if an interface is connected to a device
running STP, the interface automatically transitions to the STP mode.
Enabling MCheck on the interface is required because the interface may fail to
automatically transition to the MSTP mode in the following situations:
The switching device running STP is shut down or moved.
The switching device running STP transitions to the MSTP mode.
NOTE:
If you run the stp mcheck command in the system view, the MCheck operation is performed on
all the interfaces.
Procedure
1. Run:
system-view
The maximum number of BPDUs sent by a port within each Hello time is set.
By default, the maximum number of BPDUs that a port sends within each Hello
time is 147.
6. (Optional) Run:
stp edged-port enable
The auto recovery function on an edge port is configured. That is, enable the port
in the error-down state to automatically go Up, and set the delay for the transition
from Down to Up.
There is no default value for the recovery time. Therefore, you must specify a
delay when configuring this command.
Follow-up Procedure
When the topology of a spanning tree changes, the forwarding paths to associated VLANs
are changed. Then, ARP entries corresponding to those VLANs on the switching device
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.
In either fast or normal mode, MAC entries are directly deleted.
You can run the stp converge { fast | normal } command in the system view to configure
the MSTP convergence mode.
By default, the MSTP convergence is configured as normal.
NOTE:
The normal mode is recommended. If the fast mode is adopted, ARP entries will be frequently deleted,
causing the CPU usage on the MPU or LPU to reach 100%. As a result, network flapping frequently occurs.
Prerequisites
The configurations of MSTP parameters are complete.
Procedure
Run the display stp [ instance instance-id ] [ interface { interface-type interface-
number } ] [ brief ] command to view spanning-tree status and statistics.
Applicable Environment
MSTP provides the following protection functions, as listed in Table 9-6.
Table 9-6 MSTP protection
Root protection Due to incorrect To address this issue, the root protection
configurations or malicious function can be configured to protect the root
attacks on the network, a root bridge by preserving the role of the designated
bridge may receive BPDUs port. With this function, when the designated
with a higher priority. port receives RST BPDUs with a higher priority,
Consequently, the legitimate the port enters the Discarding state and does not
root bridge is no longer able to forward the BPDUs. If the port does not receive
serve as the root bridge, and any RST BPDUs with a higher priority for a
the network topology is certain period (double the Forward Delay), the
illegitimately changed, port transitions to the Forwarding state.
triggering spanning tree
recalculation. This may
transfer traffic from high-
speed links to low-speed links,
causing traffic congestion.
Loop A root port or an alternate port The loop protection function can be used to
protection will age if link congestion or a prevent such network loops. If the root port or
one-way link failure occurs. alternate port cannot receive RST BPDUs from
After the root port ages, a the upstream switching device, the root port is
switching device may re-select blocked and the switching device notifies the
a root port incorrectly and NMS that the port enters the Discarding state.
after the alternate port ages, The blocked port remains in the Blocked state
the port enters the Forwarding and no longer forwards packets. This prevents
state. Loops may occur in such loops on the network. The root port restores the
a situation. Forwarding state after new RST BPDUs are
received.
Pre-configuration Tasks
Before configuring MSTP protection functions on a switching device, complete the
following task:
Configuring basic MSTP functions
NOTE:
Configuring an edge port on the switching device before configuring BPDU protection.
Data Preparation
To configure MSTP protection functions on a switching device, you need the following
data.
No. Data
Context
Edge ports are directly connected to user terminals and normally, the edge ports will not
receive BPDUs. Some attackers may send pseudo BPDUs to attach the switching device. If
the edge ports receive the BPDUs, the switching device automatically sets the edge ports as
non-edge ports and triggers new spanning tree calculation. Network flapping then occurs.
BPDU protection can be used to protect switching devices against network attacks.
NOTE:
Do as follows on a switching device having an edge port.
Procedure
1. Run:
system-view
Context
An attacker may send pseudo TC-BPDUs to attack switching devices. Switching devices
receive a large number of TC BPDUs in a short time and delete entries frequently, which
burdens system processing and degrades network stability.
TC protection is used to suppress TC-BPDUs. The number of times that TC-BPDUs are
processed by a switching device within a given time period is configurable. If the number
of TC-BPDUs that the switching device receives within a given time exceeds the specified
threshold, the switching device handles TC-BPDUs only for the specified number of times.
Excessive TC-BPDUs are processed by the switching device as a whole for once after the
timer (that is, the specified time period) expires. This protects the switching device from
frequently deleting MAC entries and ARP entries, thus avoiding over-burdened.
Procedure
1. Run:
system-view
The threshold of the number of times the MSTP process handles the received TC-
BPDUs and updates forwarding entries within a given time is set.
NOTE:
The value of the given time is consistent with the MSTP Hello time set by using the stp timer
hello hello-time command.
NOTE:
Root protection is configured on a designated port. It takes effect only when being configured on the port that
functions as a designated port on all MSTIs. If root protection is configured on other types of ports, it does not
take effect.
Procedure
1. Run:
system-view
Context
On a network running MSTP, a switching device maintains the root port status and status of
blocked ports by receiving BPDUs from an upstream switching device. If the switching
device cannot receive BPDUs from the upstream 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 cause network loops. To address such a problem, configure loop protection.
After loop protection is configured, if the root port or alternate port does not receive
BPDUs from the upstream switching device, the root port is blocked and the switching
device notifies the NMS that the port enters the Discarding state. The blocked port remains
in the Blocked state and no longer forwards packets. This prevents loops on the network.
The root port restores the Forwarding state after receiving new BPDUs.
NOTE:
An alternate port is a backup port of a root port. If a switching device has an alternate port, you need to
configure loop protection on both the root port and the alternate port.
Do as follows on a root port and an alternate port on a switching device in an MST region:
Procedure
1. Run:
system-view
Loop protection for the root port is configured on the switching device.
By default, loop protection is disabled.
Prerequisites
All configurations of MSTP protection functions are complete.
Procedure
Run the display stp [ instance instance-id ] [ interface { interface-type interface-
number } ] [ brief ] command to view spanning-tree status and statistics.
Applicable Environment
On an MSTP network, inconsistent protocol packet formats and BPDU keys may lead to a
communication failure. Configuring proper MSTP parameters on Huawei devices ensures
interoperability between Huawei devices and non-Huawei devices.
Pre-configuration Tasks
Before configuring MSTP interoperability between Huawei devices and non-Huawei
devices, complete the following task:
Configuring basic MSTP functions
Data Preparation
To configure MSTP interoperability between Huawei devices and non-Huawei devices, you
need the following data.
No. Data
1 BPDU format
Context
The rapid transition mechanism is also called the Proposal/Agreement mechanism.
Switching devices currently support the following modes:
Enhanced mode: The current interface counts a root port when it computes the
synchronization flag bit.
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 then 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.
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 Datacom devices are interworking with non-Huawei devices, select either
mode depending on the Proposal/Agreement mechanism on non-Huawei devices.
Procedure
1. Run:
system-view
Context
MSTP protocol packets have two formats: dot1s (IEEE 802.1s standard packets) and legacy
(proprietary protocol packets). The auto mode is introduced to allow an interface to
automatically use the format of MSTP protocol packets sent from the remote interface. In
this manner, the two interfaces use the same MSTP protocol packet format.
Do as follows on a switching device in an MST region:
Procedure
1. Run:
system-view
The system view is displayed.
2. Run:
interface interface-type interface-number
NOTE:
If the format of MSTP packets is set to dot1s on one end and legacy on the other end, the
negotiation fails.
Context
Do as follows on a switching device in an MST region:
Procedure
1. Run:
system-view
Prerequisites
All the configurations for the interoperability between Huawei devices and non-Huawei
devices are complete.
Procedure
Run the display stp [ instance instance-id ] [ interface { interface-type interface-
number } ] [ brief ] command to view spanning-tree status and statistics.
Context
CAUTION:
MSTP statistics cannot be restored after you clear them. Therefore, exercise caution when
using the reset commands.
After you confirm that MSTP statistics need to be cleared, run the following command in
the user view.
Procedure
1. Run the reset stp [ interface interface-type interface-
number ] statistics command to clear spanning-tree statistics.
Configuration Roadmap
The configuration roadmap is as follows:
1. Add SwitchA and SwitchC to MST region RG1, and create MSTI1.
2. Add SwitchB and SwitchD to MST region RG2, and create MSTI1.
3. Configure SwitchA as the CIST root.
4. In RG1, configure SwitchA as the CIST regional root and regional root of
MSTI1. Configure the root protection function on Eth 0/0/2 and the Eth 0/0/1
on SwitchA.
5. In RG2, configure SwitchB as the CIST regional root and SwitchD as the
regional root of MSTI1.
6. On SwitchC and SwitchD, connect Eth 0/0/1 to a PC and configure Eth 0/0/1 as
an edge port. Enable BPDU protection on SwitchC and SwitchD.
7. Configure the Switches to calculate the path cost by using the Huawei-
proprietary algorithm.
Data Preparation
To complete the configuration, you need the following data:
Region that SwitchA and SwitchC belong to: RG1
Region that SwitchB and SwitchD belong to: RG2
Numbers of the Eth interfaces, as shown in Figure 9-7
VLAN IDs: 1-20
Procedure
1. Configure SwitchA.
# Configure the MST region on SwitchA.
<SwitchA> system-view
[SwitchA] stp region-configuration
[SwitchA-mst-region] region-name RG1
[SwitchA-mst-region] instance 1 vlan 1 to 10
# Activate the configuration of the MST region.
[SwitchA-mst-region] active region-configuration
[SwitchA-mst-region] quit
# Enable MSTP.
[SwitchA] stp enable
2. Configure SwitchB.
# Configure the MST region on SwitchB.
[SwitchB] stp region-configuration
[SwitchB-mst-region] region-name RG2
[SwitchB-mst-region] instance 1 vlan 1 to 10
# Enable MSTP.
[SwitchB] stp enable
3. Configure SwitchC.
# Configure the MST region on SwitchC.
[SwitchC] stp region-configuration
[SwitchC-mst-region] region-name RG1
[SwitchC-mst-region] instance 1 vlan 1 to 10
# Enable MSTP.
[SwitchC] stp enable
4. Configure SwitchD.
# Configure the MST region on SwitchD.
[SwitchD] stp region-configuration
[SwitchD-mst-region] region-name RG2
[SwitchD-mst-region] instance 1 vlan 1 to 10
# Enable MSTP.
[SwitchD] stp enable
The priority of SwitchA is the highest in the CIST; therefore, SwitchA is elected
as the CIST root and regional root of RG1. Eth 0/0/2 and Eth 0/0/1 of SwitchA
are designated ports in the CIST.
The priority of SwitchA in MSTI1 is the highest in RG1; therefore, SwitchA is
elected as the regional root of SwitchA. Eth 0/0/2 and Eth 0/0/1 of SwitchA are
designated ports in MSTI1.
# Run the display stp interface brief commands on SwitchC. The displayed
information is as follows:
<SwitchC> display stp interface Ethernet 0/0/3 brief
MSTID Port Role STP State Protection
0 Ethernet0/0/3 ROOT FORWARDING NONE
1 Ethernet0/0/3 ROOT FORWARDING NONE
<SwitchC> display stp interface Ethernet 0/0/2 brief
MSTID Port Role STP State Protection
0 Ethernet0/0/2 DESI FORWARDING NONE
1 Ethernet0/0/2 DESI FORWARDING NONE
Eth 0/0/3 of SwitchC is the root port in the CIST and MSTI1. Eth 0/0/2
of SwitchC is a designated port in the CIST and MSTI1.
# Run the display stp brief command on SwitchB. The displayed information is
as follows:
The priority of SwitchB in the CIST is lower than that of SwitchA; therefore, Eth
0/0/2 of SwitchB functions as the root port in the CIST. SwitchA and SwitchB
belong to different regions; therefore, Eth 0/0/2 of SwitchB functions as the
master port in MSTI1. In MSTI1, the priority of SwitchB is lower than that
of SwitchD; therefore, Eth 0/0/1 of SwitchB functions as the root port. The
priority of SwitchB in the CIST is higher than that of SwitchB; therefore, Eth
0/0/1 of SwitchB functions as the designated port in the CIST.
# Run the display stp interface brief commands on SwitchD. The displayed
information is as follows:
<SwitchD> display stp interface Ethernet 0/0/3 brief
MSTID Port Role STP State Protection
0 Ethernet0/0/3 ROOT FORWARDING NONE
1 Ethernet0/0/3 DESI FORWARDING NONE
<SwitchD> display stp interface Ethernet 0/0/2 brief
MSTID Port Role STP State Protection
0 Ethernet0/0/2 ALTE DISCARDING NONE
1 Ethernet0/0/2 ALTE DISCARDING NONE
On SwitchD, Eth 0/0/2 functions as the alternate port in the CIST. SwitchD
and SwitchC are in different regions; therefore, Eth 0/0/2 of SwitchD also
functions as the alternate port in MSTI1.
Eth 0/0/3 of SwitchD is the root port in the CIST. The priority of SwitchD is
higher than that of SwitchB in MSTI1; therefore, Eth 0/0/3 also functions as the
designated port in MSTI1.
Configuration Files
Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 2 to 20
#
stp instance 0 priority 0
stp instance 1 priority 0
stp pathcost-standard legacy
stp region-configuration
region-name RG1
instance 1 vlan 1 to 10
active region-configuration
#
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 1 to 20
stp root-protection
#
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 1 to 20
stp root-protection
#
return