MSTP:一个VLAN一颗生成树,实现链路的负载均衡。

MSTP的命令:

stp mode mstp
stp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10
instance 2 vlan 20
active region-configuration
stp instance 1 root primary
stp instance 2 root secondary(根据具体情况而定)

拓扑图:

华为网络实验(4)------MSTP

SW1配置文件:

#
sysname sw1
#
vlan batch 10 20

#
interface Ethernet0/0/1
 port hybrid pvid vlan 10
 port hybrid untagged vlan 10 20
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/1
 port hybrid pvid vlan 10
 port hybrid untagged vlan 10 20

 

SW2配置文件:

#
sysname sw2
#
vlan batch 10 20

#
interface Ethernet0/0/1
 port hybrid pvid vlan 20
 port hybrid untagged vlan 10 20
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/1
 port hybrid pvid vlan 20
 port hybrid untagged vlan 10 20

 

SW3配置文件:

#
sysname sw3
#
vlan batch 10 20

interface Ethernet0/0/1
 port hybrid pvid vlan 10
 port hybrid untagged vlan 10 20
#
interface Ethernet0/0/2
 port hybrid pvid vlan 20
 port hybrid untagged vlan 10 20
#
interface GigabitEthernet0/0/1
 port hybrid pvid vlan 10
 port hybrid untagged vlan 10 20

#

interface GigabitEthernet0/0/2
port hybrid pvid vlan 20
 port hybrid untagged vlan 10 20

 

输入display stp brief查看各端口的状态

SW1

华为网络实验(4)------MSTP

SW2

华为网络实验(4)------MSTP

SW3

华为网络实验(4)------MSTP

根据上图可知,SW3的g0/0/1口为AP口,处于blocking状态。

配置MSTP

SW1

stp mode mstp
stp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10
instance 2 vlan 20
active region-configuration
stp instance 1 root primary
stp instance 2 root secondary
 

SW2

stp mode mstp
stp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10
instance 2 vlan 20
active region-configuration
stp instance 2 root primary
stp instance 1 root secondary

 

SW3

stp mode mstp
stp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10
instance 2 vlan 20
active region-configuration

配置完之后查看端口状态:

SW1:

华为网络实验(4)------MSTP

SW2:

华为网络实验(4)------MSTP

SW3:

华为网络实验(4)------MSTP

可以看到,SW3的AP口自动进行了转换,不会影响数据的传输。

相关文章:

  • 2021-06-07
  • 2021-04-27
  • 2021-05-17
  • 2022-12-23
  • 2021-05-26
  • 2022-01-08
  • 2021-10-09
猜你喜欢
  • 2021-07-07
  • 2021-09-03
  • 2021-09-07
  • 2021-12-12
  • 2021-05-06
  • 2022-12-23
  • 2021-11-08
相关资源
相似解决方案