MSTP的配置
SwitchC作为一台汇聚层的交换机,汇聚了VLAN10、VLAN20、VALN30、VALN40的流量,现在需要将VLAN的流量进行分流后送入冗余的核心层,已达到负载均衡和冗余链路的作用。
① 在SwitchC上需要创建vlan10、vlan20、vlan30、vlan40,并将e0/4/1和e0/4/2端口设为Trunk端口,配置如下:
[H3C]vlan 10
[H3C-vlan10]vlan 20
[H3C-vlan20]vlan 30
[H3C-vlan30]vlan 40
[H3C]inter Ethernet 0/4/1
[H3C-Ethernet0/4/1]port trunk permit vlan all
Please wait........................................... Done.
[H3C-Ethernet0/4/1]inter Ethernet 0/4/2
[H3C-Ethernet0/4/2]port trunk permit vlan all
Please wait........................................... Done.
[H3C-Ethernet0/4/2]quit
[H3C]stp region-configuration 进入MST域视图
[H3C-mst-region]region-name test 配置MST域的域名
[H3C-mst-region]instance 1 vlan 10 20 配置VLAN映射表即将vlan10vlan20加入实例1
[H3C-mst-region]instance 2 vlan 30 40 将vlan30、vlan40加入实例2
[H3C-mst-region]revision-level 0 配置MSTP的修订级别 (默认就是0)
[H3C-mst-region]active region-configuration 激活MST域配置
[H3C-mst-region]quit
[H3C]stp enable 全局使用生成树协议
② 在SwitchA上需要创建vlan10、vlan20、vlan30、vlan40,并将e0/4/1和e0/4/2端口设为Trunk端口,配置如下:
[H3C]vlan 10
[H3C-vlan10]vlan 20
[H3C-vlan20]vlan 30
[H3C-vlan30]vlan 40
[H3C]inter Ethernet 0/4/1
[H3C-Ethernet0/4/1]port trunk permit vlan all
Please wait........................................... Done.
[H3C-Ethernet0/4/1]inter Ethernet 0/4/2
[H3C-Ethernet0/4/2]port trunk permit vlan all
Please wait........................................... Done.
[H3C-Ethernet0/4/2]quit
[H3C]stp region-configuration
[H3C-mst-region]region-name test
[H3C-mst-region]instance 1 vlan 10 20
[H3C-mst-region]instance 2 vlan 30 40
[H3C-mst-region]revision-level 0
[H3C-mst-region]active region-configuration
[H3C-mst-region]quit
[H3C]stp instance 1 root primary 配置本设备为MSTl 1的跟桥
[H3C]stp enable
③ 在SwitchB上需要创建vlan10、vlan20、vlan30、vlan40,并将e0/4/1和e0/4/2端口设为Trunk端口,配置如下:
[H3C]vlan 10
[H3C-vlan10]vlan 20
[H3C-vlan20]vlan 30
[H3C-vlan30]vlan 40
[H3C]inter Ethernet 0/4/1
[H3C-Ethernet0/4/1]port trunk permit vlan all
Please wait........................................... Done.
[H3C-Ethernet0/4/1]inter Ethernet 0/4/2
[H3C-Ethernet0/4/2]port trunk permit vlan all
Please wait........................................... Done.
[H3C-Ethernet0/4/2]quit
[H3C]stp region-configuration
[H3C-mst-region]region-name test
[H3C-mst-region]instance 1 vlan 10 20
[H3C-mst-region]instance 2 vlan 30 40
[H3C-mst-region]revision-level 0
[H3C-mst-region]active region-configuration
[H3C-mst-region]quit
[H3C]stp instance 2 root primary 配置本设备为MSTl 2的跟桥
[H3C]stp enable
④ 检验配置效果,当网络拓扑稳定后,通过使用display stp brief命令可以查看各设备上生成树的简要信息。例如
查看SwitchA上的生成树信息
查看SwitchB上的生成树信息
查看SwitchC上的生成树信息