Enabling and configuring R-PVST+ on a system

The ports and parameters can be configured individually by:
  1. Entering the commands in steps 1 and 2
  2. Running the relevant addition steps and parameter commands
  3. Verifying the result
  4. Saving the configuration

For detailed descriptions of the parameters and features, see the sections STP parameters and STP features.

  1. Enter global configuration mode.
    device# configure terminal
    
  2. Enable R-PVST+.
    device(config)# protocol spanning-tree rpvst
    

    You can shut down R-PVST+ by entering the shutdown command when in rpvst configuration mode.

  3. Configure the bridge priority for the common instance.
    device(config-rpvst)# bridge-priority 4096
    
    Valid values range from 0 through 61440 in increments of 4096. Assigning a lower priority value indicates that the bridge might become root.
  4. Configure the forward delay parameter.
    device(config-rpvst)# forward-delay  20
    
  5. Configure the hello time parameter.
    device(config-rpvst)# hello-time 8
    
  6. Configure the maximum age parameter.
    device(config-rpvst)# max-age 22
    
  7. Specify the transmit hold count.
    device(config-rpvst)# transmit-holdcount 5
    
    This command configures the maximum number of BPDUs transmitted per second. The range of values is 1 through 10.
  8. Configure VLANs.
    1. Configure VLAN 100 with a priority of 0.
      device(config-rpvst)# vlan 100 priority 0
      
      Valid priority values range from 0 through 61440 in multiples of 4096.
    2. Configure VLAN 201 with a priority of 12288.
      device(config-rpvst)# vlan 201 priority 12288
      
    3. Configure VLAN 301 with a priority of 20480.
      device(config-rpvst)# vlan 301 priority 20480
      
  9. Set the switching characteristics for interface 0/3.
    1. Enter interface configuration mode.
      device(config-rpvst)# interface ethernet 0/3
      
    2. Set the switching characteristics of the interface.
      device(conf-if-eth-0/3)# switchport
      
    3. Set the interface mode to trunk.
      device(conf-if-eth-0/3)# switchport mode trunk
      
    4. Add VLAN 100 as a member VLAN.
      device(conf-if-eth-0/3)# switchport trunk allowed vlan add 100  
      
    5. Add VLAN 201 as a member VLAN.
      device(conf-if-eth-0/3)# switchport trunk allowed vlan add 201  
      
    6. Add VLAN 301 as a member VLAN.
      device(conf-if-eth-0/3)# switchport trunk allowed vlan add 301  
      
    7. Enable spanning tree on the interface.
      device(conf-if-eth-0/3)# no spanning-tree shutdown  
      
    8. Return to privileged EXEC mode.
      device(conf-if-eth-0/3)# exit 
      
  10. Set the switching characteristics for interface 0/4.
    1. Enter interface configuration mode.
      device(config-rpvst)# interface ethernet 0/4
      
    2. Set the switching characteristics of the interface.
      device(conf-if-eth-0/4)# switchport
      
    3. Set the interface mode to trunk.
      device(conf-if-eth-0/4)# switchport mode trunk
      
    4. Add VLAN 100 as a member VLAN.
      device(conf-if-eth-0/4)# switchport trunk allowed vlan add 100  
      
    5. Add VLAN 201 as a member VLAN.
      device(conf-if-eth-0/4)# switchport trunk allowed vlan add 201  
      
    6. Add VLAN 301 as a member VLAN.
      device(conf-if-eth-0/4)# switchport trunk allowed vlan add 301  
      
    7. Enable spanning tree on the interface.
      device(conf-if-eth-0/4)# no spanning-tree shutdown  
      
    8. Return to privileged EXEC mode.
      device(conf-if-eth-0/4)# exit  
      
  11. To interoperate with switches other than VDX switches in R-PVST+ mode, you must configure the interface that is connected to that switch.
    1. Enter interface configuration mode for the port that interoperates with a VDX switch.
      device(config)# interface ethernet 0/12
      
    2. Specify the MAC address for the device.
      device(conf-if-eth-0/12)# spanning-tree bpdu-mac 0100.0ccc.cccd
      
    3. Enable spanning tree on the interface.
      device(conf-if-eth-0/12)# no spanning-tree shutdown  
      
    4. Return to privileged EXEC mode.
      device(conf-if-eth-0/12)# end  
      
  12. Verify the configuration.
    device# show spanning-tree 
    
    VLAN 1
    
     Spanning-tree Mode: Rapid PVST Protocol
    
     Root Id: 0001.01e0.5200.0180 (self)
     Bridge Id: 0001.01e0.5200.0180
    
     Root Bridge Forward Delay: 15; Hello Time: 2; Max Age: 20; Max-hops: 20
     Configured Forward Delay: 20; Hello Time: 8; Max Age: 22; Max-hops: 20
     Tx-HoldCount 5
     Number of topology change(s): 0
    
     Bpdu-guard errdisable timeout: disabled
     Bpdu-guard errdisable timeout interval: 300 sec
    
     Port Et 0/3 enabled
        Ifindex: 201351168; Id: 8001; Role: Disabled; State: Disabled
        Designated Path Cost: 0
        Configured Path Cost: 20000000
        Designated Port Id: 0; Port Priority: 128
        Designated Bridge: 0000.0000.0000.0000
        Number of forward-transitions: 0
        Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP
        Portfast: off
        Configured Root guard: off; Operational Root guard: off
        Bpdu-guard: off
        Link-type: point-to-point
        Received BPDUs: 0; Sent BPDUs: 0
    
     Port Et 0/4 enabled
        Ifindex: 201359360; Id: 8002; Role: Disabled; State: Disabled
        Designated Path Cost: 0
        Configured Path Cost: 20000000
        Designated Port Id: 0; Port Priority: 128
        Designated Bridge: 0000.0000.0000.0000
        Number of forward-transitions: 0
        Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP
        Portfast: off
        Configured Root guard: off; Operational Root guard: off
        Bpdu-guard: off
        Link-type: point-to-point
        Received BPDUs: 0; Sent BPDUs: 0
    
    VLAN 100
    
     Spanning-tree Mode: Rapid PVST Protocol
    
     Root Id: 0064.01e0.5200.0180 (self)
     Bridge Id: 0064.01e0.5200.0180
    
     Root Bridge Forward Delay: 15; Hello Time: 2; Max Age: 20; Max-hops: 20
     Configured Forward Delay: 20; Hello Time: 8; Max Age: 22; Max-hops: 20
     Tx-HoldCount 5
     Number of topology change(s): 0
    
     Bpdu-guard errdisable timeout: disabled
     Bpdu-guard errdisable timeout interval: 300 sec
    
     Port Et 0/3 enabled
        Ifindex: 201351168; Id: 8001; Role: Disabled; State: Disabled
        Designated Path Cost: 0
        Configured Path Cost: 20000000
        Designated Port Id: 0; Port Priority: 128
        Designated Bridge: 0000.0000.0000.0000
        Number of forward-transitions: 0
        Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP
        Portfast: off
        Configured Root guard: off; Operational Root guard: off
        Bpdu-guard: off
        Link-type: point-to-point
        Received BPDUs: 0; Sent BPDUs: 0
    
     Port Et 0/4 enabled
        Ifindex: 201359360; Id: 8002; Role: Disabled; State: Disabled
        Designated Path Cost: 0
        Configured Path Cost: 20000000
        Designated Port Id: 0; Port Priority: 128
        Designated Bridge: 0000.0000.0000.0000
        Number of forward-transitions: 0
        Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP
        Portfast: off
        Configured Root guard: off; Operational Root guard: off
        Bpdu-guard: off
        Link-type: point-to-point
        Received BPDUs: 0; Sent BPDUs: 0
    
    VLAN 201
    
     Spanning-tree Mode: Rapid PVST Protocol
    
     Root Id: 30c9.01e0.5200.0180 (self)
     Bridge Id: 30c9.01e0.5200.0180
    
     Root Bridge Forward Delay: 15; Hello Time: 2; Max Age: 20; Max-hops: 20
     Configured Forward Delay: 20; Hello Time: 8; Max Age: 22; Max-hops: 20
     Tx-HoldCount 5
     Number of topology change(s): 0
    
     Bpdu-guard errdisable timeout: disabled
     Bpdu-guard errdisable timeout interval: 300 sec
    
     Port Et 0/3 enabled
        Ifindex: 201351168; Id: 8001; Role: Disabled; State: Disabled
        Designated Path Cost: 0
        Configured Path Cost: 20000000
        Designated Port Id: 0; Port Priority: 128
        Designated Bridge: 0000.0000.0000.0000
        Number of forward-transitions: 0
        Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP
        Portfast: off
        Configured Root guard: off; Operational Root guard: off
        Bpdu-guard: off
        Link-type: point-to-point
        Received BPDUs: 0; Sent BPDUs: 0
    
     Port Et 0/4 enabled
        Ifindex: 201359360; Id: 8002; Role: Disabled; State: Disabled
        Designated Path Cost: 0
        Configured Path Cost: 20000000
        Designated Port Id: 0; Port Priority: 128
        Designated Bridge: 0000.0000.0000.0000
        Number of forward-transitions: 0
        Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP
        Portfast: off
        Configured Root guard: off; Operational Root guard: off
        Bpdu-guard: off
        Link-type: point-to-point
        Received BPDUs: 0; Sent BPDUs: 0
    
    VLAN 301
    
     Spanning-tree Mode: Rapid PVST Protocol
    
     Root Id: 512d.01e0.5200.0180 (self)
     Bridge Id: 512d.01e0.5200.0180
    
     Root Bridge Forward Delay: 15; Hello Time: 2; Max Age: 20; Max-hops: 20
     Configured Forward Delay: 20; Hello Time: 8; Max Age: 22; Max-hops: 20
     Tx-HoldCount 5
     Number of topology change(s): 0
    
     Bpdu-guard errdisable timeout: disabled
     Bpdu-guard errdisable timeout interval: 300 sec
    
     Port Et 0/3 enabled
        Ifindex: 201351168; Id: 8001; Role: Disabled; State: Disabled
        Designated Path Cost: 0
        Configured Path Cost: 20000000
        Designated Port Id: 0; Port Priority: 128
        Designated Bridge: 0000.0000.0000.0000
        Number of forward-transitions: 0
        Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP
        Portfast: off
        Configured Root guard: off; Operational Root guard: off
        Bpdu-guard: off
        Link-type: point-to-point
        Received BPDUs: 0; Sent BPDUs: 0
    
     Port Et 0/4 enabled
        Ifindex: 201359360; Id: 8002; Role: Disabled; State: Disabled
        Designated Path Cost: 0
        Configured Path Cost: 20000000
        Designated Port Id: 0; Port Priority: 128
        Designated Bridge: 0000.0000.0000.0000
        Number of forward-transitions: 0
        Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP
        Portfast: off
        Configured Root guard: off; Operational Root guard: off
        Bpdu-guard: off
        Link-type: point-to-point
        Received BPDUs: 0; Sent BPDUs: 0
    

    Observe that the settings comply with the formula set out in the STP parameters section, as:

    (2 × (forward delay - 1)) ≥ maximum age ≥ (2 × (hello time + 1))

    or in this case: 28 ≥ 20 ≥ 6.

  13. Save the configuration.
    device# copy running-config startup-config
    

Enable R-PVST+ on a system configuration example

device# configure terminal
device(config)# protocol spanning-tree rpvst
device(config-rpvst)# bridge-priority 4096
device(config-rpvst)# forward-delay  20
device(config-rpvst)# hello-time 8
device(config-rpvst)# max-age 22
device(config-rpvst)# transmit-holdcount 5
device(config-rpvst)# vlan 100 priority 0
device(config-rpvst)# vlan 201 priority 12288
device(config-rpvst)# vlan 301 priority 20480
device(config-rpvst)# interface ethernet 0/3
device(conf-if-eth-0/3)# switchport
device(conf-if-eth-0/3)# switchport mode trunk
device(conf-if-eth-0/3)# switchport trunk allowed vlan add 100 
device(conf-if-eth-0/3)# switchport trunk allowed vlan add 201 
device(conf-if-eth-0/3)# switchport trunk allowed vlan add 301 
device(conf-if-eth-0/3)# no spanning-tree shutdown
device(conf-if-eth-0/3)# exit
device(config)# interface ethernet 0/4
device(conf-if-eth-0/4)# switchport
device(conf-if-eth-0/4)# switchport mode trunk
device(conf-if-eth-0/4)# switchport trunk allowed vlan add 100 
device(conf-if-eth-0/4)# switchport trunk allowed vlan add 201 
device(conf-if-eth-0/4)# switchport trunk allowed vlan add 301 
device(conf-if-eth-0/4)# no spanning-tree shutdown
device(conf-if-eth-0/4)# end
device# show spanning-tree 
device# copy running-config startup-config