Types:
- STP Standard
- PVST+ (STP per VLAN – by Cisco)
- RSTP (STP faster)
- Rapid PVST+ (RSTP per VLAN – by Cisco)
Root Bridge election:
- BID = (Priority+VLAN) + MAC
- Lowest Priority;
- Lowest VLAN;
- Lowest MAC.
Commands:
spanning-tree mode pvst
spanning-tree mode rapid-pvst
spanning-tree mode mst
spanning-tree vlan 1 root primary # VLAN number 1-4094
spanning-tree vlan 1 priority 0 # priority 0-61440
# default 32768
# set increments of 4096
spanning-tree portfast # directly to forwarding mode
spanning-tree uplinkfast # accelerate new root port
no spanning-tree vlan 1 # VLAN number 1-4094
Debugging commands:
show spanning-tree show spanning-tree vlan 1 root # LAN number 1-4094 show spanning-tree vlan 1 bridge # LAN number 1-4094