目录
1.配置 DeviceA、DeviceB、DeviceC 和 DeviceD 到域名为 RG1 的域内,创建实例 MSTI1 和实例MSTI2。
2 .在 MST 域 RG1 内,分别配置 MSTI1、MSTI2 的根桥和备份根桥。
3.配置同一网络内所有设备的端口路径开销应使用相同的计算方法;配置实例 MSTI1 和 MSTI2 中将要被阻塞端口的路径开销值大于缺省值。
4.设备全局启用 MSTP。 缺省情况下,设备上生成树协议处于使能状态,无需操作。在系统视图下执行命令 stp enable 可以启用 MSTP 功能。
6.配置保护功能,如在各实例的根桥设备的指定端口配置根保护功能。
一、拓扑图
instance可以理解为树。如上图示,那么instance 1,就可以理解为树1,树1包含了vlan 2到vlan 10。树2(instance 2)包含了vlan 11到vlan 20。
二、配置MSTP
一.组网需求
如图 1 所示,网络中 DeviceA、DeviceB、DeviceC 和 DeviceD 之间存在环路。 用户希望在网络中部署 MSTP,破除网络环路,从而避免广播风暴和 MAC 表振荡;并且实现 VLAN2~ VLAN10 和 VLAN11~VLAN20 的流量负载分担。
二.操作步骤
1.配置 DeviceA、DeviceB、DeviceC 和 DeviceD 到域名为 RG1 的域内,创建实例 MSTI1 和实例MSTI2。
当两台设备的 MST 域的域名、实例和 VLAN 的映射关系、MST 域的修订级别都相同时,这两台设备属于同一个 MST 域。
不能将同一个 VLAN 映射到多个不同的实例上。如果将一个已经和实例建立映射关系的 VLAN 又映射到另一个实例 上,原来的映射关系将被取消。
# 在 DeviceA 上配置 MST 域。MST域=Multiple Spanning Tree Region
<HUAWEI> system-view [HUAWEI] sysname DeviceA [DeviceA] stp region-configuration
[DeviceA-mst-region] region-name RG1
[DeviceA-mst-region] instance 1 vlan 2 to 10
[DeviceA-mst-region] instance 2 vlan 11 to 20
[DeviceA-mst-region] quit
# 在 DeviceB 上配置 MST 域。
<HUAWEI> system-view [HUAWEI] sysname DeviceB [DeviceB] stp region-configuration
[DeviceB-mst-region] region-name RG1
[DeviceB-mst-region] instance 1 vlan 2 to 10
[DeviceB-mst-region] instance 2 vlan 11 to 20
[DeviceB-mst-region] quit
# 在 DeviceC 上配置 MST 域。
<HUAWEI> system-view [HUAWEI] sysname DeviceC [DeviceC] stp region-configuration
[DeviceC-mst-region] region-name RG1
[DeviceC-mst-region] instance 1 vlan 2 to 10
[DeviceC-mst-region] instance 2 vlan 11 to 20
[DeviceC-mst-region] quit
# 在 DeviceD 上配置 MST 域。
<HUAWEI> system-view
[HUAWEI] sysname DeviceD
[DeviceD] stp region-configuration
[DeviceD-mst-region] region-name RG1
[DeviceD-mst-region] instance 1 vlan 2 to 10
[DeviceD-mst-region] instance 2 vlan 11 to 20
[DeviceD-mst-region] quit
2 .在 MST 域 RG1 内,分别配置 MSTI1、MSTI2 的根桥和备份根桥。
MSTI=Multiple Spanning Tree Instance
# 配置 DeviceA 为 MSTI1 的根桥。
[DeviceA] stp instance 1 root primary
# 配置 DeviceB 为 MSTI1 的备份根桥。
[DeviceB] stp instance 1 root secondary
# 配置 DeviceB 为 MSTI2 的根桥。
<