Per VLAN Spanning Tree (PVST)

19 posts were merged into an existing topic: Per VLAN Spanning Tree (PVST)

Hi Rene,
From what I can infer, we don’t use the rule for selecting root bridge based on BPDU since we are manipulating it ?

Hello Ishan

Yes, from the moment that you change the priority of a switch, you are changing the priority value sent by the BPDUs. So the BPDUs that are received by each switch will be changed accordingly and used to determine the root bridge.

I hope this has been helpful!


Hi Rene,

Can I change the STP mode per VLAN ? for example using PVST+ for VLAN 10 and RPVST+ for VLAN 20 ??

Hi Hussein,

The STP mode is set globally, you can’t change it per VLAN.


Hi Rene!

I think default mode is PVST+ not standard PVST for cisco IOS.



Hello Conor

Yes you are correct, PVST+ is the default STP mode. I’ll let @ReneMolenaar know to update that in the lesson. Here’s the text in question:


Thanks again!


PVST and PVST+. Are these two the same?

Hi Rene !
I can not understand how BPDU select different root bridge for different Vlan as it use the same method to select root bridge (MAC + Priority). Please kindly help

Almost, but there is a difference.

PVST is Cisco proprietary and only supported ISL trunks, not 802.1q trunks. PVST+ is also Cisco proprietary, an “enhanced” version of PVST that does support 802.1Q.

Hi Heng,

You can configure a different priority for each VLAN, allowing you to select a different root bridge per VLAN.

1 Like

Hi Rene
What about default of PVST ? Does it select only switch as root switch for all Vlan?

Hello Heng.

If you do not change any of the priorities for root bridge selection, then by default the switch with the lowest bridge ID will be chosen. This means that the same switch will be chosen as the root bridge for all VLANs.

I hope this has been helpful!


1 Like

Thank you so much. I got it now.

1 Like

Can you show the command to assign a different priority on a switch to different VLAN?

Hello rosna

There are several ways to change the priority of a switch. The first is:

**spanning-tree vlan VLANID priority priorityvalue**

where VLANID is the VLAN for the instance of STP that you want to implement and priorityvalue is the value of the priority that can be between 1 and 61440 in multiples of 4096.

A second way to do it is:

**spanning-tree vlan VLANID root primary**

This command will make the current switch the primary root bridge. It will essentially check the priorities of all other switches and configure itself to have a lower priority number. This will only work if the same command is not implemented on another switch in the same network. The keyword primary can be replaced with secondary, which would make it have the second lowest priority number, making it the root if the first fails.

You can find out more about these commands at this Cisco reference.

I hope this has been helpful!


How do we configure root bridge for each vlan rene ?
if we change priority one willl be elected if priority ties one wd da lowest mac address will be elected. so again my question is how do we configure pvst to have one root bridge for each vlan ? or it’s by default when i have two different vlan it’s a default behavior making some root bridge for each vlan

Hi Zeko,

You change it with the following command:

SW1(config)#spanning-tree vlan 1 priority 4096

Which sets the priority to 4096 for VLAN 1. This way, you can change it for each individual VLAN. You can also do this for a range:

SW1(config)#spanning-tree vlan 1-200 priority 4096

There’s also this command:

SW1(config)#spanning-tree vlan 1 root primary

You can use “primary” or “secondary”. Basically it’s a macro that checks for the current root bridge and then sets the priority of the switch to a value just above or below the current root bridge.

By default, the priority is 32768 for all VLANs so it’s the MAC address that defines which switch becomes the root bridge for all VLANs.

Hope this helps!


1 Like

Thanks Andrew…
Can you please confirm by default which version runs on switch PVST or PVST+ ? and which command do we use to enable PVST+

Hello Aniket

PVST+ is the default configuration on most modern Cisco switches. If you have changed this default and you want to revert back to PVST+ you can do this by issuing the following command: spanning-tree mode pvst.

Now the fact that the ‘+’ is not included can be a bit confusing. Keep in mind that plain PVST is no longer configurable on a switch, it’s always PVST+ so even if you see ‘pvst’ alone in the command, it is always PVST+ that is being referred to.

The advantage of PVST+ is that it sends 802.1D compatible BPDUs, as well as Cisco proprietary, making it compatible with non-Cisco STP implementations.

The spanning-tree mode command can be used to change the type of spanning tree that is running. Depending on the IOS version, it could be MST, PVST+ or Rapid PVST+ to name a few. More about this command can be found here:

I hope this has been helpful!