Tuesday 28 February 2023

Spanning Tree Protocol - STP

Spanning Tree Protocol

The Spanning tree protocol (STP) is a loop free layer 2 technology. Without STP loops can occur on a network and result in a broadcast storm

Switches within the same network need to be enabled for STP before they run the spanning tree algorithm so they can accurately determine which switch should be elected the “root bridge.” This designated root bridge will be responsible for sending configuration bridge protocol data units (BPDUs) along with other information to its directly connected switches that, in turn, forward the BPDUs to their neighbouring switches. Each switch has a bridge ID priority value (BID), which is a combination of a priority value (default 32768) and the switch’s own MAC address. The switch with the lowest BID will become the root bridge.

STP Port States

There are five STP switchport states; these are:

  • Disabled - The result of an administrative command that will disable the port.
  • Blocking - When a device is connected, the port will first enter the blocking state.
  • Listening -The switch will listen for and send BPDUs.
  • Learning - The switch will receive a superior BPDU, will stop sending its own BPDUs, and will relay the superior BPDUs.
  • Forwarding - The port is forwarding traffic.

STP Port Roles

  • Root - Ports on non-root switches with the best cost path to root bridge. These ports forward data to the root bridge.
  • Designated - Ports on root and designated switches. All ports on the root bridge will be designated.
  • Blocked - All other ports to bridges or switches are in a blocked state. Access ports going to workstations or PCs are not affected.


Path cost

A switch may encounter one or more switches in its path to the root bridge. All paths are analysed and the path with the lowest cost is selected. Speed of ports are important and link speed relates to the port cost





Example Video with STP ; 



No comments:

Post a Comment

Fast switching vs Process switching

Process Switching: Process switching is the traditional method of packet forwarding used in early routers. When a packet arrives at a router...