Network Kings

Multi-Access Year Deal

Get 55+ courses now at the best price ever! Use Code:    MULTIYEAR

d :
h :
m

What Is The Rapid Spanning Tree Protocol (RSTP) And How Does It Work?

RSTP Protocol
RSTP Protocol

The Rapid Spanning Tree Protocol (RSTP) is a network protocol that allows for the rapid recovery of failed links in a network. It is an open standard, originally developed by IEEE in the early 2000s. RSTP is based on the Spanning Tree Protocol (STP), but it significantly reduces the time it takes to recover from link failures.

The Spanning Tree Protocol (STP) is referred to  a network protocol that builds a loop-free logical topology for Ethernet networks. The STP was invented by Dr. Radia Perlman while working for Digital Equipment Corporation in 1985. STP is commonly used in bridged Ethernet local area networks (LANs)

The RSTP was designed to be an improvement over the STP. The RSTP was defined in the IEEE 802.1w standard in 2001. RSTP is similar to STP in that it prevents loops in the network and allows for redundant paths. However, RSTP converges much faster than STP. 

In a traditional STP network, if a link fails, it can take up to 50 seconds for the STP algorithm to converge and re-route traffic. With RSTP, this time is reduced to less than 10 seconds. RSTP accomplishes this by using a more efficient algorithm, and by defining new port states that allow for faster recovery.

In this blog, we will take a closer look at the RSTP. We will explain what the RSTP is, how it works, and how it compares to the STP.

In the previous blog of our CCNA 200-301 series , we talked about the Security Program Elements in CCNA. I recommend you go through it before you jump to this blog. 

What is the RSTP Protocol?

The Rapid Spanning Tree Protocol (RSTP) is an open, IEEE-standard network protocol that is based on the Spanning Tree Protocol (STP). It is designed to provide rapid recovery from failures in network links by allowing the network to quickly converge and route traffic around the failure.

RSTP Tree

RSTP works by detecting the loss of a link and then rapidly electing which new link should be used to re-route traffic. 

In a traditional STP network, the election of this new link could take up to 50 seconds, but with RSTP, the time is reduced to less than 10 seconds. To achieve this rapid recovery, RSTP uses new port states and functions that allow for faster link failure detection and recovery. In addition, the RSTP algorithm is more efficient than the STP algorithm, and it also simplifies the topology of a network by using fewer protocol packets.

How is the RSTP Similar to the STP?

Here are some of the main similarities between the RSTP and STP:

  • RSTP serves the same purpose as STP, blocking specific ports to restrict Layer 2 loops.
  • RSTP elects a root bridge with the same rules as STP.
  • RSTP elects root ports with the same rules as STP.
  • RSTP elects designated ports with the same rules as STP(Spanning Tree Protocol).

How Does the RSTP Protocol Work?

The RSTP protocol is based on a link-state algorithm. This means that is it constantly listening and monitoring the network to detect any changes in the topology or link status. 

When a link failure is detected, the RSTP algorithm quickly reconfigures the network to route around the failed link. The RSTP protocol uses a set of defined port states and functions to enable it to rapidly detect link failures and reconfigure the network. 

The five defined port states are mentioned below: 

  • Blocking
  • Listening
  • Learning
  • Forwarding
  • Discarding

Each port state serves a specific purpose in the RSTP recovery process. For example, when a link fails the RSTP protocol assigns the failed port to the blocking state, which prevents it from participating in the forwarding of traffic for that period of time. 

Then, the RSTP protocol quickly elects which port should become the new root port and assigns it to the forwarding state, allowing it to take over the forwarding of traffic.

The Rapid Spanning Tree Port States

The various RSTP port states are given below in the table:

STP Port State

Send/Receive BPDUs

Frame Forwarding (Regular traffic)

MAC Address Learning

Stable/Transitional

Discarding

NO/YES

NO

NO

Stable

Learning

YES/YES

NO

YES

Transitional

Forwarding

YES/YES

YES

YES

Stable

  • If a port is administratively disabled (shutdown command), that is equal to discarding state.
  • If a port is enabled but blocking traffic to prevent Layer 2 loops, it means it is in the discarding state.

RSTP Link Types

RSTP distinguishes between three different ‘link types’.

  • Edge:

It is a port that is connected to an end host. It moves directly to forwarding without negotiating.

  • Point-to-Point:

It establishes a direct connection between two switches.

  • Shared:

It is an established connection to a hub. It should be operated in half-duplex mode.

The Benefits of Using the RSTP Protocol

The biggest benefit of using the RSTP protocol is its ability to quickly recover from link failures. With a traditional STP network, the time it takes to re-route traffic around a failure can be up to 50 seconds. With RSTP, this time is reduced to less than 10 seconds. This drastically reduces network disruptions and improves the overall performance of the network. 

In addition, since RSTP is an open, IEEE standard, it is supported by most network switches and routers. This makes it easy to implement and maintain in any network.

Some Final Thoughts

The Rapid Spanning Tree Protocol (RSTP) is a powerful, open standard that provides improved link-failure recovery time compared to the traditional Spanning Tree Protocol. 

It is a fully supported protocol and is easy to implement and maintain in a network. RSTP is especially beneficial in network environments that require near-instantaneous recovery from link failures.

I recommend you read about STP first in order to understand RSTP in a better way.

Stay tuned for more blogs for the CCNA 200-301 series!

Happy Learning!

What is Spanning Tree Protocol (STP)? Types of STP

What is Spanning Tree Protocol?
What is Spanning Tree Protocol?

The Spanning Tree Protocol (STP) is a network protocol that is situated in Layer 2 (Data Link Layer) of the Open Systems Interconnection (OSI) model. It was built to prevent the problems that arise when data is exchanged through computers over a Local Area Network (LAN).

If 2-3 switches are connected together, they broadcast by default. When a message is broadcasted, it is sent all across the switches back and forth. This could lead to a broadcast storm or the formation of a loop.

Note: The Spanning Tree Protocol (STP) is the topic in CCNA 200-301 exam and one of the most important topic in switching .

If you haven’t read the previous blog of our CCNA 200-301 series, I highly recommend you do so.

What is Spanning Tree Protocol?

This is where the Spanning Tree Protocol (STP) comes in handy. 

What Does Spanning Tree Protocol (STP) Do?

The Spanning Tree Protocol (STP) avoids the formation of loops or broadcast storms. It does so by blocking ports where it senses loop formation. In other words, the STP looks after the network to make it loop-free by tracking all the links and stopping the working of useless links.

The STPs are now standardized by the Institute of Electrical and Electronics Engineers (IEEE). It is now referred to as STP (802.1D).

How Does STP Work?

The STP works in the following three steps:

  • Selecting the root bridge
  • Selecting the root port
  • Selecting designated port and non-designated port

Before we dive deep into these steps, here are some terms that you must know about!

1. Bridge:

A bridge is a very important component of VLAN Trunking Protocol (VTP) that functions to connect to or more LAN segments.

2. Bridge ID:

The bridge ID refers to the MAC address of a particular bridge. It is an 8-byte entity that consists of a bridge priority (2 bytes) and a Base MAC address (6 bytes). The base MAC address is considered in cases where there is a tie on the bridge priority.

Bridge ID:

3. Root Bridge:

The bridge with the lowest bridge ID is called the root bridge. The root bridge chooses which port has the best path to the root bridge.

4. Bridge Priority Data Unit (BPDU):

An STP network device has to exchange messages to run a loop-free topology smoothly. All the switches exchange BPDU to select the right root bridge. The switch with the lowest Bridge ID is chosen as the root bridge.

5. Bridge Priority:

Every switch is assigned a priority. It is 32768 by default.

Now that you are familiar with all these terms, let’s learn how the STP works.

1. Selecting the root bridge:

The root bridge with the lowest bridge ID is selected. The lower bridge ID is found as follows:
Bridge ID = Priority + MAC Address

By default, the priority of all the switches is the same. If the priority is the same, then we look for the MAC addresses of the switches. The BPDU message is sent and it compares the MAC addresses of all the switches.

The switch that has the lowest MAC Address is then chosen. Therefore, this is our root bridge. This root bridge becomes the focal point of the connection.

Note: No port of the root bridge is ever blocked.

2. Selecting the root port:

Now that we have found our root bridge, other switches will find out the best path to reach the root bridge. They do so by checking the path cost. The path with the lowest cost is selected to connect with the root bridge. 

Selecting the root port:

From the above path cost table, you can see that the cost for 100 Mbps is 19

3. Selecting designated port and non-designated port:

You should remember that there are two types of ports:

Forwarding Ports

Block Ports

1. These are the designated ports.

1. These are the non-designated ports.

2. The root ports are the forwarding ports.

2. The block ports are non-forwarding ports.

The root bridge is the designated port. 

In case, if the cost of a path is the same no matter what path is chosen, the switches look for lower Bridge ID using BPDU.

The port with the higher bridge ID (MAC address + Priority) is blocked

If you want to learn how STP works in a visual way, you can watch this video right here:

What are the Types of Spanning Tree Protocol?

There are over six types of STP protocols that we study. Let’s go over each of them and learn the difference between them!

Standard

Description

Short Form

802.1D

  • Prevents loop
  • Also known as Common Spanning Tree (CST).
  • It is very slow (32 seconds to converge).
  • In case of changes, it auto-configures the trees.
  • No load balancing is performed.

STP/CST

Cisco Proprietary

  • Finds root bridge per VLAN for Cisco devices.
  • It is more optimized.
  • It is slow as CST.
  • Backward compatibility with CST.

PVRST+ or R-PVST+

802.1w

  • It is referred to as the Rapid Spanning Tree Protocol.
  • It has improved STP with fast performance.
  • Backward compatibility with STP.

RSTP

Cisco Proprietary

  • Per VLAN Rapid Spanning Tree.
  • Faster convergence than PVST+.

RPVST+

802.1s

  • VLANs are grouped.
  • RSTP is run for each group.
  • Multiple Spanning Tree Protocol.

MSTP

802.1Q

  • It is the Virtual LAN.
  • It uses single STP for all VLANs.

CST

 

What are the States of STP?

There are five different states of STP. These are as follows:

What is Spanning Tree Protocol?

1. Blocking State:

  • It is a non-designated port.
  • It does not take part in the forwarding of frames.
  • Switch ports are kept in the blocking state for 20 seconds. After that, they change to the listening state.

2. Listening State:

  • It is the first state of the Spanning Tree Protocol after the blocking state.
  • The STP decides whether to use the port in frame forwarding or not.
  • The ports stay in the listening state for 15 seconds and then move on to the next state.

3. Learning State:

  • This state helps prepare STP to take part in the frame forwarding state.
  • The STP discards frames received on the port during this state.
  • It receives BPDUs.
  • It learns the addresses.
  • The learning state lasts for 15 seconds.

4. Forwarding State:

  • The ports forward the frames received to the other ports in this state.
  • It receives BPDUs in this state.
  • It also learns the addresses.
  • The ports remain in the forwarding state until any change occurs.

5. Disabled State:

  • When an administrator commands the port to get disabled, the port enters the disabled state.
  • it then discards the frames received on the port.
  • It stops learning the LAN addresses.
  • It does not receive BPDUs.

It’s a Wrap!

That’s all for our STP blog. I have covered everything that you need to know about STP. 

Now, you are familiar with what is STP, how it works, the types of STP, and the various states of STP. If you are not familiar with switches very well, I recommend you to read this blog.

Stay tuned for more blogs for the CCNA 200-301 series!

Happy learning!