In this article we will discuss about Rapid Spanning Tree Protocol (RSTP). RSTP is defined under 802.1w standard. The legacy STP is defined under 802.1D standard.

Before diving into RSTP let’s discuss the drawbacks of legacy STP. The first one is the high convergence time. To recover from a link failure, it takes 50 seconds – 20 seconds for the BPDU to age out, 15 seconds for listening state and another 15 seconds for learning state. While this doesn’t seem too much, in today’s networks this is unacceptable. The other drawback of legacy STP is how the STP is maintained. Both RSTP and STP are using BPDU to advertise the current topology. On legacy STP, the root initiates the messages and they are propagated throughout the network every hello timer interval. So if a switch doesn’t receive a BPDU it means that the message wasn’t received. This might be because the root bridge didn’t send it at all or maybe it was sent but somewhere along the path it was dropped without knowing where this happened. With RSTP, a non-root bridge sends its own BPDU regardless of if it has received the BPDU from the root bridge.

CCNA Training – Resources (Intense)

RSTP has better convergence than STP due to these factors:

  • Point-to-point link designation
  • Edge port designation
  • Faster transition between port roles
  • Direct and indirect failure detection and recovery

    In RSTP, there are new port roles defined and these are:

  • Alternate port – provides an alternate path to the root bridge. This port blocks superior BPDU. In case the root port fails, the alternate port assumes the root port role and transition to forwarding state.
  • Backup port – this allows a redundant path to a segment. The traffic is blocked because there is another port that is designated port that has (in most of the cases) lower port ID. The backup port is placed in discarding state.

    The root and designated ports are kept in RSTP without any behavior change.

    Let’s continue to discuss the port states and do a summary of the port states in STP:

  • Blocking – the port drops all the data and listens to BPDUs
  • Listening – the port drops all the data, listens to BPDUs and it will be used in the active topology
  • Learning – the port drops all the data, listens to BPDUs and it is learning MAC addresses
  • Forwarding – the port forwards data and it’s learning MAC addresses

In RSTP, there are less port states and if a port is not in learning or forwarding state, then it is placed in discarding state.

Only the root and designated ports are in forwarding state, whereas alternate, backup and disabled ports are in discarding state. This is a comparison of the port states between STP and RSTP:










The below diagram should help to understand the port roles in RSTP:

All RSTP switches send BPDUs every two seconds (the default hello timer that can be changed). If a neighbor switch doesn’t receive any BPDU for six seconds, it assumes there was a failure and updates the tree. This is much faster than the 50 seconds that a switch running the legacy STP has to wait before the tree is updated.

Also, the Ethernet (this is referring to any speed of the interface) that are in full duplex are considered a point-to-point interface. This allows in the case of a failure that a port in point-to-point to move to root port or designated port and to forwarding state right away. If the port is operating in half duplex, it is considered to be running in shared mode and needs to wait for the timer to expire before it can move to forwarding state.

Let’s discuss the BPDU packet fields. This is the packet with each field and its size:

Protocol ID – 2 octets
Protocol Version – 1 octet
BPDU Type – 1 octet
Flags – 1 octet
Root ID – 8 octets
Root Path Cost – 4 octets
Bridge ID – 8 octets
Port ID – 2 octets
Message Age – 2 octets
Max Age – 2 octets
Hello Time – 2 octets
Forward Delay – 2 octets
Version 1 Length – 2 octets

Some of the fields have these values:

  • The Protocol Version is 0x02
  • The BPDU Type is 0x02
  • The Version Length is 0x0000

    The flags field contains the following flags:

  • TCN Acknowledgement Flag
  • Agreement Flag
  • Forwarding Flag
  • Learning Flag
  • Port Role Flag
  • Proposal Flag
  • Topology Change Flag

A port in STP transition in forwarding state after 30 seconds after the port is enabled. In RSTP, a proposal-agreement handshake is used on point-to-point links instead of timers to determine when a port is transitioning to forwarding state. However, the exceptions are the alternate ports that move immediately to root and edge ports that transition to forwarding state. Non-edge designated ports transition to forwarding states once they receive the agreement.

Edge ports are the ports connected to end stations and because they cannot create loops, are put immediately in forwarding state. If a switch doesn’t receive a BPDU from the connecting device, it assumes the role of an edge port. However, if a port with edge role that is receiving a BPDU is moved to a normal spanning tree port role, a non-edge port.

In STP, when a port transitions to any state (due to the port going down or coming up), a TCN is generated. In RSTP, a TCN is generated only when a non-edge port transition to forwarding state. Therefore with RSTP, TCNs are not generated when a port is administratively disabled, excluded from the active topology or excluded from learning and forwarding.

When the TCN is generated, the device initiating it floods all designated and root ports. In legacy STP, the TCN has to reach the root bridge that in turn sends a Topology Change Acknowledgement downstream so the other switches will flush the MAC table. However, in RSTP, the switches that are in the path of the TCN initiator towards the root bridge do not need to wait for the TCA. The switches flush most of the MAC addresses without any TC acknowledgement from the root bridge. The switches do not flush the MAC addresses learned from their edge ports or from the ports through which they received the TCN.

Let’s discuss about the proposal-agreement handshake based on the following drawing:

  1. The downstream switch (the one pictured) receives a BPDU with the Proposal flag set from the upstream switch.
  2. The downstream switch transitions the downstream ports to blocking
  3. The downstream switch compares its bridge ID with the one from the BPDU received that had the Proposal flag set.
  4. Let’s assume the bridge ID is higher. Then the switch transition the port to root port and sends a BPDU with the Agreement flag set
  5. When the switch that has sent initially the BPDU with the Proposal flag set sees the BPDU with the Agreement flag set, it transition the port in forwarding state There is no loop possible because the downstream switch blocked all its downstream ports
  6. The same process continues with all the switches connected to the downstream switch and the ports are transitioned in forwarding state after the proposal-agreement handshake is done

    Now let’s move further with some hands-on experiments.

    We will use this topology:

Let’s see what we have by default for VLAN 13:

SW12#show  spanning-tree vlan 13

  Spanning tree enabled protocol ieee
  Root ID    Priority    32781
             Address     0027.0c1a.db80
             This bridge is the root

As you can see, the protocol is IEEE, which is the legacy one. This is how you enable RSTP on a Cisco switch:

SW12#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
SW12(config)#spanning-tree mode rapid-pvst 

And now the switch is running RSTP:

SW12#show  spanning-tree  vlan  13

  Spanning tree enabled protocol rstp
  Root ID    Priority    32781
             Address     0027.0c1a.db80
             This bridge is the root

Now SW12 is running RSTP, but the other switches are still using STP. You will see this as a type of the interfaces:

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi0/0               Desg FWD 4         128.1    P2p Edge 
Gi0/2               Desg FWD 4         128.3    P2p Peer(STP) 
Gi0/3               Desg FWD 4         128.4    P2p Peer(STP) 
Gi0/4               Desg FWD 4         128.5    P2p Peer(STP)

As you can see, GigabitEthernet0/0 is in edge role as there is a host connected.

Let’s check the port roles and states on SW3:

SW3#show spanning-tree vlan 13

  Spanning tree enabled protocol rstp
  Root ID    Priority    32781
             Address     0027.0c1a.db80
             Cost        4
             Port        1 (GigabitEthernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32781  (priority 32768 sys-id-ext 13)
             Address     f4ac.c115.e300
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi0/0               Root FWD 4         128.1    P2p 
Gi0/1               Altn BLK 4         128.2    P2p 


As you can see, the root port is Gi0/0, which is the direct link towards SW12 (the root bridge) and it is in forwarding state. Gi0/1 is in alternate role and in blocking state as expected.

I did the following test. I filtered out the BPDUs on SW12 so that SW3 will not receive any causing to age out the BPDU and transition Gi0/1 to root port. This is the debug information from SW3 for VLAN 24:

*Jun 11 22:59:13.257: RSTP(24): Gi0/0 rcvd info expired
*Jun 11 22:59:13.257: RSTP(24): updt roles, information on root port Gi0/0 expired
*Jun 11 22:59:13.257: RSTP(24): Gi0/1 is now root port
*Jun 11 22:59:13.257: RSTP(24): Gi0/0 blocked by re-root
*Jun 11 22:59:13.257: RSTP(24): Gi0/0 is now designated

The configuration is not much different than for legacy STP. However one needs to pay attention to how RSTP is different from legacy STP from the operational point of view.

This article described the additions that RSTP has over the legacy STP and I hope you found it useful for your studies on different flavors of STP.


  1. CCNP Routing and Switching SWITCH 300-115 Official Cert Guide – David Hucaby