What is the difference between STP and RSTP?

The interconnection of computers in a network results in more than one path to a given destination. To avoid looping and to determine the optimum path for packets to move across, we use these protocols:

  • Spanning tree protocol (STP)

  • Rapid spanning tree protocol (RSTP)

Spanning tree protocol

Spanning tree protocol (STP) is a layer 2 (data link layer) protocol that operates on switches and bridges. Without STP, a loop may occur, and produce a variety of issues such as network clogging, broadcast storms, and even switch failure.

In STP, the root switch's functional interfaces are all set to forwarding. All other switches select the optimal way to the root switch. The forwarding port is connected to the root switch. The switch with the best path to the root switch is set to deliver on shared Ethernet segments. This switch is the designated switch, and its port is the specified port. All other interfaces are blocked, and do not forward frames.

STP in a computer network

Rapid spanning tree protocol

The rapid spanning tree protocol (RSTP) is an upgraded version of the spanning tree protocol. STP and RSTP have numerous similarities, and RSTP is backward-compatible with STP. It prevents network loops by limiting unused ports.

RSTP operates by introducing an alternate and backup port. These ports can enter the forwarding state instantly, rather than waiting for the network to converge. If the segment's assigned port fails, the alternate port shifts to the forwarding state.

RSTP in a computer network

Differences

The table below lists some key differences between the two protocols:

STP

RSTP

It uses flag bits 0 and 7 for TCN (Topology Change Notification) and TCA (Topology Change Acknowledgement).

It uses flag bits 0, 1, 2, 3, 4, 5, 6, and 7. It uses for various purposes such as TCN, bit-fowarding, and TCA.

It provides slower network coherence.

It provides significantly faster network coherence.

It does not have a link type.

It has both shared and point-to-point link types.

It has 5 port states

It has 3 port states.

It has 3 port roles.

It has 4 port roles, with the addition of an alternative port.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved