Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
MPLS Applications User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Configuring Ethernet over MPLS (Layer 2 Circuit)

date_range 05-Mar-25

To implement Ethernet over MPLS, you must configure a Layer 2 circuit on the provider edge (PE) switches. No special configuration is required on the customer edge (CE) switches. The provider switches require MPLS and LDP to be configured on the interfaces that will be receiving and transmitting MPLS packets.

Note:

A Layer 2 circuit is similar to a circuit cross-connect (CCC), except that multiple Layer 2 circuits can be transported over a single label-switched path (LSP) tunnel between two PE switches. In contrast, each CCC requires a dedicated LSP.

This topic describes how to configure the PE switches to support Ethernet over MPLS. You must configure interfaces and protocols on both the local PE (PE1) and the remote PE (PE2) switches. The interface configuration varies depending upon whether the Layer 2 circuit is port-based or VLAN-based.

Starting in Junos OS Release 20.3R1, support for Layer 2 circuit to provide Layer 2 VPN and VPWS with LDP signaling.

Figure 1 shows an example of a Layer 2 circuit configuration.

Figure 1: Ethernet over MPLS Layer 2 CircuitEthernet over MPLS Layer 2 Circuit
Note:

This topic refers to the local PE switch as PE1 and the remote PE switch as PE2. It also uses interface names rather than variables to help clarify the connections between the switches. The loopback addresses of the switches are configured as follows:

  • PE1: 10.127.1.1

  • PE2: 10.127.1.2

Note:

On QFX Series and EX4600 switches, the Layer 2 circuit CE facing interface does not support AE interfaces.

Configuring the Local PE Switch for Port-Based Layer 2 Circuit (Pseudo-wire)

CAUTION:

Configure MPLS networks with an MTU (maximum transmission unit) that is at least 12 bytes larger than the largest frame size that will be transported by the LSPs. If the size of a encapsulated packet on the ingress LSR exceeds the LSP MTU, that packet is dropped. If an egress LSR receives a packet on a VC LSP with a length (after the label stack and sequencing control word have been popped) that exceeds the MTU of the destination layer 2 interface, that packet is also dropped.

To configure the local PE switch (PE1) for a port-based layer 2 circuit (pseudo-wire):

  1. Configure an access CE-facing interface for Ethernet encapsulation:
    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/6 encapsulation ethernet-ccc
    user@switch# set xe-0/0/6 unit 0
    Note:

    Note that only unit number 0 is supported for Ethernet CCC.

  2. Configure the Layer 2 circuit from PE1 to PE2:
    content_copy zoom_out_map
    [edit protocols]
    user@switch#set l2circuit neighbor 10.127.1.2 interface xe-0/0/6 virtual-circuit-id 1
  3. Configure the label switched path from PE1 to PE2:
    content_copy zoom_out_map
    [edit protocols]
    user@switch#set mpls label-switched-path PE1-to-PE2 to 10.127.1.2
  4. Configure the protocols on the core and loopback interfaces:
    content_copy zoom_out_map
    [edit protocols]
    user@switch#set mpls interface xe-0/0/7
    user@switch#set ldp interface xe-0/0/7
    user@switch#set ldp interface lo0.0

    The changes are shown for the local PE:

    content_copy zoom_out_map
    [edit ]
    user@device# show interfaces 
    xe-0/0/6 {
        encapsulation ethernet-ccc;
        unit 0;
    }
    
    [edit]
    user@device# show protocols 
    l2circuit {
        neighbor 10.127.1.2 {
            interface xe-0/0/6.0 {
                virtual-circuit-id 1;
            }
        }
    }
    ldp {
        interface xe-0/0/7.0;
        interface lo0.0;
    }
    mpls {
        label-switched-path PE1-to-PE2 {
            to 10.127.1.2;
        }
        interface xe-0/0/7.0;
    }
    

Configuring the Remote PE Switch for Port-Based Layer 2 Circuit (Pseudo-wire)

To configure the remote PE switch (PE2) for a port-based layer 2 circuit:

  1. Configure an access CE-facing interface for Ethernet encapsulation:
    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/6 encapsulation ethernet-ccc
    user@switch# set xe-0/0/6 unit 0
  2. Configure the Layer 2 circuit from PE2 to PE1:
    content_copy zoom_out_map
    [edit protocols]
    user@switch#set l2circuit neighbor 10.127.1.2 interface xe-0/0/6 virtual-circuit-id 1
  3. Configure the label switched path from PE2 to PE1:
    content_copy zoom_out_map
    [edit protocols]
    user@switch#set mpls label-switched-path PE2-to-PE1 to 10.127.1.1
  4. Configure the protocols on the core and loopback interfaces:
    content_copy zoom_out_map
    [edit protocols]
    user@switch#set mpls interface xe-0/0/7
    user@switch#set ldp interface xe-0/0/7
    user@switch#set ldp interface lo0.0

Configuring the Local PE Switch for VLAN-Based Layer 2 Circuit

To configure the local PE switch (PE1) for a VLAN-based layer 2 circuit:

  1. Configure an access CE-facing interface for VLAN encapsulation:
    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/6 encapsulation vlan-ccc
  2. Configure the logical unit of the CE-facing interface for VLAN encapsulation:
    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/6 unit 0 encapsulation vlan-ccc
  3. Configure the logical unit of the CE-facing interface to belong to family ccc:
    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/6 unit 0 family ccc
  4. Configure the same interface for VLAN tagging:
    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/6 vlan-tagging
  5. Configure the VLAN ID of the interface:
    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/6 unit 0 vlan-id 600
  6. Configure the Layer 2 circuit from PE1 to PE2:
    content_copy zoom_out_map
    [edit protocols]
    user@switch#set l2circuit neighbor 10.127.1.2 interface xe-0/0/6 virtual-circuit-id 1
  7. Configure the label switched path from PE1 to PE2:
    content_copy zoom_out_map
    [edit protocols]
    user@switch#set mpls label-switched-path PE1-to-PE2 to 10.127.1.2
  8. Configure the protocols on the core and loopback interfaces:
    content_copy zoom_out_map
    [edit protocols]
    user@switch#set mpls interface xe-0/0/7
    user@switch#set ldp interface xe-0/0/7
    user@switch#set ldp interface lo0.0

Configuring the Remote PE Switch for VLAN-Based Layer 2 Circuit

To configure the remote PE switch (PE2) for a VLAN-based layer 2 circuit:

  1. Configure an access CE-facing interface for VLAN encapsulation:
    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/6 encapsulation vlan-ccc
  2. Configure the logical unit of the CE-facing interface for VLAN encapsulation:
    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/6 unit 0 encapsulation vlan-ccc
  3. Configure the logical unit of the CE-facing interface to belong to family ccc:
    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/6 unit 0 family ccc
  4. Configure the same interface for VLAN tagging:
    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/6 vlan-tagging
  5. Configure the VLAN ID of the interface:
    content_copy zoom_out_map
    [edit interfaces]
    user@switch# set xe-0/0/6 unit 0 vlan-id 600
  6. Configure the Layer 2 circuit from PE2 to PE1:
    content_copy zoom_out_map
    [edit protocols]
    user@switch#set l2circuit neighbor 10.127.1.1 interface xe-0/0/6 virtual-circuit-id 1
  7. Configure the label switched path from PE2 to PE1:
    content_copy zoom_out_map
    [edit protocols]
    user@switch#set mpls label-switched-path PE2-to-PE1 to 10.127.1.1
  8. Configure the protocols on the core and loopback interfaces:
    content_copy zoom_out_map
    [edit protocols]
    user@switch#set mpls interface xe-0/0/7
    user@switch#set ldp interface xe-0/0/7
    user@switch#set ldp interface lo0.0

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
20.3R1
Starting in Junos OS Release 20.3R1, support for Layer 2 circuit to provide Layer 2 VPN and VPWS with LDP signaling.
footer-navigation