Rapid Spanning Tree Protocol (RSTP)-802.1w

In normal STP (802.1d), there are four port states which are blocking, listening, learning, and forwarding port state.

In RSTP there are only three port states which are discarding, Learning, Forwarding.

In RSTP blocking and listening states are combined to form the discarding state.



Port types in RSTP



Root port:-





Designated port:-






Alternate port:-


This is the port through which the switch will have alternate path to the root switch which is different that the path which root port takes. This will be used in case root port goes down.

Backup port:-



This is a port which gives a backup path to a network segment but this path will be used in case designated port goes down.




Port states:-


Discarding:-In this state the incoming frames are dropped.

Learning:-In this state the MAC addresses of the incoming frames are learned but the incoming frames are dropped.

Forwarding:-In this state the incoming frames are forwarded as per the MAC address which are learned.



BPDU's in RSTP


Changes in BPDU from 802.1D

BPDU version is 2.

In STP(802.1D) the BPDU's are generated by root switch and other switches in the network simply forward them.
But in RSTP every switch generates BPDU's. All the switchports send out BPDU's at regular intervals.
If a switch does not receive 3 BPDU's continuosly from its neighbor then it will assume the neighbor switch is down.

In 802.1D neighbor failure is detected in 20 seconds but in RSTP its detected in 6 seconds.

RSTP Convergence



Port Types


Edge port:-
A port at the corner of the network where the is a possibility to connect only one host. Since there is no probability of receiving any BPDU's on the edge port, it can be immediately moved to forward state.

Root port:-The port with the shortest path to the root switch is called the root port.

Point-to-point port:-In RSTP when two switches are connected, the BPDU's are exchanged between the switches to decide which switchport will become the designated port.Once the neighboring switch agrees, it will send the agreement message to the switch.This designated port is called the point-to-point port.



Convergence process:

Switch1 will send the proposal and it has a better BPDU than the Switch2.So Switch1 wants its port(F0/1) to become the designated port.Switch2 agrees on this since Switch1 has a better BPDU and its port F0/1 will become the root port.

Switch2 needs to synchronize itself with the topology before the agreement with switch2.

Switch2 will move the non-edge port(F0/2) into discarding state to avoid loops.

Switch2 will send an agreement message to Switch1 agreeing that Switch1 F0/1 port can become the designated port.

Switch2's F0/1 port and Switch1's F0/1 port will move to forwarding state. 

Now Switch2 will send a proposal message out the non-edge port (F0/2) to Switch3 and waits for the agreement message.


Once Switch2 receives the agreement message it will move the port F0/2 to forwaridng state.



Topology changes and RSTP





RSTP Configuration



Switch(config)#spanning-tree mode rapid-pvst