Enabling and configuring RSTP globally

See the section STP parameters for parameters applicable to all STP variants.

You can enable RSTP or RSTP with one or more parameters enabled. The parameters can be enabled or changed individually by entering the commands in steps 1 and 2, running the parameter command, verifying the result, and then saving the configuration.

  1. Enter global configuration mode.
    device# configure terminal
    
  2. Enable RSTP.
    device(config)# protocol spanning-tree rstp
    
    You can shut down RSTP by entering the shutdown command.
  3. Designate the root device.
    device(conf-rstp)# bridge-priority 28582
    
    The range is 0 through 61440 and the priority values can be set only in increments of 4096.

    You can shut down RSTP by entering the shutdown command when in RSTP configuration mode.

  4. Configure the bridge forward delay value.
    device(conf-rstp)# forward-delay 15
    
  5. Configure the bridge maximum aging time value.
    device(conf-rstp)# max-age 20
    
  6. Enable the error disable timeout timer.
    1. Enable the timer.
      device(conf-rstp)# error-disable-timeout enable
      
    2. Configure the error disable timeout interval value.
      device(conf-rstp)# error-disable-timeout interval 60
      
  7. Configure the port-channel path cost.
    device(conf-rstp)# port-channel path-cost custom
    
  8. Configure the bridge hello-time value.
    device(conf-rstp)# hello-time 2
    
  9. Specify the transmit hold count.
    device(config-rstp)# transmit-holdcount 5
    
    This command configures the maximum number of BPDUs transmitted per second.
  10. Return to privileged exec mode.
    device(conf-rstp)# end
    
  11. Verify the configuration
    device# show spanning-tree
    
     Spanning-tree Mode: Rapid Spanning Tree Protocol
    
     Root Id: 8000.01e0.5200.0180 (self)
     Bridge Id: 8000.01e0.5200.0180
    
     Root Bridge Forward Delay: 15; Hello Time: 2; Max Age: 20; Max-hops: 20
     Configured Forward Delay: 15; Hello Time: 2; Max Age: 20; Max-hops: 20
     Number of topology change(s): 0
    
     Bpdu-guard errdisable timeout: enabled
     Bpdu-guard errdisable timeout interval: 60 sec
    

    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.

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

Enabling RSTP and configuring RSTP parameters example

device# configure terminal
device(config)# protocol spanning-tree rstp
device(conf-rstp)# bridge-priority 28582
device(conf-rstp)# forward-delay 20
device(conf-rstp)# max-age 25
device(conf-rstp)# error-disable-timeout enable
device(conf-rstp)# error-disable-timeout interval 60
device(conf-rstp)# port-channel path-cost custom
device(conf-rstp)# hello-time 5 forward-delay 16 max-age 21
device(conf-rstp)# transmit-holdcount 5
device(conf-rstp# end
device# show spanning-tree
device# copy running-config startup-config