Follow these steps to enable and configure RSTP.
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.
device# configure terminal
device(config)# protocol spanning-tree rstp
device(conf-rstp)# bridge-priority 28582
You can shut down RSTP by entering the shutdown command when in RSTP configuration mode.
device(conf-rstp)# forward-delay 15
device(conf-rstp)# max-age 20
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 2
device(config-rstp)# transmit-holdcount 5
device(conf-rstp)# end
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.
device# copy running-config startup-config
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