ON THIS PAGE
Example: Configuring MPLS Egress Protection Service Mirroring for BGP Signaled Layer 2 Services
Starting in Junos OS Release 14.2, Junos OS supports the restoration of egress traffic when there is a link or node failure in the egress PE node. 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 a node-link failure at the edge of the network (for example, a failure of a PE router).
This example shows how to configure link protection for BGP signaled Layer 2 services.
Requirements
MX Series Routers running Junos OS Release 14.2 or later.
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 a node-link failure at the edge of the network (for example, a failure of a PE router).
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 or IPv6 address used to define the pair of PE routers participating in the egress protection LSP. It is assigned to each ordered pair of primary PE and the protector to facilitate protection establishment. This address is globally unique, or unique in the address space of the network where the primary PE and the protector reside.
egress-protection—Configures the protector information for the protected Layer 2 circuit and configures the protector Layer 2 circuit at the [edit protocols mpls] hierarchy level. Configures an LSP as an egress protection LSP at the [edit protocols mpls] hierarchy level.
protector—Configures the creation of standby pseudowires on the backup PE for link or node protection for the instance.

In the event of a failure of the egress PE Router PE1, traffic is switched to the egress protection LSP configured between Router PE1 and Router PE2 (the protector PE router):
Device CE2—Traffic origin
Router PE3—Ingress PE router
Router PE1— (Primary) Egress PE router
Router PE2—Protector PE router
Device CE1—Traffic destination
When the link between CE1– PE1 goes downs, PE1 will briefly redirect that traffic toward CE1, to PE2. PE2 forwards it to CE1 until ingress router PE3 recalculates to forward the traffic to PE2.
Initially the traffic direction was: CE2 – PE3 – P – PE1 – CE1.
When the link between CE1– PE1 goes down, the traffic will be: CE2 – PE3 – P – PE1 – PE2 –CE1. PE3 then recalculates the path: CE2 – PE3 – P – PE2 – CE1.
This example shows how to configure routers PE1, PE2, and PE3.
Configuration
CLI Quick Configuration
To quickly configure an egress protection LSP, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configurations, copy and then paste the commands into the CLI and enter commit from configuration mode.
PE1
PE2
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 for router PE1:
- Configure RSVP.content_copy zoom_out_map
- Configure MPLS to use the egress protection LSP to protect
against a link failure to Device CE1.content_copy zoom_out_map[edit protocols mpls]user@PE1# set interface alluser@PE1# set interface fxp0.0 disableuser@PE1# set egress-protection context-identifier 198.51.100.3 primaryuser@PE1# set egress-protection context-identifier 198.51.100.3 advertise-mode stub-aliasuser@PE1# set egress-protection traceoptions file ep size 100muser@PE1# set egress-protection traceoptions flag all
- Configure BGP.content_copy zoom_out_map[edit protocols bgp]user@PE1# set traceoptions file bgp.log world-readableuser@PE1# set group ibgp type internaluser@PE1# set group ibgp local-address 10.255.183.58user@PE1# set group ibgp family inet unicastuser@PE1# set group ibgp family l2vpn signaling egress-protectionuser@PE1# set group ibgp neighbor 192.0.2.3user@PE1# set group ibgp neighbor 192.0.2.4
- Configure IS-IS.content_copy zoom_out_map[edit protocols isis]user@PE1# set traceoptions file isis-edge size 10m world-readableuser@PE1# set traceoptions flag erroruser@PE1# set level 1 disableuser@PE1# set level 2 wide-metrics-onlyuser@PE1# set interface all point-to-pointuser@PE1# set interface all level 2 metric 10user@PE1# set interface fxp0.0 disable
- Configure LDP.content_copy zoom_out_map[edit protocols ldp]user@PE1# set interface alluser@PE1# set interface fxp0.0 disable
- Configure a load-balancing policy.content_copy zoom_out_map[edit]user@PE1# set policy-options policy-statement lb then load-balance per-packet
- Configure the routing options to export routes based on
the load-balancing policy.content_copy zoom_out_map[edit routing-options]user@PE1# set traceoptions file ro.loguser@PE1# set traceoptions flag alluser@PE1# set autonomous-system 100user@PE1# set forwarding-table export lb
- Configure BGP to advertise nrli from the routing instance
with context-ID as next-hop.content_copy zoom_out_map[edit routing-instances]user@PE1# set foo instance-type l2vpnuser@PE1# set foo egress-protection context-identifier 198.51.100.3user@PE1# set foo interface ge-2/0/2.0user@PE1# set foo route-distinguisher 10.255.183.58:1user@PE1# set foo vrf-target target:9000:1
- Configure l2vpn instance to use the egress LSP configured.content_copy zoom_out_map[edit routing-instances]user@PE1# set foo protocols l2vpn encapsulation-type ethernet-vlanuser@PE1# set foo protocols l2vpn site foo site-identifier 1user@PE1# set foo protocols l2vpn site foo site-preference primaryuser@PE1# set foo protocols l2vpn site foo interface ge-2/0/2.0 remote-site-id 2
- If you are done configuring the device, enter commit from configuration mode.
Step-by-Step Procedure
To configure an egress protection LSP for Router PE2:
- Configure RSVP.content_copy zoom_out_map
- Configure MPLS and the LSP that acts as the egress protection
LSP.content_copy zoom_out_map[edit protocols mpls]user@PE2# set interface alluser@PE2# set interface fxp0.0 disableuser@PE2# set egress-protection context-identifier 198.51.100.3 protectoruser@PE2# set egress-protection context-identifier 198.51.100.3 advertise-mode stub-aliasuser@PE2# set egress-protection traceoptions file ep size 100muser@PE2# set egress-protection traceoptions flag all
- Configure BGP.content_copy zoom_out_map[edit protocols bgp]user@PE2# set traceoptions file bgp.log world-readableuser@PE2# set group ibgp type internaluser@PE2# set group ibgp local-address 10.255.183.57user@PE2# set group ibgp family inet unicastuser@PE2# set group ibgp family l2vpn signalinguser@PE2# set group ibgp family l2vpn egress-protectionuser@PE2# set group ibgp neighbor 192.0.2.3user@PE2# set group ibgp neighbor 192.0.2.4
- Configure IS-IS.content_copy zoom_out_map[edit protocols isis]user@PE2# set traceoptions file isis-edge size 10m world-readableuser@PE2# set traceoptions flag erroruser@PE2# set level 1 disableuser@PE2# set level 2 wide-metrics-onlyuser@PE2# set interface all point-to-pointuser@PE2# set interface all level 2 metric 10user@PE2# set interface fxp0.0 disable
- Configure LDP.content_copy zoom_out_map[edit protocols ldp]user@PE2# set interface alluser@PE2# set interface fxp0.0 disable
- Configure a load-balancing policy.content_copy zoom_out_map[edit]user@PE2# set policy-options policy-statement lb then load-balance per-packet
- Configure the routing options to export routes based on
the load-balancing policy.content_copy zoom_out_map[edit routing-options]user@PE2# set traceoptions file ro.loguser@PE2# set traceoptions flag alluser@PE2# set autonomous-system 100user@PE2# set forwarding-table export lb
- Configure BGP to advertise nrli from the routing instance
with context-ID as next-hop.content_copy zoom_out_map[edit routing-instances]user@PE2# set foo instance-type l2vpnuser@PE2# set foo egress-protection protectoruser@PE2# set foo interface ge-2/0/2.0user@PE2# set foo route-distinguisher 10.255.183.57:1user@PE2# set foo vrf-target target:9000:1
- Configure l2vpn instance to use the egress LSP configured.content_copy zoom_out_map[edit routing-instances]user@PE2# set foo protocols l2vpn encapsulation-type ethernet-vlanuser@PE2# set foo protocols l2vpn site foo hot-standbyuser@PE2# set foo protocols l2vpn site foo site-identifier 1user@PE2# set foo protocols l2vpn site foo site-preference backupuser@PE2# set foo protocols l2vpn site foo interface ge-2/0/2.0 remote-site-id 2
- If you are done configuring the device, enter commit from configuration mode.
Step-by-Step Procedure
To configure an egress protection LSP for Router PE3:
- Configure RSVP.content_copy zoom_out_map
- Configure MPLS.content_copy zoom_out_map
- Configure BGP.content_copy zoom_out_map[edit protocols bgp]user@PE3# set traceoptions file bgp.log world-readableuser@PE3# set group ibgp type internaluser@PE3# set group ibgp local-address 10.255.183.61user@PE3# set group ibgp family inet unicastuser@PE3# set group ibgp family l2vpn signalinguser@PE3# set group ibgp neighbor 192.0.2.3user@PE3# set group ibgp neighbor 192.0.2.4
- Configure IS-IS.content_copy zoom_out_map[edit protocols isis]user@PE3# set traceoptions file isis-edge size 10m world-readableuser@PE3# set traceoptions flag erroruser@PE3# set level 1 disableuser@PE3# set level 2 wide-metrics-onlyuser@PE3# set protocols isis interface all point-to-point[edit protocols isis]user@PE3# set protocols isis interface all level 2 metric 10[edit protocols isis]user@PE3# set protocols isis interface fxp0.0 disable
- Configure LDP.content_copy zoom_out_map[edit protocols ldp]user@PE3# set interface alluser@PE3# set interface fxp0.0 disable
- Configure a load-balancing policy.content_copy zoom_out_map[edit]user@PE3# set policy-options policy-statement lb then load-balance per-packet
- Configure the routing options to export routes based on
the load-balancing policy.content_copy zoom_out_map[edit routing-options]user@PE3# set traceoptions file ro.loguser@PE3# set traceoptions flag normaluser@PE3# set traceoptions flag routeuser@PE3# set autonomous-system 100user@PE3# set forwarding-table export lb
- Configure BGP to advertise nlri from the routing instance
with context-ID as next-hop.content_copy zoom_out_map[edit]user@PE3# set routing-instances foo instance-type l2vpnuser@PE3# set routing-instances foo interface ge-2/1/2.0user@PE3# set routing-instances foo route-distinguisher 10.255.183.61:1user@PE3# set routing-instances foo vrf-target target:9000:1
- Configure l2vpn to specify the interface that connects
to the site and the remote interface to which you want the specified
interface to connect.content_copy zoom_out_map[edit routing-instances]user@PE3# set foo protocols l2vpn encapsulation-type ethernet-vlanuser@PE3# set foo protocols l2vpn site foo site-identifier 2user@PE3# set foo protocols l2vpn site foo interface ge-2/1/2.0 remote-site-id 1
- If you are done configuring the device, enter commit from 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 instructions in this example to correct the configuration.
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 instructions in this example to correct the configuration.
From configuration mode, confirm your configuration on Router PE3 by entering the show protocols, show policy-options, and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
Verification
Confirm that the configuration is working properly.
Verifying the L2VPN Configuration
Purpose
Verify that LSP is protected by the connection protection logic.
Action
From operational mode, run the show l2vpn connections extensive command.
Layer-2 VPN connections: Legend for connection status (St) EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS EM -- encapsulation mismatch WE -- interface and instance encaps not same VC-Dn -- Virtual circuit down NP -- interface hardware not present CM -- control-word mismatch -> -- only outbound connection is up CN -- circuit not provisioned <- -- only inbound connection is up OR -- out of range Up -- operational OL -- no outgoing label Dn -- down LD -- local site signaled down CF -- call admission control failure RD -- remote site signaled down SC -- local and remote site ID collision LN -- local site not designated LM -- local site ID not minimum designated RN -- remote site not designated RM -- remote site ID not minimum designated XX -- unknown connection status IL -- no incoming label MM -- MTU mismatch MI -- Mesh-Group ID not available BK -- Backup connection ST -- Standby connection PF -- Profile parse failure PB -- Profile busy RS -- remote site standby SN -- Static Neighbor LB -- Local site not best-site RB -- Remote site not best-site VM -- VLAN ID mismatch Legend for interface status Up -- operational Dn -- down Instance: foo Local site: foo (1) connection-site Type St Time last up # Up trans 2 rmt Up Aug 3 00:08:14 2001 1 Local circuit: ge-2/0/2.0, Status: Up Remote PE: 192.0.2.3 Incoming label: 32769, Outgoing label: 32768 Egress Protection: Yes Time Event Interface/Lbl/PE Aug 3 00:08:14 2001 PE route up Aug 3 00:08:14 2001 Out lbl Update 32768 Aug 3 00:08:14 2001 In lbl Update 32769 Aug 3 00:08:14 2001 ckt0 up fe-0/0/0.0
Meaning
The Egress Protection: Yes output shows that the given PVC is protected by connection protection logic.
Verifying the Routing Instance Details
Purpose
Verify the routing instance information and the context identifier configured on the primary, which is used as the next-hop address in case of node-link failure.
Action
From operational mode, run the show route foo detail command.
foo: Router ID: 0.0.0.0 Type: l2vpn non-forwarding State: Active Interfaces: lt-1/2/0.56 Route-distinguisher: 10.255.255.11:1 Vrf-import: [ __vrf-import-foo-internal__ ] Vrf-export: [ __vrf-export-foo-internal__ ] Vrf-import-target: [ target:100:200 ] Vrf-export-target: [ target:100:200 ] Fast-reroute-priority: low Vrf-edge-protection-id: 198.51.100.3 Tables: foo.l2vpn.0 : 5 routes (3 active, 0 holddown, 0 hidden) foo.l2id.0 : 6 routes (2 active, 0 holddown, 0 hidden)
Meaning
The context-id is set to 198.51.100.3 and the Vrf-import: [ __vrf-import-foo-internal__] in the output mentions the policy used for rewriting the next-hop address.
Verifying the IS-IS Configuration
Purpose
Verify the IS-IS context identifier information.
Action
From operational mode, run the show isis context-identifier detail command.
IS-IS context database: Context L Owner Role Primary Metric 198.51.100.3 2 MPLS Protector pro17-b-lr-R1 0 Advertiser pro17-b, Router ID 10.255.107.49, Level 2, tlv protector Advertiser pro17-b-lr-R1, Router ID 10.255.255.11, Metric 1, Level 2, tlv prefix
Meaning
Router PE2 is the protector and the configured context identifier is in use for the MPLS protocol.
Verifying the MPLS Configuration
Purpose
Verify the context identifier details on the primary and protector PEs.
Action
From operational mode, run the show mpls context-identifier detail command.
ID: 198.51.100.3 Type: primary, Metric: 1, Mode: alias Total 1, Primary 1, Protector 0
ID: 198.51.100.3 Type: protector, Metric: 16777215, Mode: alias Context table: __198.51.100.3__.mpls.0, Label out: 299968
Instance Type Protection-Type foo local-l2vpn Protector Route Target 100:200
Meaning
Context-id is 198.51.100.3, advertise-mode is alias, the MPLS table created for egress protection is __198.51.100.3__.mpls.0, and the egress instance name is foo, which is of type local-l2vpn.