今天测试MST配置:
测试设备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,14 //配置实例包括的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,14 的根桥,默认端口优先级为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,测试完成.