Configuring RPVST+

Procedure
  1. Set RPVST+ as the spanning tree mode with the command spanning-tree mode rpvst.
  2. Enable spanning tree with the command spanning-tree.
  3. For each layer 2 interface or LAG, configure the list of VLANs that are part of the spanning tree with the command spanning-tree vlan.
  4. Set the cost and priority for each VLAN with the commands spanning-tree vlan cost and spanning-tree vlan port-priority.
  5. For most deployments, the default values for the following settings do not need to be changed. If your deployment requires different settings, change the default values with the indicated commands:
    RPVST+ setting Default value Command to change it
    Include VLAN ID in spanning tree packets. Enabled. spanning-tree extend-system-id
    Block links when VLAN mismatch is detected. Disabled. spanning-tree ignore-pvid-inconsistency
    STP link type. Point-to-point. spanning-tree link-type
    Support extended range of paths costs for high-speed links. Enabled. spanning-tree pathcost-type
    Propagate topology changes to other ports. Disabled. spanning-tree tcn-guard
  6. Review RPVST+ configuration settings with the command show spanning tree.

Example

This example creates the following configuration:

  • Sets the spanning tree mode to rpvst.
  • Enables spanning tree.
  • Defines spanning tree support for VLANs 2-5.
  • Sets the priority for each VLAN.
switch# config 
switch(config)# spanning-tree mode rpvst 
switch(config)# spanning-tree
switch(config)# spanning-tree vlan 2-5
switch(config)# spanning-tree vlan 2 priority 5
switch(config)# spanning-tree vlan 3 priority 4
switch(config)# spanning-tree vlan 4 priority 3
switch(config)# spanning-tree vlan 5 priority 2
switch(config)# exit
switch# show spanning-tree

Spanning tree status      : Enabled Protocol: RPVST
Extended System-id        : Enabled
Ignore PVID Inconsistency : Disabled
Path cost method          : Long

VLAN2
  Root ID    Priority   : 20480
             MAC-Address: 70:72:cf:38:21:e5
             This bridge is the root
             Hello time(in seconds):2  Max Age(in seconds):20
             Forward Delay(in seconds):15

  Bridge ID  Priority  : 20480
             MAC-Address: 70:72:cf:38:21:e5
             Hello time(in seconds):2  Max Age(in seconds):20
             Forward Delay(in seconds):15

Port         Role           State        Cost    Priority   Type
------------ -------------- ------------ ------- ---------- ----------
1/1/1        Designated     Forwarding   20000   128        point_to_point

VLAN3
  Root ID    Priority   : 16384
             MAC-Address: 70:72:cf:38:21:e5
             This bridge is the root
             Hello time(in seconds):2  Max Age(in seconds):20
             Forward Delay(in seconds):15

  Bridge ID  Priority  : 16384
             MAC-Address: 70:72:cf:38:21:e5
             Hello time(in seconds):2  Max Age(in seconds):20
             Forward Delay(in seconds):15

Port         Role           State        Cost    Priority   Type
------------ -------------- ------------ ------- ---------- ----------
1/1/1        Designated     Forwarding   20000   128        point_to_point

VLAN4
  Root ID    Priority   : 12288
             MAC-Address: 70:72:cf:38:21:e5
             This bridge is the root
             Hello time(in seconds):2  Max Age(in seconds):20
             Forward Delay(in seconds):15

  Bridge ID  Priority  : 12288
             MAC-Address: 70:72:cf:38:21:e5
             Hello time(in seconds):2  Max Age(in seconds):20
             Forward Delay(in seconds):15

Port         Role           State        Cost    Priority   Type
------------ -------------- ------------ ------- ---------- ----------
1/1/1        Designated     Forwarding   20000   128        point_to_point

VLAN5
  Root ID    Priority   : 8192
             MAC-Address: 70:72:cf:38:21:e5
             This bridge is the root
             Hello time(in seconds):2  Max Age(in seconds):20
             Forward Delay(in seconds):15

  Bridge ID  Priority  : 8192
             MAC-Address: 70:72:cf:38:21:e5
             Hello time(in seconds):2  Max Age(in seconds):20
             Forward Delay(in seconds):15

Port         Role           State        Cost    Priority   Type
------------ -------------- ------------ ------- ---------- ----------
1/1/1        Designated     Forwarding   20000   128        point_to_point