交换网络中有vlan1 到20个vlan,要求使用MSTP技术实现vlan的负载分担。
SW2为实例1(vlan1-vlan10)的主根,SW3为备根
SW3为实例2(vlan11-vlan20)的主根,SW2为备根
步骤:
1、 完成每个交换机VLAN的创建
[SW1]vlan 1 to 20
[SW2]vlan 1 to 20
[SW3]vlan 1 to 20
2、 完成每个交换机trunk的设置
[SW1-Ethernet0/4/0]port link-type trun
[SW1-Ethernet0/4/0]port trunk permit vlan 1 to 20
[SW1-Ethernet0/4/1]port link-type trunk
[SW1-Ethernet0/4/1]port trunk permit vlan 1 to 20
[SW2-Ethernet0/4/0]port link-type trunk
[SW2-Ethernet0/4/0]port trunk permit vlan 1 to 20
[SW3-Ethernet0/4/1]port link-type trunk
[SW3-Ethernet0/4/1]port trunk permit vlan 1 to 20
[SW3-Ethernet0/4/2]port link-type trunk
[SW3-Ethernet0/4/2]port trunk permit vlan 1 to 20
3、 开启STP,设置模式为MSTP
[SW1]stp enable
[SW1]stp mode mstp
[SW2]stp mode mstp
[SW2]stp enable
SW3]stp enable
[SW3]stp mode mstp
4、 创建生成树实例,完成实例和VLAN映射
[SW3]stp region-configuration
[SW3-mst-region]region-name H3C
[SW3-mst-region]revision-level 0
[SW3-mst-region]instance 1 vlan 1 to 10
[SW3-mst-region]instance 2 vlan 11 to 20
[SW3-mst-region]active region-configuration
[SW1]stp region-configuration
[SW1-mst-region]region-name H3C
[SW1-mst-region]instance 1 vlan 1 to 10
[SW1-mst-region]instance 2 vlan 11 to 20
[SW1-mst-region]active region-configuration
[SW2]stp region-configuration
[SW2-mst-region]region-name H3C
[SW2-mst-region]revision-level 0
[SW2-mst-region]instance 1 vlan 1 to 10
[SW2-mst-region]instance 2 vlan 11 to 20
[SW2-mst-region]active region-configuration
5、 手工指定实例的根桥和备份根桥
[SW2]stp instance 1 root primary
[SW3]stp instance 1 root secondary
[SW3]stp instance 2 root primary
[SW2]stp instance 2 root secondary
6、 结果测试
查看instance 1的主根
查看instance 1的备份根
查看instance 2的主根
查看instance 2的备份根