Sub topic 15
One tree per VLAN: PVST+ and Rapid PVST+
This chapter assumes you know how the root bridge is elected, how port roles are chosen, and how VLANs and trunks work. It covers how Cisco switches run a separate spanning tree for each VLAN, and why that is useful.
Why one tree is not enough
Standard 802.1D and 802.1w build a single tree for the whole switched network. Every VLAN shares it. A blocked port is blocked for all VLANs, so a redundant uplink carries no traffic until the active path fails.
Cisco's Per-VLAN Spanning Tree Plus (PVST+) runs one spanning tree instance for each VLAN. Rapid PVST+ does the same using the 802.1w rapid rules. Each VLAN elects its own root bridge and chooses its own root, designated and blocked ports.
How the bridge ID carries the VLAN
Each instance needs a distinct bridge ID. The 16-bit priority field is split into a 4-bit priority and a 12-bit extended system ID. The extended system ID holds the VLAN number. The 4-bit part is why priorities must be multiples of 4096.
For VLAN 10 with the default priority of 32768, the advertised priority is 32768 + 10 = 32778. The same switch advertises 32788 for VLAN 20.
Load balancing with per-VLAN roots
Because each VLAN has its own root, you can choose different roots for different VLANs. Two links from an access switch to two distribution switches can then both carry traffic:
- Make Distribution A the root for VLAN 10 and secondary for VLAN 20.
- Make Distribution B the root for VLAN 20 and secondary for VLAN 10.
The access switch forwards VLAN 10 toward A and blocks it toward B. For VLAN 20 it does the opposite. Both uplinks are used.
Configuration
Select the mode, then set the root for each VLAN. The root primary macro lowers the priority to 24576, or lower if needed to beat the current root. An explicit priority gives you predictable results.
! Distribution A
configure terminal
spanning-tree mode rapid-pvst
spanning-tree vlan 10 priority 4096
spanning-tree vlan 20 priority 8192
end
! Distribution B
configure terminal
spanning-tree mode rapid-pvst
spanning-tree vlan 20 priority 4096
spanning-tree vlan 10 priority 8192
endCheck the result with show spanning-tree vlan 10. The output names the root bridge for that VLAN and lists each port's role and state.
Trade-offs and common errors
- Each VLAN adds BPDUs and a CPU load. On a switch with hundreds of VLANs this adds up, which is the reason MSTP exists.
- Unlike the IEEE standards, PVST+ is Cisco proprietary. Interoperating with other vendors depends on how the VLANs are carried, and mismatches can cause blocked ports.
- Mixing PVST+ and Rapid PVST+ on neighbors works, but the link falls back to classic timers, so convergence is slow.
- Setting the root for only some VLANs leaves the others on default priorities. The root is then chosen by lowest MAC address, which may be an old access switch.
Exercise
A switch has the default priority of 32768. What priority does it advertise for VLAN 30, and why can you not set a priority of 5000?
Show answer
It advertises 32768 + 30 = 32798, because the VLAN number is carried in the 12-bit extended system ID. You cannot set 5000 because the configurable part of the priority is 4 bits, so values must be multiples of 4096.