MST (Multiple Spanning Tree,多生成树)将IEEE 802.1 w RST算法扩展到多个生成树。MST 的主要目的是降低与网络的物理拓扑相匹配的生成树实例的总数,进而可以降低交换机的CPU周期。PVST+为每个VLAN运行STP实例,并且没有考虑可能需要很多不同STP拓扑的物理拓扑;另 外一方面, MST使用最少数目的STP实例来匹配现有物理拓扑的数目O 
图子29举例说明了2条链路和100个VLANo 1000个VLAN映射到2个MST实例。每台交换机不 需要维护1000个生成树实例,而只需要维护2个生成树实例,从而降低了对交换机资源的要求。对 于图5-29所示拓扑的2个MST实例的概念,它能够扩展到4096个VLAN。与PVST+相比较, MST的 收敛速度更快,并且向后兼容802.1D STP" 802.1 w (RSTP)和Cisco PVST+等体系结构。 
配置实例:测试设备Cisco 3750G12S,3560G-48TS各一台.
 
New37(config)#spanning-tree mode mst     //启用MST,默认为PVST+
New37(config)#spanning-tree mst configuration      //进入MST配置模 式
New37(config-mst)#name test     //注意交换机之间的实例Name要相同,不然会出现各自说自己是根桥.
New37(config-mst)#instance 1 vlan 2,3
New37(config-mst)#instance 2 vlan 4,5   //配置实例包括的Vlan,关于Vlan,VTP,Trunk配置这里不提了.
New37(config-if-range)#spanning-tree mst 1 port-priority 96
New37(config-if-range)#spanning-tree mst 2 port-priority 160 //MST端口优先级,我们要让3750成为vlan 2,3的根桥,3560成vlan 4,5 的根桥,默认端口优先级为128,+/-16.
或者
New37(config)#spanning-tree mst 1 root primary
New37(config)#spanning-tree mst 2 root secondary
 
New35(config)#spanning-tree mst 2 root primary
New35(config)#spanning-tree mst 1 root secondary
 
结果如下:
New37#sh spanning-tree
MST0
  Spanning tree enabled protocol mstp
  Root ID    Priority    32768
             Address     0013.c342.f100
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
  Bridge ID  Priority    32768  (priority 32768 sys-id-ext 0)
             Address     0013.c342.f100
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi2/0/1             Desg FWD 20000     128.55   P2p 
Gi2/0/2             Desg FWD 20000     128.56   P2p
          
MST1
  Spanning tree enabled protocol mstp
  Root ID    Priority    24577
             Address     0013.c342.f100
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
  Bridge ID  Priority    24577  (priority 24576 sys-id-ext 1)
             Address     0013.c342.f100
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi2/0/1             Desg FWD 20000      96.55   P2p 
Gi2/0/2             Desg FWD 20000      96.56   P2p
          
MST2
  Spanning tree enabled protocol mstp
  Root ID    Priority    24578
             Address     0024.f935.7a00
             Cost        20000
             Port        55 (GigabitEthernet2/0/1)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
  Bridge ID  Priority    28674  (priority 28672 sys-id-ext 2)
             Address     0013.c342.f100
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi2/0/1             Root FWD 20000     160.55   P2p 
Gi2/0/2             Altn BLK 20000     160.56   P2p
 
默认3750优先级高,除已经配置的vlan外均以3750为根桥,MST2根桥为3560,测试完成.