Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Interconnecting a Layer 2 VPN with a Layer 2 VPN

This example provides a step-by-step procedure for interconnecting and verifying a Layer 2 VPN with a Layer 2 VPN. It contains the following sections:

Requirements

This example uses the following hardware and software components:

  • Junos OS Release 9.3 or later

  • 2 MX Series 5G Universal Routing Platforms

  • 2 M Series Multiservice Edge Routers

  • 1 T Series Core Routers

  • 1 EX Series Ethernet Switches

Overview and Topology

Topology

The physical topology of the Layer 2 VPN to Layer 2 VPN connection example is shown in Figure 1.

Figure 1: Physical Topology of a Layer 2 VPN to Layer 2 VPN ConnectionPhysical Topology of a Layer 2 VPN to Layer 2 VPN Connection

The logical topology of a Layer 2 VPN to Layer 2 VPN connection is shown in Figure 2.

Figure 2: Logical Topology of a Layer 2 VPN to Layer 2 VPN ConnectionLogical Topology of a Layer 2 VPN to Layer 2 VPN Connection

Configuration

Note:

In any configuration session, it is good practice to verify periodically that the configuration can be committed using the commit check command.

In this example, the router being configured is identified using the following command prompts:

  • CE1 identifies the customer edge 1 (CE1) router

  • PE1 identifies the provider edge 1 (PE1) router

  • CE3 identifies the customer edge 3 (CE3) router

  • PE3 identifies the provider edge 3 (PE3) router

  • CE5 identifies the customer edge 5 (CE5) router

  • PE5 identifies the provider edge 5 (PE5) router

This example is organized in the following sections:

Configuring Protocols on the PE and P Routers

Step-by-Step Procedure

All of the PE routers and P routers are configured with OSPF as the IGP protocol. The MPLS, LDP, and BGP protocols are enabled on all of the interfaces except fxp.0. Core-facing interfaces are enabled with the MPLS address and inet address.

  1. Configure all the PE and P routers with OSPF as the IGP. Enable the MPLS, LDP, and BGP protocols on all interfaces except fxp.0. The following configuration snippet shows the protocol configuration for Router PE1:

  2. Configure the PE and P routers with OSPF as the IGP. Enable the MPLS, LDP, and BGP protocols on all interfaces except fxp.0. The following configuration snippet shows the protocol configuration for Router PE3:

Step-by-Step Procedure

Configuring the Layer 2 VPN Protocol and Interfaces

  1. On Router PE1, configure the ge-1/0/0 interface encapsulation. To configure the interface encapsulation, include the encapsulation statement and specify the ethernet-ccc option (vlan-ccc encapsulation is also supported). Configure the ge-1/0/0.0 logical interface family for circuit cross-connect functionality. To configure the logical interface family, include the family statement and specify the ccc option. The encapsulation should be configured the same way for all routers in the Layer 2 VPN domain.

  2. On Router PE1, configure the Layer 2 VPN protocols. Configure the remote site ID as 3. Site ID 3 represents Router PE3 (Hub-PE). To configure the Layer 2 VPN protocols, include the l2vpn statement at the [edit routing-instances routing-instances-name protocols] hierarchy level. Layer 2 VPNs use BGP as the signaling protocol.

  3. On Router PE5, configure the ge-2/0/0 interface encapsulation by including the encapsulation statement and specify the ethernet-ccc option. Configure the ge-1/0/0.0 logical interface family for circuit cross-connect functionality by including the family statement and specifying the ccc option.

  4. On Router PE5, configure the Layer 2 VPN protocols by including the l2vpn statement at the [edit routing-instances routing-instances-name protocols] hierarchy level. Configure the remote site ID as 3.

  5. On Router PE3, configure the iw0 interface with two logical interfaces. To configure the iw0 interface, include the interfaces statement and specify iw0 as the interface name. For the unit 0 logical interface, include the peer-unit statement and specify the logical interface unit 1 as the peer interface. For the unit 1 logical interface, include the peer-unit statement and specify the logical interface unit 0 as the peer interface.

  6. On Router PE3, configure the edge-facing ge-1/0/1 interface encapsulation by including the encapsulation statement and specifying the ethernet-ccc option.

  7. On Router PE3, configure the logical loopback interface. The loopback interface is used to establish the targeted LDP sessions to Routers PE1 and Router PE5.

  8. On Router PE3, enable the Layer 2 interworking protocol. To enable the Layer 2 interworking protocol, include the l2iw statement at the [edit protocols] hierarchy level.

  9. On Router PE3, configure two Layer 2 VPN routing instances to terminate the Layer 2 VPN virtual circuits from Router PE1 and Router PE5, as shown.

Verifying the Layer 2 VPN to Layer 2 VPN Connection on Router PE3

Step-by-Step Procedure

  1. BGP is used for control plane signaling in a Layer 2 VPN. On Router PE1, use the show bgp command to verify that the BGP control plane for the Layer 2 VPN, has established a neighbor relationship with the route reflector that has IP address 192.0.2.7.

    Three Layer 2 VPN routes are received from the route reflector for each PE router in the topology.

  2. On Router PE1, use the show route command to verify that the BGP Layer 2 VPN routes are stored in the L2VPN.l2vpn.0 routing table for each PE router.

  3. On Router PE1, use the show ldp session command to verify that targeted LDP sessions are established to the PE routers in the network and that the state is Operational.

  4. On Router PE1, use the show l2vpn connections command to verify that the Layer 2 VPN to site 3 on Router PE3 (Hub-PE) is Up.

  5. On Router PE1, use the show route command to verify that the mpls.0 routing table is populated with the Layer 2 VPN routes used to forward the traffic using an LDP label. Notice that in this example, the router is pushing label 8000000.

Verifying the Layer 2 VPN to Layer 2 VPN Connection on Router PE3

Step-by-Step Procedure

  1. On Router PE3, use the show l2vpn connections command to verify that the Layer 2 VPN connections from Router PE1 and Router PE5 are Up and are using the iw0 interface.

  2. On Router PE3, use the show ldp neighbor command to verify that the targeted LDP session neighbor IP addresses are shown.

  3. On Router PE3, use the show bgp summary command to verify that the BGP control plane for the Layer 2 VPN, has established a neighbor relationship with the route reflector that has IP address 192.0.2.7.

  4. On Router PE3, use the show ldp session command to verify that targeted LDP sessions are established to all of the PE routers in the network and that the state is Operational.

  5. On Router PE3, use the show route command to verify that the mpls.0 routing table is populated with the Layer 2 VPN routes used to forward the traffic using an LDP label. Notice that in this example, the router is swapping label 800000. Also notice the two iw0 interfaces that are used for the Layer 2 interworking routes.

Step-by-Step Procedure

Testing Layer 2 VPN to Layer 2 VPN Connectivity (CE1 to CE5)

  1. On Router CE1, use the ping command to test connectivity to Router CE5. Notice that the response time is in milliseconds, confirming that the ping response is returned.

  2. On Router CE5, use the ping command to test connectivity to Router CE1. Notice that the response time is in milliseconds, confirming that the ping response is returned.

Results

The configuration and verification of this example have been completed. The following section is for your reference.

The relevant sample configuration for Router PE1 follows.

Router PE1

The relevant sample configuration for Router PE3 follows.

Router PE3