RSTP Principles and
Configuration
[Link]
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved
Foreword
This section introduces the basic principles and configuration of
RSTP. Compared with STP, the most significant feature of
RSTP is the new mechanism, the speed of convergence.
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page2
Objective
Upon completion of this section, you will be able to:
Explain the convergence process of RSTP
Describe the state transition of a port in RSTP
Describe effects of Topology Changes in RSTP
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page3
Content
The convergence process of RSTP
The state transition of a port in RSTP
RSTP Topology Change Information
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page4
RSTP Basic Calculation Process-Select Root
Bridge
32768. 32768.
00e0-fc16-ee43 00e0-fc22-715a
SWA SWB
Root Bridge
32768.
00e0-fc41-4259 SWC
LANA
32768.
00e0-fc41-43b9 SWD
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 5
RSTP Basic Calculation Process -Select Root
Port on Non-root Bridge
32768. Root Port
32768.
00e0-fc16-ee43 00e0-fc22-715a
SWA SWB
Root Bridge
Root Port
32768.
SWC 00e0-fc41-4259
LANA
Root Port
32768.
00e0-fc41-43b9 SWD
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 6
RSTP Basic Calculation Process -Select
Designated Port for Network Segment
32768. Root Port
32768.
00e0-fc16-ee43 00e0-fc22-715a
SWA Designated Port SWB
Root Bridge
Root Port
32768.
SWC 00e0-fc41-4259
E0/1
E0/2
Designated Port
LANA
Root Port
32768.
00e0-fc41-43b9 SWD
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 8
RSTP Basic Calculation Process -Select Alternate
Port and Backup Port
32768. Root Port
32768.
00e0-fc16-ee43 00e0-fc22-715a
SWA Designated Port SWB
Root Bridge Alternate Port
Root Port
32768.
SWC 00e0-fc41-4259
E0/1
E0/2
Backup Port
Designated Port LANA
Root Port
32768.
00e0-fc41-43b9 SWD
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 9
Bridge Port Role
Port role Description
Root port is the nearest port to the root bridge, it is in
Root Port
the forwarding state in a stable network .
Responsible for forwarding data to the downstream
Designated Port network segments or switches. It is in the forwarding
state in a stable network.
Backup port is not in the forwarding state, the switch
Backup Port it belongs to is the designated bridge of network
segment it connects.
Alternate Port is not in the forwarding state, the
Alternate Port switch it belongs to is not the designated bridge of
network segment it connects.
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 10
Content
The convergence process of RSTP
The state transition of a port in RSTP
RSTP Topology Change Information
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page11
Bridge Port Status
Port
Description
status
A port in the Discarding state can only receive BPDUs.
Discarding
Includes Alternate Port and Backup Port.
A port in the Learning state learns MAC addresses
Learning 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.
Forwarding A port in the Forwarding state can send and receive
BPDUs as well as forward user traffic.
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 12
Port Status Transition Rule
Discarding Discarding
Where loop exists,
wait for the other
bridges to complete If no loop exists or
calculation designated time has
expired, begin state
transition
Forwarding Forwarding
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 13
Select New Root Port-No Loop Risk
SWA
Root
32768.00e0-fc16-ee43
Designated port
Designated port
for LANA
for LANB
LANA LANB
Root port
SWB
32768. SWC 32768.
00e0-fc41-4259 LANC 00e0-fc41-43b9
Alternate
port
Designated New root port will
port for LANC forward data
immediately
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 15
Select New Designated Port-Edge Port
SWA
Root bridge
32768.00e0-fc16-ee43
LANA LANB
SWB SWC
32768. 32768.
00e0-fc41-4259 LANC 00e0-fc41-43b9
Edge port
LAND LANE
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 16
Select New Designated Port-"Proposal-Agreement"
SWA SWB
Root
D E0/2 R
R
E0/1 D A D
Proposal Agreement
Enter into
Keep forwarding
forwarding
state
state D
R E0/2 Agreement E0/2 R D
Discarding E0/1 E0/1 New Root
D A
SWC R Proposal D SWD Enter into
forwarding state
Keep forwarding
state
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 17
Precondition of Negotiation Mechanism -
Point-to-point Link
SWE SWA
D Enter into
forwarding state
Proposal
prematurely
SWD LAN
Agreement
D R R
Proposal
SWB SWC
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 19
State Transition
SWA SWB
Root E0/1
LANB
E0/2 Designated port
New alternate port,
not stop forwarding
LANA LANC
temporarily
Root port
E0/1
New designated
New Root E0/2 port
LAND
SWC SWD
Alternate port
New root port
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 21
Configure RSTP-Basic Configuration
[Quidway]sysname SWA [Quidway]sysname SWB
[SWA]stp enable [SWB]stp enable
[SWA]stp mode rstp [SWB]stp mode rstp
[SWA]stp priority 4096 [SWB]stp priority 8192
E0/10 E0/10 SWB
SWA
D R
D
E0/20 D E0/20
Root
R A
E0/20 E0/10
SWC
[Quidway]sysname SWC
[SWC]stp enable E0/1 D
[SWC]stp mode rstp
LANA
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 22
Configure RSTP-Configure Point-to-point Link
[SWA]interface Ethernet 0/10
[SWA-Ethernet0/10]stp point-to-point force-true
[SWA]interface Ethernet 0/20
[SWA-Ethernet0/20]stp point-to-point force-true
E0/10 E0/10 SWB
SWA
D R
D
E0/20 D E0/20
Root
R A
E0/20 E0/10
SWC
E0/1 D
LANA
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 23
Configure RSTP-Configure Edge Port
E0/10 E0/10 SWB
SWA
D R
D
E0/20 D E0/20
Root
R A
E0/20 E0/10
[SWC]interface Ethernet 0/1 SWC
[SWC-Ethernet0/1]stp edged-port enable
E0/1 D
LANA
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 24
Encapsulate RST BPDU
DMAC SMAC Length Data FCS
01-80-C2-00-00-00
LLC Header RST BPDU
DSAP SSAP
Control
01000010 01000010
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 25
RST BPDU Structure
2 Bytes Protocol Identifier 0x0000
1 Byte Protocol Version Identifier 0x02
1 Byte BPDU Type 0x02
1 Byte Flags
8 Bytes Root Identifier
Used to
4 Bytes Root Path Cost
check the
8 Bytes Bridge Identifier best BPDU
2 Bytes Port Identifier
2 Bytes Message Age
2 Bytes Max Age
2 Bytes Hello Time
2 Bytes Forward Delay
1 Byte Version 1 Length 0x00
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 26
Flags Field -Port Role and Port Status
1bit 2bit 3bit 4bit 5bit 6bit 7bit 8bit
Learning
value Port role Status flag
00 Unknown
Alternate or Forwarding
01
backup port Status flag
10 Root port
11 Designated port
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 27
Flag Field-"Proposal-Agreement"
1bit 2bit 3bit 4bit 5bit 6bit 7bit 8bit
Proposal Agreement
Message Message
flag flag
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 28
Content
The convergence process of RSTP
The state transition of a port in RSTP
RSTP Topology Change Information
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page30
Topology Change Causes MAC Address Table
Error
SWA
Root
Destination
Destination MAC
port
00-0D-56-BF-88-20 E1
Root port ..... .....
LANA LANB ..... .....
E1
E1 SWC
Wrong destination port,
SWB LANC it should be E2
E2 E2
New root port
LAND LANE
00-0D-56-BF-88-20
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 31
Detect The Topology Change-Edge Port Fault
Destination
Destination MAC SWA
port Root
MAC in LANA E1
D D
MAC in LANB E3
MAC in LANC E1
MAC in LAND..... E1
..... LANA
R R SWC
E1 E1
SWB A D
LAND
Edge port E2 E2
E3 E3
LANB LANC
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 32
Detect The Topology Change -Non-edge
Forwarding Port
Destination MAC
destination SWA
port Root
MAC in LANA E1
MAC in LANB E3 D D
MAC in LANC E1
MAC in LAND E1
..... .....
LANA
Root port
E1 R SWC
E1
SWB A D
LAND
E2 E2
E3 E3
TCN
New root port
LANB LANC
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 33
Flags Filed in RST BPDU-TCN
1bit 2bit 3bit 4bit 5bit 6bit 7bit 8bit
Topology
Topology
change
change
acknowledge
flag
flag
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 34
Receive Topology Change Notification
SWA
Root Destination
Destination MAC
port
D D MAC in LANA E1
MAC in LANB E1
MAC in LANC E3
MAC in LAND E2
LANA ..... .....
Root port
E1 R
E1
SWB A D SWC
LAND
E2 E2
E3 E3
TCN
New root port
LANB LANC
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 35
Questions
What port roles are defined in RSTP?
What is the prerequisite for rapid status
transition on a designated port?
How many types of topology change
message are used by RSTP?
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 36
Thank you
[Link]