配置ERPS单环多实例示例
以ERPS单环多实例组网为例,重点介绍如何配置ERPS功能,帮助您配置ERPS基本功能。
组网需求
以太网交换网络中为了进行链路备份,提高网络可靠性,通常会使用冗余链路。但是使用冗余链路会在交换网络上产生环路,导致广播风暴以及MAC地址表不稳定等故障现象,从而导致用户通信质量较差,甚至通信中断。
为了解决使用冗余链路引起的环路问题,可以在组成环网的设备上部署ERPS协议,ERPS协议是ITU-T定义的一种二层破环协议标准,且收敛速度快,可以满足收敛速度达到电信级可靠性要求。
如图12-17所示,以部署多实例的ERPS环为例,SwitchA~SwitchD组成环形组网,位于汇聚层,汇聚环完成业务的二层汇聚外,同时接入上级三层网络进行业务处理。汇聚环运行ERPS协议,提供汇聚环的二层冗余保护倒换功能。在SwitchA~SwitchD上配置两个ERPS实例ERPS环1和ERPS环2,ERPS环1阻塞SwitchB的P1端口,ERPS环2阻塞SwitchA的P2端口,实现负载分担并提供链路备份。
配置思路
采用如下的思路配置ERPS环:
配置加入ERPS环的所有端口类型为Trunk型。
创建ERPS环,并配置控制VLAN和保护实例。
将二层端口加入ERPS环并配置端口角色。
配置ERPS环的Guard Timer和WTR Timer定时器。
配置SwitchA~SwitchD二层转发功能。
操作步骤
- 配置加入ERPS环的所有端口类型为Trunk型。
# 配置SwitchA。
<HUAWEI> system-view [~HUAWEI] sysname SwitchA [*HUAWEI] commit [~SwitchA] interface 10ge 1/0/1 [~SwitchA-10GE1/0/1] port link-type trunk [*SwitchA-10GE1/0/1] commit [~SwitchA-10GE1/0/1] quit [~SwitchA] interface 10ge 1/0/2 [~SwitchA-10GE1/0/2] port link-type trunk [*SwitchA-10GE1/0/2] commit [~SwitchA-10GE1/0/2] quit
# 配置SwitchB。
<HUAWEI> system-view [~HUAWEI] sysname SwitchB [*HUAWEI] commit [~SwitchB] interface 10ge 1/0/1 [~SwitchB-10GE1/0/1] port link-type trunk [*SwitchB-10GE1/0/1] commit [~SwitchB-10GE1/0/1] quit [~SwitchB] interface 10ge 1/0/2 [~SwitchB-10GE1/0/2] port link-type trunk [*SwitchB-10GE1/0/2] commit [~SwitchB-10GE1/0/2] quit
# 配置SwitchC。
<HUAWEI> system-view [~HUAWEI] sysname SwitchC [*HUAWEI] commit [~SwitchC] interface 10ge 1/0/1 [~SwitchC-10GE1/0/1] port link-type trunk [*SwitchC-10GE1/0/1] commit [~SwitchC-10GE1/0/1] quit [~SwitchC] interface 10ge 1/0/2 [~SwitchC-10GE1/0/2] port link-type trunk [*SwitchC-10GE1/0/2] commit [~SwitchC-10GE1/0/2] quit
# 配置SwitchD。
<HUAWEI> system-view [~HUAWEI] sysname SwitchD [*HUAWEI] commit [~SwitchD] interface 10ge 1/0/1 [~SwitchD-10GE1/0/1] port link-type trunk [*SwitchD-10GE1/0/1] commit [~SwitchD-10GE1/0/1] quit [~SwitchD] interface 10ge 1/0/2 [~SwitchD-10GE1/0/2] port link-type trunk [*SwitchD-10GE1/0/2] commit [~SwitchD-10GE1/0/2] quit
- 创建ERPS环1、ERPS环2并配置两个ERPS环的保护实例,配置ERPS环1的控制VLAN ID为10,ERPS环2的控制VLAN ID为20,ERPS环1传递VLAN100~VLAN200的数据报文,ERPS环2传递VLAN300~VLAN400的数据报文。
# 配置SwitchA。
[~SwitchA] erps ring 1 [*SwitchA-erps-ring1] control-vlan 10 [*SwitchA-erps-ring1] protected-instance 1 [*SwitchA-erps-ring1] commit [~SwitchA-erps-ring1] quit [~SwitchA] stp region-configuration [~SwitchA-mst-region] instance 1 vlan 10 100 to 200 [*SwitchA-mst-region] commit [~SwitchA-mst-region] quit [~SwitchA] erps ring 2 [*SwitchA-erps-ring2] control-vlan 20 [*SwitchA-erps-ring2] protected-instance 2 [*SwitchA-erps-ring2] commit [~SwitchA-erps-ring2] quit [~SwitchA] stp region-configuration [~SwitchA-mst-region] instance 2 vlan 20 300 to 400 [*SwitchA-mst-region] commit [~SwitchA-mst-region] quit
# 配置SwitchB。
[~SwitchB] erps ring 1 [*SwitchB-erps-ring1] control-vlan 10 [*SwitchB-erps-ring1] protected-instance 1 [*SwitchB-erps-ring1] commit [~SwitchB-erps-ring1] quit [~SwitchB] stp region-configuration [~SwitchB-mst-region] instance 1 vlan 10 100 to 200 [*SwitchB-mst-region] commit [~SwitchB-mst-region] quit [~SwitchB] erps ring 2 [*SwitchB-erps-ring2] control-vlan 20 [*SwitchB-erps-ring2] protected-instance 2 [*SwitchB-erps-ring2] commit [~SwitchB-erps-ring2] quit [~SwitchB] stp region-configuration [~SwitchB-mst-region] instance 2 vlan 20 300 to 400 [*SwitchB-mst-region] commit [~SwitchB-mst-region] quit
# 配置SwitchC。
[~SwitchC] erps ring 1 [*SwitchC-erps-ring1] control-vlan 10 [*SwitchC-erps-ring1] protected-instance 1 [*SwitchC-erps-ring1] commit [~SwitchC-erps-ring1] quit [~SwitchC] stp region-configuration [~SwitchC-mst-region] instance 1 vlan 10 100 to 200 [*SwitchC-mst-region] commit [~SwitchC-mst-region] quit [~SwitchC] erps ring 2 [*SwitchC-erps-ring2] control-vlan 20 [*SwitchC-erps-ring2] protected-instance 2 [*SwitchC-erps-ring2] commit [~SwitchC-erps-ring2] quit [~SwitchC] stp region-configuration [~SwitchC-mst-region] instance 2 vlan 20 300 to 400 [*SwitchC-mst-region] commit [~SwitchC-mst-region] quit
# 配置SwitchD。
[~SwitchD] erps ring 1 [*SwitchD-erps-ring1] control-vlan 10 [*SwitchD-erps-ring1] protected-instance 1 [*SwitchD-erps-ring1] commit [~SwitchD-erps-ring1] quit [~SwitchD] stp region-configuration [~SwitchD-mst-region] instance 1 vlan 10 100 to 200 [*SwitchD-mst-region] commit [~SwitchD-mst-region] quit [~SwitchD] erps ring 2 [*SwitchD-erps-ring2] control-vlan 20 [*SwitchD-erps-ring2] protected-instance 2 [*SwitchD-erps-ring2] commit [~SwitchD-erps-ring2] quit [~SwitchD] stp region-configuration [~SwitchD-mst-region] instance 2 vlan 20 300 to 400 [*SwitchD-mst-region] commit [~SwitchD-mst-region] quit
- 将二层端口加入ERPS环并配置端口角色,分别将SwitchA的端口10GE1/0/1和SwitchB的端口10GE1/0/2配置为RPL owner。
# 配置SwitchA。
[~SwitchA] interface 10ge 1/0/1 [~SwitchA-10GE1/0/1] stp disable [*SwitchA-10GE1/0/1] erps ring 1 [*SwitchA-10GE1/0/1] erps ring 2 rpl owner [*SwitchA-10GE1/0/1] commit [~SwitchA-10GE1/0/1] quit [~SwitchA] interface 10ge 1/0/2 [~SwitchA-10GE1/0/2] stp disable [*SwitchA-10GE1/0/2] erps ring 1 [*SwitchA-10GE1/0/2] erps ring 2 [*SwitchA-10GE1/0/2] commit [~SwitchA-10GE1/0/2] quit
# 配置SwitchB。
[~SwitchB] interface 10ge 1/0/1 [~SwitchB-10GE1/0/1] stp disable [*SwitchB-10GE1/0/1] erps ring 1 [*SwitchB-10GE1/0/1] erps ring 2 [*SwitchB-10GE1/0/1] commit [~SwitchB-10GE1/0/1] quit [~SwitchB] interface 10ge 1/0/2 [~SwitchB-10GE1/0/2] stp disable [*SwitchB-10GE1/0/2] erps ring 1 rpl owner [*SwitchB-10GE1/0/2] erps ring 2 [*SwitchB-10GE1/0/2] commit [~SwitchB-10GE1/0/2] quit
# 配置SwitchC。
[~SwitchC] interface 10ge 1/0/1 [~SwitchC-10GE1/0/1] stp disable [*SwitchC-10GE1/0/1] erps ring 1 [*SwitchC-10GE1/0/1] erps ring 2 [*SwitchC-10GE1/0/1] commit [~SwitchC-10GE1/0/1] quit [~SwitchC] interface 10ge 1/0/2 [~SwitchC-10GE1/0/2] stp disable [*SwitchC-10GE1/0/2] erps ring 1 [*SwitchC-10GE1/0/2] erps ring 2 [*SwitchC-10GE1/0/2] commit [~SwitchC-10GE1/0/2] quit
# 配置SwitchD。
[~SwitchD] interface 10ge 1/0/1 [~SwitchD-10GE1/0/1] stp disable [*SwitchD-10GE1/0/1] erps ring 1 [*SwitchD-10GE1/0/1] erps ring 2 [*SwitchD-10GE1/0/1] commit [~SwitchD-10GE1/0/1] quit [~SwitchD] interface 10ge 1/0/2 [~SwitchD-10GE1/0/2] stp disable [*SwitchD-10GE1/0/2] erps ring 1 [*SwitchD-10GE1/0/2] erps ring 2 [*SwitchD-10GE1/0/2] commit [~SwitchD-10GE1/0/2] quit
- 配置ERPS环的Guard Timer和WTR Timer定时器。
# 配置SwitchA。
[~SwitchA] erps ring 1 [~SwitchA-erps-ring1] wtr-timer 6 [*SwitchA-erps-ring1] guard-timer 100 [*SwitchA-erps-ring1] commit [~SwitchA-erps-ring1] quit [~SwitchA] erps ring 2 [~SwitchA-erps-ring2] wtr-timer 6 [*SwitchA-erps-ring2] guard-timer 100 [*SwitchA-erps-ring2] commit [~SwitchA-erps-ring2] quit
# 配置SwitchB。
[~SwitchB] erps ring 1 [~SwitchB-erps-ring1] wtr-timer 6 [*SwitchB-erps-ring1] guard-timer 100 [*SwitchB-erps-ring1] commit [~SwitchB-erps-ring1] quit [~SwitchB] erps ring 2 [~SwitchB-erps-ring2] wtr-timer 6 [*SwitchB-erps-ring2] guard-timer 100 [*SwitchB-erps-ring2] commit [~SwitchB-erps-ring2] quit
# 配置SwitchC。
[~SwitchC] erps ring 1 [~SwitchC-erps-ring1] wtr-timer 6 [*SwitchC-erps-ring1] guard-timer 100 [*SwitchC-erps-ring1] commit [~SwitchC-erps-ring1] quit [~SwitchC] erps ring 2 [~SwitchC-erps-ring2] wtr-timer 6 [*SwitchC-erps-ring2] guard-timer 100 [*SwitchC-erps-ring2] commit [~SwitchC-erps-ring2] quit
# 配置SwitchD。
[~SwitchD] erps ring 1 [~SwitchD-erps-ring1] wtr-timer 6 [*SwitchD-erps-ring1] guard-timer 100 [*SwitchD-erps-ring1] commit [~SwitchD-erps-ring1] quit [~SwitchD] erps ring 2 [~SwitchD-erps-ring2] wtr-timer 6 [*SwitchD-erps-ring2] guard-timer 100 [*SwitchD-erps-ring2] commit [~SwitchD-erps-ring2] quit
- 配置SwitchA~SwitchD二层转发功能。
# 配置SwitchA。
[~SwitchA] vlan batch 100 to 200 300 to 400 [*SwitchA] commit [~SwitchA] interface 10ge 1/0/1 [~SwitchA-10GE1/0/1] port trunk allow-pass vlan 100 to 200 300 to 400 [*SwitchA-10GE1/0/1] commit [~SwitchA-10GE1/0/1] quit [~SwitchA] interface 10ge 1/0/2 [~SwitchA-10GE1/0/2] port trunk allow-pass vlan 100 to 200 300 to 400 [*SwitchA-10GE1/0/2] commit [~SwitchA-10GE1/0/2] quit
# 配置SwitchB。
[~SwitchB] vlan batch 100 to 200 300 to 400 [*SwitchB] commit [~SwitchB] interface 10ge 1/0/1 [~SwitchB-10GE1/0/1] port trunk allow-pass vlan 100 to 200 300 to 400 [*SwitchB-10GE1/0/1] commit [~SwitchB-10GE1/0/1] quit [~SwitchB] interface 10ge 1/0/2 [~SwitchB-10GE1/0/2] port trunk allow-pass vlan 100 to 200 300 to 400 [*SwitchB-10GE1/0/2] commit [~SwitchB-10GE1/0/2] quit
# 配置SwitchC。
[~SwitchC] vlan batch 100 to 200 300 to 400 [*SwitchC] commit [~SwitchC] interface 10ge 1/0/1 [~SwitchC-10GE1/0/1] port trunk allow-pass vlan 100 to 200 300 to 400 [*SwitchC-10GE1/0/1] commit [~SwitchC-10GE1/0/1] quit [~SwitchC] interface 10ge 1/0/2 [~SwitchC-10GE1/0/2] port trunk allow-pass vlan 100 to 200 300 to 400 [*SwitchC-10GE1/0/2] commit [~SwitchC-10GE1/0/2] quit
# 配置SwitchD。
[~SwitchD] vlan batch 100 to 200 300 to 400 [*SwitchD] commit [~SwitchD] interface 10ge 1/0/1 [~SwitchD-10GE1/0/1] port trunk allow-pass vlan 100 to 200 300 to 400 [*SwitchD-10GE1/0/1] commit [~SwitchD-10GE1/0/1] quit [~SwitchD] interface 10ge 1/0/2 [~SwitchD-10GE1/0/2] port trunk allow-pass vlan 100 to 200 300 to 400 [*SwitchD-10GE1/0/2] commit [~SwitchD-10GE1/0/2] quit
- 验证配置结果
# 在网络稳定后,在设备上执行display erps,查看设备加入的ERPS环的端口和环的概要信息。以SwitchB为例。
[~SwitchB] display erps D : Discarding F : Forwarding R : RPL Owner N : RPL Neighbour FS : Forced Switch MS : Manual Switch Total number of rings configured = 2 Ring Control WTR Timer Guard Timer Port 1 Port 2 ID VLAN (min) (csec) -------------------------------------------------------------------------------- 1 10 6 100 (F)10GE1/0/1 (D,R)10GE1/0/2 2 20 6 100 (F)10GE1/0/1 (F)10GE1/0/2 --------------------------------------------------------------------------------
# 在设备上执行display erps verbose,查看设备加入的ERPS环的端口和环的详细信息。以SwitchB为例。
[~SwitchB] display erps verbose Ring ID : 1 Description : Ring 1 Control Vlan : 10 Protected Instance : 1 Service Vlan : 100 to 200 WTR Timer Setting (min) : 6 Running (s) : 0 Guard Timer Setting (csec) : 100 Running (csec) : 0 Holdoff Timer Setting (deciseconds) : 0 Running (deciseconds) : 0 WTB Timer Running (csec) : 0 Ring State : Idle RAPS_MEL : 7 Revertive Mode : Revertive R-APS Channel Mode : - Version : 1 Sub-ring : No Forced Switch Port : - Manual Switch Port : - TC-Notify : - Time since last topology change : 0 days 0h:35m:5s -------------------------------------------------------------------------------- Port Port Role Port Status Signal Status -------------------------------------------------------------------------------- 10GE1/0/1 Common Forwarding Non-failed 10GE1/0/2 RPL Owner Discarding Non-failed Ring ID : 2 Description : Ring 2 Control Vlan : 20 Protected Instance : 2 Service Vlan : 300 to 400 WTR Timer Setting (min) : 6 Running (s) : 0 Guard Timer Setting (csec) : 100 Running (csec) : 0 Holdoff Timer Setting (deciseconds) : 0 Running (deciseconds) : 0 WTB Timer Running (csec) : 0 Ring State : Idle RAPS_MEL : 7 Revertive Mode : Revertive R-APS Channel Mode : - Version : 1 Sub-ring : No Forced Switch Port : - Manual Switch Port : - TC-Notify : - Time since last topology change : 0 days 0h:35m:30s -------------------------------------------------------------------------------- Port Port Role Port Status Signal Status -------------------------------------------------------------------------------- 10GE1/0/1 Common Forwarding Non-failed 10GE1/0/2 Common Forwarding Non-failed
配置文件
SwitchA的配置文件
# sysname SwitchA # vlan batch 10 20 100 to 200 300 to 400 # stp region-configuration instance 1 vlan 10 100 to 200 instance 2 vlan 20 300 to 400 # erps ring 1 control-vlan 10 protected-instance 1 wtr-timer 6 guard-timer 100 # erps ring 2 control-vlan 20 protected-instance 2 wtr-timer 6 guard-timer 100 # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 10 20 100 to 200 300 to 400 stp disable erps ring 1 erps ring 2 rpl owner # interface 10GE1/0/2 port link-type trunk port trunk allow-pass vlan 10 20 100 to 200 300 to 400 stp disable erps ring 1 erps ring 2 # return
SwitchB的配置文件
# sysname SwitchB # vlan batch 10 20 100 to 200 300 to 400 # stp region-configuration instance 1 vlan 10 100 to 200 instance 2 vlan 20 300 to 400 # erps ring 1 control-vlan 10 protected-instance 1 wtr-timer 6 guard-timer 100 # erps ring 2 control-vlan 20 protected-instance 2 wtr-timer 6 guard-timer 100 # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 10 20 100 to 200 300 to 400 stp disable erps ring 1 erps ring 2 # interface 10GE1/0/2 port link-type trunk port trunk allow-pass vlan 10 20 100 to 200 300 to 400 stp disable erps ring 1 rpl owner erps ring 2 # return
SwitchC的配置文件
# sysname SwitchC # vlan batch 10 20 100 to 200 300 to 400 # stp region-configuration instance 1 vlan 10 100 to 200 instance 2 vlan 20 300 to 400 # erps ring 1 control-vlan 10 protected-instance 1 wtr-timer 6 guard-timer 100 # erps ring 2 control-vlan 20 protected-instance 2 wtr-timer 6 guard-timer 100 # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 10 20 100 to 200 300 to 400 stp disable erps ring 1 erps ring 2 # interface 10GE1/0/2 port link-type trunk port trunk allow-pass vlan 10 20 100 to 200 300 to 400 stp disable erps ring 1 erps ring 2 # return
SwitchD的配置文件
# sysname SwitchD # vlan batch 10 20 100 to 200 300 to 400 # stp region-configuration instance 1 vlan 10 100 to 200 instance 2 vlan 20 300 to 400 # erps ring 1 control-vlan 10 protected-instance 1 wtr-timer 6 guard-timer 100 # erps ring 2 control-vlan 20 protected-instance 2 wtr-timer 6 guard-timer 100 # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 10 20 100 to 200 300 to 400 stp disable erps ring 1 erps ring 2 # interface 10GE1/0/2 port link-type trunk port trunk allow-pass vlan 10 20 100 to 200 300 to 400 stp disable erps ring 1 erps ring 2 # return