To switch to PVST input the following commands:
console> enable console# config
For rapid-pvst:
console(config)# spanning-tree mode rapid-pvst
For legacy devices that use PVST:
console(config)# spanning-tree mode pvst
To remove specific VLANs from PVST and include specific VLANs, input the following commands. This example removes VLAN 10 and adds VLAN 20.
console(config)#no spanning-tree vlan 10 console(config)#spanning-tree vlan 20
The following command sets priority for root bridge selection. This example sets vlan 20 and 30 as priority 4096 and VLAN 40 through 45 as priority 8192.
console(config)# spanning-tree vlan 20,30 priority 4096 console(config)# spanning-tree vlan 40-45 priority 8192
It is recommended to configure any edge ports, ports that go to end devices such as printers, phones, servers, workstations, to be set up as PortFast. A port in PortFast moves directly to the forwarding state when the link comes up without waiting for the forward-time delay.
console(config)#interface te1/0/1 console(config-if)#spanning-tree portfast
To review PVST, run the following command. X is replaced with the VLAN ID that you want to check.
console# show spanning-tree vlan X