Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring Layer 2 Circuit Switching Protection

Unlike Layer 2 circuit protect interfaces (see Example: Configuring Layer 2 Circuit Protect Interfaces), which provide traffic protection for paths configured between the PE routers and CE routers, Layer 2 circuit switching protection provides traffic protection for the paths configured between the PE routers. In the event the path used by a Layer 2 circuit fails, traffic can be switched to an alternate path (or protection path). Switching protection is supported for locally switched Layer 2 circuits and provides 1 to 1 protection for each Layer 2 circuit interface.

When you enable Layer 2 circuit switching protection, each Layer 2 circuit interface requires the following paths:

  • Working path—Used by the Layer 2 circuit when working normally.
  • Protection path—Used by the Layer 2 circuit when the working path fails.

Requirements

This example uses the following hardware and software components:

  • MX 3D routers
  • Junos OS Release 12.3

Overview

Each working path can be configured to have a either a protection path routed directly to the neighboring PE router (as shown in Figure 1) or indirectly using a pseudowire configured through an intermediate PE router (as shown in Figure 2 and Figure 3). The protection path provides failure protection for the traffic flowing between the PE routers. Ethernet OAM monitors the status of these paths. When OAM detects a failure, it reroutes the traffic from the failed working path to the protection path. You can configure OAM to revert the traffic automatically to the working path when it is restored. You can also manually switch traffic between the working path, the protection path, and back.

Note: Non-stop routing (NSR) and graceful routing engine switchover (GRES) do not support Layer 2 circuit switching protection.

Topology

Figure 1 illustrates Layer 2 circuit local switching. There are two OAM sessions running between router PE1 and router PE2. One OAM session is configured over the working path and the other is configured over the protection path.

Figure 1: Connection protection enabled between router PE1 and router PE2

Connection protection enabled between
router PE1 and router PE2

In Figure 2 and Figure 3, there are two OAM sessions running between router PE1 and router PE2. For Figure 2, one OAM session is configured over the working path between router PE1 and router PE2. The other OAM session is configured over the protection path between router PE1 and router PE3 to router PE2.

Figure 2: Connection Protection Using a Pseudowire Configured through Router PE3 as the Protection Path

Connection Protection Using a Pseudowire
Configured through Router PE3 as the Protection Path

For Figure 3, one OAM session is configured over the working path, the pseudowire between router PE1 and router PE3, then to router PE2. The other OAM session is configured on the protect path between router PE1 and router PE2.

Figure 3: Connection Protection Using a Pseudowire Configured through Router PE3 as the Working Path

Connection Protection Using a Pseudowire
Configured through Router PE3 as the Working Path

Configuration

The following sections describe how to configure each of the variations of Layer 2 circuit connection protection:

Configuring Connection Protection Between Two PE Routers

Step-by-Step Procedure

To configure Layer 2 Circuit switching protection as shown in Figure 1 on router PE1:

  1. Configure the Layer 2 circuit on router PE1.
    [edit protocols l2circuit]set local-switching interface ge-2/0/2.0 connection-protectionset local-switching interface ge-2/0/2.0 end-interface interface ge-2/0/1.0set local-switching interface ge-2/0/2.0 end-interface backup-interface ge-2/0/1.1
  2. Configure the routing policy on router PE1.
    [edit policy-options]set policy-statement protection-policy then load-balance per-packet
  3. Enable the routing policy on router PE1.
    [edit routing-options]set routing-options forwarding-table export protection-policy
  4. Configure OAM on Router PE1. OAM is used to monitor the working path between router PE1 and router PE2. In the event of a failure on the working path, traffic is switched automatically to the protection path. A connectivity fault management (CFM) session is configured on the working path and on the protection path. Begin by configuring the OAM maintenance domain.
    [edit protocols oam ethernet]set protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md level 5
  5. Configure OAM on Router PE1 for the working path.
    [edit protocols oam ethernet]set protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working continuity-check interval 100msset protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 interface ge-2/0/1.0set protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 interface workingset protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 direction downset protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 remote-mep 103
  6. Configure OAM on Router PE1 for the protection path.
    [edit protocols oam ethernet]set protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection continuity-check interval 100msset protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 interface ge-2/0/1.1set protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 interface protectset protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 direction downset protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 remote-mep 104
  7. Configure the OAM maintenance domain on Router PE2.
    set protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md level 5
  8. Configure OAM on Router PE2 for the working path.
    set protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working continuity-check interval 100msset protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 interface ge-2/0/1.0set protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 interface workingset protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 direction downset protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 remote-mep 1000
  9. Configure OAM on Router PE2 for the protection path.
    set protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection continuity-check interval 100msset protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 interface ge-2/0/1.1set protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 interface protectset protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 direction downset protocols oam ethernet connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 remote-mep 1001

Results

From configuration mode on Router PE1, confirm your configuration by entering the show protocols l2circuit, show policy-options, show routing-options, and show protocols oam ethernet commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

user@host> show protocols l2circuitlocal-switching {interface ge-2/0/2.0 {connection-protection;end-interface {interface ge-2/0/1.0;backup-interface ge-2/0/1.1;}}}
user@host> show policy-optionspolicy-statement protection-policy {then {load-balance per-packet;}}
user@host> show routing-optionsforwarding-table {export protection-policy;}
user@host> show protocols oam ethernetconnectivity-fault-management {maintenance-domain l2circuit-example-md {level 5;maintenance-association working {continuity-check {interval 100ms;}mep 1000 {interface ge-2/0/1.0 working;direction down;remote-mep 103;}}maintenance-association protection {continuity-check {interval 100ms;}mep 1001 {interface ge-2/0/1.1 protect;direction down;remote-mep 104;}}}}

From configuration mode on Router PE2, confirm your configuration by entering the show protocols oam ethernet commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

connectivity-fault-management {maintenance-domain l2circuit-example-md {level 5;maintenance-association working {continuity-check {interval 100ms;}mep 103 {interface ge-2/0/1.0 working;direction down;remote-mep 1000;}}maintenance-association protection {continuity-check {interval 100ms;}mep 104 {interface ge-2/0/1.1 protect;direction down;remote-mep 1001;}}}}

Configuring Connection Protection Using Another PE Router for the Protection Path

Step-by-Step Procedure

To configure Layer 2 Circuit switching protection as shown in Figure 2 on router PE1:

  1. Configure the Layer 2 circuit on router PE1.
    [edit protocols l2circuit]set protocols l2circuit local-switching interface ge-2/0/2.0 connection-protectionset protocols l2circuit local-switching interface ge-2/0/2.0 backup-neighbor 2.2.2.2 virtual-circuit-id 2set protocols l2circuit local-switching interface ge-2/0/2.0 backup-neighbor 2.2.2.2 community exampleset protocols l2circuit local-switching interface ge-2/0/2.0 end-interface interface ge-2/0/1.0
  2. Configure the routing policy on router PE1.
    [edit policy-options]set policy-statement load-balance then load-balance per-packetset policy-statement protection-policy term protect from community exampleset policy-statement protection-policy term protect then install-nexthop lsp-regex lsp-protect-*
  3. Configure the routing options on router PE1.
    [edit routing-options]set routing-options forwarding-table export load-balance
  4. Configure OAM on Router PE1 to setup the maintenance domain. OAM is used to monitor the working path between router PE1 and router PE2. In the event of a failure on the working path, traffic is switched automatically to the protection path.
    [edit protocols oam ethernet]set connectivity-fault-management maintenance-domain l2circuit-example-md level 5
  5. Configure OAM on Router PE1 for the working path.
    [edit protocols oam ethernet]set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 interface ge-2/0/1.0set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 direction downset connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 remote-mep 103
  6. Configure OAM on Router PE1 for the protection path.
    [edit protocols oam ethernet]set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 interface ge-2/0/0.0set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 direction downset connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 remote-mep 104
  7. Configure OAM on Router PE2 to setup the maintenance domain.
    [edit protocols oam ethernet]set connectivity-fault-management maintenance-domain l2circuit-example-md level 5
  8. Configure OAM on Router PE2 for the working path.
    [edit protocols oam ethernet]set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 interface ge-2/0/1.0set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 direction downset connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 remote-mep 1000
  9. Configure OAM on Router PE2 for the protection path.
    [edit protocols oam ethernet]set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 interface ge-2/0/0.0set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 direction downset connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 remote-mep 1001

Results

From configuration mode on Router PE1, confirm your configuration by entering the show protocols l2circuit, show policy-options, show routing-options, and show protocols oam ethernet commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

user@host> show protocols l2circuitlocal-switching {interface ge-2/0/2.0 {connection-protection;backup-neighbor 2.2.2.2 {virtual-circuit-id 2;community example;}end-interface {interface ge-2/0/1.0;}}}
user@host> show policy-optionspolicy-statement load-balance {then {load-balance per-packet;}}policy-statement protection-policy {term protect {from community example;then {install-nexthop lsp-regex lsp-protect-*;}}}
user@host> show routing-optionsforwarding-table {export load-balance;}
user@host> show protocols oam ethernetconnectivity-fault-management {maintenance-domain l2circuit-example-md {level 5;maintenance-association working {mep 1000 {interface ge-2/0/1.0;direction down;remote-mep 103;}}maintenance-association protection {mep 1001 {interface ge-2/0/0.0;direction down;remote-mep 104;}}}}

From configuration mode on Router PE2, confirm your configuration by entering the show protocols oam ethernet commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

connectivity-fault-management {maintenance-domain l2circuit-example-md {level 5;maintenance-association working {mep 103 {interface ge-2/0/1.0;direction down;remote-mep 1000;}}maintenance-association protection {mep 104 {interface ge-2/0/0.0;direction down;remote-mep 1001;}}}}

Configuring Connection Protection Using an Another PE Router for the Working Path

Step-by-Step Procedure

To configure Layer 2 Circuit switching protection as shown in Figure 3 on router PE1:

  1. Configure the Layer 2 circuit on router PE1.
    [edit protocols l2circuit]set protocols l2circuit neighbor 2.2.2.2 interface ge-2/0/2.0 virtual-circuit-id 2set protocols l2circuit neighbor 2.2.2.2 interface ge-2/0/2.0 community exampleset protocols l2circuit neighbor 2.2.2.2 interface ge-2/0/2.0 connection-protectionset protocols l2circuit neighbor 2.2.2.2 interface ge-2/0/2.0 backup-neighbor 3.3.3.3 virtual-circuit-id 3set protocols l2circuit neighbor 2.2.2.2 interface ge-2/0/2.0 backup-neighbor 3.3.3.3 standby
  2. Configure the policies on router PE1.
    [edit policy-options]set policy-options policy-statement load-balance then load-balance per-packetset policy-options policy-statement protection-policy term protect from community exampleset policy-options policy-statement protection-policy term protect then install-nexthop lsp-regex lsp-primary
  3. [edit routing-options]set routing-options forwarding-table export load-balance
  4. Configure OAM on Router PE1 to setup the maintenance domain. OAM is used to monitor the working path between router PE1 and router PE2. In the event of a failure on the working path, traffic is switched automatically to the protection path.
    [edit protocols oam ethernet]set connectivity-fault-management maintenance-domain l2circuit-example-md level 5
  5. Configure OAM on Router PE1 for the working path.
    [edit protocols oam ethernet]set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 interface ge-2/0/0.0set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 direction downset connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 remote-mep 103
  6. Configure OAM on Router PE1 for the protection path.
    [edit protocols oam ethernet]set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 interface ge-2/0/1.0set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 direction downset connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 remote-mep 104
  7. Configure OAM on Router PE2 to setup the maintenance domain.
    [edit protocols oam ethernet]set connectivity-fault-management maintenance-domain l2circuit-example-md level 5
  8. Configure OAM on Router PE2 for the working path.
    [edit protocols oam ethernet]set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 interface ge-2/0/0.0set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 direction downset connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 remote-mep 1000
  9. Configure OAM on Router PE2 for the protection path.
    [edit protocols oam ethernet]set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 interface ge-2/0/1.0set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 direction downset connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 remote-mep 1001

Results

From configuration mode on Router PE1, confirm your configuration by entering the show protocols l2circuit, show policy-options, show routing-options, and show protocols oam ethernet commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

user@host> show protocols l2circuitneighbor 2.2.2.2 {interface ge-2/0/2.0 {virtual-circuit-id 2;community example;connection-protection;backup-neighbor 3.3.3.3 {virtual-circuit-id 3;standby;}}}
user@host> show policy-optionspolicy-statement load-balance {then {load-balance per-packet;}}policy-statement protection-policy {term protect {from community example;then {install-nexthop lsp-regex lsp-primary;}}}
user@host> show routing-optionsforwarding-table {export load-balance;}
user@host> show protocols oam ethernetconnectivity-fault-management {maintenance-domain l2circuit-example-md {level 5;maintenance-association working {mep 1000 {interface ge-2/0/0.0;direction down;remote-mep 103;}}maintenance-association protection {mep 1001 {interface ge-2/0/1.0;direction down;remote-mep 104;}}}}

From configuration mode on Router PE2, confirm your configuration by entering the show protocols oam ethernet commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

connectivity-fault-management {maintenance-domain l2circuit-example-md {level 5;maintenance-association working {mep 103 {interface ge-2/0/0.0;direction down;remote-mep 1000;}}maintenance-association protection {mep 104 {interface ge-2/0/1.0;direction down;remote-mep 1001;}}}}

Published: 2012-11-29