Automation Glossary • Rapid Spanning Tree (RSTP)

What Is the Rapid Spanning Tree Protocol (RSTP)?

Merobix Engineering • • 7 min read

Redundant links make an Ethernet network resilient, but they also create loops, and a loop in a switched Ethernet is a serious problem because frames circulate and multiply until the network collapses. The Rapid Spanning Tree Protocol is the general, vendor-neutral mechanism that lets a network have redundant links safely, by automatically blocking the ones that would form loops and reactivating them when a primary link fails. It is the workhorse of ordinary switched networks. This guide explains how RSTP prevents loops, what root bridges, BPDUs and edge ports are, how quickly it recovers, and why control-network rings usually prefer the faster, more deterministic MRP or DLR instead.

Back to Blog

Rapid Spanning Tree (RSTP) in one line: The Rapid Spanning Tree Protocol, RSTP, defined in IEEE 802.1w, is the standard Ethernet loop-prevention protocol. Switches exchange messages called BPDUs to elect a root bridge and compute a loop-free tree, blocking any links that would create a loop while keeping them in reserve. If an active link fails, RSTP reconverges by unblocking a standby link, typically within a few seconds. It is ideal for general plant IT backbones but slower than the purpose-built control-network schemes like MRP and DLR.

Blocking Loops While Keeping Links in Reserve

The problem RSTP solves is fundamental to switched Ethernet: if there is more than one path between two points, frames can loop endlessly, and because switches replicate broadcast and unknown-destination frames out of every port, a single loop can escalate into a broadcast storm that saturates the network within seconds. Yet redundant paths are exactly what a resilient network needs. RSTP resolves this tension by allowing the redundant links to exist physically but disabling just enough of them logically to leave a single, loop-free path, a tree, connecting every switch.

To build that tree the switches agree on a single reference point called the root bridge, elected as the switch with the most favourable identifier, and every other switch determines its best path toward that root. Ports that lie on a best path forward traffic, while ports that would create an alternative path to somewhere already reachable are put into a blocking state. A blocked port does not forward ordinary traffic, but it is not dead; it stays powered and listening, ready to be brought into service if the network's active topology changes.

This is the key to RSTP's redundancy: the blocked links are held in reserve rather than removed. Under normal operation the tree carries all the traffic and the blocked ports sit idle, but they represent standby paths that the protocol can activate. When something changes, RSTP recomputes which links should forward and which should block, and a formerly blocked port can be unblocked to restore connectivity. The result is a network that enjoys the safety of a loop-free tree while still having redundant paths available for failover.

Root Bridges, BPDUs and Edge Ports

The switches coordinate all of this by exchanging small control messages called Bridge Protocol Data Units, or BPDUs. Through BPDUs the switches advertise their identities and their costs to reach the root, elect the root bridge, and continuously confirm that the tree is intact. In RSTP the switches generate BPDUs proactively and use them as a handshake between neighbours, which is one of the improvements over the older spanning tree it replaced: rather than passively waiting on timers, neighbouring switches actively negotiate role changes, which is what makes RSTP's recovery faster than its predecessor.

The root bridge sits at the top of the tree and is the reference against which every path cost is measured, so its placement influences the shape of the whole network. Network designers often set the root bridge deliberately, by configuring a switch with a favourable priority, so that the tree forms around a well-chosen central switch rather than wherever the election happens to land. Each non-root switch then has a root port pointing toward the root, and each network segment has a designated port responsible for forwarding toward the root, with the remaining redundant ports blocked.

RSTP also introduces the notion of an edge port, a port that connects to an end device such as a PLC, a host or an instrument rather than to another switch. Because an edge port cannot be part of a loop, it does not need to go through the cautious listening and learning process that inter-switch links do, and it can begin forwarding almost immediately when a device is connected. Marking access ports as edge ports is good practice, both because it speeds up device connection and because it prevents an accidentally connected switch from destabilising the tree without warning.

Why Control Rings Prefer MRP or DLR

RSTP's recovery is much faster than the original spanning tree, but it is still measured in a small number of seconds for a network of any size, and its exact convergence time depends on the topology and how far a failure is from the root. For a plant IT backbone, an office-style network, or the upper layers of a plant network carrying supervisory and business traffic, a few seconds of reconvergence after a rare failure is perfectly acceptable, and RSTP's great virtue is that it is universal, vendor-neutral and works on ordinary managed switches without special hardware.

For the control layer, though, seconds-scale recovery is often too slow and too variable. A control network exchanging cyclic I/O with tight watchdogs needs a redundancy scheme whose recovery is both fast and predictable, and RSTP's convergence, which can vary with topology and which is generally slower than dedicated ring protocols, does not meet that need well. This is precisely why the automation world developed ring-specific standards: MRP for Profinet, which heals in around 200 milliseconds, and DLR for EtherNet/IP, which heals in under 3 milliseconds, both with far more deterministic timing than a spanning-tree reconvergence.

So RSTP and the control-ring protocols are not really competitors but occupy different tiers of a plant network. RSTP does its job on the backbone and the IT-facing segments, where its flexibility with arbitrary topologies is an advantage and its recovery time is a non-issue. MRP and DLR do their job on the deterministic control rings, where their bounded, fast healing keeps cyclic communication alive. For a SCADA integrator the practical lesson is to recognise which layer a given network is, and not to rely on RSTP where a control ring's timing demands a purpose-built scheme, nor to reach for a control-ring protocol on a general backbone where RSTP is the natural fit.

Frequently Asked Questions

How is RSTP different from the original spanning tree protocol?

RSTP, defined in IEEE 802.1w, is a faster successor to the original spanning tree. The original relied heavily on fixed timers and could take tens of seconds to reconverge after a failure. RSTP has neighbouring switches actively negotiate role changes through BPDUs and introduces port roles and edge ports that let recovery happen in seconds rather than tens of seconds. It is backward compatible with the older protocol.

What is a root bridge in RSTP?

The root bridge is the single reference switch at the top of the spanning tree, elected as the switch with the most favourable identifier. Every other switch computes its best path toward the root, and path costs are measured relative to it, so the root's placement shapes the whole tree. Designers often set the root deliberately by configuring a favourable priority on a well-chosen central switch.

Can I use RSTP for a control network ring?

You can, but it is usually not the best choice for the control layer. RSTP's recovery is measured in seconds and varies with topology, which is fine for a plant IT backbone but often too slow and unpredictable for cyclic control traffic with tight watchdogs. Purpose-built ring protocols like MRP for Profinet or DLR for EtherNet/IP recover far faster and more deterministically, so control rings usually prefer them.

From Definitions to a Live Dashboard

Merobix reads your field devices into a cloud SCADA - the real thing behind these terms, live in days from any browser.

Request a Free Demo +1 (903) 307-7300
More in Automation Glossary
802.1AS gPTP  •  Target Flow Meter  •  Elbow Flow Meter  •  Dall Tube  •  Pitot-Static Tube  •  Stagnation Pressure  •  All Automation Glossary →
Free SCADA operator training
Merobix University - 70 video lessons & 261 quiz questions, from first login to compliance reporting. No demo call required.
Start free →