Per VLAN Spanning Tree (PVST)

(Nyi Nyi L) #29

PVST and PVST+. Are these two the same?

(Heng S) #30

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

(Rene Molenaar) #31

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.

(Rene Molenaar) #32

Hi Heng,

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

1 Like
(Heng S) #33

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

(Lazaros Agapides) #34

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!

Laz

1 Like
(Heng S) #35

lagapides
Thank you so much. I got it now.

1 Like
(rosna s) #36

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

(Lazaros Agapides) #37

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!

Laz

(Zeko a) #38

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

(Rene Molenaar) #39

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!

Rene

1 Like
(aniket g) #40

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+

(Lazaros Agapides) #41

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!

Laz

(aniket g) #42

Thanks a lot as always Lazaros …

1 Like
(Ritesh S) #43

Hi Rene,
This might be the very basic which is making me confused. When you are using topology of 2 switches to show loop, suppose if that 2 links are in etherchannel then what? Whether they will create a loop or not?

(Lazaros Agapides) #44

Hello Ritesh

If you configure two links to function as an aggregated port, then spanning tree will not be activated in such a case. The two (or more) links that are bundled into the etherchannel will be viewed and treated as a single link, so there is no logical loop there and thus STP will not be engaged.

I hope this has been helpful!

Laz

(Trust_the P) #45

Hello @lagapides,
the default STP mode was PVST+ until release 15.2(3)E. This may be added to the site as well

Source:

(Lazaros Agapides) #46

Hello sales2161

Thanks for that update, I’ll inform Rene as well!

Laz

1 Like
(Rene Molenaar) #47

Thanks for sharing this @sales2161, I just added a note to this lesson.

1 Like
(Trust_the P) #48

My pleasure!! @lagapides @ReneMolenaar

1 Like