Rapid Spanning Tree Protocol (RSTP)
I previously discussed the plain-old Spanning Tree Protocol (STP). In this post, I will look at the differences introduces by its successor, the Rapid Spanning Tree Protocol (RSTP).
The Case for RSTP
STP required 50 seconds to get a port in forwarding state: it waits 20 seconds for the MaxAge (by default 10 times the value of the Hello Timer) timer to expire. At that point, it knows it has to change the topology. It will spend the Forward Delay in a listening state (15 seconds by default) and then another Forward Delay in learning mode.
All that waiting is tedious: 50 seconds is a long time to be without network connectivity. Devices that live off of edge ports expect to be able to do DHCP and are unable to. Apparently, some DHCP client implementations just give up if they cannot Discover a DHCP server within those 50 seconds.
So RSTP promises faster convergence. It does this by introducing new roles. STP had Root Ports (ports facing toward the root bridge that had the least path cost from that port to the root) and Designated Ports (ports facing away from the root bridge that had the least path cost to the root bridge on that segment and that was therefore designated to put the BPDUs on the segment).
RSTP introduces the Alternate and Backup Port roles. Alternate Ports function as secondaries to the Root Ports (on a point-to-point link type). They have the least cost path to the root after the Root Port. Backup Ports are only relevant to shared links. This means that when you have multiple links into the same segment (the same collision domain), all but one of those links will be blocking (or discarding in RSTP parlance). One of the blocked ports will be a Backup Port. Shared access to a collision domain only happens when using hubs1 (but see below for an interesting inter-op case with MikroTik bridges).
So: Alternate Ports step in for failing Root Ports, Backup Ports step in for failing Designated Ports.
The idea of assigning Alternate Ports is that when a Root Port goes down, the Alternate Port can transition to the forwarding state without any delays. Same with Backup Ports.
STP had 5 states a port could be in:
- Blocking
- Listening
- Learning
- Forwarding
- Disabled
RSTP simplifies this to 3:
- Discarding
- Learning
- Forwarding
The discarding state now encapsulates the blocking and disabled states. The listening state is simply not used anymore.
Key Differences between STP and RSTP
- RSTP detects root failure in 3 Hello times (by default:
3 * 2 = 6
seconds), instead of ten Hello times (by default:10 * 2 = 20
seconds). - RSTP may send BPDUs in the direction of the root bridge, confirming to the upstream bridge that it has received superior information. The bridge receiving this confirmation can rapidly transition the port to the forwarding state, skipping the listening/learning states.
-
And, as everybody keeps saying in instruction videos and podcasts, these are exceedingly rare these days. I’ve never even seen a hub in my life except on network diagrams. ↩︎