IEEE 802.1w RSTP: the Rapid Spanning Tree Protocol
Ethernet frames carry no hop count, so a loop in a bridged network would circulate broadcasts forever. Bridges therefore agree on a loop-free subset of the links: a spanning tree. The Rapid Spanning Tree Protocol (RSTP) is the standard way to compute it, and the first control protocol listed for the active topology in the bridge post.
Abbreviations used in this post (9)
| Abbreviation | Stands for | Meaning |
|---|---|---|
| BPDU | Bridge Protocol Data Unit | The message bridges exchange to run STP, RSTP and MSTP. |
| FRER | Frame Replication and Elimination for Reliability | IEEE 802.1CB: frames are numbered, sent over disjoint paths, and duplicates are removed. |
| IEEE | Institute of Electrical and Electronics Engineers | The professional association whose Standards Association publishes the IEEE 802 LAN/MAN standards. |
| LAN | Local Area Network | A network covering a limited area, such as a building or a vehicle; IEEE 802 standardises LANs. |
| MSTP | Multiple Spanning Tree Protocol | IEEE 802.1s, now in 802.1Q: several spanning trees, each used by a group of VLANs. |
| RSTP | Rapid Spanning Tree Protocol | IEEE 802.1w, now in 802.1Q: a faster-converging spanning tree with alternate and backup port roles. |
| SPB | Shortest Path Bridging | IEEE 802.1aq: bridges compute shortest path trees with IS-IS, so all links can be used. |
| STP | Spanning Tree Protocol | The original 802.1D protocol that blocks redundant links to leave a loop-free tree; now replaced by RSTP. |
| VLAN | Virtual LAN | A logical LAN within a bridged network, identified by a 12-bit VLAN ID in the 802.1Q tag. |
1. Definition
The Rapid Spanning Tree Protocol was introduced by IEEE in 2001 as IEEE 802.1w and incorporated into IEEE 802.1D-2004, which made the original Spanning Tree Protocol (STP) obsolete [1]. It is backward compatible with STP [1]. The bridge functions of 802.1D, including RSTP, have since been brought into IEEE 802.1Q [2]. The IEEE 802.1 tutorial notes that STP is now historical, replaced by RSTP [3].

RSTP sits on the first layer of the bridge's control. It decides the active topology: which of the physical links are actually used. VLAN membership and station locations are then learned on top of it [3].
2. How a spanning tree is built
Bridges exchange bridge protocol data units (BPDUs) with their neighbours. From them [1]:
- the bridges elect a root bridge;
- every other bridge adds up the path cost towards the root and selects its best port towards it, the root port;
- on each LAN segment, the bridge with the best path to the root forwards for that segment through its designated port;
- every other port that would close a loop stops forwarding user data.
The default path cost is inversely proportional to link speed: RSTP uses 20 Tbit/s divided by the bandwidth [1].
3. What makes it rapid
RSTP keeps the idea of the spanning tree but changes how fast it reacts [1]:
| STP | RSTP | |
|---|---|---|
| Reaction to a topology change | 30 to 50 s | Within 3 hello times (6 s by default), or a few milliseconds after a physical link failure |
| Port states | Five | Three: discarding, learning, forwarding |
| Port roles | Root, designated, blocked | Root, designated, alternate (another path to the root), backup (another path to a segment), disabled |
| Edge ports | — | Ports with no bridge behind them forward at once, but still watch for BPDUs |
Two mechanisms do most of the work [1]:
- Prepared alternatives. An alternate or backup port already knows it is the next best choice, so it can take over without waiting for timers when the active port fails.
- Proposal and agreement. On point-to-point links, a bridge proposes its spanning-tree information on its designated ports. A neighbour that accepts it as superior puts its other ports into discarding and returns an agreement, and the first bridge then moves the port straight to forwarding. The handshake cascades away from the root, instead of each port waiting through listening and learning.
An RSTP bridge falls back to legacy STP on a port where it detects an old-style BPDU [1].
4. What a spanning tree means for determinism
For the analyses in this series, three properties of a spanning tree matter:
- One path. Between two bridges there is exactly one active path, and all traffic shares it. Redundant links stay idle until a failure. That is why MSTP and SPB were developed.
- Paths change after a failure. When the tree reconverges, streams move to new paths through new queues. A network calculus bound computed for the old path no longer applies, which is the problem studied in the reconfiguration post.
- Reconvergence is not seamless. Even milliseconds of reconvergence lose frames. Applications that cannot afford this rely on FRER, which sends every frame on two disjoint paths at once and needs no reconvergence at all.
References
- Wikipedia, "Spanning Tree Protocol," sections on protocol operation and on the Rapid Spanning Tree Protocol. Article
- Wikipedia, "IEEE 802.1aq," section on associated protocols (802.1Q-2014 incorporates functionality previously specified in 802.1D). Article
- P. Thaler, N. Finn, D. Fedyk, J. Farkas, G. Parsons, E. Gray, "IEEE 802.1Q: Media Access Control Bridges and Virtual Bridged Local Area Networks," IEEE 802.1 tutorial, IETF 86, 10 March 2013, slides 25–26. Slides