这一篇主要讲MSTP的配置,至于PVST+以及RPVST+,配置都比较简单,这里就不介绍了
配置MSTP:
启用MST:Sw1(config)#spanning-tree mode mst
进入到mst配置模式:sw1(config)#spanning-tree mst configuration
设置mst的region name和revision号:
sw1(config-mst)#name ccie
sw1(config-mst)#revision 1
映射VLAN:
sw1(config-mst)#instance 1 vlan 10,20
sw1(config-mst)#instance 2 vlan 30,40
默认情况下,所有的VLAN都映射到instance 0.
注:其它交换机配置和SW1配置完全相同,必须region name和revision number完全相同,否则属于不同的region。
配置交换机作为实例的根交换机:
sw1(config)#spanning-tree mst 1 root primary
至于pathcost、port-priority等都要在接口模式下配置:
Switch1(config-if)#spanning-tree mst 1 ?
cost Change the interface spanning tree path cost for an instance
port-priority Change the spanning tree port priority for an instance
Switch1(config-if)#