Course contents

Chapter 6: Spanning Tree ProtocolLesson 11 of 25

Introduction to PVST+

Why Cisco runs a separate spanning tree for every VLAN, and what that makes possible.

Intermediate · 6 min read

Technical definition

PVST+ (Per-VLAN Spanning Tree Plus) is Cisco’s version of Spanning Tree that runs a separate STP instance for each VLAN, each with its own root bridge, port roles and BPDUs. Different VLANs can therefore block different links, which allows load sharing across redundant paths.

One tree per VLAN

With Common Spanning Tree (CST), covered earlier, all VLANs share one tree. So a blocked link is unused by every VLAN. Cisco's PVST+ (Per-VLAN Spanning Tree Plus) is different. It runs a separate spanning tree for every VLAN. Each VLAN has its own root bridge, its own port roles and its own blocked ports.

That's why the bridge ID includes the extended system ID (the VLAN number). The same switch has a different bridge ID in each VLAN. For example, 24586 in VLAN 10 and 32788 in VLAN 20.

Two fibres between buildings, one sitting idle

Situation: a campus has two buildings, joined by two expensive fibre cables. It has a data VLAN and a voice VLAN. With one tree for everything:

Diagram
CST: both VLANs forced onto one fibre, the other idle
CST: both VLANs forced onto one fibre, the other idle
fibre 1fibre 2: idleCore ABuilding 1 · rootCore BBuilding 2VLAN 10Data VLANVLAN 30Voice VLAN

Device key: Core A, Core B (Layer 3 switch) · Data VLAN (computer) · Voice VLAN (desk phone)

Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type. Blocked: forwarding prevented by a port or policy. Down: failed link. Read the step for the cause.

  1. 1. Data uses fibre 1… the only fibre that STP leaves forwarding.
  2. 2. …and so does voice. Fibre 2 carries nothing, for any VLAN, until fibre 1 fails.
Diagram
Two fibres between buildings, one sitting idle
Two fibres between buildings, one sitting idle
Problem with one treeWhat it meansHow one tree per VLAN helps
Wasted capacityYou paid for two fibres but use oneBlock fibre 2 for some VLANs and fibre 1 for others, so both carry traffic
One root for all trafficA VLAN's traffic must go through the one root, even if its servers are somewhere else. The longer path adds delay, which is bad for voice and video.Put each VLAN's root next to its main traffic
Everything fails togetherA problem in the tree affects every VLAN at onceEach VLAN recovers on its own. The others keep working.
Read each row across: the left box names the item, the others describe it.

Load sharing: SW1 roots VLAN 10, SW2 roots VLAN 20

Situation: you make SW1 the root for VLAN 10, and SW2 the root for VLAN 20. Now each VLAN blocks a different link:

VLAN 10: root SW1

Diagram
VLAN 10 spanning tree with SW1 as root
VLAN 10 spanning tree with SW1 as root
DPRPDPRPDPBLKSW1 (root)SW2SW3PC APC B

Device key: SW1 (root), SW2, SW3 (switch) · PC A, PC B (computer)

Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type. Blocked: forwarding prevented by a port or policy. Down: failed link. Read the step for the cause.

  1. 1. VLAN 10 uses SW1–SW3… …and blocks SW2–SW3 at SW3.

VLAN 20: root SW2

Diagram
VLAN 20 spanning tree with SW2 as root
VLAN 20 spanning tree with SW2 as root
DPRPDPRPDPBLKSW1SW2 (root)SW3PC APC B

Device key: SW1, SW2 (root), SW3 (switch) · PC A, PC B (computer)

Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type. Blocked: forwarding prevented by a port or policy. Down: failed link. Read the step for the cause.

  1. 1. VLAN 20 uses SW2–SW3… …the link that VLAN 10 blocks. VLAN 20 blocks SW1–SW3 at SW3 instead.

Why it works: in VLAN 20, SW2 is the root. So SW3's cheapest path is its direct link to SW2. On the SW1–SW3 link, both ends are cost 4 from SW2. SW1 has the lower MAC, so it wins designated, and SW3's end is blocked. Now both of SW3's uplinks carry traffic, each for different VLANs. And each one is still a backup for the other.

In practice, a VLAN's root is usually placed on the same switch that is its active default gateway (the HSRP active router, for example). Then traffic to the gateway doesn't cross an extra link to get there.

Tagged BPDUs, one set per VLAN

Each VLAN sends its own BPDUs. On trunks, most are tagged with the VLAN number and sent to Cisco's special address 0100.0ccc.cccd. For VLAN 1, PVST+ also sends standard IEEE BPDUs (to 0180.c200.0000). This lets it work with other vendors' switches that run a single Common Spanning Tree.

CST, PVST+ and MST compared

CST (802.1D)PVST+ / Rapid PVST+MST (802.1s)
Number of trees11 per VLANA few, each for many VLANs
Uses all linksNoYes, per VLANYes, per tree
Work for the switchLowestGrows with every VLANLow
StandardIEEECiscoIEEE

With hundreds of VLANs, PVST+ means hundreds of trees and lots of BPDUs. Each switch model has a limit on how many trees it can run. That's where MST helps. For most office networks, Rapid PVST+ is the usual choice.

PVST, PVST+ and the names you'll see

Diagram
PVST, PVST+ and the names you'll see
PVST, PVST+ and the names you'll see
NameTrunkingNotes
PVSTCisco ISL onlyThe first per-VLAN version. No longer used, like ISL.
PVST+802.1Q (and ISL)Adds 802.1Q support. Works with other vendors' single standard tree through VLAN 1.
Rapid PVST+802.1QRSTP for each VLAN (the Rapid Spanning Tree lessons). The default on modern Cisco switches.
Read each row across: the left box names the item, the others describe it.

On Cisco switches, the command spanning-tree mode pvst really runs PVST+. show spanning-tree shows it as protocol ieee (classic 802.1D rules). Rapid PVST+ shows rstp, and MST shows mstp.

Test yourself on PVST+

Predict · scenario 1

With PVST+, can the same switch be root for VLAN 10 but not for VLAN 20?

Predict · scenario 2

A switch with 300 VLANs runs PVST+. What's the main cost?