#配置 MSTP 多进程下单接环和多接环接入

MSTP(Multiple Spanning Tree Protocol ,多生成树协议)将环路网络修剪成为一个无环的树型网络, 避免报文在环路网络中的增生和无限循环, 同时还提供了数据转发的多个冗余路径,在数据转发过程中实现 VLAN数据的负载均衡。
MSTP多进程实现不同的二层环完成不同的业务。
在二层单接环和二层双接环混合组网环境下, 交换设备同时承载二三层业务。 为了实现不同的环完成不同的业务,可在该组网上部署 MSTP多进程,实现不同环上的生成树协议进行独立计算,互不影响。
二层单接环和二层双接环混合组网环境下,交换设备 SwitchA 和 SwitchB
同时承载二三层业务。 在该组网下, 接入双接环的两台交换设备 SwitchA 和 SwitchB 下均存在单接环。
在 MSTP多进程的环中,建议端口阻塞不要配置在与根保护端口直连的链路上。
在这里插入图片描述
配置思路
采用如下的思路配置 MSTP多进程:
配置 MSTP基本功能,将设备加入到域,并创建实例,实现对流量的负载分担。
每个环只能配置一个域。
一个 CE设备只能加入一个环。
创建 MSTP多进程,实现对端口的分割管理,包括:
在设备上创建多进程并将端口加入到相应的进程。
配置共享链路。
配置其他功能,实现对设备或链路的保护,包括:
配置优先级和根保护。
配置共享链路保护功能。
配置设备的二层转发功能。
数据准备
为完成此配置例,需准备如下的数据:
MSTP的域名 RG1,实例 1、实例 2 和实例 3
VLAN编号 2~300
MSTP进程的 ID
配置 MSTP基本功能,将设备加入到域,并创建实例
在设备上配置域和实例
#在 SwitchA 上配置域和实例。
system-view
[Quidway] sysname SwitchA
[SwitchA] stp region-configuration
[SwitchA-mst-region] region-name RG1
[SwitchA-mst-region] instance 1 vlan 2 to 100
[SwitchA-mst-region] instance 2 vlan 101 to 200
[SwitchA-mst-region] instance 3 vlan 201 to 300
[SwitchA-mst-region] active region-configuration
[SwitchA-mst-region] quit
#在 SwitchB 上配置域和实例。
system-view
[Quidway] sysname SwitchB
[SwitchB] stp region-configuration
[SwitchB-mst-region] region-name RG1
[SwitchB-mst-region] instance 1 vlan 2 to 100
[SwitchB-mst-region] instance 2 vlan 101 to 200
[SwitchB-mst-region] instance 3 vlan 201 to 300
[SwitchB-mst-region] active region-configuration
[SwitchB-mst-region] quit
启动 MSTP
#配置 SwitchA 。
[SwitchA] stp enable
#配置 SwitchB 。
[SwitchB] stp enable
创建 MSTP多进程
在设备上创建多进程并将端口加入到相应的进程
#在 SwitchA 上创建进程 1 和进程 2。
[SwitchA] stp process 1
[SwitchA-mst-process-1] quit
[SwitchA] stp process 2
[SwitchA-mst-process-2] quit
在 SwitchB 上创建进程 2 和进程 3。
[SwitchB] stp process 2
[SwitchB-mst-process-2] quit
[SwitchB] stp process 3
[SwitchB-mst-process-3] quit
将 SwitchA 的端口 GE0/0/3 和 GE0/0/4 加入到进程 1,端口 GE0/0/2 加入到
进程 2。
[SwitchA] interface gigabitethernet 0/0/4
[SwitchA-GigabitEthernet0/0/4] stp enable
[SwitchA-GigabitEthernet0/0/4] bpdu enable
[SwitchA-GigabitEthernet0/0/4] stp binding process 1
[SwitchA-GigabitEthernet0/0/4] quit
[SwitchA] interface gigabitethernet 0/0/3
[SwitchA-GigabitEthernet0/0/3] stp enable
[SwitchA-GigabitEthernet0/0/3] bpdu enable
[SwitchA-GigabitEthernet0/0/3] stp binding process 1
[SwitchA-GigabitEthernet0/0/3] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] stp enable
[SwitchA-GigabitEthernet0/0/2] bpdu enable
[SwitchA-GigabitEthernet0/0/2] stp binding process 2
[SwitchA-GigabitEthernet0/0/2] quit
将 SwitchB 的端口 GE0/0/3 和 GE0/0/4 加入到进程 3,端口 GE0/0/2 加入
到进程 2。
[SwitchB] interface gigabitethernet 0/0/4
[SwitchB-GigabitEthernet0/0/4] stp enable
[SwitchB-GigabitEthernet0/0/4] bpdu enable
[SwitchB-GigabitEthernet0/0/4] stp binding process 3
[SwitchB-GigabitEthernet0/0/4] quit
[SwitchB] interface gigabitethernet 0/0/3
[SwitchB-GigabitEthernet0/0/3] stp enable
[SwitchB-GigabitEthernet0/0/3] bpdu enable
[SwitchB-GigabitEthernet0/0/3] stp binding process 3
[SwitchB-GigabitEthernet0/0/3] quit
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] stp enable
[SwitchB-GigabitEthernet0/0/2] bpdu enable
[SwitchB-GigabitEthernet0/0/2] stp binding process 2
[SwitchB-GigabitEthernet0/0/2] quit
配置共享链路
#配置 SwitchA 。
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] stp enable
[SwitchA-GigabitEthernet0/0/1] bpdu enable
[SwitchA-GigabitEthernet0/0/1] stp binding process 2 link-share
[SwitchA-GigabitEthernet0/0/1] quit
#配置 SwitchB 。
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] stp enable
[SwitchB-GigabitEthernet0/0/1] bpdu enable
[SwitchB-GigabitEthernet0/0/1] stp binding process 2 link-share
[SwitchB-GigabitEthernet0/0/1] quit
配置 SwitchA 。
[SwitchA] stp process 1
[SwitchA-mst-process-1] stp enable
[SwitchA-mst-process-1] quit
[SwitchA] stp process 2
[SwitchA-mst-process-2] stp enable
[SwitchA-mst-process-2] quit
#配置 SwitchB 。
[SwitchB] stp process 3
[SwitchB-mst-process-3] stp enable
[SwitchB-mst-process-3] quit
[SwitchB] stp process 2
[SwitchB-mst-process-2] stp enable
[SwitchB-mst-process-2] quit
配置其他功能
配置优先级和根保护
#配置 SwitchA 。
[SwitchA] stp process 1
[SwitchA-mst-process-1] stp instance 0 root primary
[SwitchA-mst-process-1] stp instance 1 root primary
[SwitchA-mst-process-1] quit
[SwitchA] stp process 2
[SwitchA-mst-process-2] stp instance 0 root primary
[SwitchA-mst-process-2] stp instance 2 root primary
[SwitchA-mst-process-2] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] stp root-protection
[SwitchA-GigabitEthernet0/0/2] quit
配置 SwitchB 。
[SwitchB] stp process 3
[SwitchB-mst-process-3] stp instance 0 root primary
[SwitchB-mst-process-3] stp instance 3 root primary
[SwitchB-mst-process-3] quit
[SwitchB] stp process 2
[SwitchB-mst-process-2] stp instance 0 root secondary
[SwitchB-mst-process-2] stp instance 2 root secondary
[SwitchB-mst-process-2] quit
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] stp root-protection
[SwitchB-GigabitEthernet0/0/2] quit
每个环中都要确保下游 CE设备的 MSTP优先级低于交换设备。
在双接环接入时,建议 SwitchA 和 SwitchB 分别作为不同实例的
主备根。
配置 MSTP多进程的共享链路保护功能
配置 SwitchA 。
[SwitchA] stp process 2
[SwitchA-mst-process-2] stp link-share-protection
[SwitchA-mst-process-2] quit
#配置 SwitchB 。
[SwitchB] stp process 2
[SwitchB-mst-process-2] stp link-share-protection
[SwitchB-mst-process-2] quit
创建 VLAN,并将接口加入到 VLAN中
#在 SwitchA 上创建 VLAN2~VLAN200,并将端口 GE0/0/3 和端口 GE0/0/4 加入到VLAN2~ 100 中,将端口 GE0/0/1 和端口 GE0/0/2 加入到 VLAN101~200 中。
[SwitchA] vlan batch 2 to 200
[SwitchA] interface gigabitethernet 0/0/3
[SwitchA-GigabitEthernet0/0/3] port link-type trunk
[SwitchA-GigabitEthernet0/0/3] port trunk allow-pass vlan 2 to 100
[SwitchA-GigabitEthernet0/0/3] quit
[SwitchA] interface gigabitethernet 0/0/4
[SwitchA-GigabitEthernet0/0/4] port link-type trunk
[SwitchA-GigabitEthernet0/0/4] port trunk allow-pass vlan 2 to 100
[SwitchA-GigabitEthernet0/0/4] quit
[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] port link-type trunk
[SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 101 to 200
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] port link-type trunk
[SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 101 to 200
[SwitchA-GigabitEthernet0/0/2] quit
在 SwitchB 上创建 VLAN101~VLAN300,并将端口 GE0/0/3 和端口 GE0/0/4 加入
到 VLAN201~VLAN300中,将端口 GE0/0/1 和端口 GE0/0/2 加入到 VLAN101~200
中。
[SwitchB] vlan batch 101 to 300
[SwitchB] interface gigabitethernet 0/0/3
[SwitchB-GigabitEthernet0/0/3] port link-type trunk
[SwitchB-GigabitEthernet0/0/3] port trunk allow-pass vlan 201 to 300
[SwitchB-GigabitEthernet0/0/3] quit
[SwitchB] interface gigabitethernet 0/0/4
[SwitchB-GigabitEthernet0/0/4] port link-type trunk
[SwitchB-GigabitEthernet0/0/4] port trunk allow-pass vlan 201 to 300
[SwitchB-GigabitEthernet0/0/4] quit
[SwitchB] interface gigabitethernet 0/0/1
[SwitchB-GigabitEthernet0/0/1] port link-type trunk
[SwitchB-GigabitEthernet0/0/1] port trunk allow-pass vlan 101 to 200
[SwitchB-GigabitEthernet0/0/1] quit
[SwitchB] interface gigabitethernet 0/0/2
[SwitchB-GigabitEthernet0/0/2] port link-type trunk
[SwitchB-GigabitEthernet0/0/2] port trunk allow-pass vlan 101 to 200
[SwitchB-GigabitEthernet0/0/2] quit
检查配置结果
在 SwitchA 上执行 display stp interface brief 命令
端口 GE0/0/4 在 MSTP进程 1 的 CIST 和实例 1 中为指定端口。
端口 GE0/0/2 在 MSTP进程 2 的 CIST 和实例 2 中为指定端口。
在 SwitchB 上执行 display stp interface brief 命令.
#端口 GE0/0/4 在 MSTP进程 3 的 CIST 和实例 3 中为指定端口。
端口 GE0/0/2 在 MSTP进程 2 的 CIST 和实例 2 中为指定端口。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
MSTP(Multiple Spanning Tree Protocol)是一个用于在多个VLAN之间共享单个STP(Spanning Tree Protocol)实例的协议。MSTP可以有效地减少网络中的冗余链路,从而提高网络性能和可靠性。 MSTP支持多个区域,并且每个区域可以有不同的STP实例。这种灵活性使得MSTP适用于大型网络,因为它允许网络管理员对网络进行分段管理,而不必担心不同区域之间的冲突。 下面是一个基本的MSTP多区域配置示例: ``` spanning-tree mode mst spanning-tree mst configuration name region1 revision 1 instance 1 vlan 10-20 instance 2 vlan 30-40 ! spanning-tree mst configuration name region2 revision 1 instance 1 vlan 50-60 instance 2 vlan 70-80 ! interface GigabitEthernet1/0/1 switchport mode trunk switchport trunk allowed vlan 10-20 spanning-tree mst 1 cost 10 ! interface GigabitEthernet1/0/2 switchport mode trunk switchport trunk allowed vlan 30-40 spanning-tree mst 2 cost 100 ! interface GigabitEthernet1/0/3 switchport mode trunk switchport trunk allowed vlan 50-60 spanning-tree mst 1 cost 20 ! interface GigabitEthernet1/0/4 switchport mode trunk switchport trunk allowed vlan 70-80 spanning-tree mst 2 cost 200 ``` 上述示例中,我们定义了两个MSTP区域:region1和region2。每个区域都有不同的STP实例,每个实例由一组VLAN组成。然后,我们将每个接口与相应的MSTP实例关联,并为每个接口指定一个STP成本。 这样就可以在MSTP中实现多个区域,并且每个区域都可以有不同的STP实例。这使得网络管理员可以更好地管理大型网络,并有效地减少冗余链路。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值