Supported Platforms
Example: Configuring an Egress Protection LSP for a Layer 2 Circuit
This example shows how to configure an egress protection LSP.
Requirements
Egress protection LSPs are supported on Juniper Networks MX Series routers only. This requirement applies to the PE routers facilitating the egress protection LSP.
Egress Protection LSP Overview
If there is a link or node failure in the core network, a protection mechanism such as MPLS fast reroute can be triggered on the transport LSPs between the PE routers to repair the connection within tens of milliseconds. An egress protection LSP addresses the problem of when a link failure occurs at the edge of the network (for example, a link failure between a PE router and a CE device). Egress protection LSPs do not address the problem of a node failure at the edge of the network (for example, a failure of a PE router). An egress protection LSP is an RSVP-signaled ultimate hop popping LSP.
This example includes the following configuration concepts and statements that are unique to the configuration of an egress protection LSP:
- context-identifier—Specifies an IPV4 address used to define the pair of PE routers participating in the egress protection LSP. The context identifier is used to assign an identifier to the protector PE router. The identifier is propagated to the other PE routers participating in the network, making it possible for the protected egress PE router to signal the egress protection LSP to the protector PE router.
- egress-protection—Configures the protector information for the protected Layer 2 circuit and configures the protector Layer 2 circuit at the [edit protocols l2circuit] hierarchy level. Configures an LSP as an egress protection LSP at the [edit protocols mpls label-switched-path lsp-name] hierarchy level. It also configures the context identifier at the [edit protocols mpls] hierarchy level.
- protected-l2circuit—Specifies which Layer 2 circuit is to be protected by the egress protect LSP. This statement includes the following sub-statements: ingress-pe, egress-pe, and virtual-circuit-id. These sub-statements specify the address of the PE router at the ingress of the Layer 2 circuit, the address of the PE router at the egress of the Layer 2 circuit, and the Layer 2 circuit’s identifier respectively.
- protector-interface—Specify the interface used by the egress protection LSP. In the event of a local link failure to a CE device, the egress protect LSP uses the interface specified to communicate with the protector PE router.
- protector-pe—Specify the IPv4 address of the protector PE router. The protector PE router must have a connection to the same CE device as the protected PE router for the egress protect LSP to function. This statement includes the following sub-statements: context-identifier and lsp. The lsp statement specifies the LSP to be used as the actual egress protection LSP.
Figure 1: Egress Protection LSP Configured from Router PE2 to Router PE3

Pseudowires are configured along two paths, one from router PE1 to router PE2 (pseudowire 12) and one from router PE1 to router PE3 (pseudowire 13). In the event of a failure on the link between router PE2 and device CE2, traffic is switched to the egress protection LSP configured between router PE2 and router PE3 (the protector PE router):
- Device CE1—Traffic origin
- Router PE1—Ingress PE router
- Router PE2—Egress PE router
- Router PE3—Protector PE router
- Device CE2—Traffic destintation
This example shows how to configure routers PE1, PE2, and PE3.
Egress Protection LSP Configuration
CLI Quick Configuration
To quickly configure an egress protection LSP, copy the following commands into a text file, modify the interface configurations to match your equipment, remove any line breaks, and then paste the commands into the CLI. This group of set commands is for router PE1.
To quickly configure an egress protection LSP, copy the following commands into a text file, modify the interface configurations to match your equipment, remove any line breaks, and then paste the commands into the CLI. This group of set commands is for router PE2.
To quickly configure an egress protection LSP, copy the following commands into a text file, modify the interface configurations to match your equipment, remove any line breaks, and then paste the commands into the CLI. This group of set commands is for router PE3.
Step-by-Step Procedure
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode.
To configure an egress protection LSP, complete the following steps for router PE1:
- Configure RSVP. Include the interface linked to router
PE2 and the interface linked to router PE3.[edit]user@PE1# edit protocols rsvp[edit protocols rsvp]user@PE1# set interface ge-3/1/0.1[edit protocols rsvp]user@PE1# set interface ge-3/1/3.2
- Configure LDP. Include the interface linked to router
PE2, the interface linked to router PE3, and the loopback interface.[edit]user@PE1# edit protocols ldp[edit protocols ldp]user@PE1# set interface ge-3/1/0.1[edit protocols ldp]user@PE1# set interface ge-3/1/3.2[edit protocols ldp]user@PE1# set interface lo0.0
- Configure MPLS. Include the interface linked to router
PE2 and the interface linked to router PE3.[edit]user@PE1# edit protocols mpls[edit protocols mpls]user@PE1# set interface ge-3/1/0.1[edit protocols mpls]user@PE1# set interface ge-3/1/3.2
- Configure OSPF. Include the interface linked to router
PE2, the interface linked to router PE3, and the loopback interface
in the configuration for the OSPF area.[edit]user@PE1# edit protocols ospf[edit protocols ospf]user@PE1# set interface traffic-engineering[edit protocols ospf]user@PE1# set area 0.0.0.0 interface ge-3/1/0.1[edit protocols ospf]user@PE1# set area 0.0.0.0 interface ge-3/1/3.2[edit protocols ospf]user@PE1# set area 0.0.0.0 interface lo0.0 passive
- Configure Layer 2 circuits to use the egress protection
LSP to protect against a link failure to device CE1.[edit]user@PE1# edit protocols l2circuit[edit protocols l2circuit]user@PE1# set neighbor 1.1.1.3 interface fe-3/3/0.1 virtual-circuit-id 32[edit protocols l2circuit]user@PE1# edit neighbor 1.1.1.3[edit protocols l2circuit neighbor 1.1.1.3]user@PE1# set interface fe-3/3/0.1 egress-protection protector-interface ge-3/1/2.2[edit protocols l2circuit]user@PE1# set neighbor 1.1.1.4 interface ge-3/1/2.2 virtual-circuit-id 33
- Configure a load balancing policy.[edit]user@PE1# set policy-options policy-statement load-balance-example then load-balance per-packet
- Configure the routing options to export routes based on
the load balancing policy.[edit]user@PE1# set routing-options router-id 1.1.1.2[edit]user@PE1# set routing-options forwarding-table export load-balance-example
- If you are done configuring the device, commit the configuration.
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode.
To configure an egress protection LSP, complete the following steps for router PE2:
- Configure RSVP. Include the interface linked to the ingress
PE router and the interface linked to the CE device.[edit]user@PE2# edit protocols rsvp[edit protocols rsvp]user@PE2# set tunnel-services[edit protocols rsvp]user@PE2# set interface ge-2/3/0.3[edit protocols rsvp]user@PE2# set interface ge-2/3/1.4 link-protection
- Configure LDP. Include the interface linked to the ingress
PE router and the interface linked to the CE device.[edit]user@PE2# edit protocols ldp[edit protocols ldp]user@PE2# set interface ge-2/3/0.3[edit protocols ldp]user@PE2# set interface ge-2/3/1.4[edit protocols ldp]user@PE2# set interface lo0.0[edit protocols ldp]user@PE2# set upstream-label-assignment
- Configure MPLS and the LSP which acts as the egress protection
LSP.[edit]user@PE2# edit protocols mpls[edit protocols mpls]user@PE2# set interface ge-2/3/0.3[edit protocols mpls]user@PE2# set interface ge-2/3/1.4[edit protocols mpls]user@PE2# set label-switched-path protected-lsp to 2.2.3.4[edit protocols mpls]user@PE2# set label-switched-path protected-lsp egress-protection
- Configure OSPF.[edit]user@PE2# edit protocols ospf[edit protocols ospf]user@PE2# set interface traffic-engineering[edit protocols ospf]user@PE2# set interface area 0.0.0.0 interface ge-2/3/0.3[edit protocols ospf]user@PE2# set interface area 0.0.0.0 interface ge-2/3/1.4[edit protocols ospf]user@PE2# set interface area 0.0.0.0 interface lo0.0 passive
- Configure the Layer 2 circuit to use the egress protection
LSP.[edit]user@PE2# edit protocols l2circuit[edit protocols l2circuit]user@PE2# set neighbor 1.1.1.2 interface ge-2/0/2.5 virtual-circuit-id 23[edit protocols l2circuit]user@PE2# edit neighbor 1.1.1.2[edit protocols l2circuit neighbor 1.1.1.2]user@PE2# set interface ge-2/0/2.5 egress-protectionprotector-pe 1.1.1.4[edit protocols l2circuit neighbor 1.1.1.2]user@PE2# set interface ge-2/0/2.5 egress-protection protector-pe context-identifier 2.2.3.4
- Configure a load balancing policy.[edit]user@PE1# set policy-options policy-statement load-balance-example then load-balance per-packet
- Configure the routing options to export routes based on
the load balancing policy.[edit]user@PE2# set routing-options router-id 1.1.1.3[edit]user@PE2# set routing-options forwarding-table export load-balance-example
- If you are done configuring the device, commit the configuration.
Step-by-Step Procedure
To configure an egress protection LSP, complete the following steps for router PE3:
- Configure RSVP. Include the interface linked to the ingress
PE router and the interface linked to the CE device.[edit]user@PE3# edit protocols rsvp[edit protocols rsvp]user@PE3# set tunnel-services[edit protocols rsvp]user@PE3# set interface ge-2/0/0.6[edit protocols rsvp]user@PE3# set interface ge-2/0/1.7
- Configure LDP. Include the interface linked to the ingress
PE router and the interface linked to the CE device.[edit]user@PE3# edit protocols ldp[edit protocols ldp]user@PE3# set interface ge-2/0/0.6[edit protocols ldp]user@PE3# set interface ge-2/0/1.7[edit protocols ldp]user@PE3# set interface lo0.0[edit protocols ldp]user@PE3# set upstream-label-assignment
- Configure MPLS and the LSP which acts as the egress protection
LSP.[edit]user@PE3# edit protocols mpls[edit protocols mpls]user@PE3# set interface ge-2/0/0.6[edit protocols mpls]user@PE3# set interface ge-2/0/1.7[edit protocols mpls]user@PE3# set egress-protection context-identifier 2.2.3.4 protector
- Configure OSPF.[edit]user@PE3# edit protocols ospf[edit protocols ospf]user@PE3# set interface traffic-engineering[edit protocols ospf]user@PE3# set area 0.0.0.0 interface ge-2/0/0.6[edit protocols ospf]user@PE3# set area 0.0.0.0 interface ge-2/0/1.7[edit protocols ospf]user@PE3# set area 0.0.0.0 interface lo0.0 passive
- Configure the Layer 2 circuit to use the egress protection
LSP.[edit]user@PE3# edit protocols l2circuit[edit protocols l2circuit]user@PE3# set neighbor 1.1.1.2 interface ge-2/0/3.21 virtual-circuit-id 42[edit protocols l2circuit]user@PE3# edit neighbor 1.1.1.2[edit protocols l2circuit neighbor 1.1.1.2]user@PE3# set interface ge-2/0/3.21 egress-protection protected-l2circuit ingress-pe 1.1.1.2[edit protocols l2circuit neighbor 1.1.1.2]user@PE3# set interface ge-2/0/3.21 egress-protection protected-l2circuit egress-pe 1.1.1.3[edit protocols l2circuit neighbor 1.1.1.2]user@PE3# set interface ge-2/0/3.21 egress-protection protected-l2circuitvirtual-circuit-id 31
- If you are done configuring the device, commit the configuration.
Results
From configuration mode, confirm your configuration on router PE1 by entering the show protocols, show policy-options, and show routing-options commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
From configuration mode, confirm your configuration on router PE2 by entering the show protocols, show policy-options, and show routing-options commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
From configuration mode, confirm your configuration on router PE3 by entering the show protocols command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.