STP的基本配置
按照图所示拓扑结构,将S1配置成vlan1的主根,将S2配置成vlan2的次根
步骤
1,在Switch1中配置
Switch(config)#spanning-tree vlan 1 priority 24576
或
Switch(config)#spanning-tree vlan 1 root primary
2,在Switch2中配置
Switch(config)#spanning-tree vlan 1 priority 28672
或
Switch(config)#spanning-tree vlan 1 root secondary
配置阻塞端口
按照图拓扑结构所示,通过配置生成树协议,按照拓扑需求阻塞相应端口
步骤
1,在Switch3中配置
Switch(config)#spanning-tree vlan 1 root primary
2,在Switch1中配置
Switch(config)#spanning-tree vlan 1 root secondary
STP配置
通过配置PVST+实现MS1负责转发VLAN1的数据,MS2负责转发VLAN2的数据
按照图所示拓扑结构,配置MS1为vlan1的主根,vlan2的次根,配置SM2位vlan1的次根,vlan2的主根