MSTP

实现属于同一个vlan 的主机能够相互通信,并配置MSTP使得SW1成为vlan 1的主根,vlan 2的备份根;使得SW2成为vlan 1的备份根,vlan 2的主根
MSTP

实验前须知:
active region-configuration //该命令用来激活在MST域的配置,否则配置无法生效

SW1 的配置:
[Huawei]sys SW1
[SW1]vlan batch 2 to 3
[SW1]int e0/0/1
[SW1-Ethernet0/0/1]port link-type trunk
[SW1-Ethernet0/0/1]port trunk allow-pass vlan all
[SW1-Ethernet0/0/1]int e0/0/2
[SW1-Ethernet0/0/2]port link-type trunk
[SW1-Ethernet0/0/2]port trunk allow-pass vlan all
[SW1-Ethernet0/0/2]int e0/0/3
[SW1-Ethernet0/0/3]port link-type access
[SW1-Ethernet0/0/3]port default vlan 2
[SW1-Ethernet0/0/3]q
[SW1]stp region-configuration
[SW1-mst-region]region-name re1
[SW1-mst-region]revision-level 1 //配置修订级别为1,这一步暂时没弄明白干什么的
[SW1-mst-region]instance 1 vlan 2 //关联实例1和vlan 2
[SW1-mst-region]instance 2 vlan 3
[SW1-mst-region]q
[SW1]stp instance 1 root primary
[SW1]stp instance 2 root secondary
[SW1-mst-region]active region-configuration //这一步很重要

SW 2的配置:
[Huawei]sys SW2
[SW2]vlan batch 2 to 3
[SW2]int e0/0/1
[SW2-Ethernet0/0/1]port link-type trunk
[SW2-Ethernet0/0/1]port trunk allow-pass vlan all
[SW2-Ethernet0/0/1]int e0/0/2
[SW2-Ethernet0/0/2]port link-type trunk
[SW2-Ethernet0/0/2]port trunk allow-pass vlan all
[SW2-Ethernet0/0/2]int e0/0/3
[SW2-Ethernet0/0/3]port link-type access
[SW2-Ethernet0/0/3]port default vlan 3
[SW2-Ethernet0/0/3]q
[SW2]stp region-configuration
[SW2-mst-region]region-name re1
[SW2-mst-region]revision-level 1
[SW2-mst-region]instance 1 vlan 2 //关联实例1和vlan 2
[SW2-mst-region]instance 2 vlan 3
[SW2-mst-region]q
[SW2]stp instance 2 root primary
[SW2]stp instance 1 root secondary
[SW2-mst-region]active region-configuration //这一步很重要

SW 3的配置:
[Huawei]sys SW3
[SW3]vlan batch 2 to 3
[SW3]int e0/0/1
[SW3-Ethernet0/0/1]port link-type trunk
[SW3-Ethernet0/0/1]port trunk allow-pass vlan all
[SW3-Ethernet0/0/1]int e0/0/2
[SW3-Ethernet0/0/2]port trunk allow-pass vlan all
[SW3-Eth-Trunk0]int e0/0/3
[SW3-Ethernet0/0/3]port link-type access
[SW3-Ethernet0/0/3]port default vlan 2
[SW3-Ethernet0/0/3]int e0/0/4
[SW3-Ethernet0/0/4]port link-type access
[SW3-Ethernet0/0/4]port default vlan 3
[SW3-Ethernet0/0/4]q
[SW3]stp region
[SW3-mst-region]region-name re1
[SW3-mst-region]revision-level 1
[SW3-mst-region]instance 1 vlan 2
[SW3-mst-region]instance 2 vlan 3
[SW3-mst-region]active region-configuration //这一步很重要

测试:
PC 1 ping PC 3
MSTP

在SW 1的e0/0/1和SW 2的e 0/0/2没有icmp报文,在SW 1的e 0/0/2的抓包结果如下:MSTP

上一篇:网管思科二层交换机


下一篇:eNSP网络综合配置