Home » Layer-2 Switching » Rapid Spanning Tree (RSTP)

Rapid Spanning Tree (RSTP)

RSTP (802.1w)
Rapid Spanning Tree Protocol

RSTP is backward compatible with classic STP (802.1d)
RSTP has faster convergence than STP.
Introduces new simplified Port States and Port Roles.
The Timers in RSTP are replaced on a Synchronization Process which is also called as the Proposal and Agreement Process.

Three Port States in RSTP:

1. Discarding: State where the Port is dropping frames
(Equivalent to STP Disabled and Blocking state)

2. Learning: State where the switch is building its CAM table but still is dropping frames
(Equivalent to STP  listening and learning states)

3. Forwarding: State of normal frame forwarding

Port Roles in RSTP

1. Root Port:
Same as the Classic STP Root Port.

2. Designated Port:
Same as the Classic STP designated port.

3. Alternate Port:
Its an alternate port to Root Port that is an alternate way to get to the Root Switch. Its normally in discarding state when existing Root Port is functioning normally and becomes active and transitions to forwarding state when the existing Root Port fails. Its like the uplink fast of STP

4. Backup Port:
Is a backup port to the designated port, it is normally in discarding state when existing designated is functioning normally, when the existing designated port fails this port becomes active and transitions to forwarding state.

With the new Alternate and Backup port Roles there is a quick convergence during a network link failure.

RSTP Edge Ports

RSTP Edge Ports are the ports connected to end workstations or server.
These Ports immediately transition to forwarding state
These Edge ports still need to be identified in RSTP with the Spanning-tree Portfast command
The Edge Port status will remain in places as long as no BPDUs are received, if a BPDU is received then these ports will remove the Edge Port Status and generate a TCN.

Note: It is important to define the ports connecting to workstations and end hosts as Edge Ports ( Portfast command) to avoid the generation  and propagation of unnecessary TCNs when these ports go up and down.

RSTP Non-Edge Ports

Non-Edge Ports fall into two categories in RSTP
1.Point-to-Point Ports : These are Full Duplex ports connecting to other switches.
2. Shared Ports: These are ports connecting to other switches but are in Half Duplex mode *

* Note: The RSTP Sync process will not work on the ports which are marked as Shared Ports, so the rapid convergence will never happen on the ports that are marked as shared ports.

RSTP Sync Process (Proposal and Agreement)

1. Switch will elect a Root Port
2. All of the non-edge ports on this switch are marked as designated but they are all in discarding state.
3. Next Proposals are sent out of these designated ports, the proposal sets the port role to designated and contains the root bridge information
4. Downstream switches receive the proposal and they either agree to this information or they disagree to the proposal and send back the better information they have ( that is when they have better path to the Root switch)
4a. If the downstream switches agree to the proposal, they send an agreement back, upon receiving the agreement the switch will unblock the designated port and transitions it from discarding to forwarding state.
4b. If the downstream switch denies the proposal and sends a better Root path information then the local switch will change its Root Port.

The Sync Process in RSTP prevents the temporary loops by blocking the designated ports initially until the proposal and agreement process completes and it also ensures that all switches in the topology agree to the same Root Switch.

In RSTP, if the Root Port fails then the Alternate Port takes over and synchronizes this information with downstream switches. But if there is no Alternate port then the local switch will declare itself as the root switch and then syncs with the downstream switches and will adapt to the better Root  information sent by downstream switches, if downstream switches have a better Root Path information else this local switch becomes the Root Switch and downstream the topology undergoes the sync process again until all switches in the topology learn the new Root information.

Note: Also when the downstream switch agrees to the proposal then it goes through the same process again
1. Select the Root Port
2. Put all non-edge ports in designated but discarding state
3. start the Sync Process on all designated Ports

In Classic STP only Root Switch used to generate the configuration BPDU and other switches used to just forward it, where as TCN BPDUs were generated by all the switches on a topology change.
In RSTP, all switches  now generate a configuration BPDU every 2 seconds and if 3 of these BPDUs are missed from the neighbor then the link is considered down, so the re-convergence is started in 6 seconds when compared to the max-age timer of 20 seconds in classic STP.

Commands to Configure RSTP:
Under Global Configuration Mode:

# spanning-tree mode rapid-pvst

Before enabling or moving from PVST to RSTP remove
1. Backbone Fast
2. Uplink Fast
3. Other PVST features can stay like Port Fast, Root Guard etc

Incoming search terms for the article:

One thought on “Rapid Spanning Tree (RSTP)

  1. Jezz says:

    Nice clear explanation of the RSTP sync process – well done!

Leave a Reply