September 17, 2024

What is STP and how it works?

Spanning Tree Protocol (STP) may be a Layer 2 arrange convention utilized to anticipate circling inside a organize topology. STP was made to maintain a strategic distance from the issues that emerge when computers trade information on a nearby zone arrange (LAN) that contains redundant paths. In case the stream of activity isn’t carefully checked and controlled, the information can be caught in a circle that circles around organize sections, influencing execution and bringing activity to a close halt.

Networks are regularly arranged with repetitive ways when interfacing organize fragments. In spite of the fact that excess can offer assistance secure against calamity, it can moreover lead to bridge or switch circling. Circling happens when information voyages from a source to a goal along repetitive ways and the information starts to circle around the same ways, getting to be opened up and coming about in a broadcast storm.

STP can offer assistance avoid bridge circling on LANs that incorporate repetitive joins. Without STP, it would be troublesome to execute that repetition and still dodge organize circling. STP screens all arrange joins, recognizes excess associations and debilitates the ports that can lead to circling.

BPDUs

Switches communicate with each other via BPDUs, or bridge protocol data units. They are sent out every 2 seconds from the switch’s MAC address to a multicast address.

Two types of BPDUs can be transmitted:

  • Configuration BPDU – for STP computation.
  • Topology Change Notification (TCN) – sent when changes occur in the network topology.

Root Bridge

Each loop-free topology has one root bridge. A root bridge is elected based on the lowest bridge ID. A bridge ID consists of the Bridge Priority — the default priority for all switches is 32,768. The other portion of the bridge ID is the MAC address of the switch.

Root Ports

Each non-root bridge has a root port that points toward the current root bridge. Just remember that a switch with root ports is not a root bridge. Can be confusing at first. A root port is chosen based on a port’s cost to the root bridge.

The following table lists the STP port cost to reach the root bridge based on the link bandwidth:

Designated Ports

A designated port is a port on each network segment with the lowest cumulative root path cost to the root bridge. The purpose of this port is to remove the possibility of a bridging loop.

STP Port States

Each port participating in STP undergoes different STP states. The order of the states follows:

1. Disabled
2. Blocking
3. Listening
4. Learning
5. Forwarding

Reference

About Author