[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 #修改端口的開銷值