Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Configuring Ethernet Ring Protection Switching on Switches (CLI Procedure)


You can configure Ethernet ring protection switching (ERPS) on connected switches to prevent fatal loops from disrupting a network. ERPS is similar to spanning-tree protocols, but ERPS is more efficient than spanning-tree protocols because it is customized for ring topologies. You must configure at least three switches to form a ring. One of the links, called the ring protection link (RPL) end interface, is blocked until another link fails—at this time the RPL link is unblocked, ensuring connectivity.


In legacy EX Series switches, ERPS acts when the logical interface goes up or down. On EX4300 and QFX Series switches, ERPS acts only when the physical interface goes up or down. Therefore, ERPS does not react to the connectivity fault management (CFM) logical interface when it goes up or down.


Ethernet OAM connectivity fault management (CFM) can be used with ERPS to detect link faults faster in some cases. See Configuring Ethernet OAM Connectivity Fault Management (CLI Procedure).

The time needed for switchover to the ERPS link is affected by three settings—link failure detection time, the number of nodes in the ring, and the time it takes to unblock the RPL after a failure is detected.


Do not configure redundant trunk groups on ERPS interfaces. You can configure VSTP on ERPS interfaces if the VSTP uses a VLAN that is not part of the ERPS control VLAN or data channel VLANs. The total number of ERPS and VSTP or MSTP instances is limited to 253.

  • On EX2300 and EX3400 switches, if ERP is configured on an interface, that interface cannot participate in STP, RSTP or MSTP. If a VLAN is part of an MST instance, it cannot also be in ERP’s control VLAN or data VLAN. Also, due to TCAM size, the combined total number of ERP instances and MSTP instances, or ERP instances alone, is limited to 50 instances for the EX2300 switch and 100 instances for the EX3400 switch.

Before you begin:

  • Configure a VLAN to act as a control channel for ERPS. Two interfaces (east and west) on each switch in the ring must be associated with the control VLAN. See Configuring VLANs for EX Series Switches.


    When EX2300 and EX3400 ERPS switches have a VLAN-ID configured with a name under an interface hierarchy, a commit error occurs. Avoid this by configuring VLAN-IDs using numbers when they are under an interface hierarchy with ERPS configured in the switch.

    • The interfaces on the ERPS control channel are usually (but not required to be) configured as trunk ports. See Configuring Gigabit Ethernet Interfaces (CLI Procedure). Note that if one switch has trunk ports as the ERPS control interfaces, the same must be true of all switches on the ring (the ERPS control interfaces must also be trunk ports).

  • Data channels are optional on the ERPS link. If you plan to use them, configure a VLAN for each data channel. If you have multiple ERPS instances, the control VLANs and data channel VLANs must not overlap.

To configure ERPS:


You must configure at least three switches, with only one switch designated as the RPL owner node.

  1. Spanning tree protocols and ERPS cannot both be configured on the ring ports, so on each ERPS interface, you must disable any configured spanning tree protocols (such as STP, RSTP, VSTP, or MSTP). Spanning tree protocols are disabled for individual interfaces in two different ways, depending on which Junos OS version and release is running on the switch. RSTP is enabled in the default configuration, so disabling RSTP is shown here.

    For switches without Enhanced Layer 2 (ELS) software support, and switches running ELS software with Junos OS release 15.1 or later, use this command to disable RSTP on the individual ERPS interfaces:

    For switches running Enhanced Layer 2 (ELS) software with Junos OS releases prior to 15.1, you disable spanning tree protocols on individual interfaces by deleting that configuration item. Use this command to delete the RSTP configuration item on the individual ERPS interfaces:

  2. Create a node ring on each switch:
  3. Configure a control VLAN for the node ring:
  4. Configure the east and west interfaces of the node ring with the control-channel interface.

    For switches with ELS support, additionally associate the east and west interfaces with the control VLAN:

  5. In addition, configure either the east interface or the west interface (but not both) as a link end. For example, configure the east interface:
  6. Configure only one switch as the RPL owner node:
  7. The restore interval is the time the RPL owner node waits after the last ring automatic protection switching (RAPS) signal failure (SF) event has been cleared, to see if any further RAPS events occur. During this time interval, the RPL owner continues to process RAPS packets, and the ring remains in protection state with the RPL link unblocked. When this interval expires, if no further RAPS SF events have been reported, the RPL owner reverts the protection switching, blocks the RPL link, and returns the protection ring to idle state. Optionally, configure a local restore interval for the ERPS ring on each switch:

    The restore interval can also be set globally to apply to any ERPS rings configured on the switch. Local per-ring settings take priority over global settings.

  8. The guard interval prevents ring nodes from receiving outdated RAPS messages. Optionally, configure the guard interval on each switch:

    The guard interval can also be set globally to apply to any ERPS rings configured on the switch. Local per-ring settings take priority over global settings.

  9. Global restore and guard interval settings are used when no local settings are configured. If these intervals are not configured globally or locally, the default values apply. Optionally configure global interval settings on the switch to apply to all rings that do not have a corresponding interval configured locally for the ring:
    • restore interval:

    • guard interval:


    You can also configure other global settings, such as ERP traceoptions (file, page size, file size, flag name).

  10. Optionally, configure VLANs for data channels on the ERPS link:

G.8032v1 supports a single ring topology and G.8032v2 supports multiple rings and ladder topology. Because Junos OS uses an ERPV2 state machine for ERPV1 support on both EX2300 and EX3400 switches, how ERPS works on those two switches deviates from the ERPV1 ITU standard in the following ways:

  • Wait to Restore (WTR) configuration values on EX2300 and EX3400 switches must be 5-12 minutes.

  • The Wait To Block Timer (WTB) is always disabled on EX2300 and EX3400 switches because it is not supported in ERPSv1. Any configuration change has no effect on the WTB setting, although the output from the show protection-group ethernet-ring node-state detail CLI command lists a WTB setting. However, that setting has no effect.

  • During initial state machine initialization on EX2300 and EX3400 switches, both ERPV1 ring ports move to a discarding state on the non-RPL node. During ERPV1 initial state machine initialization on EX2300 and EX3400 switches, the Automatic Protection Switching (APS) state moves to an idle state on the non-RPL switch.