31 Jan 2024

802.1D Spanning Tree Protocol (vanilla)

I do a lot of Switch/VLAN migration these days because of the ongoing Data Center migration, so a Spanning Tree refreshment was necessary, here are some of my notes on the topic.

Convergence phases
1. Elect Root Bridge
2. Elect a Root Port for each switch
3. Elect designated ports for each segment

STP Algorithm
Root BridgeID (priority + MAC) (8 bits = 2+6)
Root Path Cost
Sender BID
Sender PortID (port priority + port number)

Port Roles
Root Port
Designated Port
Blocked Port

Port States
Disabled
Blocking
Listening
Learning
Forwarding






Types of BPDU
Configuration BPDU (sent by root bridge, default every 2 seconds)
TCN BPDU (Topology Change Notification, the detecting bridge sends upstream)
BPDU with TCA set (TC Ack, the upstream bridge receiving TCN sends this back)
BPDU with TC flag (Root bridge sends this downstream, to tell other bridges to age their CAM tables, in Forward-Delay time)

Cisco Proprietary enhancements
PortFast: Use in ports with only hosts, skips Listen/Learn and jumps to Forwarding
UplinkFast: Use in Access Layer, to detect direct failures. Tracks backup root port and raises it to Forwarding state quickly. (Cuts back 15+15 seconds)
BackboneFast: Used to detect indirect failures. All switches must enable. Uses RLQ (Root Link Query) mechanism to detect topology. (Cuts back on 10 sec. of Max-Age timer)

Useful show commands
show span summary
show span root
show span bridge
show span vlan xxx
show span vlan xxx detail


No comments:

Post a Comment