Wednesday 1 February 2023

What is PVST PVST+ and RPVST+ Spanning tree? How to configure PVST?

  

Per VLAN Spanning tree (PVST) is cisco's proprietary version of STP which delivers more flexibility than the common spanning tree version. PVST works on a separate instance of STP for each VLAN. In normal STP, CST (Common Spanning Tree), only one instance can be used for the network. There are no specific instances per VLAN. This allows the STP on each VLAN to be configured independently and offers better load balancing and tuning according to the conditions. 

but as we know PVST is a cisco proprietary and because of its proprietary nature, Per VLAN Spanning tree (PVST) requires the use of a cisco inter-switch link (ISL) trunk but in coexist network where CST is working, and we configure PVST there will be problem occurs both require different trunking methods and the problem remains BPDUs are never exchanged between these types of STP. 

the solution is Per-VLAN spanning tree plus (PVST+) it's also the cisco proprietary version of STP and allows the device to interoperate with both PVST and CST. PVST+ act as a translator between a group of CST switches and groups of PVST switches. PVST+ creates an instance for each VLAN and in each instance, a different STP process occurs, a different Root bridge is selected, different port roles are used, etc.


Rapid Per VLAN Spanning Tree Plus (RPVST+) it's a Cisco proprietary STP version. Again, it has an instance for each VLAN and each VLAN has a separate STP process just like PVST but RPVST+ has a faster convergence advantage if we compare it with PVST+.

 

Let's see the configuration for a better understanding:

Topology:



Goal:

  • configure the topology as per the diagram.
  • configure VLANs 10,20,30 and 40 on all the switches.
  • configure TRUNK between switches 
  • Allowed all VLANs on all the switches
  • configure PVST on all switches 
  • configure Root bridge on switch 1 for VLAN 10
  • configure Root bridge on switch 2 for VLAN 20 
  • configure Root bridge on switch 3 for VLAN 30
  • configure Root bridge on switch 4 for VLAN 40 
  • verify the configuration 


SWITCH-1(config-vlan)#VLAN 10

SWITCH-1(config-vlan)#VLAN 20

SWITCH-1(config-vlan)#VLAN 30

SWITCH-1(config-vlan)#VLAN 40 


SWITCH-2(config)#VLAN 10

SWITCH-2(config-vlan)#VLAN 20 

SWITCH-2(config-vlan)#VLAN 30

SWITCH-2(config-vlan)#VLAN 40


SWITCH-3(config)#VLAN 10

SWITCH-3(config-vlan)#VLAN 20 

SWITCH-3(config-vlan)#VLAN 30

SWITCH-3(config-vlan)#VLAN 40


SWITCH-4(config)#VLAN 10

SWITCH-4(config-vlan)#VLAN 20 

SWITCH-4(config-vlan)#VLAN 30

SWITCH-4(config-vlan)#VLAN 40


SWITCH-1(config)#interface range fastEthernet 0/1-2
SWITCH-1(config-if-range)#switchport mode trunk
SWITCH-1(config-if-range)#exit

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

SWITCH-2(config)#interface range fastEthernet 0/1-2
SWITCH-2(config-if-range)#switchport mode trunk

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up


SWITCH-3(config)#interface range fastEthernet 0/1-2
SWITCH-3(config-if-range)#switchport mode trunk

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

SWITCH-4(config)#interface range fastEthernet 0/1-2
SWITCH-4(config-if-range)#switchport mode trunk

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

SWITCH-1(config)#interface range fastEthernet 0/1-2
SWITCH-1(config-if-range)#switchport trunk allowed vlan 1-40 
SWITCH-1(config-if-range)#exit











SWITCH-2(config)#interface range fastEthernet 0/1-2
SWITCH-2(config-if-range)#switchport trunk allowed vlan 1-40 
SWITCH-2(config-if-range)#exit

SWITCH-3(config)#interface range fastEthernet 0/1-2
SWITCH-3(config-if-range)#switchport trunk allowed vlan 1-40 
SWITCH-3(config-if-range)#exit













SWITCH-4(config)#interface range fastEthernet 0/1-2
SWITCH-4(config-if-range)#switchport trunk allowed vlan 1-40 
SWITCH-4(config-if-range)#exit

SWITCH-1(config)#spanning-tree ?
  mode      Spanning tree operating mode
  portfast  Spanning tree portfast options
  vlan      VLAN Switch Spanning Tree

SWITCH-1(config)#spanning-tree  mode ?
  pvst        Per-Vlan spanning tree mode
  rapid-pvst  Per-Vlan rapid spanning tree mode
























SWITCH-1(config)#spanning-tree  mode pvst

SWITCH-2(config)#spanning-tree mode pvst

SWITCH-3(config)#spanning-tree mode pvst

SWITCH-4(config)#spanning-tree mode pvst


SWITCH-1(config)#spanning-tree vlan 10 root primary 

SWITCH 1 VLAN 10














SWITCH-2(config)#spanning-tree vlan 20 root primary


SWITCH 2 VLAN 20











 
SWITCH-3(config)#spanning-tree vlan 30 root primary 

SWITCH 3 VLAN 30














SWITCH-4(config)#spanning-tree vlan 40 root primary 

SWITCH 4 VLAN 40


















No comments:

What is Virtual Router Redundancy Protocol (VRRP)? How to configure Virtual Router Redundancy Protocol (VRRP)?

 Virtual Router Redundancy Protocol (VRRP) is a gateway redundancy networking protocol used to create a virtual gateway similar to HSRP . VR...