Open In App

Rapid Spanning Tree Protocol

RSTP is the more improved and advanced version of STP which is a layer 2 protocol that prevents bridge loops and broadcast storms in local networks with redundant connections. Rapid spanning tree protocol has faster convergence and it is also backward-compatible with STP. To make sure a loop-free topology, the Rapid Spanning Tree Protocol (RSTP) precludes some of the connections which permit only a single active path between any two devices. All these disabled connections can be used as backup paths in case an active connection fails. The IEEE standard for Rapid spanning tree protocol is 802.1w.

Similarities between STP and RSTP:



Working of RSTP

RSTP follows a strict set of rules by which the switches decide the best way to forward the traffic on the network free from any redundancy. When RSPT is enabled on a network, the spanning tree algorithm decides the configuration of the spanning tree automatically.

The topmost bridge of the spanning tree is the Root bridge in RSTP and it is in charge of sending all the network topology information to other switches present in the network. This plays an important role when hardware failures occur, or some other topology changes occur. So, the most efficient alternate paths are established without any delay.



Port Roles in RSTP

There are four-port roles in RSTP

  1. Root Port: The port with the best path cost is elected as the root port. A non-root bridge can only have one root port. Root ports forward data to the bridge.
  2. Designated Port: It is a non-root port that is used as a forwarding port for every LAN segment.
  3. Backup Port: It is a backup path to a segment where another bridge port is already connected. These ports receive BPDUs from their switches but they remain in a blocked state.
  4. Alternate Port: It is a Backup port with a less desirable path cost. All such ports remain in a blocked state.

Port States in RSTP

Rapid spanning tree protocol supports three port states.

  1. Discarding: In the discarding state, no user data is sent over the port.
  2. Learning: In the learning state the ports learn about the MAC address but it doesn’t forward any frames.
  3. Forwarding: In the forwarding state the ports can send data and are fully operational.

Working of Port States:

At first, a switch port starts in a discarding state, a discarding port does not forward any frames nor does it learn MAC addresses, and it also listens for BPDUs. Backup and alternate ports remain discarding.

In RSTP if a port is elected as a Root port or Designated port, the transition will directly take place from a discarding state to a learning state. Hence, RSTP doesn’t need a listening state. A learning port adds MAC addresses into the Content addressable memory table; However, it can not forward frames.

In the next phase, a learning port transitions into a forwarding state. A forwarding port is completely functional i.e., it learns MAC addresses, sends and listens for BPDUs, and forwards frames.

Benefits of RSTP:

In STP BPDUs are generated only by the root bridge. If a non-root bridge receives a BPDU from the root bridge on its root port, it will pass on the BPDU downstream to its neighbors. This Convergence process is slower and STP relies on forwarding delay timers to make sure a loop-free environment, this takes a lot of time.

In RSTP, switches just handshake directly with their neighboring switches, this allows quick synchronization in the topology. This lets ports promptly change from a discarding state to a forwarding state without a delay timer.

Types of ports in RSTP

There are three types of ports in RSTP

  1. Edge: It is a port that connects to a host.
  2. Root: It is a port that connects to another switch, and it has the best path cost to the root bridge.
  3. Point-to-point: It is a port that connects to another switch and it has the potential of becoming the designated port for a segment.

RSTP algorithm

RSTP algorithm follows some general steps:

Article Tags :