Spanning Tree Protocol (802.1D)
STP is enabled by Default in Cisco Switches. STP constructs a loop-free shortest path network and allows for duplicate or redundant paths.
There is a separate STP in each VLAN
States of STP
Status |
Frame Processing |
Time |
Blocked (max age) (Discarding State for RSTP) |
No frames forwarded, Receiving BPDU’s |
20 Sec |
Listening |
No frames forwarded, Listening frames, BPDU’s processed (sent/recd) to determine paths and build topology |
15 Sec |
Learning |
No frames forwarded, Learning addresses, builds bridging table |
15 Sec |
Forwarding |
Frames forwarded. Sending/Receiving data |
|
Disabled |
No frames forwarded, No BPDU’s heard. Administratively down |
|
Note:BPDU’s sent out every 2 seconds by default.
Note: Rapid STP (802.1w) can bypass Listening and Learning states because it can skip the process on Edge Type shared
and Edge Type Point-to-point links.
Switches selected based on BID (Bridge ID), and the lowest will become the
Bridge ID is made up of a Bridge Priority and the MAC address.
Priority can be changed with the following switch command
Switch(config)#spanning-tree vlan 1 priority <number> (number can be any value from 0-65535. Default is 32768)
Once converged, BPDU’s are only sent out from Root Switch (except RSTP). If no BPDU’s are heard when Max Age is reached
Then switch initiates negotiations to rebuild Spanning Tree.
It does this by transitioning to the
the same process as the startup.
During the Election process, the root bridge, root ports and designated ports are elected. Root bridge is decided as above, by BID. Root ports and designated ports are selected based on cumulative path costs, based on the following table:
Bandwidth |
Total or cumulative path cost |
4 Mbps |
250 |
10 Mbps |
100 |
16 Mbps |
62 |
45 Mbps |
39 |
100 Mbps |
19 (previously 10) |
155 Mbps |
14 |
622 Mbps |
6 |
1 Gbps |
4 (previously 1) |
10 Gbps |
2 (previously 1) |
STP prevents three problems in switch networks:
· Broadcast Storms
· Multiple Frame Transmissions
· Unstable MAC Databases
Switch show and
debug commands
show spanning-tree
show run