TCP vs UDP: Detail Explained
On the internet, two of the most important protocols are TCP and UDP. But what are they, and…

RSTP (Rapid Spanning Tree Protocol, IEEE 802.1w) is the modern replacement for the original STP (Spanning Tree Protocol, IEEE 802.1D). The fundamental difference is convergence speed — STP takes 30–50 seconds to recover from a topology change, while RSTP converges in 1–2 seconds. Both protocols prevent Layer 2 loops in networks with redundant switch connections, but RSTP does it much faster and more intelligently.
| Feature | STP (802.1D) | RSTP (802.1w) |
|---|---|---|
| IEEE Standard | 802.1D (1998) | 802.1w (2001), merged into 802.1D-2004 |
| Convergence Time | 30–50 seconds | 1–2 seconds |
| Port States | 5 (Blocking, Listening, Learning, Forwarding, Disabled) | 3 (Discarding, Learning, Forwarding) |
| Port Roles | Root, Designated, Non-Designated | Root, Designated, Alternate, Backup, Disabled |
| BPDU Generation | Only root bridge generates BPDUs | Every switch generates BPDUs every 2 seconds |
| Topology Change | Slow — max age timer must expire (20s) | Fast — immediate propagation via proposal/agreement |
| Edge Ports | PortFast (Cisco proprietary) | Edge Port (native in standard) |
| Compatibility | N/A | Backward compatible with STP |
| BPDU Version | Version 0 | Version 2 |
STP has five port states. RSTP simplifies this to three by merging Blocking and Listening into a single Discarding state:
| STP State | RSTP Equivalent | Forwards Traffic? | Learns MACs? |
|---|---|---|---|
| Disabled | Discarding | No | No |
| Blocking | Discarding | No | No |
| Listening | Discarding | No | No |
| Learning | Learning | No | Yes |
| Forwarding | Forwarding | Yes | Yes |
RSTP introduces two new port roles not found in STP:
RSTP uses a Proposal/Agreement mechanism to rapidly transition ports to Forwarding state without waiting for timers:
The entire process completes in under 2 seconds vs 30–50 seconds with STP timers.
In STP, Cisco introduced PortFast as a proprietary feature to allow access ports to skip Listening and Learning states. RSTP standardizes this concept as Edge Ports — ports connected to end devices (PCs, phones, printers) that will never create a loop. Edge ports immediately enter Forwarding state. If an Edge port receives a BPDU, it automatically loses its edge port status (BPDU Guard can shut it down to prevent rogue switches).
The answer is almost always RSTP. Use RSTP (Rapid PVST+ on Cisco) in all modern networks. STP’s 30–50 second convergence causes unacceptable outages. The only reason to keep STP is compatibility with very old legacy equipment that does not support RSTP — but RSTP is backward compatible with STP, so mixing the two in a network is safe.
! Enable Rapid PVST+ (Cisco's RSTP implementation per VLAN)
Switch(config)# spanning-tree mode rapid-pvst
! Verify
Switch# show spanning-tree | include mode
Switch# show spanning-tree summary
! Configure Edge Port (replaces PortFast)
Switch(config-if)# spanning-tree portfast
Switch(config-if)# spanning-tree bpduguard enableWhile RSTP is faster than STP, it still runs one instance per VLAN in Cisco’s Rapid PVST+ implementation. MSTP (Multiple Spanning Tree Protocol, 802.1s) maps multiple VLANs to fewer STP instances, reducing CPU and memory overhead in networks with many VLANs. For networks with 20+ VLANs, MSTP is worth considering.
Yes. If an RSTP switch receives an STP BPDU (version 0) from a neighbor, it automatically falls back to STP behavior on that port, ensuring compatibility with older switches.
Yes — the IEEE merged RSTP into the 802.1D-2004 standard, making RSTP the new “STP.” What is called STP today technically refers to RSTP in modern implementations.
RSTP convergence is typically 1–2 seconds using the Proposal/Agreement mechanism, compared to STP’s 30–50 seconds using timer-based convergence.
Related reading: STP Complete Guide | What is a Switch? | EtherChannel Guide