PVST+ Spanning-tree Summary
-
Filed under Cisco
-
February 5, 2014
-
Roles
-
Bridges:
- root
- non-root
-
Ports:
- Root Port (RP)
- Designated Port (DP)
- Non-designated Port (NDP)
Overview
-
For each VLAN choose one root bridge
- The switch with the lowest Bridge ID (BID)
- BID consists of 4-bit priority value (multiple of 4096) + 12-bit VLAN ID + MAC address
- Priority defaults to 8 (8 * 4096 = 32768)
- If all BIDs are default, then switch with lowest MAC address will be the root
-
For each non-root bridge choose one root port (RP)
- This will be the port that is on the best path to the root bridge
- Root Path Cost is cumulative link cost on path to root bridge out that port
- First the switch compares cumulative Root Path Cost out each potential RP
- Lowest root path cost wins
- If root path cost is tied
- RP is port that is receiving BPDUs from the neighbor switch with the lowest BID
- If sender BID is tied
- Lowest sender port ID wins
- Port ID is 8 bit priority (default 128) then 8 bit interface number
-
For each link choose one designated port (DP)
- The one port on the link that is closest to the root bridge
- Lowest Root Path Cost
- If Root Path Cost is tied
- lowest sender BID
- If sender BID is tied
- lowest local port ID (looped to itself)
-
If a port is not classified as an RP or a DP, then it is a NDP and it blocks
States (Controlled by timers set on root bridge)
-
Blocking to Listening
-
Listening to Learning
-
Learning to Forwarding
Timers
-
Hello timer
- root bridge sends a BPDU every (default 2 seconds)
- non-root bridges update it and forward it
-
Max Age
- Max Age is refreshed every time the port receives a BPDU
- non-designated ports will save a BPDU for (default 20 seconds)
- If port fails to hear 10 BPDUs in a row
- Max age expires
- port transitions to Listening state
-
Forward Delay
- time spent in Listening and Learning states (default 15 seconds)
-
Time to transition from blocking to forwarding
- Max Age + (2 * Forward Delay) = (20 seconds) + (2 * 15 seconds) = 50 seconds
Permanent link to this article: https://daherlabs.mywire.org/wordpress/?p=311