Spanning Tree Protocol Explanation in Packet Tracer || In Tamil || Dinesh Kumar
Dinesh CCIE Dinesh CCIE
4.41K subscribers
6,104 views
119

 Published On Premiered May 14, 2021

#STP#CCNA#PacketTracer


STP (Spanning Tree Protocol) automatically removes layer 2 switching loops by shutting down the redundant links. A redundant link is an additional link between two switches. A redundant link is usually created for backup purposes.

Just like every coin has two sides, a redundant link, along with several advantages, has some disadvantages. The biggest disadvantage of a redundant link is that it creates a loop between switches. If a loop exists between two switches, they do not work properly.


What is the STP?
STP is a protocol. It actively monitors all links of the network. To finds a redundant link, it uses an algorithm, known as the STA (spanning-tree algorithm). The STA algorithm first creates a topology database then it finds and disables the redundant links. Once redundant links are disabled, only the STP-chosen links remain active. If a new link is added or an existing link is removed, the STP re-runs the STA algorithm and re-adjusts all links to reflect the change.

The below section explains how all it happens and what terminology and components the STP uses in its operation.

BPDU

BPDUs (Bridge Protocol Data Unit) are multicast frames which switches use to share information about themselves and their connections. Besides sharing information, switches also use BPDUs to learn the network topology, to learn which switch is connected with which switches, and to learn whether any layer 2 switching loop exists in the learned topology or not.

Root Bridge
A Root Bridge is the starting point of the STP network topology. To elect a Root Bridge from all switches of the network, STP uses two parameters; a variable known as bridge priority and the MAC addresses of participating switches. A switch that has the lowest bridge priority value, is elected as the root bridge. If the bridge priority value is the same in all switches, the switch which has the lowest MAC address is elected as the Root Bridge.

By default, the bridge priority value is set to 32768 in all Cisco switches. Unless you change this value, a switch that has the lowest MAC address is elected as the Root Bridge. If you want a specific switch to be elected as the Root Bridge, you can set the bridge priority value of that switch to less than 32768.

The selection process of the Root Bridge happens each time when a network change occurs like a new switch is added in the network topology, or an existing switch is removed or the current Root Bridge is failed. If other switches of the network do not receive BPDUs from the Root Bridge within 20 seconds, they assume that the Root Bridge has failed. If the current Root Bridge fails, remaining switches automatically start the election process to choose a new Root Bridge again.

Non-Root Bridge
Except the Root Bridge, all remaining switches of the network are considered as the Non-Root Bridges. Non-Root Bridges receive updates from the Root Bridge and update their STP databases relatively.

Port Cost
Based on the connected media link, STP assigns a value to each port of the network. This value is known as the port cost value. STP uses this value to choose the single best path when multiple links are available between two switches. It selects the port which has the lowest port cost value.

There are two sets of the port cost value. The following table lists both.

Bandwidth Old Cost Value New Cost Value
10 Gbps 1 2
1 Gbps 1 4
100 Mbps 10 19
10 Mbps 100 100

Path cost is an accumulated value of the port costs from the Root Bridge to other switches in the network. It is always calculated from the Root Bridge. The default path cost at the Root Bridge is 0. BPDU contains the path cost information.

show more

Share/Embed