由于设备限制,本实验只在一台3550交换机上完成。主要目的是熟悉配置命令。
 
conf t
vlan 2
vlan 3
vlan 4
vlan 5
vlan 6
vlan 7
vlan 8
exit
spanning-tree mst config              进入spanning-tree-mst配置
name ccie                                      命名为CCIE
instance 1 vlan 2-4
instance 2 vlan 5-8                       这两个命令是定义两个实例,并将所配置的VLAN分配到实例中去。
revision 1                                     设置revision值,在所有运行name相同的MST的revision值必须相同。version取值范围是 0~65535
exit
spanning-tree mode mst              在交换机上启用MST
spanning-tree mst 1 root primary 设置此交换机为MST实例1的根交换机
spanning-tree mst 2 root secordary 设置此交换机为MST实例2的次根交换机
int f 0/19
spanning-tree mst 1 port-priority 32 设置此端口在MST实例1中的端口优先级,取值越低,优先级越高。优先级范围0~240,默认为128,在此设为32。注意,优先级是以16的倍数增长的,比如设置成为2,则交换机会报错
spanning-tree mst 1 cost 100        设置此端口在MST实例1中的cost值,范围1~200000000
exit
spanning-tree mst 1 priority 4096 设置此交换机在MST实例1中的优先级。取值越低,越有可能成为根交换机。优先级范围0~61440,默认为52768。注意,优先级必须是以4096的倍数向上增加。否则交换机会报错
spanning-tree hello-time 10      范围1~10,默认为2,单位second
spanning-tree forward-time 20 范围4~30,默认为15
spanning-tree max-age 30        范围6~40 ,默认为20
spanning-tree mst max-hop 10 配置BPDU在被丢弃前MST区域中所传输的跳数。范围1~255(在我所实验的3550上范围是1~20,可能是IOS版本的问题)
 
以下是校验
 
sw2#sh sp mst config
Name      [ccie]
Revision  2
Instance  Vlans mapped
--------  ---------------------------------------------------------------------
0         1,9-4094
1         2-4
2         5-8
-------------------------------------------------------------------------------
 
 
sw2#sh sp mst 1
###### MST01        vlans mapped:   2-4
Bridge      address 000a.4153.0f00  priority  24577 (24576 sysid 1)
Root        this switch for MST01
Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/19           Boun FWD 200000    128.19   P2p Bound(STP)
Fa0/20           Boun FWD 200000    128.20   P2p Bound(STP)
Fa0/21           Boun FWD 200000    128.21   P2p Bound(STP)
Fa0/22           Boun FWD 200000    128.22   P2p Bound(STP)
Fa0/23           Boun FWD 200000    128.23   P2p Bound(RSTP)
Fa0/24           Desg FWD 200000    128.24   P2p
 
 
sw2#sh sp mst 2
###### MST02        vlans mapped:   5-8
Bridge      address 000a.4153.0f00  priority  4098  (4096 sysid 2)
Root        this switch for MST02
Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/19           Boun FWD 200000    128.19   P2p Bound(STP)
Fa0/20           Boun FWD 200000    128.20   P2p Bound(STP)
Fa0/21           Boun FWD 200000    128.21   P2p Bound(STP)
Fa0/22           Boun FWD 200000    128.22   P2p Bound(STP)
Fa0/23           Boun FWD 200000    128.23   P2p Bound(RSTP)
Fa0/24           Desg FWD 200000    128.24   P2p

sw2#sh sp mst interface f0/19
FastEthernet0/19 of MST00 is designated forwarding
Edge port: no             (default)        port guard : none        (default)
Link type: point-to-point (auto)           bpdu filter: disable     (default)
Boundary : boundary       (STP)            bpdu guard : disable     (default)
Bpdus sent 143, received 7
Instance Role Sts Cost      Prio.Nbr Vlans mapped
-------- ---- --- --------- -------- -------------------------------
0        Desg FWD 200000    128.19   1,9-4094
1        Boun FWD 200000    128.19   2-4
2        Boun FWD 200000    128.19   5-8