Christmas Offer - Every Learner Must Check Out - Flat 88% OFF on All Access Pass
00
days
:
00
hours
:
00
minutes
:
00
seconds
PyNet Labs- Network Automation Specialists

STP vs RSTP – What’s the Difference?

Author : Pankaj Kumar
Last Modified: October 12, 2023 
STP vs RSTP Featured Image

Introduction

In a computer network, having multiple paths to reach a destination can be beneficial for redundancy and load balancing. However, it can also cause problems such as network loops, broadcast storms, and inconsistent routing. To avoid these issues, network devices need to agree on a single active path for each destination and block the redundant paths. This is where Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP) come into action. In this blog, we will compare STP vs RSTP and explain the basics of the two protocols.

Let’s understand the basic difference between STP and RSTP.

STP vs RSTP

Below we have explained the basic difference between the two protocols in a tabular form.

FactorsRSTP (Rapid Spanning Tree Protocol)STP (Spanning Tree Protocol)
Convergence TimeFaster (5 to 10 seconds)Slower (30 to 50 seconds)
Port StatesDiscarding, Learning, ForwardingBlocking, Listening, Learning, Forwarding, disabled
Topology ChangesDetected and propagated quickly by all bridgesDetected and propagated slowly by the root bridge
Port RolesRoot, Designated, Alternate, BackupRoot, Designated, Blocked
Backward CompatibilityCompatible with STP but reverts to STP mode if STP device is connectedCompatible with RSTP but operates in STP mode if the RSTP device is connected
ScalabilityMore scalable due to faster convergence and link aggregation supportLess scalable due to slower convergence and blocked links

Now, let’s understand what STP and RSTP really are.

What is STP in networking?

STP stands for spanning tree protocol. STP is a layer 2 protocol that was developed in 1985 and is standardized by IEEE 802.1D. STP avoids network loops by blocking redundant network links.

Spanning Tree Protocol

In this scenario, there is a possibility that a loop can form which can further cause several network problems such as broadcast storms, clogging up the network, or even leading to switch failure. This is where STP comes into action. STP selects a root bridge based on a priority value and a MAC address to control the network’s active path in the network. The root bridge is the switch that has the lowest priority value or the lowest MAC address if there is a tie.

The root bridge then sends BPDUs to all other switches to inform them about their existence and the cost to reach each destination. The ports that are not on the active path are then blocked by the other bridges.

To prevent loops, ports that are not root nor designated are blocked. Although the blocked ports do not forward traffic, they do listen for BPDUs from other switches. The ports that are either root or designated are then put into a forwarding state to route traffic normally.

This procedure produces a loop-free logical topology known as a spanning tree, in which there is only one active path between any two switches in the network.

What is RSTP in networking?

RSTP stands for rapid spanning tree protocol. RSTP is an improved version of STP. There are many similarities between STP and RSTP, and RSTP is backward-compatible with STP. It limits unused ports to prevent network loops.

RSTP works by adding an alternate and backup port. Instead of waiting for the network to converge, these ports can immediately enter the forwarding state. The alternative port changes to the forwarding state if the segment’s allocated port fails.

Rapid Spanning Tree Protocol

Let’s understand the detailed STP vs RSTP to get better knowledge about the two.

Difference between STP and RSTP

The network protocols RSTP (Rapid Spanning Tree Protocol) and STP (Spanning Tree Protocol) both function to stop loops in switched networks. Below we have explained the difference between the two in detail.

Convergence Time

RSTP may convert a port to the forwarding state without having to wait for the timers to finish, hence it has a faster convergence time than STP. A proposal agreement method is used by RSTP to discuss the port status with nearby switches.

Port States

STP has five different states Blocking, Listening, Learning, Forwarding, and disabled. Only three port states are supported by RSTP: discarding, learning, and forwarding. The blocking and disabled states of STP are combined into the discarding state.

Topology Changes

Due to its ability to identify link failures or recoveries using BPDUs (Bridge Protocol Data Units) or physical link status, RSTP responds to topology changes more quickly than STP. A TCN (Topology Change Notification) flag in the BPDUs is used by RSTP to transmit the topology change information to every switch in the network.

Port Roles

These are the roles assigned to ports by the protocol, which determine their function in the network. RSTP has four port roles: root, designated, alternate, and backup. STP has three port roles: root, designated, and non-designated.

Backward Compatibility

This is the ability of the protocol to interoperate with older versions or other protocols. RSTP is backward compatible with STP, as it can detect and communicate with STP switches in the same network. However, this may reduce the performance and benefits of RSTP, as it has to follow the rules and limitations of STP.

Scalability

RSTP is more scalable as compared to STP. RSTP can manage larger networks with quick convergence.

Now, we have fully compared STP vs RSTP to understand their differences.

Frequently Asked Questions

Q1 – Is RSTP faster than STP?

Yes, the Rapid spanning tree protocol is faster than the spanning tree protocol in terms of convergence rate. Also, it has a new port state and port roles for better functioning making businesses choose RSTO over STP.

Q2 – What is the difference between STP and RSTP and MSTP?

STP, RSTP, and MSTP are protocols that assist in preventing loops in network switches.

  • STP stands for spanning tree protocol is the standard but it is slow to converge.
  • RSTP stands for rapid spanning tree protocol which is an enhanced version of STP and also reduces convergence time.
  • MSTP stands for multiple spanning tree protocol that allows multiple spanning trees for different VLANs.

Q3 – What is STP and RSTP time?

STP time is around 30 to 50 seconds, which means if there are any changes to topology it will act as per the given time.  RSTP time is around 6 seconds, hence faster than STP.

Q4 – What is Bpdu in STP?

A BPDU (Bridge Protocol Data Unit) is a data message that is exchanged between switches in a network using the Spanning Tree Protocol (STP). The BPDU contains information about the switch’s identity, priority, port roles, and costs.

Conclusion

Both STP and RSTP are important protocols that assist in preventing network loops and also ensure network redundancy. In this blog, we have compared STP vs RSTP. We also have explained both these protocols separately in detail.

If you have any doubts or suggestions, feel free to write in the comment box below.

Recent Blog Post

Leave a Reply

Your email address will not be published. Required fields are marked *

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram