需求
1、确定谁是根桥和非根桥(先猜);
2、确定端口角色(先猜);
3、确定端口状态(先猜);
4、最后在每台交换机上,通过命令dis stp b进行验证上面的需求;
5、交换机SW5上,使用e0/0/1连接PC1,使用命令dis stp b验证连接PC1的端口状态(体验不使用stp edge port enable的慢);
6、交换机SW3上,使用e0/0/1连接PC2,使用命令dis stp b验证连接PC1的端口状态(体验使用stp edge port enable的块);
7、交换机SW2上,先关掉生成树,然后启用边缘端口,使用e0/0/1连接黑客交换机,然后设置BPDU保护,开启生成树,然后验证端口是否会被关闭;
8、交换机SW1上,连接一个优先级比较高的hacker交换机,看根桥SW1是否会变化。
9、生成树的可控性,手动指定谁是根桥,谁是备根桥;
10、连通性测试;
网络拓扑图
配置
交换机SW1的配置:
sysname sw1
stp mode rstp
interface Ethernet0/0/1
stp root-protection
交换机SW2的配置:
sysname sw2
stp mode rstp
stp bpdu-protection
interface Ethernet0/0/1
shutdown
stp edged-port enable
交换机SW3的配置:
sysname sw3
stp mode rstp
interface Ethernet0/0/1
stp edged-port enable
交换机SW5的配置:
sysname sw5
stp mode rstp
交换机HACKER的配置:
sysname Huawei
stp mode rstp
stp priority 4096
注释(手动指定谁是根桥,可以指定交换机SW2为根桥stp root primary,谁是备根桥,可以指定交换机SW3为备根桥stp root secondary)
调试方法
调试方法:
1、首先确定交换机的BID;
SW1: 32768.4c1f-cc29-4d85
SW2:32768.4c1f-ccee-2fb5
SW3:32768.4c1f-ccea-1a6d
SW5:32768.4c1f-cc56-6226
HACKER: 32768.4c1f-cc47-2564