Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
29 views3 pages

About Spanning Tree Protocol

Uploaded by

sidneyalceu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views3 pages

About Spanning Tree Protocol

Uploaded by

sidneyalceu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

SPANNING TREE PROTOCOL

What is Spanning Tree Protocol:


Spanning tree protocol is a mechanism that prevents layer 2 loops from occurring when the switches are
having redundant paths to peers. It is an open standard protocol IEEE 802.1D. STP algorithm determines which
port is to be blocked and which port is to be permitted to converge.

TERMINOLOGY OF STP:

Bridge Priority: Bridge priority is a 2 Bytes value. The left most four bits value is considered as Bridge Priority. That
value ranges from 0 to 61440. Priority value can be incremented and decremented in the multiples of 4096.

How Bridge Priority is calculated? The below image can give clear cut idea on how the bridge priority is
calculated. If you can club the left most four bits value it comes to 61440. So, the priority value ranges from 0 to
61440.

Why to increase or decrease only in multiples of 4096? Reason being, the least value that can be arrived from the
bits 12 to 15 itself is 4096. Thus, increment or decrement is only possible with 4096.

If the image doesn't give the clear-cut information... here-under given is the explanation on how the STP priority
values are calculated.

The total 16 bits are from 0 to 15. Out of which, 0 to 11 are VLAN bits and 12 to 15 are Bridge Priority bits. When
the bridge priority value is calculated, both VLAN ID and bridge priority values are calculated together. Starting
from the right most side, the bit position value is calculated using 2^n formula.

VLAN IDs calculation from VLAN-1 to VLAN-2048.


2^0 = 1
2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16
2^5 = 32
2^6 = 64
2^7 = 128
2^8 = 256
2^9 = 512
2^10 = 1024
2^11 = 2048
Examples: If a VLAN ID number is 6 that is actually represented as 000000000110
If a VLAN ID number is 100 that is actually represented as 000001100100
Bridge priority values calculation from 0 to 61440.
2^12 = 4094
2^13 = 8192
2^14 = 16384
2^15 = 32768

The possible Bridge priority values are as under.


0000 = 0
0001 = 4096
0010 = 8192
0011 = 12288
0100 = 16384
0101 = 20480
0110 = 24576
0111 = 28672
1000 = 32768 (default)
1001 = 36864
1010 = 40960
1011 = 45056
1100 = 49152
1101 = 53248
1110 = 57344
1111 = 61440

VLAN ID: From the above image, starting from right side, the twelve bits represent VLAN ID. If you club the total
value of the twelve bits it comes 4095. That means 4096 (0 to 4095) VLANs can be created and the usable VLAN
range is 1 to 4094.

Bridge ID: Bridge ID is the combination of MAC address, Priority and VLAN ID of that switch.
Example: if switch A's priority is 8192, VLAN ID is 01 and the MAC address of the switch is 1111:1111:1111:1111,
then the bridge ID would be 8192+01:1111:1111:1111:1111 = 8193:1111:1111:1111:1111

Root ID: Root ID is the MAC address of the switch which is elected as Root Switch.

Root Switch: Whichever switch is having the lowest bridge priority value, that switch will be elected as root
switch, in case of tie, the tie breaker is Bridge ID, whichever switch is having lowest Bridge ID (MAC) that switch
will be elected as root.

Root Port: The port which is opposite to the designated port coming from root switch is root port.

Designated Port: All ports of the root switch are the designated ports and also the opposite ports of the root
ports of other STP switches are also designated ports.

STP ALGORITHM:

After the election process of the ROOT SWITCH and non-root switches, the STP algorithm determines
which port is to be blocked of the redundancy paths in the NON-ROOT switch.

How STP determines which link is to be blocked?


(01) Lowest Cost of the link
(02) Lowest Bridge ID
(03) Lowest Port from which the link is connected
In the above image there are two links between the switches. From the two switches, Switch6 is elected as root
switch… because its Bridge priority was same but Bridge ID is lower than the other one. By default, all ports of the
root switch are designated ports and they will be always n forwarding mode.

Coming to Switch7, in this switch only one port (Green in colour) is in forwarding mode and other one is
in blocking (Orange in colour) mode.

Why STP blocked the port number 02 but not port no 01 in switch07? To arrive at a conclusion, the following is
what STP checks to determine the link to be blocked.
1. STP checks the cost of the links, here, in our case, cost of both links is same,
2. STP checks the bridge ID of the ports, in this case even bridge ID is same.
3. STP checks the source port number of the link. In our case, the port number is different.
As per the STP algorithm, it considers the lowest port number from which the link is connected on the non-root
switch, irrespective of to which port it is connected on the other end switch.
In our case, port no 01 of switch06 is connected to port no 01 of switch 07 and from no port no 02 of switch06 to
port no 02 of switch 07. So as per the Spanning Tree Algorithm, it blocked the port no 02 on Switch-07.

AshokReddy

You might also like