Professional Documents
Culture Documents
STP is used to prevent loops in the LAN. The switching devices running STP discover loops on the
network by exchanging information with one another, and block certain interfaces to cut off loops.
STP/RSTP/MSTP STP can solve loop issues, but slow network convergence affects the communication quality. If the
network topology changes frequently, the connections on the network where STP is deployed are
frequently torn down, causing frequent service interruption. This is intolerable for users.
Due to limitations of STP, IEEE released 802.1w in 2001 to define RSTP. RSTP enhances STP and
implements fast convergence of Layer 2 network topology.
However, both RSTP and STP have a significant shortcoming: All VLANs on a LAN use one spanning tree,
www.huawei.com making VLAN-based load balancing impossible. Once a link is blocked, it will no longer transmit traffic,
wasting bandwidth and causing the failure in forwarding certain VLAN packets.
MSTP implements fast convergence and provides multiple paths to load balance VLAN traffic.
Objectives Contents
Upon completion of this section, you will be able to: 1. Limitations of STP
Be familiar with similarities and differences between RSTP and STP 2. Improvements in RSTP
Master the working principle of RSTP
3. Principles of MSTP
Master the working principle of MSTP
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 2 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 3
1
Problem 1: Switches Run STP in Problem 2: The Switch Has the Blocked
Initialization Scenarios Port and the Root Port Goes Down
The duration from initialization to full convergence is at least 30s.
The direct link between SWC and SWA goes Down. The blocked port
ROOT
SWA switches to the root port and enters the forwarding state. This process
STP-enabled switches wait for timeout
At the beginning, switches DP
send and monitor BPDUs and
DP of timers to determine all collected
BPDUs, and then perform STP
requires at least 30s.
calculate the spanning tree.
calculation.
SWA ROOT To ensure that topology change
RP RP
information is spread on the entire
DP DP
Blocked Port network and all devices complete topology
DP change, the new root port must wait for
timeout of timers and then enters the
SWB SWC forwarding state.
Listening RP RP
To prevent loops, STP must wait for a long time (BPDUs can be sent to
15s each node) to ensure that the port status of the entire network is SWC
DP Blocked Port
Learning
determined. Then STP enters the Forwarding state.
SWB
Learning
Before entering the forwarding state, STP creates a MAC address table The blocked port becomes the new root port
15s and is in blocking state.
based on received user traffic. STP enters the Forwarding state when
It enters the forwarding state after two
Forwarding the timer expires. intervals of Forward Delay.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 4 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 5
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 6 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 7
2
Problem 5: STP Topology Change STP Limitation - Port Roles
When the topology changes, TCN BPDUs are sent to the root bridge. The upstream bridge Root Port
32768. 32768.
that receives the TCN BPDUs sends TCA BPDUs. After the TCN BPDUs reach the root 00e0-fc16-ee43 00e0-fc22-715a
bridge, the root bridge sends TC BPDUs to notify devices of deleting MAC address entries. Designated Port
SWA SWB
This implementation is complex and the efficiency is low. Root Bridge
RP TCA
RP RP 32768.
TC 00e0-fc41-43b9 SWD
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 8 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 9
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 10 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 11
3
Re-classification of Port Roles Re-classification of Port States
RSTP adds two port roles: backup port and alternate port. RSTP deletes two port states in STP.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 12 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 13
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 14 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 15
4
Solution 1 to Problem 1: P/A mechanism Solution to Problem 2: Fast Switching of
(3/3) the Root Port
The election principles of STP and RSTP are similar: electing the
root switch, root port of the non-root-switch, designated port, The direct link between SWC and SWA goes down. The alternate
and alternate port and backup port in sequence. port switches to the root port and enters the forwarding state
within seconds.
RSTP adds the Proposal/Agreement mechanism. There is the
ROOT To accelerate the convergence time, after the
acknowledgement mechanism during negotiation, so RSTP- SWA old root port fails, the new root port should
immediately transition to the Forwarding
DP DP state if there is no loop. The alternate port
enabled switches can forward BPDUs, without depending on can immediately enter the forwarding state
because this requirement is considered during
timers to ensure the loop-free network topology. RSTP-enabled RP RP
election.
switches only need to consider the time for sending BPDUs and DP SWC
AP
calculating a loop-free topology (usually within seconds). SWB ① Immediately become
the new root port and
enter the Forwarding state.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 16 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 17
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 18 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 19
5
Solution to Problem 5: Topology Change
Problems Caused by Topology Changes
Optimization
SWA ④ MAC address table of SWA
Topology change identification: The non-edge port enters the
Root Destination MAC
Port
Address
Forwarding state. Root DP
E1
DP MAC address of PCA
SWA ⑤ SWA forwards traffic E1 E2 ... ...
When the network topology changes, the ⑦ The MAC address table of
switch at the change point directly sends ③ SWC forwards traffic the switch records the
a BPDU with the TC field of 0. This ⑥ Traffic is discarded LAN A LAN B incorrect port.
shortens the network convergence time
because the switch at the change point RP
does not need to notify the root switch or SWB SWC RP SWC ② MAC address table of SWC
send TC BPDUs on the entire network. E1 E1
SWB LAN C Destination MAC
Port
E2 DP AP E2 Address
MAC address of PCA E1
Edge port Edge port ... ...
SWD SWG
① PCB accesses PCA
Forwarding SWE SWF
PCA PCB
RST BPDU with
PC the TC field of 1
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 20 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 21
Destination MAC
Port
Address SWB SWC SWB SWC MAC address table of SWC
MAC address of LANA E1 E1 E1 E1 E1 Destination MAC
MAC address of LANB E1 LAN C LAN C Address
Port
MAC address of LANC E2 E2 E2 E2 E2
E1 MAC address of LANA E1
MAC address of PCB E3
MAC address of PCA E3 New root port TC Edge port New root port TC Edge port
E3 MAC address of LANB E1
MAC address of LANC E1
... ... E1
MAC address of PCA
MAC address of PCB E3
... ...
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 22 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 23
6
Processing of Topology Changes (3/4) Processing of Topology Changes (4/4)
MAC address table of SWA
Destination MAC
Port SWA
SWA Address
MAC address of LANA E1 Root
Root MAC address of LANB E2
MAC address of LANC E1
E1 E2
MAC address of PCA E1
E1 E2
MAC address of PCB E2 MAC address table of SWB
... ... Destination MAC
Port LAN A LAN B
LAN A Address
LAN B
MAC address of LANA E1
MAC address of LANB E1 SWB SWC
SWB SWC MAC address of LANC E2 E1 E1
E1 E1 MAC address of PCB E1 LAN C
LAN C MAC address of PCA E3 E2 E2
E2 E2 ... ... E3
PCA PCB
PCA PCB
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 24 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 25
① A hacker connects
to an STP-enabled When the new switch sends BPDUs,
switch through the spanning tree calculation of other
edge port. switches is triggered. As a result, network
flapping occurs.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 26 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 27
7
Root Protection (1/2) Root Protection (2/2)
② SWA receives higher-priority RST BPDUs,
SWA recalculates the spanning tree, and loses the
role of the root switch. As a result, the network
Root topology incorrectly changes. SWA When the port receives higher-priority RST BPDUs, it enters
DP DP
Root the Discarding state and does not forward packets. If the
port does not receive RST BPDUs with a higher priority in a
① The hacker connects a DP DP period of time, it enters the Forwarding state.
switch with the highest
priority to the network.
SWB RP RP SWC
RST BPDU RST BPDU
AP DP SWB RP RP SWC
RST BPDU
AP DP
New Root
Enable root protection
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 28 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 29
Edge port
deletes MAC address
Configure TC protection
TC BPDU
entries.
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 30 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 31
8
RSTP Configuration Requirements RSTP Configuration Procedure
stp enable
stp mode rstp
SWA SWA stp root primary
As shown in the preceding figure, SWA, SWB, and SWC form a ring stp enable
stp mode rstp
stp enable
stp mode rstp
stp bpdu-protection stp bpdu-protection
switching network. To eliminate the impact of loops on the network, interface GigabitEthernet 0/0/4 interface GigabitEthernet 0/0/4
stp edged-port enable stp edged-port enable
the switches run RSTP to prune the ring network into a loop-free tree
network.
RSTP
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 32 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 33
<SWA>display stp
-------[CIST Global Info][Mode RSTP]-------
Check STP information on SWC.
CIST Bridge :0 .4c1f-cc5f-55e4
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20 <SWC>display stp brief
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20 MSTID Port Role STP State Protection
CIST Root/ERPC :0 .4c1f-cc5f-55e4 / 0 0 GigabitEthernet0/0/2 ROOT FORWARDING NONE
CIST RegRoot/IRPC :0 .4c1f-cc5f-55e4 / 0 0 GigabitEthernet0/0/3 ALTE DISCARDING NONE
CIST RootPortId :0.0 0 GigabitEthernet0/0/4 DESI FORWARDING BPDU
BPDU-Protection :Disabled
CIST Root Type :Primary root
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 34 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 35
9
Limitations of a Single Spanning Tree -
Contents
Some VLAN Paths Are Unreachable
1. Limitations of STP
Permit packets from
DP VLANs RP
2. Improvements in RSTP SWA SWB
DP DP
3. Principles of MSTP Root VLAN2 VLAN2 This path is disconnected
VLAN3 and the path of VLAN 3 is
unreachable
RP AP
Discarding
DP DP
SWC
VLAN2 VLAN3
LAN A LAN B
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 36 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 37
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 38 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 39
10
MSTIs Overcome the Limitations of a
MSTP Configuration Requirements
Single Spanning Tree
DP RP
MSTP can be used to load balance of Internet access traffic of PCs from
SWA SWB
RP DP different VLANs. VLANs 1 to 10 map MSTI 1, and VLANs 11 to 20 map
DP DP DP
DP
MSTI 2.
Root switch of Root switch of
MSTI 1 MSTI 2 The configuration
stp enable is similar to
AP RP stp mode mstp
RP that of SWA
AP stp region-configuration
MSTI 2 -> VLAN 3 and VLAN region-name RG1
MSTI 1 -> VLAN 2 4 instance 1 vlan 1 to 10
instance 2 vlan 11 to 20 SWA GE0/0/2 GE0/0/2
DP DP SWB
SWC active region-configuration
GE0/0/1 GE0/0/1
VLAN 2 VLAN 3
VLAN 4 GE0/0/1 GE0/0/1
SWC GE0/0/2
SWD
LAN A LAN B GE0/0/2
G0/0/3 G0/0/3
The configuration The configuration
An MST region may contain multiple spanning trees, each of which is an MSTI. MSTI are independent is similar to is similar to
MSTP that of SWA
of each other and the calculation process of each MSTI is the same as the RSTP calculation process. that of SWA
PC1 PC2
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 40 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 41
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 42 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 43
11
MSTP Configuration Verification (2/2) Quiz
Check the port status on SWC. 1. Which port roles does RSTP define?
[SWC]display stp brief
MSTID Port Role STP State Protection 2. Which of the following statements about MSTP is false?
0 GigabitEthernet0/0/1 ROOT FORWARDING NONE
0 GigabitEthernet0/0/2 DESI FORWARDING NONE
0 GigabitEthernet0/0/3 DESI FORWARDING NONE A. One MST region can have only one MSTI.
1 GigabitEthernet0/0/1 ROOT FORWARDING NONE
1
1
GigabitEthernet0/0/2
GigabitEthernet0/0/3
DESI
DESI
FORWARDING
FORWARDING
NONE
NONE
B. Each MSTI uses the RSTP algorithm independently.
2 GigabitEthernet0/0/1 ROOT FORWARDING NONE
2 GigabitEthernet0/0/2 ALTE DISCARDING NONE C. MSTP is compatible with STP.
Check the port status on SWD. D. An MSTI can correspond to one or more VLANs.
<SWD>display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 ALTE DISCARDING NONE
0 GigabitEthernet0/0/2 ROOT FORWARDING NONE
0 GigabitEthernet0/0/3 DESI FORWARDING NONE
1 GigabitEthernet0/0/1 ROOT FORWARDING NONE
1 GigabitEthernet0/0/2 ALTE DISCARDING NONE
1 GigabitEthernet0/0/3 DESI FORWARDING NONE
2 GigabitEthernet0/0/1 ROOT FORWARDING NONE
2 GigabitEthernet0/0/2 DESI FORWARDING NONE
Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 44 Copyright © 2017 Huawei Technologies Co., Ltd. All rights reserved. Page 45
Thank You
www.huawei.com
12