What is Spanning Tree Protocol

In the previous article, I have explained the redundancy. It increases the network availability by protecting the network from a single point of failure, such as a fault in a network cable or fault in a switch. When engineers introduce physical redundancy in design, loops and duplicate frames happen.

I have written in the previous lesson that loops and duplicate frames have several disadvantages for a switched network. The duplicate frames and nonstop broadcast frames in a loop network need a logical mechanism. The Spanning Tree Protocol (STP) is the mechanism that was developed to address loop issues in the switched network.

Spanning Tree Protocol (STP) ensures only one logical path between all destinations on the network. It blocks all the redundant paths that can cause a loop. Data cannot enter or leave that port. Preventing loops on the network is not an easy task.

The physical connection is still available to provide a redundant path, but the STP only disabled the paths to prevent the loops from occurring. In case of failure of the switch and cable, the STP recalculates the paths and unblocks the necessary ports to allow the redundant path to becoming active.

spanning tree protocol

  • PC1 sends a broadcast packet out onto the network.
  • Switch-1 is configured with Spanning Tree Protocol (STP) and Port 1/0/2 is set to the blocking state which preventing from being used to forward user data. Switch-1 forwards a broadcast frame out all switch ports, except the originating port from PC1 and port 1/0/2.
  • Switch-3 receives the broadcast frame and forwards the frame out all of its switch ports, where it reaches Switch-4, PC4 Switch-2 and PC2. When switch-2 receive the frame it forward to PC-2 and drops the frame. The Layer 2 loop is prevented.

Spanning Tree Protocol (STP) prevents loops from occurring by putting the port of the switch in “blocking-state” strategically. The switches running Spanning Tree Protocol (STP) can avoid failures by dynamically unblocked the previously blocked ports and permitting traffic on that port.

Spanning Tree Protocol (STP) is based on an algorithm invented by Radia Joy Perlman is an American computer programmer and network engineer. Radia Perlman was working for Digital Equipment Corporation, and published in the 1985 paper “An Algorithm for Distributed Computation of a Spanning Tree in an Extended LAN“.