MSTP的配置拓扑
1.交换机端口配置
<Huawei>system-view
[Huawei]sysname SWA
[SWA]int g0/0/1
[SWA-GigabitEthernet0/0/1]port link-type trunk
[SWA-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SWA-GigabitEthernet0/0/1]int g0/0/2
[SWA-GigabitEthernet0/0/2]port link-type trunk
[SWA-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[SWA-GigabitEthernet0/0/2]dis this
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
return
<Huawei>system-view
[Huawei]sysname SWB
[SWB-GigabitEthernet0/0/1]
[SWB-GigabitEthernet0/0/1]port link-type trunk
[SWB-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SWB-GigabitEthernet0/0/1]int g0/0/2
[SWB-GigabitEthernet0/0/2]port link-type trunk
[SWB-GigabitEthernet0/0/2]port trunk allow-pass vlan all
<Huawei>system-view
[Huawei]sysname SWC
[SWC-GigabitEthernet0/0/1]int g0/0/1
[SWC-GigabitEthernet0/0/1]port link-type trunk
[SWC-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SWC-GigabitEthernet0/0/1]int g0/0/2
[SWC-GigabitEthernet0/0/2]port link-type trunk
[SWC-GigabitEthernet0/0/2]port trunk allow-pass vlan all
2.VLAN的配置
[SWA-GigabitEthernet0/0/2]q
[SWA]vlan batch 10 20
[SWB-GigabitEthernet0/0/2]q
[SWB]vlan batch 10 20
[SWC-GigabitEthernet0/0/2]q
[SWC]vlan batch 10 20
3.MST实例的相关配置
进入了MST域视图,并指定域使用的名称,同一个MST域中的交换机上面都要配置相同的域名,并使用instance 10 vlan 10,instance 20 vlan 20创建了实例和VLAN的映射关系,如果在配置时立即应用这些操作,容易引起拓扑震荡,所以要使用命令active region-configuration进行激活。
[SWA]stp region-configuration
[SWA-mst-region]region-name mst-region
[SWA-mst-region]instance 10 vlan 10
[SWA-mst-region]instance 20 vlan 20
[SWA-mst-region]active region-configuration
[SWB]stp region-configuration
[SWB-mst-region]region-name mst-region
[SWB-mst-region]instance 10 vlan 10
[SWB-mst-region]instance 20 vlan 20
[SWB-mst-region]active region-configuration
[SWC]stp region-configuration
[SWC-mst-region]region-name mst-region
[SWC-mst-region]instance 10 vlan 10
[SWC-mst-region]instance 20 vlan 20
[SWC-mst-region]active region-configuration
4.为每个实例指定根网桥
[SWA]stp instance 10 root secondary
[SWA]stp instance 20 root primary
[SWC]stp instance 10 root primary
[SWC]stp instance 20 root secondary
5.在SWA上查看MSTP区域
[SWA]stp region-configuration
[SWA-mst-region]check region-configuration
Admin configuration
Format selector :0
Region name :mst-region
Revision level :0
Instance VLANs Mapped
0 1 to 9, 11 to 19, 21 to 4094
10 10
20 20
check region-configuration 可以查看区域名称以及实例和VLAN的映射关系。
6.查看STP汇总信息
SWA
SWB
SWC
7.最后得到的拓扑图
VLAN 10
VLAN 20