Understand,Configure and Verify MST on Cisco IOS Switches

This article discusses and demonstrates the configuration and verification of 802.1s MSTP on Cisco IOS switches. MSTP configuration is quite different from legacy PVST/Rapid-PVST in such that MSTP has its own configuration mode. In this mode, you assign VLANs to a spanning tree instance. All spanning-tree calculation related changes are applied to instances.

This article covers following topics.

  1. The need for MST
  2. Facts about MST
  3. MST configuration
  4. MST Root bridge election
  5. MST path selection with port-priority

Interoperatibility of MST with PVST/RPVST will be covered in a separate article.

To best describe, I am using the simple topology as shown in the above-mentioned diagram. I have two Cisco switches connected to each other using their Eth0/0 and Eth0/1 interfaces, running trunk links. Both switches also have VLAN 11 to 20 defined. Here is the initial configuration of both switches for this lab.

SW1 and SW2

interface range Ethernet0/0-1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 no shutdown
end
!
vlan 11-20
end
Multiple Spanning Tree (MST)
The need for MST

By default, Cisco Catalyst Switches run PVST+ or Rapid PVST+ (Per VLAN Spanning Tree). With PVST or RPVST, a switch runs a separate spanning-tree instance for each VLAN created, plus VLAN 1. This method assumes that each VLAN could be running on a differently shaped logical topology or different layer 2 forwarding path. However, in many networks, multiple VLANs follow the same logical topology with same layer 2 forwarding path, so multiple spanning-tree calculations for the same topologies can get redundant and in many situations, it can tax on CPU during the reconvergence events. MST lets you configure different spanning tree instances. Each instance can hold a group of VLANs and manages its own spanning tree calculation.

Facts about MST
  • MST is backward compatible with PVST and RPVST+.
  • Two switches only run MST with each other if they are in the same MST region.
  • An MST region is defined by switches having identical region names, revision numbers, and VLAN-to-instance assignments. If they differ by any single attribute, they are considered different MST regions and fall back to RPVST+.
  • MSTP does not generate per-instance BPDUs as RSTP did with per-VLAN BPDUs. Instead, it uses a single BPDU which has additional records to advertise STP data for all configured instances.
MST configuration

MST is designed in a way that you’ll have regional STP instances. A region is defined by the name given in MST configuration mode.

Also per each region you have a revision number. This is a locally significant number to signify a revision for the MST configuration. Note that the name, instance map and revision number MUST MATCH in order to build a converged MST topology.

With MST you’re able to utilize multiple core switches at a single location (region) by using different instances. For example; core switch 1 is the root bridge for all odd VLANs such as 1, 3, 5, 7 and so on. Core switch 2 is the root bridge for even VLANs such as 2,4,5,8,10 and so on.

Keep in mind when designing a core network for a particular region some VLAN’s may be more traffic intensive, so you may need to further load balance them out across multiple core switch instances in a given region.

Let’s configure the MST on both switches as follows.

  • Create an MST region named NetFixPro with a revision of 1.
  • Instance 10 should map VLANs 11 – 15.
  • Instance 20 should map VLANs 16 – 20.
  • All other VLANs should be part of Instance 0.
SWx(config)# spanning-tree mode mst

# The above command will enable MST globally.

SWx(config)# spanning-tree mst configuration

# The above command enters the MST configuration mode

SWx(config-mst)# revision 1

The above command sets the MST configuration revision to 1. The range is 1-65535.

Note: The MST revision number is not like the configuration revision number used with VTP. It does not increment when changes are made.

SWx(config-mst)# name NetFixPro

# The above command sets the name of the region to be "NetFixPro"

SWx(config-mst)# instance 10 vlan 11-15
SWx(config-mst)# instance 20 vlan 16-20
SWx(config-mst)# end

MST supports total 16 instances. Instance 0 is created automatically and it is the default instance number. That means by default, all VLANs that are not statically mapped to a given instance are assigned to instance 0.
Verify this configuration
SW1# show spanning-tree mst configuration
Name      [NetFixPro]
Revision  1     Instances configured 3

Instance  Vlans mapped
--------  ---------------------------------------------------------------------
0         1-10,21-4094
10        11-15
20        16-20
-------------------------------------------------------------------------------

NOTE that I have 3 intstances configured, even though I just configured instance 10 and 20. Also note, all undefined/unmapped VLANs are mapped to instance 0 by default.

SW1# show spanning-tree bridge
                                                   Hello  Max  Fwd
MST Instance                 Bridge ID              Time  Age  Dly  Protocol
---------------- --------------------------------- -----  ---  ---  --------
MST0             32768 (32768,   0) aabb.cc00.0100    2    20   15  mstp
MST10            32778 (32768,  10) aabb.cc00.0100    2    20   15  mstp
MST20            32788 (32768,  20) aabb.cc00.0100    2    20   15  mstp

Note: This command displays the BID of the local switch, and instead of assigning a BID to each VLAN, there is a BID for each instance, priority is incremented based on the instance number.

For Example,

For instance 0, 0 is added to the default priority of 32768
For instance 10, 10 is added to the default priority of 32768
For instance 20, 20 is added to the default priority of 32768

MST Root Bridge Election

Like CST and PVST, MST uses the lowest Bridge-ID (BID) in the network to elect the Root Bridge. The BID is made up of the priority value and the MAC address. The lower priority wins the election, and if there is a tie in priority the lowest MAC address is the tie breaker. In PVST, there is one root bridge election per VLAN, because there is one STP instance per VLAN, but in MST there is one election per user-defined instance.

Let’s verify the current root bridge.

SW1# show spanning-tree mst | i MST|Root
##### MST0 vlans mapped: 1-10,21-4094
Root this switch for the CIST
##### MST10 vlans mapped: 11-15
Root this switch for MST10
##### MST20 vlans mapped: 16-20
Root this switch for MST20
SW1#show spanning-tree root
                                        Root    Hello Max Fwd
MST Instance           Root ID          Cost    Time  Age Dly  Root Port
---------------- -------------------- --------- ----- --- ---  ------------
MST0             32768 aabb.cc00.0100         0    2   20  15
MST10            32778 aabb.cc00.0100         0    2   20  15
MST20            32788 aabb.cc00.0100         0    2   20  15

As noticed, SW1 is the root bridge for all instance.

NOTE: Root bridge does not have any root port for the instance it was elected as spanning-tree root.

Now let’s configure both switches so SW1 stays the STP Root Bridge for instance 10 and SW2 as the STP Root Bridge for instance 20.

SW1(config)#spanning-tree mst 10 priority 0
SW1(config)#spanning-tree mst 20 priority 4096

SW2(config)#spanning-tree mst 10 priority 4096
SW2(config)#spanning-tree mst 20 priority 0

 

SW2# show spanning-tree root
                                        Root    Hello Max Fwd
MST Instance           Root ID          Cost    Time  Age Dly  Root Port
---------------- -------------------- --------- ----- --- ---  ------------
MST0             32768 aabb.cc00.0100         0    2   20  15  Et0/0
MST10               10 aabb.cc00.0100   2000000    2   20  15  Et0/0
MST20               20 aabb.cc00.0200         0    2   20  15
SW1# show spanning-tree root
                                        Root    Hello Max Fwd
MST Instance           Root ID          Cost    Time  Age Dly  Root Port
---------------- -------------------- --------- ----- --- ---  ------------
MST0             32768 aabb.cc00.0100         0    2   20  15
MST10               10 aabb.cc00.0100         0    2   20  15
MST20               20 aabb.cc00.0200   2000000    2   20  15  Et0/0

As you can see from the output above, SW1 is the root bridge for MST 0 and MST 10. SW2 now is the root bridge for MST 20.

MST Path Selection with Port Priority

Like CST and PVST, MST uses the designated (upstream) port-priority as a tie breaker if the end-to-end cost is the same on multiple ports to the same upstream switch.

As noticed from the previous output of “show spanning-tree root” command, both switches are using Eth0/0 port as forwarding port. Here is another way to verify the same thing.

SW1# show spanning-tree mst 20

##### MST20   vlans mapped:   16-20
Bridge        address aabb.cc00.0100  priority      4116  (4096 sysid 20)
Root          address aabb.cc00.0200  priority      20    (0 sysid 20)
              port    Et0/0           cost          2000000   rem hops 19

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Et0/0            Root FWD 2000000   128.1    Shr
Et0/1            Altn BLK 2000000   128.2    Shr
SW2# show spanning-tree mst 10

##### MST10   vlans mapped:   11-15
Bridge        address aabb.cc00.0200  priority      4106  (4096 sysid 10)
Root          address aabb.cc00.0100  priority      10    (0 sysid 10)
              port    Et0/0           cost          2000000   rem hops 19

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Et0/0            Root FWD 2000000   128.1    Shr
Et0/1            Altn BLK 2000000   128.2    Shr

NOTE: Eth0/1 is in Blocking status and Eth0/0 is the only forwarding port on both switches. Eth0/1 is in Blocking status and Eth0/0 is the only forwarding port on both switches.

Now let’s alter the port priorities so that both switches uses Eth0/0 as the forwarding port for MST 10 and Eth0/1 as the forwarding port for MST 20.

SW1(config)# interface Ethernet0/0
SW1(config-if)# spanning-tree mst 10 port-priority 0

SW2(config)# interface Ethernet0/1
SW2(config-if)# spanning-tree mst 20 port-priority 0

 

SW1# show spanning-tree interface ethernet 0/0

Mst Instance        Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
MST0                Desg FWD 2000000   128.1    Shr
MST10               Desg FWD 2000000     0.1    Shr
MST20               Altn BLK 2000000   128.1    Shr
SW2# show spanning-tree interface ethernet 0/1

Mst Instance        Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
MST0                Altn BLK 2000000   128.2    Shr
MST10               Altn BLK 2000000   128.2    Shr
MST20               Desg FWD 2000000     0.2    Shr

I hope you enjoyed this article. Please feel free to leave any comment or feedback.