[S-switch-A]stp enable
[S-switch-B]stp enable
[S-switch-C]stp enable
[S-switch-D]stp enable
这样交换机根据自己的MAC地址大小,自动选取根桥。
1、查看stp的运行状态:
[S-switch-B]dis stp
2、直连终端的端口,禁用stp报文的发送
[S-switch-A]int g0/0/2
[S-switch-A-GigabitEthernet0/0/2]stp disable
3、stp 抓包分析
<S-switch-D>debugging stp packet all
<S-switch-D>terminal debugging
4、手工指定根桥
[S-switch-D]stp priority 4096
或者
[S-switch-D]stp root primary
5、指定备份根桥
[S-switch-B]stp root secondary
6、指定端口为根端口:
[S-switch-B]int e0/0/2
[S-switch-B-Ethernet0/0/2]stp port priority 64
或者
[S-switch-B]int e0/0/2
[S-switch-B-Ethernet0/0/2]stp cost 100 #修改端口的开销值