Generally, redundant links are used on an Ethernet switching network to provide link backup and enhance network reliability. The use of redundant links, however, may produce loops, causing broadcast storms and rendering the MAC address table unstable. As a result, communication quality deteriorates, and communication services may even be interrupted.
To prevent loops caused by redundant links, enable ERPS on the nodes of the ring network. ERPS is a Layer 2 loop-breaking protocol defined by the ITU-T, and provides fast convergence of carrier-class reliability standards.
As shown in Figure 1, intersecting ERPS rings are used. SwitchA, SwitchB, SwitchC, and SwitchD constitute the major ring, and SwitchA, LSW1, LSW2, LSW3, and SwitchD constitute a sub-ring.
The configuration roadmap is as follows:
Configure the link type of all ports to be added to ERPS rings as trunk.
Create ERPS rings and configure control VLANs and Ethernet Ring Protection (ERP) instances in the ERPS rings.
Specify the ERPS version and configure a sub-ring.
Add Layer 2 ports to ERPS rings and specify port roles.
Configure the topology change notification and TC protection.
Configure the Guard timers and WTR timers in the ERPS rings.
Configure Layer 2 forwarding on SwitchA through SwitchD and LSW1 through LSW3.
# Configure SwitchA. The configurations of SwitchB, SwitchC, SwitchD, LSW1, LSW2, and LSW3 are similar to the configuration of SwitchA, and are not mentioned here.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] port link-type trunk [SwitchA-GigabitEthernet0/0/1] quit [SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] port link-type trunk [SwitchA-GigabitEthernet0/0/2] quit [SwitchA] interface gigabitethernet 0/0/3 [SwitchA-GigabitEthernet0/0/3] port link-type trunk [SwitchA-GigabitEthernet0/0/3] quit
# Configure SwitchA. The configurations of SwitchB, SwitchC, SwitchD, LSW1, LSW2, and LSW3 are similar to the configuration of SwitchA, and are not mentioned here.
[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
# Configure SwitchA. The configurations of SwitchB, SwitchC, SwitchD, LSW1, LSW2, and LSW3 are similar to the configuration of SwitchA, and are not mentioned here.
[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
# Configure SwitchA. The configurations of SwitchC, SwitchD, LSW1, and LSW2 are similar to the configuration of SwitchA, and are not mentioned here.
[SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] stp disable [SwitchA-GigabitEthernet0/0/1] erps ring 2 [SwitchA-GigabitEthernet0/0/1] quit [SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] stp disable [SwitchA-GigabitEthernet0/0/2] erps ring 1 [SwitchA-GigabitEthernet0/0/2] quit [SwitchA] interface gigabitethernet 0/0/3 [SwitchA-GigabitEthernet0/0/3] stp disable [SwitchA-GigabitEthernet0/0/3] erps ring 1 [SwitchA-GigabitEthernet0/0/3] quit
# Configure SwitchB. The configurations of LSW3 are similar to the configuration of SwitchB, and are not mentioned here.
[SwitchB] interface gigabitethernet 0/0/1 [SwitchB-GigabitEthernet0/0/1] stp disable [SwitchB-GigabitEthernet0/0/1] erps ring 1 rpl owner [SwitchB-GigabitEthernet0/0/1] quit [SwitchB] interface gigabitethernet 0/0/2 [SwitchB-GigabitEthernet0/0/2] stp disable [SwitchB-GigabitEthernet0/0/2] erps ring 1 [SwitchB-GigabitEthernet0/0/2] quit
# Configure 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
# Configure 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
# Configure SwitchA. The configurations of SwitchB, SwitchC, SwitchD, LSW1, LSW2, and LSW3 are similar to the configuration of SwitchA, and are not mentioned here.
[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
# Configure SwitchA. The configurations of SwitchB, SwitchC, SwitchD, LSW1, LSW2, and LSW3 are similar to the configuration of SwitchA, and are not mentioned here.
[SwitchA] vlan batch 100 to 200 [SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1 [SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 to 200 [SwitchA-GigabitEthernet0/0/1] quit [SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1 [SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 to 200 [SwitchA-GigabitEthernet0/0/2] quit [SwitchA] interface gigabitethernet 0/0/3 [SwitchA-GigabitEthernet0/0/3] undo port trunk allow-pass vlan 1 [SwitchA-GigabitEthernet0/0/3] port trunk allow-pass vlan 100 to 200 [SwitchA-GigabitEthernet0/0/3] quit
# After the network becomes stable, run the display erps command to check brief information about the ERPS ring and ports added to the ERPS ring. SwitchB is used as an example.
[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)GE0/0/1 (F)GE0/0/2 --------------------------------------------------------------------------------
# Run the display erps verbose command to check detailed information about the ERPS ring and ports added to the ERPS ring.
[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 -------------------------------------------------------------------------------- GE0/0/1 RPL Owner Discarding Non-failed GE0/0/2 Common Forwarding Non-failed
SwitchA configuration file
# 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 GigabitEthernet0/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 GigabitEthernet0/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 GigabitEthernet0/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 configuration file
# 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 GigabitEthernet0/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 GigabitEthernet0/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 configuration file
# 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 GigabitEthernet0/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 GigabitEthernet0/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 configuration file
# 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 GigabitEthernet0/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 GigabitEthernet0/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 GigabitEthernet0/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 configuration file
# 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 GigabitEthernet0/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 GigabitEthernet0/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 configuration file
# 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 GigabitEthernet0/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 GigabitEthernet0/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 configuration file
# 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 GigabitEthernet0/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 GigabitEthernet0/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