Spanning Tree Protocol

Configuring MST (802.1s)/RSTP (802.1w) on Catalyst Series Switches Running CatOS

Document ID: 19080

Updated: Nov 16, 2007



This document explains how to configure Multiple Spanning-Tree (MST) (802.1s) on the Catalyst 4000, 6000, and 6500 series switches running CatOS. CatOS Software Release 7.1 introduced this feature which allows a system administrator to use Multiple Spanning-Tree Instances (MSTIs) to group VLANs on a switch.

If you are running Integrated IOS, refer to the following document for configuration assistance:

Using this MST configuration, each instance runs independently of the others inside of the MST region. Instance 0, the Internal Spanning-Tree (IST), is reserved for interacting with other Spanning-Tree Protocols (STPs) and other MST regions. In order to maintain a loop-free topology, the spanning-tree states, such as forwarding and blocking for all boundary ports (the ports on the edge of the MST region), match the spanning-tree state from the IST.

The Catalyst 4000, 6000, and 6500 series switches support Rapid Per-VLAN Spanning-Tree + (RPVST+) since CatOS Software Release 7.5. MST (802.1s) uses a modified version of RSTP (802.1w). This modified version is incorporated inside of MST and provides a fast convergence time in case of a failure in the network.

Before You Begin


For more information on document conventions, see the Cisco Technical Tips Conventions.


There are no specific prerequisites for this document.

Components Used

The information in this document is based on the software and hardware versions below.

  • Cisco Catalyst 4000, 6000, and 6500 Series Switches

  • CatOS Software Release 7.1

The information presented in this document was created from devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If you are working in a live network, ensure that you understand the potential impact of any command before using it.

Configuring MST

This section provides the commands you will need in order to set up the basic configuration of MST on your Catalyst 4000, 6000, or 6500 series switch. For commands and explanations on tuning MST, follow the basic configuration section.

Basic Configuration

Follow these steps:

  1. Enable MST on the switch.

    Use the set spantree mode mst command to set the spanning tree mode on the switch to MST.

    Note: To disable MST, another STP, such as Per-VLAN Spanning-Tree + (PVST+), must be configured.

  2. Define the VLAN-to-instance mappings.

    Use the set spantree MST instance vlan vlans command to map VLANs to an instance. For example, you would enter the command set spantree MST 10 vlan 1-10,20 to put VLANs 1 to 10 and 20 into instance 10. By default, all VLANs are mapped to instance 0.

    Note: Mapping a VLAN to an instance does not take affect until the configuration is committed.

  3. Define the MST configuration name and revision.

    Use the set spantree MST configuration name name and the set spantree MST configuration revision revision number commands to set the configuration and the revision.

    Note: Instances 1 to 15 only operate within the MST region. On the boundary of the MST region, MST copies the port state from the IST, which communicates with the other STPs such as PVST+, Common Spanning-Tree (CST), and other MST regions to form a loop-free topology. MST-enabled switches only form an MST region if they have a matching VLAN-to-IST mapping, MST configuration name, and MST revision. If any of these three fails, the port will be flagged as a boundary port.

  4. Commit the MST configuration to apply it on the switch.

    Use the set spantree MST config commit command to commit the MST configuration.

    Note: If you find that you need to discard all edits made since the last commit, you can use the set spantree MST rollback command to undo all edits. If you need to clear changes to the MST configuration made by someone else using another session, use the set spantree MST rollback force command.

Tuning MST

Use the following commands to tune MST on your Catalyst switch.

Setting Priority Per MST Instance

Because every instance in MST runs independently of the other instances on the switch, every instance can have a different priority on the switch and possibly a different root in the MST region.

To set the priority of a spantree in an instance, use the set spantree priority priority MST instance command.

Setting Path Costs on a Specific Port

For every port, MST can use either the standard cost for the port or it can assign a different cost using the set spantree portinstancecost mod/port cost cost MST instance command. You can use this command to specify the alternative path cost for the link being used and to specify which instances will use this alternative path cost.

Setting Port Priority on a Specific Port

For every port, MST can use either the standard priority for the port or it can assign a different priority with the set spantree portinstancepriority mod/port priority MST instance command. You can use this command to specify an alternative priority for a port and to specify which instance will use the alternative priority.

Setting the Link Type on a Port

Using the set spantree MST link-type mod/port link-type command, you can configure the link type in any of the following three ways.

  • Auto - The switch will autodetect the link type for MST.

  • Point-to-point - The link is a point-to-point link to another device. For example, you could have a 10 Gigabit link to another Catalyst switch.

  • Shared - The link is a shared segment and can contain more than one device. An example of such a link would be a 10 Mb hub.

Verifying MST Operation

This section provides commands you can use to confirm your configuration is working properly. Examples of output from these commands are explained in the Troubleshooting section.

Certain show commands are supported by the Output Interpreter, which allows you to view an analysis of show command output.

  • show spantree MST instance active - Use this command to see the MST information on an instance. The addition of the keyword "active" shows only the active ports in the chosen instance.

  • Show spantree MST mod/port - This command shows you information on the spanning tree state for a specified port when running MST.

  • show spantree MST configuration - Use this command to see information about the MST configuration on the switch.

  • Show spantree summary MST - This command provides a quick overview of the MST operation.

  • Show spantree statistics MST mod/port instance - Use this command to see statistics and other information regarding MST operation on the chosen port.

Troubleshooting MST

The commands listed in the Verifying MST Operation section reveal valuable information about the status of MST on the switch. In this troubleshooting section, we highlight some of the important information in the output returned from those commands and explore its possible meaning.

  • Show spantree MST instance active

    Tank> (enable) show spantree MST 0 active 
    Spanning tree mode          MST 
    Instance                            0 
    VLANs Mapped:              2-4094
    !--- These are the VLANs mapped to this instance.
    Designated Root          00-03-6c-aa-14-01 
    !--- This is the root for the instance.
    Designated Root Priority    32768  (root priority: 32768, sys ID ext: 0) 
    Designated Root Cost        2000000 
    Designated Root Port        4/1
    !--- Indicates the root port.   
    Root Max Age   20 sec   Hello Time 2  sec   Forward Delay 15 sec 
    IST Master ID MAC ADDR      00-05-00-a9-f4-00
    !--- IST only. This indicates the master switch. 
    IST Master ID Priority      32768 
    IST Master Path Cost        0          Remaining Hops 20 
    Bridge ID MAC ADDR          00-05-00-a9-f4-00 
    Bridge ID Priority          32768  (bridge priority: 32768, sys ID ext: 0) 
    Bridge Max Age 20 sec   Hello Time 2  sec   Forward Delay 15 sec  Max Hops 20
    Port   State        Role   Cost      Prio  Type 
    ------ ----------   ----   --------  ----  -------------------- 
    4/1    forwarding   DESG   2000000   32    P2P, Boundary(STP) 
    4/2    forwarding   ROOT   2000000   32    Shared, Boundary(STP) 
    4/4    forwarding   DESG   2000000   32    Shared 
    4/11   forwarding   DESG   2000000   32    P2P 
    15/1   forwarding   DESG   20000     32    P2P, Edge 
    16/1   forwarding   DESG   20000     32    P2P, Edge 
    !--- State identifies the spanning-tree state of this port. 
    !--- Role indicates the role of this port. 
    !--- Cost displays the path cost for this port. 
    !--- Prio indicates this port's priority. 
    !--- Type displays what kind of segment is connected to this port. 
  • Show spantree MST mod/port

    The show spantree MST mod/port command gives an overview of the port and its configuration as well as all of the MST instances that are active on it.

    Console> (enable) show spantree MST 4/2 
    Edge Port:        No, (Configured) Default
    !--- The edge port in MST is enabled or disabled with the 
    !--- set spantree portfast mod/port enable/disable command.
    Link Type:     Shared, (Configured) Auto 
    Port Guard:    Default 
    Boundary:      Yes (STP) 
    Inst  State         Role   Cost      Prio  VLANs 
    ----  ------------- ----   --------  ----  ----------
      0   forwarding    ROOT   2000000   32    None 
      1   forwarding    BDRY   2000000   32    1

    If a port is incorrectly displayed as a boundary port, due to very recent changes in the network for instance, the command set spantree MST mod/port redetect-protocol can be used to force the switch to redetect the spanning tree protocol being used on this link by other devices.

  • Show spantree MST configuration

    Console> (enable) show spantree MST config 
    Current (NVRAM) MST Region Configuration:
    !--- MST configuration is currently applied on the switch. 
    Configuration Name: Test                               Revision: 123 
    !--- Configuration name and revision must match on all switches to form 
    !--- an MST region.
    Instance  VLANs
    --------  -------------------------------------------------------------- 
    IST       2-4094
    !--- IST is instance 0. It contains all the VLANs except VLAN 1.  
      1       1 
    !--- VLAN 1 is mapped into instance 1.
      2       - 
      3       -
    !--- No other VLANs are mapped to any other instance. 
      4       - 
      5       - 
      6       - 
      7       - 
      8       - 
      9       - 
     10       - 
     11       - 
     12       - 
     13       - 
     14       - 
     15       - 
    NEW MST Region Configuration (Not committed yet)
    !--- The MST configuration has not been applied yet.
    Configuration Name: Test                               Revision: 123
    !--- The revision does not increase automatically if changes are made. 
    Instance VLANs 
    -------- -------------------------------------------------------------- 
    IST      3-4094 
      1      1 
      2      - 
      3      - 
      4      - 
      5      - 
      6      - 
      7      - 
      8      - 
      9      - 
     10      - 
     11      - 
     12      - 
     13      - 
     14      - 
     15      2
     !--- VLAN 2 moved to instance 15.
    Edit buffer is locked by: Console (pid 142)
    !---  The console identified modifies the MST configuration.
  • Show spantree summary MST

    This command gives a quick overview of what MST is doing on the switch.

    Console> (enable) show spantree summary MST 
    MAC address reduction: disabled 
    Root switch for MST instances: 1. 
    Global loopguard is disabled on the switch. 
    Global portfast is disabled on the switch. 
    BPDU skewing detection disabled for the bridge. 
    BPDU skewed for MST instances:  none. 
    Portfast bpdu-guard disabled for bridge. 
    Portfast bpdu-filter disabled for bridge. 
    Summary of connected spanning tree ports by MST instances 
    Inst  Blocking Listening Learning Forwarding STP Active
    ----- -------- --------- -------- ---------- ---------- 
       0         0         0        0          5          5 
       1         0         0        0          5          5 
       2         0         0        0          0          0 
       3         0         0        0          0          0 
       4         0         0        0          0          0 
       5         0         0        0          0          0 
       6         0         0        0          0          0 
       7         0         0        0          0          0 
       8         0         0        0          0          0 
       9         0         0        0          0          0 
      10         0         0        0          0          0 
      11         0         0        0          0          0 
      12         0         0        0          0          0 
      13         0         0        0          0          0 
      14         0         0        0          0          0 
      15         0         0        0          0          0 
           Blocking Listening Learning Forwarding STP Active 
    ----- -------- --------- -------- ---------- ---------- 
    Total        0         0        0         10         10 
  • Show spantree statistics mod/port MST

    This command can be used to verify spanning tree activity on a specific port. Some of the information is highlighted below

    Console> (enable) show spantree statistics 4/2 MST 0 
    Port  4/2   Instance 0 
    SpanningTree enabled for instance = 0 
                    BPDU-related parameters 
    port spanning tree                   enabled 
    state                                forwarding 
    port_id                              0x80c2 
    port number                          0xc2 
    path cost                            2000000 
    message age (port/VLAN)              4(20) 
    designated_root                      00-50-0f-43-cc-00 
    designated_cost                      150 
    designated_bridge                    00-30-71-4e-20-07 
    designated_port                      0x8046 
    top_change_ack                       FALSE 
    config_pending                       FALSE 
    port_inconsistency                   none 
                    PORT based information & statistics 
    config bpdu's xmitted (port/inst)    2(26851)
    !--- Bridge Protocol Data Units (BPDUs) sent for this port and the total  
    !--- for all ports in the instance. 
    config bpdu's received (port/inst)   1429(5190) 
    !--- BPDUs received for this port and the total for all 
    !--- ports in the instance.
    tcn bpdu's xmitted (port/inst)       1(193)
    !--- Topology Change Notification: BPDUs sent on this port 
    !--- and for all ports in the instance. 
    tcn bpdu's received (port/inst)      0(61)
    !--- Topology Change Notification: BPDUs received on this 
    !--- port and for all ports in the instance. 
    forward trans count                  0 
    scp failure count                    0 
    root inc trans count (port/inst)     0(0) 
    inhibit loopguard                    FALSE 
    loop inc trans count (port/inst)     0(0) 
                    Status of Port Timers 
    forward delay timer                  INACTIVE 
    forward delay timer value            0 
    message age timer                    ACTIVE 
    message age timer value              4 
    topology change timer                INACTIVE 
    topology change timer value          0 
    hold timer                          INACTIVE 
    hold timer value                     0 
    delay root port timer                INACTIVE 
    delay root port timer value          0 
    delay root port timer restarted is   FALSE 
                    VLAN based information & statistics 
    spanningtree type                    ieee 
    spanningtree multicast address       01-80-c2-00-00-00 
    bridge priority                      32768 
    bridge mac address                   00-05-00-a9-f4-00 
    bridge hello time                    2 sec 
    bridge forward delay                 15(15) sec 
    topology change initiator:           1/0 
    !--- This indicates the instigator of the last topology change. 
    !--- 1/0 means this switch.
    last topology change occurred:        Fri Nov 16 2001, 04:14:01
    !--- This indicates the last change in topology. 
    topology change                      FALSE 
    topology change time                 35 
    topology change detected             FALSE 
    topology change count                107 
    !--- Indicates number of topology changes.
    topology change last recvd. from     00-30-71-4e-20-07 
                    Other port-specific info 
    dynamic max age transitions          0 
    port bpdu ok count                   0 
    msg age expiry count                 0 
    link loading                         0 
    bpdu in processing                   FALSE 
    num of similar bpdus to process      0 
    received_inferior_bpdu               FALSE 
    next state                           3 
    src Mac count:                       0 
    total src Mac count                  0 
    curr_src_mac                         00-00-00-00-00-00 
    next_src_mac                         00-00-00-00-00-00 
    channel_src_mac                      00-00-00-00-00-00 
    channel src count                    0 
    channel OK count                     0 

Related Information

Updated: Nov 16, 2007
Document ID: 19080