Spanning Tree Protocol, or STP is an important part of Layer 2 networking. STP is virtually ubiquitous in switches of all types, including both managed and unmanaged devices from a multitude of vendors.

Over the years, various newer versions of the protocol have been introduced, further refining, perfecting, and accelerating the functionality of this vital protocol. In this article, we will examine traditional STP and compare it with Rapid STP or RSTP.
Spanning Tree Protocol Versions
There are a variety of STP protocols available in modern switches. These include:
- Spanning Tree Protocol (STP) IEEE 802.1D-1998
- Per VLAN Spanning Tree (PVST) Cisco proprietary protocol
- Per VLAN Spanning Tree Plus (PVST+) Cisco proprietary protocol
- Rapid Spanning Tree (RSTP) 802.1D-2004
- Rapid Per VLAN Spanning Tree Plus (RPVST+) Cisco proprietary protocol
- Multiple Spanning Tree (MST) IEEE 802.1Q-2014
In this article, we’ll examine STP and RSTP and compare their operation and implementation.
Terminology
Before we go on, I’d just like to clarify the use of some terms, both in the industry in general and in this article.
The term Spanning Tree Protocol can refer to two different things. First, it refers to the general category of protocols that perform Layer 2 loop mitigation.
All of the protocols listed above are STPs. STP, however, also refers to the first protocol in the above list, which is sometimes referred to as “classic” or “traditional” STP. This was introduced and defined in the IEEE 802.1D-1998 standard.
For this reason, it is important to pay attention to the context in which the term is being used to determine whether it refers to the broader family of STPs, or specifically to the original “classic” STP.

STP Operation
All STPs share some commonalities in how they function. This section describes those features of all STPs and how they operate.
Root bridge
STPs work by electing one switch to act as a root bridge within a single layer 2 domain. Using the Spanning Tree Algorithm (STA), the protocol maintains a single active path to each switch in the topology while blocking all redundant paths.
All active paths branch out from the root bridge in something that resembles a tree-like structure. This loop-free amalgamation of active paths is known as the spanning tree.
BPDUs
Bridge Protocol Data Units (BPDUs) are messages exchanged by STP-enabled switches to maintain spanning tree topologies.
BPDUs exchange information such as link costs and bridge priorities to determine which switch should become the root bridge, as well as to decide which ports to block to create the spanning tree and eliminate loops.
Topology Changes
In the event of a change in the topology, due to a failed switch, a failed link, or the connection of a new link, the spanning tree may need to be recalculated.
This process is called reconvergence. BPDUs are also responsible for communicating any changes in the topology that may require the spanning tree to reconverge.
Port roles
The role of a port defines its function within the operational STP. The role specifies how a port participates in the spanning tree and whether it forwards or blocks traffic. Different STPs have slightly different port roles and functions.
Port states
Port states are stages through which a port progresses to determine which role it must adopt. It takes a certain amount of time to progress from one state to another.
Within each state, the port performs specific functions until it converges on the role it eventually chooses. Different STPs have slightly different port states, and the process through which they progress also differs.
STP (802.1D)
Classic STP was the first form of the protocol, developed in 1998 to mitigate against layer 2 loops and their devastating effects. It is primarily characterized by its port roles and port states.
STP port roles
Classic STP assigns specific port roles to determine how each switch port participates in the STP topology and whether it will forward or block traffic. The following are the port roles:
- Root Port (RP) – The port on a switch with the best (lowest cost) path to the Root Bridge. The root port always forwards traffic.
- Designated Port (DP) – The port on a switch that forwards traffic but is not the RP.
- Non-Designated Port (a.k.a. Blocking Port) – Any port that is neither a Root Port nor a Designated Port. Such ports will always block traffic to prevent layer 2 loops.
STP port states
The port states are stages through which a port will progress to determine its role. These port states are the following and they function as described:
- Blocking – The port does not forward frames but listens for BPDUs. This is the initial state as soon as the switch is turned on. It is also the state of the non-designated ports. However, once there is a topology change, a 20-second timer will begin before moving to the next state.
- Listening – The port prepares to transition to forwarding, there is no MAC learning yet. The port remains in this state for 15 seconds.
- Learning – The port learns MAC addresses but does not forward traffic. The port remains in this state for 15 seconds.
- Forwarding – The port actively forwards traffic.
Thus, Classic STP may have a maximum convergence time of 20+15+15 = 50 seconds. This slow convergence is one reason why it was largely replaced by RSTP.
RSTP (802.1D-2004)
Rapid STP was an attempt to resolve the slow convergence time and other detriments of classic STP. It’s quite clear that this is the major improvement simply from the name. The way in which RSTP is made rapid is primarily due to the way the port states function.
RSTP Port States
RSTP does away with the Listening and Learning states and transitions immediately to Forwarding if conditions allow, significantly reducing convergence time to 1-6 seconds. Specifically, RSTP uses the following states:
- Discarding (equivalent to STP’s blocking)
- Learning
- Forwarding
RSTP Port Roles
RSTP port roles are largely the same as those of classic STP with some small differences:
- Root Port (RP) – Same as for classic STP.
- Designated Port (DP) – Same as for classic STP.
- Alternate Port – A backup Root Port. It provides an alternative path to the Root Bridge in case the current Root Port fails. This port remains in a discarding state until needed.
- Backup Port – A redundant Designated Port on a shared network segment. It stays in a discarding state unless the active Designated Port fails.
- Discarding Port – A port that is not forwarding traffic to prevent loops. It replaces the Blocking Port in STP.
Edge Ports
Ports connected to hosts or end devices are known as edge ports. These ports do not need to transition through the various RSTP states before forwarding traffic.
Instead, they should immediately enter the Forwarding state. RSTP improves convergence over classic STP by allowing these edge ports to be configured to bypass the usual convergence process.
When properly configured, edge ports transition to Forwarding immediately, ensuring that connected hosts do not experience long delays—often lasting several seconds—before gaining network connectivity.
Key Differences of RSTP from classic STP
- Removes Listening State which means that ports don’t need to wait before moving to Learning.
- Fewer states means fewer transitions making it more efficient.
- Ports can move directly to Forwarding if conditions allow.
- RSTP introduces “Alternate” and “Backup” ports to enable faster failover.
- “Blocking” state is replaced with “Discarding” for simplicity.
STP vs RSTP Comparison Table
The following table shows a summary of the most notable differences between classic STP and RSTP.
|
Feature |
STP (802.1D-1998) |
RSTP (802.1w-2001) |
| IEEE Standard | 802.1D-1998 | 802.1w-2001 (Later incorporated into 802.1D-2004) |
| Convergence Time | 30-50 seconds (Listening → Learning → Forwarding) | 1-6 seconds (Immediate transition for edge ports, improved convergence for others) |
| Port States | Blocking, Listening, Learning, Forwarding, Disabled | Discarding, Learning, Forwarding |
| Port Roles | Root, Designated, Non-Designated (a.k.a. Blocking) | Root, Designated, Alternate, Backup |
| Backup Paths | No concept of backup paths; relies on topology change for new root selection. | Uses Alternate and Backup ports for immediate failover. |
| BPDU Handling | BPDUs are only sent by the root bridge; others forward them. | All switches send BPDUs every Hello interval (not just root). |
| Topology Change Handling | Topology Change Notification (TCN) BPDUs are sent upstream to root. | Immediate reaction to topology changes via synchronized BPDU exchanges. |
| Edge Port Mechanism | No concept of edge ports; must go through normal states. | Introduces PortFast (Edge Ports), allowing immediate transition to forwarding. |
| Link Type Considerations | No differentiation between link types. | Recognizes Point-to-Point (full-duplex) and Shared (half-duplex) links for better convergence. |
| Backward Compatibility | Yes, but with slower convergence. | Yes, interoperable with STP, but RSTP switches fall back to STP mode when necessary. |
| Scalability | Limited; one STP instance for entire network. | More scalable due to faster convergence and optimized port roles. |
| Common Use Cases | Legacy networks, older hardware that doesn’t support RSTP. | Modern networks where rapid convergence is necessary. |
A note about “classic” STP
STP 802.1D is no longer an available option for modern Cisco switches. If you were to check what versions are available on today’s devices, you would find that RSTP and MSTP are the primary spanning tree options supported.
Modern Cisco switches default to RSTP and Rapid PVST+ which provide much faster convergence than classic STP. If backward compatibility with legacy STP devices is needed, RSTP can seamlessly fall back to STP mode when interacting with older switches.
Even so, it is valuable to learn about classic STP and its differences from RSTP as a learning tool to more fully understand all of the STPs and their operations.
Conclusion
Classic STP has been largely replaced by RSTP and MSTP in modern networks due to their faster convergence and improved efficiency, ensuring better performance while maintaining backward compatibility with older STP implementations when necessary.
Understanding these advancements helps network engineers design more resilient and scalable Layer 2 topologies, reducing downtime and improving overall network stability.
Related Posts
- Difference Between Routers and Switches in TCP/IP Networks
- 11 Different Types of IP Addresses Used in Computer Networks
- Compare and Contrast Network Topologies (Star, Mesh, Bus, Hybrid etc)
- 11 Networking Companies Like Cisco (Competitors)
- What is a Wildcard Mask – All About Wildcard Masks Used in Networking