ON THIS PAGE
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 Series 5G Universal Routing Platforms
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.
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.
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.
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.
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
- Verifying that OAM CFM Connections are Active
- Configuring Connection Protection Using Another PE Router for the Protection Path
- Verifying that OAM CFM Connections are Active
- Configuring Connection Protection Using an Another PE Router for the Working Path
- Verifying that OAM CFM Connections are Active
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:
-
Configure the Layer 2 circuit on Router PE1.
[edit protocols l2circuit] user@PE1# set local-switching interface ge-2/0/2.0 connection-protection user@PE1# set local-switching interface ge-2/0/2.0 end-interface interface ge-2/0/1.0 user@PE1# set local-switching interface ge-2/0/2.0 end-interface backup-interface ge-2/0/1.1
-
Configure the routing policy on Router PE1.
[edit policy-options] user@PE1# set policy-statement protection-policy then load-balance per-packet
-
Enable the routing policy on Router PE1.
[edit routing-options] user@PE1# set forwarding-table export protection-policy
-
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] user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md level 5
-
Configure OAM on Router PE1 for the working path.
[edit protocols oam ethernet] user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working continuity-check interval 100ms user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 interface ge-2/0/1.0 user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 interface working user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 direction down user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 remote-mep 103
-
Configure OAM on Router PE1 for the protection path.
[edit protocols oam ethernet] user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection continuity-check interval 100ms user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 interface ge-2/0/1.1 user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 interface protect user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 direction down user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 remote-mep 104
-
Configure the OAM maintenance domain on Router PE2.
[edit protocols oam ethernet] user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md level 5
-
Configure OAM on Router PE2 for the working path.
[edit protocols oam ethernet] user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working continuity-check interval 100ms user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 interface ge-2/0/1.0 user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 interface working user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 direction down user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 remote-mep 1000
-
Configure OAM on Router PE2 for the protection path.
[edit protocols oam ethernet] user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection continuity-check interval 100ms user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 interface ge-2/0/1.1 user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 interface protect user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 direction down user@PE2# set 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 l2circuit local-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-options policy-statement protection-policy { then { load-balance per-packet; } }
user@host> show routing-options forwarding-table { export protection-policy; }
user@host> show protocols oam ethernet connectivity-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; } } } }
Verifying that OAM CFM Connections are Active
Purpose
Verify that the CFM connections are active on each of the PE routers.
Action
Execute the following command on each of the PE routers.
-
Verify that the CFM working connection on Router PE1 is active.
user@ PE1> show oam ethernet connectivity-fault-management mep-database maintenance-domain l2circuit-example-md maintenance-association working Interface status: Active, Link status: Up
-
Verify that the CFM protect connection on Router PE1 is active
user@ PE2> show oam ethernet connectivity-fault-management mep-database maintenance-domain l2circuit-example-md maintenance-association protection Interface status: Active, Link status: Up
-
Verify that the CFM working connection on Router PE2 is active.
user@ PE2> show oam ethernet connectivity-fault-management mep-database maintenance-domain l2circuit-example-md maintenance-association working Interface status: Active, Link status: Up
-
Verify that the CFM protect connection on Router PE2 is active.
user@ PE2> show oam ethernet connectivity-fault-management mep-database maintenance-domain l2circuit-example-md maintenance-association protection Interface status: Active, Link status: Up
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:
-
Configure the Layer 2 circuit on Router PE1.
[edit protocols l2circuit] user@PE1# set local-switching interface ge-2/0/2.0 connection-protection user@PE1# set local-switching interface ge-2/0/2.0 backup-neighbor 192.0.2.2 virtual-circuit-id 2 user@PE1# set local-switching interface ge-2/0/2.0 backup-neighbor 192.0.2.2 community example user@PE1# set local-switching interface ge-2/0/2.0 end-interface interface ge-2/0/1.0
-
Configure the routing policy on Router PE1.
[edit policy-options] user@PE1# set policy-statement load-balance then load-balance per-packet user@PE1# set policy-statement protection-policy term protect from community example user@PE1# set policy-statement protection-policy term protect then install-nexthop lsp-regex lsp-protect-*
-
Configure the community.
[edit policy-options] user@PE1# set community example members 65100:10
-
Configure the routing options on Router PE1.
[edit routing-options] user@PE1# set forwarding-table export load-balance
-
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] user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md level 5
-
Configure OAM on Router PE1 for the working path.
[edit protocols oam ethernet] user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 interface ge-2/0/1.0 user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 direction down user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 remote-mep 103
-
Configure OAM on Router PE1 for the protection path.
[edit protocols oam ethernet] user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 interface ge-2/0/0.0 user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 direction down user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 remote-mep 104
-
Configure OAM on Router PE2 to setup the maintenance domain.
[edit protocols oam ethernet] user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md level 5
-
Configure OAM on Router PE2 for the working path.
[edit protocols oam ethernet] user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 interface ge-2/0/1.0 user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 direction down user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 remote-mep 1000
-
Configure OAM on Router PE2 for the protection path.
[edit protocols oam ethernet] user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 interface ge-2/0/0.0 user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 direction down user@PE2# set 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 l2circuit local-switching { interface ge-2/0/2.0 { connection-protection; backup-neighbor 192.0.2.2 { virtual-circuit-id 2; community example; } end-interface { interface ge-2/0/1.0; } } }
user@host> show policy-options community example members 65100:10; policy-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-options forwarding-table { export load-balance; }
user@host> show protocols oam ethernet connectivity-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; } } } }
Verifying that OAM CFM Connections are Active
Purpose
Verify that the CFM connections are active on each of the PE routers.
Action
Execute the following command on each of the PE routers.
-
Verify that the CFM working connection on Router PE1 is active.
user@ PE1> show oam ethernet connectivity-fault-management mep-database maintenance-domain l2circuit-example-md maintenance-association working Interface status: Active, Link status: Up
-
Verify that the CFM protect connection on Router PE1 is active
user@ PE2> show oam ethernet connectivity-fault-management mep-database maintenance-domain l2circuit-example-md maintenance-association protection Interface status: Active, Link status: Up
-
Verify that the CFM working connection on Router PE2 is active.
user@ PE2> show oam ethernet connectivity-fault-management mep-database maintenance-domain l2circuit-example-md maintenance-association working Interface status: Active, Link status: Up
-
Verify that the CFM protect connection on Router PE2 is active.
user@ PE2> show oam ethernet connectivity-fault-management mep-database maintenance-domain l2circuit-example-md maintenance-association protection Interface status: Active, Link status: Up
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:
-
Configure the Layer 2 circuit on Router PE1.
[edit protocols l2circuit] user@PE1# set neighbor 192.0.2.2 interface ge-2/0/2.0 virtual-circuit-id 2 user@PE1# set neighbor 192.0.2.2 interface ge-2/0/2.0 community example user@PE1# set neighbor 192.0.2.2 interface ge-2/0/2.0 connection-protection user@PE1# set neighbor 192.0.2.2 interface ge-2/0/2.0 backup-neighbor 192.0.2.3 virtual-circuit-id 3 user@PE1# set neighbor 192.0.2.2 interface ge-2/0/2.0 backup-neighbor 192.0.2.3 standby
-
Configure the policies on Router PE1.
[edit policy-options] user@PE1# set policy-statement load-balance then load-balance per-packet user@PE1# set policy-statement protection-policy term protect from community example user@PE1# set policy-statement protection-policy term protect then install-nexthop lsp-regex lsp-primary
-
Configure the community.
[edit policy-options] user@PE1# set community example members 65100:10
-
Configure the routing options on Router PE1.
[edit routing-options] user@PE1# set forwarding-table export load-balance
-
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] user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md level 5
-
Configure OAM on Router PE1 for the working path.
[edit protocols oam ethernet] user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 interface ge-2/0/0.0 user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 direction down user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 1000 remote-mep 103
-
Configure OAM on Router PE1 for the protection path.
[edit protocols oam ethernet] user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 interface ge-2/0/1.0 user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 direction down user@PE1# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 1001 remote-mep 104
-
Configure OAM on Router PE2 to setup the maintenance domain.
[edit protocols oam ethernet] user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md level 5
-
Configure OAM on Router PE2 for the working path.
[edit protocols oam ethernet] user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 interface ge-2/0/0.0 user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 direction down user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association working mep 103 remote-mep 1000
-
Configure OAM on Router PE2 for the protection path.
[edit protocols oam ethernet] user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 interface ge-2/0/1.0 user@PE2# set connectivity-fault-management maintenance-domain l2circuit-example-md maintenance-association protection mep 104 direction down user@PE2# set 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 l2circuit neighbor 192.0.2.2 { interface ge-2/0/2.0 { virtual-circuit-id 2; community example; connection-protection; backup-neighbor 192.0.2.3 { virtual-circuit-id 3; standby; } } }
user@host> show policy-options community example members 65100:10; policy-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-options forwarding-table { export load-balance; }
user@host> show protocols oam ethernet connectivity-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; } } } }
Verifying that OAM CFM Connections are Active
Purpose
Verify that the CFM connections are active on each of the PE routers.
Action
Execute the following command on each of the PE routers.
-
Verify that the CFM working connection on Router PE1 is active.
user@ PE1> show oam ethernet connectivity-fault-management mep-database maintenance-domain l2circuit-example-md maintenance-association working Interface status: Active, Link status: Up
-
Verify that the CFM protect connection on Router PE1 is active
user@ PE2> show oam ethernet connectivity-fault-management mep-database maintenance-domain l2circuit-example-md maintenance-association protection Interface status: Active, Link status: Up
-
Verify that the CFM working connection on Router PE2 is active.
user@ PE2> show oam ethernet connectivity-fault-management mep-database maintenance-domain l2circuit-example-md maintenance-association working Interface status: Active, Link status: Up
-
Verify that the CFM protect connection on Router PE2 is active.
user@ PE2> show oam ethernet connectivity-fault-management mep-database maintenance-domain l2circuit-example-md maintenance-association protection Interface status: Active, Link status: Up