配置ERPS相交环示例
组网需求
以太网交换网络中为了进行链路备份,提高网络可靠性,通常会使用冗余链路。但是使用冗余链路会在交换网络上产生环路,导致广播风暴以及MAC地址表不稳定等故障现象,从而导致用户通信质量较差,甚至通信中断。
为了解决使用冗余链路引起的环路问题,可以在组成环网的设备上部署ERPS协议,ERPS协议是ITU-T定义的一种二层破环协议标准,且收敛速度快,可以满足收敛速度达到电信级可靠性要求。
如图19-17所示,以部署ERPS的相交环为例,SwitchA、SwitchB、SwitchC和SwitchD组成的环为主环,SwitchA、LSW1、LSW2、LSW3和SwitchD组成的环为子环。
配置思路
采用如下的思路配置ERPS环:
配置加入ERPS环的所有端口类型为Trunk型。
创建ERPS环,并配置控制VLAN和保护实例。
配置ERPS协议版本,配置子环。
将二层端口加入ERPS环并配置端口角色。
配置网络拓扑变化通告和拓扑变化保护功能。
配置ERPS环的Guard Timer和WTR Timer定时器。
配置SwitchA~SwitchD、LSW1~LSW3二层转发功能。
操作步骤
- 配置加入ERPS环的所有端口类型为Trunk型。
# 配置SwitchA。SwitchB、SwitchC、SwitchD、LSW1、LSW2和LSW3的配置与SwitchA类似,详见配置文件。
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] interface gigabitethernet 1/0/1 [SwitchA-GigabitEthernet1/0/1] port link-type trunk [SwitchA-GigabitEthernet1/0/1] quit [SwitchA] interface gigabitethernet 1/0/2 [SwitchA-GigabitEthernet1/0/2] port link-type trunk [SwitchA-GigabitEthernet1/0/2] quit [SwitchA] interface gigabitethernet 1/0/3 [SwitchA-GigabitEthernet1/0/3] port link-type trunk [SwitchA-GigabitEthernet1/0/3] quit
- 创建ERPS环1、ERPS环2并配置两个ERPS环的保护实例,配置ERPS环1的控制VLAN ID为10,ERPS环2的控制VLAN
ID为20,ERPS环1、ERPS环2传递VLAN100~200的数据报文。
# 配置SwitchA。SwitchB、SwitchC、SwitchD、LSW1、LSW2、LSW3的配置与SwitchA类似,详见配置文件。
[SwitchA] stp region-configuration [SwitchA-mst-region] instance 1 vlan 10 20 100 to 200 [SwitchA-mst-region] active region-configuration [SwitchA-mst-region] quit [SwitchA] erps ring 1 [SwitchA-erps-ring1] control-vlan 10 [SwitchA-erps-ring1] protected-instance 1 [SwitchA-erps-ring1] quit [SwitchA] erps ring 2 [SwitchA-erps-ring2] control-vlan 20 [SwitchA-erps-ring2] protected-instance 1 [SwitchA-erps-ring2] quit
- 配置ERPS协议版本为v2,将ERPS环2配置为子环。
# 配置SwitchA。SwitchB、SwitchC、SwitchD、LSW1、LSW2、LSW3的配置与SwitchA类似,详见配置文件。
[SwitchA] erps ring 1 [SwitchA-erps-ring1] version v2 [SwitchA-erps-ring1] quit [SwitchA] erps ring 2 [SwitchA-erps-ring2] version v2 [SwitchA-erps-ring2] sub-ring [SwitchA-erps-ring2] quit
- 将二层端口加入ERPS环并配置端口角色,分别将SwitchB的端口GE1/0/1和LSW3的端口GE1/0/2配置为RPL owner端口。
# 配置SwitchA。SwitchC、SwitchD、LSW1和LSW2的配置与SwitchA类似,详见配置文件。
[SwitchA] interface gigabitethernet 1/0/1 [SwitchA-GigabitEthernet1/0/1] stp disable [SwitchA-GigabitEthernet1/0/1] erps ring 2 [SwitchA-GigabitEthernet1/0/1] quit [SwitchA] interface gigabitethernet 1/0/2 [SwitchA-GigabitEthernet1/0/2] stp disable [SwitchA-GigabitEthernet1/0/2] erps ring 1 [SwitchA-GigabitEthernet1/0/2] quit [SwitchA] interface gigabitethernet 1/0/3 [SwitchA-GigabitEthernet1/0/3] stp disable [SwitchA-GigabitEthernet1/0/3] erps ring 1 [SwitchA-GigabitEthernet1/0/3] quit
# 配置SwitchB。LSW3的配置与SwitchB类似,详见配置文件。
[SwitchB] interface gigabitethernet 1/0/1 [SwitchB-GigabitEthernet1/0/1] stp disable [SwitchB-GigabitEthernet1/0/1] erps ring 1 rpl owner [SwitchB-GigabitEthernet1/0/1] quit [SwitchB] interface gigabitethernet 1/0/2 [SwitchB-GigabitEthernet1/0/2] stp disable [SwitchB-GigabitEthernet1/0/2] erps ring 1 [SwitchB-GigabitEthernet1/0/2] quit
- 在相交节点SwitchA和SwitchD配置网络拓扑变化通告,并配置拓扑变化保护。
# 配置SwitchA。
[SwitchA] erps ring 1 [SwitchA-erps-ring1] tc-protection interval 200 [SwitchA-erps-ring1] tc-protection threshold 60 [SwitchA-erps-ring1] quit [SwitchA] erps ring 2 [SwitchA-erps-ring2] tc-notify erps ring 1 [SwitchA-erps-ring2] quit
# 配置SwitchD。
[SwitchD] erps ring 1 [SwitchD-erps-ring1] tc-protection interval 200 [SwitchD-erps-ring1] tc-protection threshold 60 [SwitchD-erps-ring1] quit [SwitchD] erps ring 2 [SwitchD-erps-ring2] tc-notify erps ring 1 [SwitchD-erps-ring2] quit
- 配置ERPS环的Guard Timer和WTR Timer定时器。
# 配置SwitchA。SwitchB、SwitchC、SwitchD、LSW1、LSW2和LSW3的配置与SwitchA类似,详见配置文件。
[SwitchA] erps ring 1 [SwitchA-erps-ring1] wtr-timer 6 [SwitchA-erps-ring1] guard-timer 100 [SwitchA-erps-ring1] quit [SwitchA] erps ring 2 [SwitchA-erps-ring2] wtr-timer 6 [SwitchA-erps-ring2] guard-timer 100 [SwitchA-erps-ring2] quit
- 配置SwitchA~SwitchD二层转发功能。
# 配置SwitchA。SwitchB、SwitchC、SwitchD、LSW1、LSW2和LSW3的配置与SwitchA相同,详见配置文件。
[SwitchA] vlan batch 100 to 200 [SwitchA] interface gigabitethernet 1/0/1 [SwitchA-GigabitEthernet1/0/1] undo port trunk allow-pass vlan 1 [SwitchA-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 to 200 [SwitchA-GigabitEthernet1/0/1] quit [SwitchA] interface gigabitethernet 1/0/2 [SwitchA-GigabitEthernet1/0/2] undo port trunk allow-pass vlan 1 [SwitchA-GigabitEthernet1/0/2] port trunk allow-pass vlan 100 to 200 [SwitchA-GigabitEthernet1/0/2] quit [SwitchA] interface gigabitethernet 1/0/3 [SwitchA-GigabitEthernet1/0/3] undo port trunk allow-pass vlan 1 [SwitchA-GigabitEthernet1/0/3] port trunk allow-pass vlan 100 to 200 [SwitchA-GigabitEthernet1/0/3] 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 = 1 Ring Control WTR Timer Guard Timer Port 1 Port 2 ID VLAN (min) (csec) -------------------------------------------------------------------------------- 1 10 6 100 (D,R)GE1/0/1 (F)GE1/0/2 --------------------------------------------------------------------------------
# 在设备上执行display erps verbose,查看设备加入的ERPS环的端口和环的详细信息。
[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 : 2 Sub-ring : No Forced Switch Port : - Manual Switch Port : - TC-Notify : - Time since last topology change : 0 days 4h:12m:20s -------------------------------------------------------------------------------- Port Port Role Port Status Signal Status -------------------------------------------------------------------------------- GE1/0/1 RPL Owner Discarding Non-failed GE1/0/2 Common Forwarding Non-failed
配置文件
SwitchA的配置文件
# sysname SwitchA # vlan batch 10 20 100 to 200 # stp region-configuration instance 1 vlan 10 20 100 to 200 active region-configuration # erps ring 1 control-vlan 10 protected-instance 1 wtr-timer 6 guard-timer 100 version v2 tc-protection interval 200 tc-protection threshold 60 erps ring 2 control-vlan 20 protected-instance 1 wtr-timer 6 guard-timer 100 version v2 sub-ring tc-notify erps ring 1 # interface GigabitEthernet1/0/1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 100 to 200 stp disable erps ring 2 # interface GigabitEthernet1/0/2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 100 to 200 stp disable erps ring 1 # interface GigabitEthernet1/0/3 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 100 to 200 stp disable erps ring 1 # return
SwitchB的配置文件
# sysname SwitchB # vlan batch 10 100 to 200 # stp region-configuration instance 1 vlan 10 100 to 200 active region-configuration # erps ring 1 control-vlan 10 protected-instance 1 wtr-timer 6 guard-timer 100 version v2 # interface GigabitEthernet1/0/1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 100 to 200 stp disable erps ring 1 rpl owner # interface GigabitEthernet1/0/2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 100 to 200 stp disable erps ring 1 # return
SwitchC的配置文件
# sysname SwitchC # vlan batch 10 100 to 200 # stp region-configuration instance 1 vlan 10 100 to 200 active region-configuration # erps ring 1 control-vlan 10 protected-instance 1 wtr-timer 6 guard-timer 100 version v2 # interface GigabitEthernet1/0/1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 100 to 200 stp disable erps ring 1 # interface GigabitEthernet1/0/2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 100 to 200 stp disable erps ring 1 # return
SwitchD的配置文件
# sysname SwitchD # vlan batch 10 20 100 to 200 # stp region-configuration instance 1 vlan 10 20 100 to 200 active region-configuration # erps ring 1 control-vlan 10 protected-instance 1 wtr-timer 6 guard-timer 100 version v2 tc-protection interval 200 tc-protection threshold 60 erps ring 2 control-vlan 20 protected-instance 1 wtr-timer 6 guard-timer 100 version v2 sub-ring tc-notify erps ring 1 # interface GigabitEthernet1/0/1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 100 to 200 stp disable erps ring 2 # interface GigabitEthernet1/0/2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 100 to 200 stp disable erps ring 1 # interface GigabitEthernet1/0/3 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 10 100 to 200 stp disable erps ring 1 # return
LSW1的配置文件
# sysname LSW1 # vlan batch 20 100 to 200 # stp region-configuration instance 1 vlan 20 100 to 200 active region-configuration # erps ring 2 control-vlan 20 protected-instance 1 wtr-timer 6 guard-timer 100 version v2 sub-ring # interface GigabitEthernet1/0/1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 100 to 200 stp disable erps ring 2 # interface GigabitEthernet1/0/2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 100 to 200 stp disable erps ring 2 # return
LSW2的配置文件
# sysname LSW2 # vlan batch 20 100 to 200 # stp region-configuration instance 1 vlan 20 100 to 200 active region-configuration # erps ring 2 control-vlan 20 protected-instance 1 wtr-timer 6 guard-timer 100 version v2 sub-ring # interface GigabitEthernet1/0/1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 100 to 200 stp disable erps ring 2 # interface GigabitEthernet1/0/2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 100 to 200 stp disable erps ring 2 # return
LSW3的配置文件
# sysname LSW3 # vlan batch 20 100 to 200 # stp region-configuration instance 1 vlan 20 100 to 200 active region-configuration # erps ring 2 control-vlan 20 protected-instance 1 wtr-timer 6 guard-timer 100 version v2 sub-ring # interface GigabitEthernet1/0/1 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 100 to 200 stp disable erps ring 2 # interface GigabitEthernet1/0/2 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 20 100 to 200 stp disable erps ring 2 rpl owner # return