Hands-On Lab: Assigning Spanning Tree Priority to Multiple VLANs Simultaneously

This hands-on lab configures Spanning Tree bridge priority across several VLANs in a single command using a VLAN range, rather than repeating the configuration individually for each VLAN, and verifies the priority was correctly applied to every VLAN in the range.

STP VLAN RangeBulk Priority ConfigurationPVST+ Per-VLAN Instances

~3 min read · Updated Sep 22, 2026

Lab Objective

Configure a single switch as the root bridge for a range of VLANs using one command that applies to all of them simultaneously, rather than issuing a separate priority command for each individual VLAN, and verify the priority applied correctly to every VLAN in the range.

Lab Purpose

Cisco's default Spanning Tree implementation, PVST+, runs a completely separate Spanning Tree instance for every VLAN, each with its own independent root bridge election. On a switch supporting dozens of VLANs, configuring priority one VLAN at a time is tedious — the VLAN range syntax solves this directly.

Lab Topology

Switch1 (intended root for VLANs 10-50)

VLANs 10, 20, 30, 40, and 50 already exist
on the switch and are carried on its trunk links

Task 1: Verify Current Priority Across the VLAN Range

Check the current default priority for VLANs 10, 20, 30, 40, and 50 individually.

Task 2: Configure Priority for All Five VLANs in One Command

Using a single command with a VLAN range, set the priority for VLANs 10 through 50 to 4096.

Task 3: Verify the Priority Applied to Every VLAN in the Range

Check each VLAN individually and confirm all five now show the new priority.

Task 4: Confirm Root Bridge Status Per VLAN

Confirm the switch is recognized as root for each of the five VLANs independently.

Solution and Verification

Switch1# show spanning-tree vlan 10 | include Priority
Bridge ID  Priority    32768

Switch1# show spanning-tree vlan 50 | include Priority
Bridge ID  Priority    32768
-- Every VLAN currently sits at the default,
-- and would each need its own individual
-- command without using a range

Switch1(config)# spanning-tree vlan 10,20,30,40,50 priority 4096

-- A hyphenated range also works identically:
-- spanning-tree vlan 10-50 priority 4096
-- (matches only VLANs that actually exist
--  within that numeric range)

Switch1# show spanning-tree vlan 10 | include Priority
Bridge ID  Priority    4096

Switch1# show spanning-tree vlan 20 | include Priority
Bridge ID  Priority    4096

Switch1# show spanning-tree vlan 50 | include Priority
Bridge ID  Priority    4096
-- All five VLANs updated from a single command

Switch1# show spanning-tree vlan 30 | include Root
Root ID    Priority    4096
           This bridge is the root

Switch1# show spanning-tree vlan 40 | include Root
Root ID    Priority    4096
           This bridge is the root
-- Confirmed root for each VLAN independently,
-- since PVST+ maintains a completely separate
-- election and topology per VLAN

Key Takeaway

Because PVST+ runs an entirely independent Spanning Tree instance per VLAN, changing priority for one VLAN never affects any other — the VLAN range syntax is purely a configuration-time convenience for applying the identical change across many instances at once, not a sign that those VLANs somehow share a single underlying tree.

Written & researched by Dr. Shahin Siami

Related Articles

Hands-On Lab: Setting Switchports to Dynamic Trunking Modes

This hands-on lab configures switchport dynamic desirable and dynamic auto modes, demonstrating how Dynamic Trunking Protocol automatically negotiates whether a link becomes a trunk or remains an access port, and covers why relying on DTP is generally discouraged in production networks.

Continue

Hands-On Lab: Configuring, Verifying, and Troubleshooting EtherChannel (Static/PAgP/LACP)

This hands-on lab bundles two physical links between switches into a single logical EtherChannel using static, PAgP, and LACP modes in turn, verifies each bundle forms correctly, and demonstrates the mismatched-mode failure that prevents a bundle from forming.

Continue

Hands-On Lab: Enabling Rapid Per-VLAN Spanning Tree (RPVST+)

This hands-on lab migrates a switch from classic PVST+ to Rapid PVST+, comparing the significantly faster convergence time and the updated port role terminology that comes with the newer protocol.

Continue

Hands-On Lab: Configuring Spanning Tree Protocol for Access Ports (PortFast)

This hands-on lab configures PortFast on an access port connecting to an end-user device, bypassing the normal listening and learning delay so the port forwards traffic immediately, and covers why PortFast should never be applied to a port connecting to another switch.

Continue

Hands-On Lab: Configuring Spanning Tree Root Bridges Using the IOS Macro Command

This hands-on lab uses the spanning-tree root primary and root secondary macro commands to configure a primary and backup root bridge without manually calculating priority values, and verifies IOS automatically selects an appropriate priority relative to the current root.

Continue

Hands-On Lab: Configuring Spanning Tree Protocol Root Bridges Manually

This hands-on lab manually influences Spanning Tree root bridge election by adjusting bridge priority on two competing switches, verifying which switch becomes root before and after the change, and confirming the resulting port roles update accordingly.

Continue