Enabling MSTP on a VLAN

Procedure

  1. Enter configuration mode.
    device# configure terminal
    
  2. Enter the protocol command to enable MSTP configuration.
    device(config)# protocol spanning-tree mstp
    
  3. Map a VLAN to an MSTP instance.
    device(config-mstp)# instance 5 vlan 300
    
  4. Return to privileged EXEC mode.
    device(config-mstp)# end
    
  5. Verify the configuration.
    device# show spanning-tree mst
    
     Spanning-tree Mode: Multiple Spanning Tree Protocol
    
     CIST Root Id: 8000.609c.9f5d.4800 (self)
     CIST Bridge Id: 8000.609c.9f5d.4800
     CIST Reg Root Id: 8000.609c.9f5d.4800 (self)
    
     CIST Root 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;
     Tx-HoldCount: 6
     Number of topology change(s): 0
    
     Bpdu-guard errdisable timeout: disabled
     Bpdu-guard errdisable timeout interval: 300 sec
     Migrate Time: 3 sec
    
      Name           : NULL
      Revision Level : 0
      Digest         : 0xD5FF4C3F6C18E2F27AF3A8300297ABAA
    
      Instance        VLAN
      --------        ----
       0:             1
       5:             100
    

    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.

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

Enable spanning tree on a VLAN configuration example

device# configure terminal
device(config)# protocol spanning-tree mstp
device(config-mstp)# instance 5 vlan 300
device(config-mstp)# end
device# show spanning-tree mst
device# copy running-config startup-config