启动spanning-tree
Switch(config)#spanning-tree
修改交换机spanning-tree优先级
Switch(config)# spanning-tree priority 1000
Switch(config)#interface ethernet 2
端口优先级
Switch(config-if-ethernet2)# spanning-tree port-priority 100
端口成本
Switch(config)#interface ethernet 2
Switch(config-if-ethernet2)# spanning-tree cost 50
显示spanning-tree状态
Switch#show spanning-tree
显示交换机端口spanning-tree状态
Switch#show spanning-tree interface ethernet 1