Professional Documents
Culture Documents
11 STP RSTP MSTP Principles and Configuration ISSUE1.50 PDF
11 STP RSTP MSTP Principles and Configuration ISSUE1.50 PDF
Principles and
Configuration
www.huawei.com
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 2
Objectives
Upon completion of this course, you will be able to:
Describe STP functions.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 3
Contents
1. STP Overview
1.1 STP Functions
2. MSTP Overview
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 4
Switch Forwarding Process
GE0/0/5
3 Destination MAC Destination
Address Port
GE0/0/6 00-0D-56-BF-88-10 GE0/0/5
SWB
PCB 00-0D-56-BF-88-20 GE0/0/6
..... .....
00-0D-56-BF-88-20
..... .....
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 5
A switch forwards packets based on MAC addresses. A MAC address table defines
mapping between destination MAC addresses and destination ports.
PCA sends a frame to PCB. The destination MAC address of the frame is PCB's MAC
address 00-0D-56-BF-88-20. After SWA receives the frame, it searches the MAC
address table for the outbound port. SWA forwards the frame from GE0/0/3.
After SWB receives the frame, it searches the MAC address table for the outbound
port. SWA forwards the frame from GE0/0/6. The frame remains unchanged.
Loop Issue—Broadcast Storms
Causing Network Breakdown
PCA 1 SWA
00-0D-56-BF-88-10 GE0/0/4 4
GE0/0/2
2
GE0/0/3 GE0/0/7
2
SWC
3
GE0/0/5 GE0/0/8
3
3
GE0/0/6
GE0/0/6
SWB
PCB
00-0D-56-BF-88-20
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 6
When a switch receives a broadcast data frame from a port, it forwards the frame to all
the other ports except the receive port. If loops occur on the switching network, the frame
is forwarded endlessly, causing broadcast storms.
After SWA receives this frame, it broadcasts the frame to all the other ports except
GE0/0/2.
SWB receives the data frame from GE0/0/5 and broadcasts the data frame from
GE0/0/6.
SWC receives the data frame from GE0/0/7 and broadcasts the data frame from
GE0/0/6.
SWB receives the data frame from GE0/0/6 and broadcasts the data frame from
GE0/0/5.
SWC receives the data frame from GE0/0/8 and broadcasts the data frame from
GE0/0/7.
This process repeats. Consequently, network resources are exhausted and the network
breaks down.
Loop Issue—Instable MAC Address
Table Destination MAC Destination
Address Port
00-0D-56-BF-88-10 GE0/0/2
PCA 00-0D-56-BF-88-10 GE0/0/4
1 SWA
GE0/0/6
GE0/0/6
SWB
PCB
00-0D-56-BF-88-20
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 7
A switch generates a MAC address table based on source addresses of received data
frames and receive ports.
As shown in the preceding figure:
PCA sends out a data frame. This example assumes that the destination MAC
address of the data frame does not match any entry in MAC address tables of all the
switches on the network. After receiving the data frame, SWA generates a MAC
address 00-0D-56-BF-88-10, which maps GE0/0/2.
The destination MAC address of the data frame does not match any entry in the
MAC address table on SWA, so SWA forwards the data frame to GE0/3 and GE0/0/4.
Assuming SWB receives the data frame from GE0/0/5, the data frame is forwarded
from GE0/0/6 to SWC because the destination MAC address of the data frame does
not match any entry in the MAC address table on SWB.
After SWC receives the data frame from GE0/0/8, it sends the data frame from
GE0/0/7 because the destination MAC address of the data frame does not match
any entry in the MAC address table on SWC. SWA deletes the original entry in the
MAC address table and generates a new MAC address 00-0D-56-BF-88-10 mapping
GE0/0/4.In this situation, the MAC address table becomes instable and an incorrect
MAC address is generated.
STP Implementation
PCA
SWA
GE0/0/4
GE0/0/2
GE0/0/3 GE0/0/7
SWC
GE0/0/5 GE0/0/8
GE0/0/6
GE0/0/6
SWB
PCB
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 8
Switches running STP exchange STP BPDUs to discover loops on the network and block
some ports to prune the network into a loop-free tree network. STP prevents infinite
looping of packets to ensure packet processing capabilities of switches. When an active
link is faulty, STP activates a blocking port to ensure non-stop service transmission.
In the preceding figure, GE0/7 on SWC is blocked to prevent broadcast storms caused by
loops.
When the link between SWA and SWB is down, the blocking port is activated through STP
calculation. This ensures non-stop service transmission.
Contents
1. STP Overview
1.1 STP Functions
2. MSTP Overview
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 9
STP Packet Format
Configuration
01-80-C2-00-00-00 LLC Header
BPDU
DSAP SSAP
Control
01000010 01000010
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 10
The parameters used for SPT are encapsulated into configuration BPDUs and exchanged
between switches.
A configuration BPDU is encapsulated into an Ethernet frame in standard LLC format. Its
destination MAC address is a multicast MAC address 01-80-C2-00-00-00. This
configuration BPDU cannot be forwarded by switches. The value of the Length field is the
MAC data length. The Data field contains the LLC header and configuration BPDU. As
defined in the IEEE standard, the values of DSAP and SSAP are 0x42. The BPDU header
follows the LLC header.
BPDU
Configuration BPDU is used for SPT calculation and SPT
topology maintenance.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 11
Configuration BPDUs are heartbeat packets. STP-enabled ports send BPDUs at intervals specified by
the Hello timer.
Configuration BPDUs are used in the following scenarios:
STP-enabled ports send configuration BPDUs at intervals specified the hello timer.
When a root port receives a configuration BPDU, the device where the root port is located
sends a copy of the configuration BPDU to each designated port.
When a designated port receives a configuration BPDU with a lower priority than its
configuration BPDU, it immediately sends its own configuration BPDU to the downstream
device.
Protocol Identifier,
BPDU Type. (The BPDU Type field has a fixed value of 0x80 and is of four bytes.)
TCN BPDUs are transmitted by each device to its upstream device to notify the upstream device of
network topology change, until they reach the root bridge. A TCN BPDU is generated in one of the
following scenarios:
The port enters the Forwarding state and at least one designated port is located on the
device.
A designated port receives a TCN BPDU and sends a copy to the root bridge.
Switch Roles On The STP Network
Root bridge: the device with the smallest network bridge ID
An STP network has only one root bridge and the root bridge
changes along with the change of network topology.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 12
STP prunes a network into a loop-free tree network. Every tree network must have a root.
The root bridge is the root of the STP network.
Root Switch Election—Bridge ID
Bridge ID, BID for short, Defined in IEEE 802.1D, the bridge ID
(BID) consists of the bridge priority and bridge MAC address.
The bridge priority occupies the leftmost 16 bits and the bridge
MAC address occupies the rightmost 48 bits.
BID format:
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 13
The bridge priority can be configured and the value ranges from 0 to 65535. The default
value is 32768.
Switch Port Roles on the STP Network
Port Role Description
Root port Among the multiple paths, the path from the root port to
the root switch is the shortest.
Designated port The designated port forwards data from the local segment
to the root switch, and receives data from the root switch.
Alternate port Except designated ports and root port, all other ports are
called alternate ports. Alternate ports do not forward data
and are blocked.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 14
STP blocks a port to prune a network into a tree network. Ports on the STP network
contain the root port that sends data to the root bridge, designated port that sends data
to network segments, and alternate ports.
Root Port Election—Path Cost
Every non-root device should elect a port as root port and this
root port should be unique.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 15
Each port has a port cost, which indicates the cost of sending data from this port. A higher
bandwidth on a port indicates a smaller cost of the port. In VRP, the cost of a 100M port
is 200. There may be multiple paths from a non-root switch to the root switch. Each path
has a total cost, which is the sum of all port costs on this path. According to STP, there is
no cost of receiving data on a port.
The smallest total cost from the non-root switch to the root switch is the root path cost.
Designated Port Election—Port ID
The designated port forwards data from the local segment to the root
switch, and receives data from the root switch. Switch with
designated port is called designated switch in this local segment.
The port ID consists of the 1-byte port priority and 1-byte port
number.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 16
The port priority can be set and the default value is 128.
Switch Port Status On The STP
Network
Port Status Function Remarks
Forwarding A port in the Forwarding state can Only the root port or
forward BPDUs and user traffic. designated port can enter the
Forwarding state.
Learning When a port is in the Learning state, a This is a transition state, which
device creates a MAC address table is designed to prevent
based on the received user traffic but temporary loops.
does not forward user traffic.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 17
After a port is started, it first enters the Listening state and starts to calculate the spanning
tree.
If the port needs to be configured as the alternate port after calculation, the port
immediately enters the Blocking state.
If the port needs to be configured as the root port or designated port after calculation, the
port enters the Learning state from the Listening state after twice the Forward Delay. The
port then enters the Forwarding state from the Learning state after the Forward Delay.
STP State Transitions of a Port
Disabled or Down
1
5
Blocking
2
4 5
Listening
3
4 5
Learning
3
4 5
Forwarding
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 18
2:The port is selected as the root or designated port, and enters the Listening state.
3:When the time for keeping the port in a temporary state is reached, the port enters the
Learning or Forwarding state. The port is selected ad the root or designated port.
4:The port is not the root or designated port, and enters the blocking state.
Max Age specifies the aging time of BPDUs. You can use a command
on the root bridge to change the aging time.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 19
STP Calculation
Step 1:Root bridge selection. This procedure is based on
Bridge ID.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 20
STP Calculation—Root Bridge Election
SWA
Root Bridge
32768.00e0-fc16-ee43
LANA LANB
SWB SWC
32768. 32768.
00e0-fc41-4259 LANC 00e0-fc41-43b9
LAND LANE
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 21
Devices first compare bridge priorities. A smaller bridge priority indicates a higher priority
of the device. If devices have the same bridge priority, they compare bridge MAC
addresses. A smaller MAC address indicates a higher priority of the device.
As each bridge considers itself the root bridge, the value of the root BID field in the
BPDU sent by each port is recorded as its BID.
When a port receives a BPDU with a priority higher than that of itself, the port
extracts information from the BPDU and synchronizes its own information with the
obtained information. The port stops sending the BPDU immediately after saving the
updated BPDU.
When sending a BPDU, each device fills in the Sender BID field with its own BID.
When a device considers itself the root bridge, the device fills in the Root BID field
with its own BID. This process repeats until all devices consider the same device as
the root bridge. This indicates that the root bridge is selected.
As shown in the preceding figure, Switches have the same bridge priority and SWA‘s MAC
address is the smallest, so SWA is selected as the root switch.
STP Calculation—Root Port Election
SWA
Root Bridge
32768.00e0-fc16-ee43
SWB SWC
32768. 32768.
00e0-fc41-4259 LANC 00e0-fc41-43b9
LAND LANE
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 22
Among the multiple paths, the path from the root port to the root switch is the shortest. If
two ports have the same path costs, the port connected to the switch with the smaller
bridge ID is the root port. If two ports have the same path costs and the same bridge IDs,
the port connected to the port with the smaller port identifier is the root port.
In this example, all ports are 100M ports and the port costs are 200. The two ports closest
to the root bridge are root ports.
STP Calculation—Designated Port
Election
SWA
Root Bridge
32768.00e0-fc16-ee43
LANA designated LANB designated
port port
LANA LANB
SWB SWC
32768. 32768.
00e0-fc41-4259 LANC 00e0-fc41-43b9
LANE
LAND LANC Alternate designated
designated designated port port port
port LAND LANE
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 23
To select the designated port and designated switch, the port with the smallest path cost
is the root port. If two ports have the same path costs, the port connected to the switch
with the smaller bridge ID is the designated port. If two ports have the same path costs
and the same bridge IDs, the port connected to the port with the smaller port identifier is
the designated port.
STP Calculation—After The Topology
Becomes Stable
SWA
Root Bridge
32768.00e0-fc16-ee43
LANA LANB
designated port designated port
LANA LANB
LANE
LAND LANC Alternate designated
designated designated port port
port port
LAND LANE
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 24
After the topology becomes stable, the root bridge still sends configuration BPDUs at
intervals of the Hello timer. Each non-root-bridge forwards the received configuration
BPDUs from its designated port. If the priority of the received BPDU is higher than that on
the non-root-bridge, the non-root-bridge updates its own BPDU based on the information
carried in the received BPDU.
STP Topology Changes—Root Bridge
Faulty (1/2)
SWA
Root Bridge
32768.00e0-fc16-ee43
LANA LANB
designated port designated port
LANA LANB
LANE
LAND LANC Alternate designated
designated designated port port
port port
LAND LANE
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 25
The root bridge SWA becomes faulty, SWB and SWC will reselect the root bridge. SWB
and SWC exchange configuration BPDUs to select the root bridge.
STP Topology Changes—Root Bridge
Faulty (2/2)
Original root SWA
bridge
32768.00e0-fc16-ee43
LANA LANB
designated port designated port
New root LANA LANB
bridge
SWB SWC
32768. LANC 32768.
00e0-fc41-4259 00e0-fc41-43b9
LAND LANE
LANC Root port
designated designated
designated
port port
port
LAND LANE
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 26
STP Topology Changes—Designated
Port Faulty (1/2)
SWA
Root bridge
32768.00e0-fc16-ee43
LANA LANB
designated port designated port
LANA LANB
SWB SWC
32768. 32768.
00e0-fc41-4259 LANC 00e0-fc41-43b9
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 27
The designated port of the root bridge LANB becomes faulty. The original alternate port
on SWC becomes the root port after SWB and SWC exchange configuration BPDUs.
STP Topology Changes—Designated
Port Faulty (2/2)
SWA
Root bridge
32768.00e0-fc16-ee43
LANA
designated port
LANB designated
LANA LANB port
Root Port
SWB SWC
32768. 32768.
00e0-fc41-4259 LANC 00e0-fc41-43b9
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 28
Contents
1. STP Overview
1.1 STP Functions
2. MSTP Overview
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 29
Advantages of RSTP Over STP
STP RSTP
Network convergence is slow Using port state changing, RSTP
provides fast convergence
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 30
Possible Temporary Loop
SWA SWB
Root
GE0/0/1
LANB
Designated port
GE0/0/2
Root port
GE0/0/1
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 31
When the port role and status changes, temporary loops may be formed. In this example,
SWA is the root bridge initially. Among all switches, only SWD has an alternate port
GE0/0/2 and the port is in non-Forwarding status.
Assume that the priority of SWC is changed so that SWC becomes the new root switch. In
this case, GE0/0/2 of SWD will become the new root port and switch to Forwarding state.
GE0/0/1 of SWD will become the new designated port and switch to Forwarding state.
GE0/0/2 of SWB should become the new alternate port and switch to non-forwarding
state.
To avoid temporary loops, a port (for example, GE0/0/2 of SWD) must wait
enough time before switching from non-Forwarding state to Forwarding state.
Therefore, the ports that need to switch to non-Forwarding state have enough
time to calculate the spanning tree and switch to non-Forwarding state.
Proposal-Agreement
SWA SWB
Root
D GE0/0/2 R
R
GE0/0/1
D A D
Proposal Agreement
Enter into
forwarding Keep
forwarding
status D
GE0/0/2 GE0/0/2 status
R Agreement R D
Discarding New
GE0/0/1 GE0/0/1
Root
D A
SWC R Proposal D SWD
Keep forwarding Enter into
status forwarding status
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 32
In this example, assume that the priority sequence of the switches in the network is
SWA>SWB> SWC>SWD. Thus, SWA is the root bridge; GE0/0/1 of SWD is the alternate
port and is in Discarding state. If the priority of SWD is changed and the priority sequence
of the switches changes to SWD>SWA>SWB>SWC, the negotiation process is as follows:
1. SWD becomes the root bridge ,then GE0/0/1 and GE0/0/2 of SWD becomes the
designated port immediately. GE0/0/2 remains in Forwarding state. GE0/0/1 sends out a
Proposal message, which is an RST BPDU with a flag. This BPDU also contains the
parameters for calculating the spanning tree.
2. After SWC receives the Proposal, it calculates the spanning tree. GE0/0/1 of SWC
becomes the root port and remains in Forwarding state. GE0/0/2 of SWC becomes the
designated port. If the Proposal is received by the new root port, all non-edge designated
ports switch to the Discarding state and send out new Proposal messages. If all non-root
ports need to switch to Discarding state or become the edge port, the root port that
receives the Proposal message sends the Agreement message. In this example, GE0/0/2 of
SWC switches to Discarding state and sends a new Proposal message.
3. After SWA receives the Proposal, it calculates the spanning tree. GE0/0/1 of SWA
becomes the designated port and GE0/0/2 becomes the root port. If the port that receives
Please Put the Title Here
the Proposal needs to switch to Discarding state, this port sends the Agreement message
after the status changes.
Contents
1. STP Overview
2. MSTP Overview
2.1 Disadvantages of a Single Spanning Tree
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 33
Some Paths on The VLAN Are Blocked
D D
Root VLAN2
VLAN2
Forwarding failure
VLAN3 in VLAN 3
R A
Switch3 Discarding
D D
VLAN2 VLAN3
D: designated port
R: root port LANA LANB
A: alternate port
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 34
Switch3 connects to network segments and connect to two aggregation switches Switch1
and Switch2 through two uplinks. Traffic in VLAN 2 is sent through two uplinks and traffic
in VLAN 3 is sent through only one link. To prevent loops in VLAN 2, run a spanning tree.
If a single spanning tree is used and the port connecting Switch2 and Switch3 is the
alternate port in the Discarding state, the path of VLAN 3 is disconnected and traffic in
VLAN 3 cannot be sent to Switch2.
Traffic Cannot Be Load Balanced
D R
Switch1 Switch2
D D
Root VLAN2
Path disconnected
VLAN3
R A
Switch3 Discarding
D D
VLAN2 VLAN3
D: designated port
R: root port LANA LANB
A: alternate port
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 35
Switch3 connects to network segments and connect to Switch1 and Switch2 through two
uplinks. Dual-system hot standby is enabled Switch3.
To implement dual-system hot standby, two uplinks on Swtich3 are configured as trunks
and allow traffic from all VLANs. The link between Switch1 and Switch2 is also configured
as a trunk and allows traffic from VLANs. The Layer 3 interface of VLAN 2 is configured on
Switch1 and the Layer 3 interface of VLAN 3 is configured on Switch2. Traffic in VLAN 2
and VLAN 3 is required to reach the corresponding Layer 3 interfaces through different
links. If there is only one spanning tree, the port of Switch 1 connected to Switch3
becomes the alternate port in the Discarding state. Traffic in VLAN 2 and VLAN 3 can
reach Switch1 through only one uplink. Traffic cannot be load balanced.
Contents
1. STP Overview
2. MSTP Overview
2.1 Disadvantages of a Single Spanning Tree
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 36
MSTP Idea
D R
Switch1 Switch2
R D
D D D D
D D
VLAN 2 VLAN 3
D: designated port
LANA LANB
R: root port
A: alternate port
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 37
To fix the defect of STP and RSTP, the IEEE released 802.1s in 2002, defining the Multiple
Spanning Tree Protocol (MSTP). MSTP implements fast convergence and provides multiple
paths to load balance VLAN traffic.
MSTP divides a switching network into multiple regions, each of which has multiple
spanning trees that are independent of each other. Each spanning tree is called a multiple
spanning tree instance (MSTI) and each AS is called a multiple spanning tree (MST) region.
in this example, two MST instances are configured on the network. VLAN 2 is mapped to
MST instance 1 and VLAN 3 is mapped to MST instance 2. To configure switches as the
root switches with different MST instances, change the switches' priorities. In this example,
configure Switch1 as the root switch of MSTI 1 and Switch2 as the root switch of MSTI 2.
After multiple spanning trees are configured, data from VLAN 2 is directly sent to Switch1
and data from VLAN 3 is directly sent to Switch2. Load balancing can be implemented in
this way and the problem of unreachable VLAN path can be solved.
Contents
1. STP Overview
2. MSTP Overview
2.1 Disadvantages of a Single Spanning Tree
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 38
MST Region and MSTI (1/2)
An MST(Multiple Spanning Tree) region consists of several
switching devices on the switching network and the network
segments between the switches.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 39
MSTP configuration
Switch A MSTI 1
Root: Switch B
MSTI 2
Switch D
Root: Switch D
Switch B
MSTI 0: IST
Root: Switch A
Switch C
MSTI 1: Vlan 1
MSTI 2: Vlan 2, Vlan 3
MSTI 0: Other Vlans
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 40
CST
A common spanning tree (CST) is a spanning tree that connects
all the MST regions on a switching network.
SST switch
CST
Supporting
STP/RSTP R D
D
D
D R Root
D D A R
MSTI
regional root R A RegionA
MSTI 1: VLAN 2
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 41
If each MST region is considered as a node, the CST is calculated by using STP or RSTP
based on all the nodes.
IST
R D
D D
A R
RegionA R D
D R
D D D
D
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 42
As shown in the figure, Region A generates MST IST 0. All the switches, ports, and
network segments in an MST region belong to Instance 0 no matter whether Instance 0
contains the VLANs allowed by ports.
IST calculation is independent from MSTI calculation. That is, two trees are generated in
Region A. One is the IST (MSTI 0) and another is MSTI 1.
CIST
CIST Root
R D
D D
Only support RSTP
A R
RegionA R D
D R
D D D
D
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 43
The common and internal spanning tree (CIST) consists of the ISTs of all MST regions and
the CST.
As this example, The ISTs of all MST regions and the CST form a complete spanning tree,
that is, the CIST.
Regional Root and CIST Root
The CIST root is the root bridge of the CIST.
Regional roots are classified into IST and the MSTI regional
roots.
IST regional root is the switch nearest to the root.
MSTI regional root is the root of each spanning tree. Each MSTI
has its own regional root.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 44
Contents
1. STP Overview
2. MSTP Overview
2.1 Disadvantages of a Single Spanning Tree
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 45
MSTI Calculation (1/2)
The calculation procedure of MST instance is similar to the
calculation procedure of RSTP.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 46
MSTI Calculation (2/2)
E1/0/12 A A E1/0/13
VLAN2 VLAN3
LANA LANB
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 47
In this exmple, links between all switches are configured as trunks and allow traffic from
all VLANs.
Three switches are configured in an MST region RegionA with revision level 1. MSTI 1 and
MSTI 2 are created in RegionA. MSTI 1 contains VLAN 2 and MSTI 2 contains VLAN 3.
Switches' priorities in different MSTIs are changed so that Switch1 becomes the root
switch in MSTI 1, E1/0/13 on Switch3 becomes the alternate port in MSTI 1, Switch 2
becomes the root switch in MSTI 2, and E1/0/12 on Switch3 becomes the alternate port in
MSTI 2.
Traffic in VLAN 2 and VLAN 3 can be load balanced and two uplinks of Switch3 back up
each other.
CIST Calculation (1/2)
Select the switch with the highest priority as the CIST root
switch.
Select the designated port for the network segment of the CST.
Select the switch closest to the CIST root switch as the root
switch in MSTI 0.
The switches (not CIST regional root switch) select root port,
designated ports, alternate ports, and backup ports.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 48
CIST Calculation (2/2)
CIST Root
8192. R D
4096.
00e0-fc41-4259 00e0-fc16-ee43
D D
Only support RSTP
A R
32768. R D 32768.
000f-e212-f896 000f-e212-f890
D D
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 49
In this example, after CIST calculation, Switch2 becomes the root and Switch4 becomes
the CIST regional root.
Contents
1. STP Overview
2. MSTP Overview
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 50
MSTP Applicable Scenario
Network
Switch1 Switch2
All VLAN
VLAN20&40
Switch3 Switch5
MST Region
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 51
In this example, Switch1 and Switch2 are aggregation devices; Switch3 and Switch4 are
access devices. Traffic from VLAN 10 and VLAN 30 is terminated by aggregation devices,
and traffic from VLAN 40 is terminated by the access device. Therefore, Switch1 and
Switch2 can be configured as the roots of MSTI 1 and MSTI 3, and Switch3 can be
configured as the root of MSTI 4.
2. MSTP Overview
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 52
Configuring MSTP—Networking
Requirements
Network
GE0/0/2 GE0/0/2
GE0/0/1 GE0/0/1
GE0/0/3 GE0/0/3
GE0/0/2 GE0/0/2
X X
SwitchC SwitchD
GE0/0/1 GE0/0/1
VLAN2~10 MSTI1
VLAN11~20 MSTI2
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 53
As shown in the figure, SwitchA, SwitchB, SwitchC, and SwitchD run MSTP. To load
balance traffic from VLANs 2 to 10 and VLANs 11 to 20, use MSTP multi-instance. You can
configure a VLAN mapping table to associate VLANs with MSTIs.
Configure protection functions to protect devices or links. You can configure root
protection on the designated port of the root bridge.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 54
Run active region-configuration, MST region configurations are activated so that the
configured region name, VLAN-to-MSTI mappings, and revision number can take effect.
Configuring MSTP (2/5)
Configure an MST region on SwitchC.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 55
Configuring MSTP (3/5)
Configure the root bridge and secondary root bridge in MSTI 1.Configure
SwitchA as the root bridge in MSTI 1. Configure SwitchB as the secondary
root bridge in MSTI 1.
[SwitchA] stp instance 1 root primary
Configure the root bridge and secondary root bridge in MSTI 2. Configure
SwitchB as the root bridge in MSTI 2. Configure SwitchA as the secondary
root bridge in MSTI 2.
[SwitchB] stp instance 2 root primary
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 56
Run stp [ instance instance-id ] root primary The device is configured as the root bridge.
By default, a switch does not function as the root bridge. After the configuration is
complete, the BID of the device is 0 (this value cannot be modified). If instance is not
specified, the device in MSTI 0 is a root bridge.
Run stp [ instance instance-id ] root secondary The device is configured as the
secondary root bridge.By default, a switch does not function as the secondary root bridge.
After the configuration is complete, the BID of the device is 4096 (this value cannot be
modified). If instance is not specified, the device in MSTI 0 is a secondary root bridge.
Configuring MSTP (4/5)
Set the path costs of the ports to be blocked in MSTI 1 and MSTI 2 to be
greater than the default value.
Run stp [ instance instance-id ] priority priority A priority is set for the switch in an MSTI.
The default priority value of the switch is 32768. If instance-id is not specified, a priority is
set for the switch in MSTI 0.
Run stp instance instance-id cost cost A path cost is set for the port in the current MSTI.
When the Huawei calculation method is used, cost ranges from 1 to 200000.
When the IEEE 802.1d standard method is used, cost ranges from 1 to 65535.
When the IEEE 802.1t standard method is used, cost ranges from 1 to 200000000.
Configuring MSTP (5/5)
Enable MSTP globally (Take Switch A for example).
[SwitchA] stp enable
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 58
The stp root-protection command enables root protection at the current port. By default,
root protection is disabled at all ports.
Owning to incorrect configurations or malicious attacks on the network, a root bridge may
receive BPDUs with a higher priority. Consequently, the root bridge is no longer able to
serve as the root bridge, and the network topology is changed, triggering a spanning tree
recalculation. This spanning tree recalculation may transfer traffic from high-speed links to
low-speed links, causing traffic congestion.
If a designated port is enabled with the root protection function, the port role cannot be
changed. Once a designated port that is enabled with root protection receives BPDUs with
a higher priority, the port enters the Discarding state and does not forward packets. If the
port does not receive any BPDUs with a higher priority before a period (generally two
Forward Delay periods) expires, the port automatically enters the Forwarding state.
In MSTI 1, GE0/0/1 and GE0/0/2 are designated ports because SwitchA is the
root bridge. In MSTI 2, GE0/0/1 on SwitchA is the designated port and
GE0/0/2 is the root port.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 59
Configuring MSTP—Verify the
configuration (2/4)
在Run the display stp brief command on SwitchB.
In MSTI 2, GE0/0/1 and GE0/0/2 are designated ports because SwitchB is the
root bridge. In MSTI 1, GE0/0/1 on SwitchB is the designated port and
GE0/0/2 is the root port.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 60
Configuring MSTP—Verify the
configuration (3/4)
Run the display stp interface brief commands on SwitchC.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 61
Configuring MSTP—Verify the
configuration (4/4)
Run the display stp interface brief commands on SwitchD.
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 62
Summary
STP Overview
STP Functions, STP Implementation, RSTP Overview
MSTP Overview
Disadvantages of a Single Spanning Tree, MSTP Idea, MSTP
Concepts, MSTI Calculation
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 63
Quiz
1. (Single Choice) The default bridge priority is ( ).
A. 1
B. 128
C. 32768
D. 65535
2. (Single Choice) The ( ) forwards data from the local segment to the root
switch, and receives data from the root switch.
A. Root port
B. Designated port
C. Alternate port
D. Non-root-port
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 64
1、C
2、B
Quiz
TRUE or FALSE
3. The IST is a spanning tree that connects all the MST regions on a
switching network. ( )
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 65
1、F
2、T
3、F
4、T
More Information
Huawei Learning Website
http://support.huawei.com/learning/Index!toTrainIndex
Copyright © 2016 Huawei Technologies Co., Ltd. All rights reserved. Page 66
Thank You
www.huawei.com