Spanning Tree Protocol
Root Switch
The lowest bridge priority
If that ties, the lowest MAC address of the Switch
All the ports are in Designated Forwarding State
Default Root Cost is always ‘Zero’
Root Switch creates ‘Hello’ BPDU
Non-Root Switch
Root Port – The lowest root cost to reach a root switch.
Root Cost – STP cost between this switch and root switch.
Root Port is in a forwarding state.
If ‘Segments’ then the port will be in designated forwarding state.
The highest root cost to the reach root switch – blocking state.
Non-Root Switch accepts ‘Hello’ BPDU from root switch.
Best Root Cost Selection
If ties for two or more paths for the best ‘Root Cost’:
Lowest Neighbor Bridge-ID
Lowest Neighbor Port Priority
Lowest Neighbor Port Number
Superior Hello – Numerically lower and the listed root’s BID is better
Inferior Hello – Numerically higher and the listed root’s BID is not as good
STP Timers
Hello (2 Seconds)
Max Age (20 Seconds)
Forward Delay (15 Seconds) [ Blocking State to Forwarding State ]
Listening (15 Seconds)
Learning (15 Seconds)
Convergence Delay (50 Seconds = Listening + Learning + Max Age)
Point to Point Port (Switch to Switch)
Point to Point Edge Port (Switch to PC)
Shared Port (Switch to Hub)
Port Fast – Blocking to Forwarding (Interface Configuration)
Uplink Fast – Try to recover the direct link failures
Backbone Fast – Try to recover the indirect link failures
Root Guard – To influence which switch is eligible to become root switch
BPDU Guard – If port receives any BPDU then it will go to err-disabled state
BPDU Filter – It will filter the incoming BPDUs
Loop Guard – To prevent Layer-2 switching loops in fiber links
Key Points
RSTP Multicast MAC Address is 0180.C200.0000
RSTP(+) Multicast MAC Address is 0100.0CCC.CCCD
How to change the priority and interface cost value?
int fa0/0
spanning-tree vlan 5 cost 25
spanning-tree vlan 10 priority 28672
spanning-tree vlan 10 root primary 28672
spanning-tree vlan 20 root secondary 32768