2. What is STP???
STP used to prevent from looping when switches or bridges are
connected to each other with multiple ports.
STP implements open standard 802.1D IEEE algorithm by exchanging
BPDU (Bridge Protocol Data Unit) with other switches to detect loops
and remove the loop by shutting down the selected bridge interface.
STA (Spanning Tree Algorithm) is used in this process and this
algorithm guarantees that only one path between two devices is
active.
STP is enabled by default on all Cisco Switches.
3. How STP works???
The working of BPDU is to make elections between switches and check
for lower Bridge ID
Bridge ID= Priority + MAC address
The switch with lower Bridge ID will be Root Bridge and other switches
will become not root bridge
The port of root bridge will become Designated port and the port in
front of designated port is either called Root Port or Blocked Port
(depend on its cost and Switch ID)
Then Blocked port will automatically off for prevent from loop with in
network
5. Designated Port
Designated port exist on root switches as well as on non root switches
Its working is to receive packet which is coming through root port
Only one designated port is allowed per segment
On root switch, all ports are designated port
Designated port also populate MAC address on MAC table
6. Root Port
Root port exist on non root switch and is the switch port with the best
path to the root bridge
The working of root port is to forward packet toward root switch
Root port also populate MAC address in MAC Table
7. Non Designated (Blocked) Port
Non Designated port is a switch port that is blocked
It is also called a blocked port or sometime alternate port
It can not forward packets to next switch
It can not populate MAC address in MAC table
8. Disabled Port
Disable port is the port which is blocked by Network
Administrator
It can not send packet to another switch
Also it can not populate MAC address on MAC table
A disable port is not a part of Spanning Tree process
9. Path Cost
This information get by summing up the individual port
cost along the path from the destination to the root
bridge
These are default path costs
10 Gb/s have 2 cost
1 Gb/s have 4 cost
100 Mb/s have 19 cost
10 Mb/s have 100 cost
10. Port States
STP introduce five port states
Blocking
Listening
Learning
Forwarding
Disabled
11. Blocking State
The port is a non designated port and does not participate in frame
forwarding
Its time is 20 sec or unlimited
Listening State
At this state switch is not only receive BPDU frame, it also send BPDU
frame to next switch, by that port is participating in active topology
Its time is 15 sec
12. Learning State
In this state Switch is populating MAC Address in MAC Table
Its time is 15 sec
Forwarding State
At this state port is forwarding and receiving BPDU frame and it is a
part of STP process
Its time is unlimited
Disabled State
This state does not participate in Spanning Tree process because port
is administratively disabled
Its time is Unlimited