Types of Spanning Tree Protocol (STP) in Networking

Last Modified: January 27, 2025
A blog featured image for a blog with title - Types of Spanning Tree Protocol

Introduction

Spanning Tree Protocol (STP) is a network protocol that makes sure that the topology for any network is loop-free. It is essential to manage redundant paths in a network to prevent broadcast storms and other issues that can arise from loops. STP has evolved, with several variants designed to address specific needs and improve network performance.

In this blog, we will explore the various types of spanning tree protocols, including 802.1D (Common Spanning Tree), Per VLAN Spanning Tree + (PVST+), 802.1w – Rapid Spanning Tree Protocol (RSTP), Rapid Per VLAN Spanning Tree + (RPVST+), and 802.1s (Multiple Spanning Tree). Each type has its own set of advantages and disadvantages and understanding them can help you make informed decisions when designing and managing networks.

Before getting into different STP types, let us first understand what STP is.

What is Spanning Tree Protocol?

The Spanning Tree Protocol (STP) is a network protocol that makes sure there is no loop in a topology. This is done by identifying the best paths through which data can pass through the network and, at the same time, blocking redundant paths to minimize the formation of circular paths, i.e., loops. This is good, especially for Ethernet networks, because loops can lead to broadcast storms, hence congestion and poor performance of the whole network.

STP works by using a tree-like structure and removing all the loops that are present in the network topology. It uses a designated root bridge, which is a node in the network that other nodes refer to when making BPDUs.

Each switch then uses BPDUs in order to communicate with its neighbors, which can further be used in the decision-making process of choosing the central root bridge as well as in determining the least cost path. In order to learn the various STP Types, we need to understand why we need STP.

Need For Spanning Tree Protocol

Implementing STP is very important in networks that have more than one connected switch. The necessity for STP can be outlined as follows:

  • Prevention of Broadcast Storms: Such problems arise at the network layer due to the existence of duplicate paths, resulting in the formation of loops that usually result in broadcast storms and network traffic jams.
  • Network Stability: STP ensures the overall stability of the network since it eliminates path loops in the network.
  • Efficient Resource Utilization: By using STP, bandwidth is effectively utilized without the duplication of data by unnecessary paths.
  • Dynamic Adaptation: When there is a change of topology in the network, STP is able to do path calculations to make it more stable.
  • Simplified Configuration: STP is responsible for managing paths, whereas the configuration and creation of paths do not need additional manual procedures as they always provide loop-free connections.
  • Reduced Network Downtime: STP minimizes the chances of network loops by preventing network loops and guarantees that the network remains active even if one or more connections fail.

Now that we have a good understanding of STP, let us discuss the different types of spanning tree protocols.

Types of Spanning Tree Protocol

Several types of spanning tree protocol have been developed over the years in order to better meet certain types of networking requirements. The most common STP types are:

1 – 802.1D (Common Spanning Tree)

Tone of the most common types of spanning tree protocol is defined by IEEE 802.1D as a means to stop the formation of loops in Ethernet networks that contain redundant switches. It works on the principle of having a single root bridge, which is ideal for logical network topology.

Network topology and the election of the root bridge are done using a method called Bridge Protocol Data Units (BPDUs). In STP, only one spanning tree is created for all VLANs, and all VLANs use the same tree structure.

This results in more overhead for networks that may have multiple VLANs since it results in improper usage of the links and also causes delays in convergence times ranging from 30 to 50 seconds.

Advantages:

  • Simple to Implement: 802.1D is so straightforward protocol that anybody would not find difficult to implement and understand.
  • Low Overhead: 802.1D consumes less overhead since one has to build only one spanning tree for its implementation.

Disadvantages:

  • Limited Scalability: Having one for all VLANs may cause inefficient utilization of paths.
  • Slow Convergence: Path reconstructions in case of topology changes may take considerable time and, therefore, are disadvantageous.

2 – Per VLAN Spanning Tree + (PVST+)

PVST+ is actually an improved version of STP that allows each VLAN to have its own unique spanning tree. This protocol is Cisco’s proprietary and gives different topologies for each VLAN that improve the load balancing across multiple links. Here, the topology of one VLAN is not impacted in the event of a change in another VLAN, which makes it possible to achieve convergence based on traffic pattern.

Since every VLAN would have its own root bridge and designated ports, the network would be more efficient and reliable. However, since PVST+ is capable of holding multiple spanning trees, more CPU and memory resources are required on the network devices than the traditional STP.

Advantages:

  • VLAN Efficiency: Supports distinct traffic paths for different VLANs, improving overall network performance.
  • Faster Convergence: Calculating the new spanning tree is faster than 802.1D due to dedicated VLANs

Disadvantages:

  • Resources Intensive: Consumes more memory and has a high CPU utilization because of the establishment of several spanning-tree instances.
  • Vendor Dependency: This is mainly deployed to operate in Cisco-based networks, thus experiencing compatibility problems with non-Cisco neighboring devices.

3 – 802.1w – Rapid Spanning Tree Protocol (RSTP)

The Rapid Spanning Tree Protocol (RSTP) is defined by IEEE 802.1w as a development of the original STP with faster convergence and additional network reliability. RSTP also specifies new port states and roles: the ‘Dispute’ state is included to allow the port to transition to a forwarding state as soon as the topology change happens. In addition to that, while traditional STP may take anything between 30 to 50 seconds to converge, RSTP can take seconds to achieve convergence even under new topological changes.

RSTP also improves communication between switches and provides details of each switch port state. RSTP is backwards compatible with 802.1D in order to interconnect with older devices, making it the more robust solution for today’s Ethernet networks.

Advantages:

  • Rapid Convergence: Faster response to topology changes, most commonly in range between sub-seconds.
  • Better Port States: Adds new port states such as Discarding and Learning, which makes the process more effective.

Disadvantages:

  • Complexity: There is a more complex configuration than in more traditional STP.
  • Compatibility Issues: Although RSTP can seamlessly work with 802.1D, not every functionality is preserved.

4 – Rapid Per VLAN Spanning Tree + (RPVST+)

Rapid Per VLAN Spanning Tree Plus (RPVST+) is an extension of RSTP that is used to provide fast convergence on a per VLAN basis. Like PVST+, it is a Cisco proprietary protocol that allows for the running of multiple spanning trees for different VLANs using the fast convergence mechanism of RSTP.

As a result of relying on the RSTP mechanisms, RPVST+ provides a significantly faster convergence after topology changes, something that can be very important for environments that demand a nearly immediate response to link failures or network configuration changes.

Each VLAN can have its own unique topology and can change the state connected to the network independently, saving bandwidth. Also, it supports interconnection with legacy STP networks, meaning transitions for organizations moving from such older technologies will not be a problem.

Advantages:

  • Individual VLAN Convergence: Provides rapid convergence for each VLAN separately.
  • Improved Performance: Most helpful in decreasing the overall number of broadcasts and for optimizing the use of the network.

Disadvantages:

  • Resource Intensive: Almost the same resource requirements as PVST+ for maintaining multiple instances.
  • Cisco Dependency: Originally developed for and configured to work best on a Cisco networking environment.

5 – 802.1s (Multiple Spanning Tree)

One of the most efficient types of spanning tree protocol is Multiple Spanning Tree Protocol. MSTP is defined in IEEE 802.1s. Unlike other protocols that force users to choose between using a single spanning tree for all VLANs or creating individual trees, MSTP allows VLANs to use one unified tree. MSTP networking operates more efficiently by requiring fewer spanning-tree instances to function. MSTP helps network administrators group multiple VLANs into a logical grouping to make better use of links in a redundant network structure.

MSTP enables compatible states and configuration settings across network boundaries by using region concepts.

Advantages:

  • Efficient VLAN Management: When different VLANs use the same spanning tree setup, system management requirements are lower.
  • Interoperability: It enables different vendor products to connect because it follows established industry standards.

Disadvantages:

  • Complexity: This system demands deeper technical expertise than basic protocols needed for configuration and control.
  • Convergence Time: While better than traditional STP, convergence can still lag behind that of RSTP.

These are the various types of Spanning Tree Protocols.

Frequently Asked Questions

Q1. How many types of spanning trees are there?

The different types of spanning trees are:

  • Minimum Spanning Tree (MST)
  • Maximum Spanning Tree
  • Cayley’s Formula
  • Spanning Trees with Different Structures
  • Rooted Spanning Trees
  • Labeled vs. Unlabeled Spanning Trees

Q2. How many types of STP protocols are there?

There are five types of spanning tree protocols. These are:

  • 802.1D (Common Spanning Tree)
  • Per VLAN Spanning Tree + (PVST+)
  • 802.1w – Rapid Spanning Tree Protocol (RSTP)
  • Rapid Per VLAN Spanning Tree + (RPVST+)
  • 802.1s (Multiple Spanning Tree)

Q3. What are the 4 states of the Spanning Tree Protocol?

Four states of spanning tree protocol are:

  • Blocking
  • Listening
  • Learning
  • Forwarding

Q4. What are the 5 stages of the Spanning Tree protocol?

The five stages of the spanning tree protocol are:

  • Blocking
  • Listening
  • Learning
  • Forwarding
  • Disabled

Conclusion

The Spanning Tree Protocol remains a vital component in modern networking that allows loop-free, efficient communication across interconnected switches. Understanding the different types of spanning tree protocols, ranging from the original 802.1D to sophisticated options like RPVST+ and MSTP, allows you to optimize network setups based on specific requirements.

As technology evolves and efficiency requirements grow, the role of STP types will continue to be highly used in the field of networking.

Join Free Demo Banner

Enquiry Form

Blog

Recent Blog Post

Leave the first comment