Configuring basic RSTP parameters

Follow these steps to configure basic RSTP parameters.

Procedure

  1. Enter global configuration mode.
    device# configure terminal
    
  2. Enable RSTP.
    device(config)# protocol spanning-tree rstp
    
  3. Designate the root device.
    device(conf-rstp)# bridge-priority 28582
    
  4. Enable the error disable timeout timer value.
    device(conf-rstp)# error-disable-timeout enable
    
  5. Configure the error-disable-timeout interval value.
     
    device(conf-rstp)# error-disable-timeout interval 60
    
  6. Enable edge port on switch ports.
    1. Enter interface subtype configuration mode for the switchport.
      device(conf-rstp)# interface ethernet 0/10 
      
    2. Enable edge port.
      device(conf-if-eth-0/10)# spanning-tree edge-port
      
    3. Return to global configuration mode.
      device(conf-if-eth-0/10)# exit
      
    4. Repeat the above steps for all ports that connect to a workstation or PC.
  7. Specify port priorities.
    1. Enter interface subtype configuration mode.
      device(config)# interface ethernet 0/11
      
    2. Configure the port priority.
      device(conf-if-eth-0/11)# spanning-tree priority 1
      
    3. Return to global configuration mode.
      device(conf-if-eth-0/11)# exit
      
  8. Enable the guard root feature.
    1. Enter interface configuration mode.
      device(config)# interface ethernet 0/1
      
    2. Configure the port priority.
      device(conf-if-eth-0/1)# spanning-tree guard root
      
    3. Return to privileged EXEC mode.
      device(conf-if-eth-0/1)# exit
      
  9. Verify the configuration.
     
    device# show spanning-tree
    
    Spanning-tree Mode: Rapid Spanning Tree Protocol
    
    Root Id: 4096.01e0.5200.0180 (self)
    Bridge Id: 4096.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: disabled
    Bpdu-guard errdisable timeout interval: 300 sec
    switch# show spanning-tree brief
    Spanning-tree Mode: Rapid Spanning Tree Protocol
    Root ID Priority 4096
    Address 768e.f805.5800
    Hello Time 2, Max Age 20, Forward Delay 15
    Bridge ID Priority 4096
    Address 768e.f805.5800
    
    Interface   Role     Sts     Cost     Prio     Link-type     Edge
    ---------------------------------------------------------------------
    Eth 0/1     DES      FWD     2000     128      P2P           No
    Eth 0/10    DES      FWD     2000     128      P2P           No
    Eth 0/11    DES      FWD     2000     128      P2P           No
    

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

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

    or in this case: 28 ≥ 20 ≥ 6.

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

Basic RSTP configuration example

device# configure terminal
device(config)# protocol spanning-tree rstp
device(conf-rstp)# bridge-priority 28582
device(conf-rstp)# error-disable-timeout enable
device(conf-rstp)# error-disable-timeout interval 60
device(conf-rstp)# interface etherne 0/10 
device(conf-if-eth-0/10)# spanning-tree edge-port
device(conf-if-eth-0/10)# exit
device(config)# interface ethernet 0/11
device(conf-if-eth-0/11)# spanning-tree priority 1
device(conf-if-eth-0/11)# exit
device(config)# interface ethernet 0/1
device(conf-if-eth-0/1)# spanning-tree guard root
device(conf-if-eth-0/1)# exit
device# show spanning-tree
device# copy running-config startup-config