3 mins read

L2VPN – Overview and Basic Configuration

LDP (Martini) and BGP (Kompella) are two L2VPN technologies are supported in Junos.

Both L2VPN technologies are used for connectivity of customer attachment circuits across the provider MPLS network. A L2VPN is a point-to-point connection between two PE routers. This type of VPN emulates transparent L2 services for the customers.

Normally the L2 attachment circuits on each end are the same but may also be different. For example, it is possible to have a tagged interface on one end and an untagged interface on the other end of the VPN.

Martini and Kompella Layer 2 VPNs both use Martini data plane encapsulation.

LDP based L2VPN (Martini)

LDP based L2VPNs use LDP for signaling the tunnel. Extended/targeted LDP sessions are exchanging the control information. A Virtual Circuit Label is distributed between PEs, which identifies the specific L2VPN.

LDP L2VPNs are not configured under routing instances. For each L2 connection a L2circuit must be configured including all required parameters. The Local and remote sites are configured manually, no auto-discovery is supported.

To enable extended LDP you have to configure interface lo0.0 under the protocols ldp hierarchy.

set interfaces ge-0/0/3 vlan-tagging
set interfaces ge-0/0/3 encapsulation flexible-ethernet-services
set interfaces ge-0/0/3 unit 113 vlan-id 113
set interfaces ge-0/0/3 unit 113 encapsulation vlan-ccc
set interfaces ge-0/0/3 unit 114 vlan-id 114
set interfaces ge-0/0/3 unit 114 encapsulation vlan-ccc
#
set protocols l2circuit neighbor 17.30.0.3 interface ge‐0/0/1.112 virtual‐circuit‐id 65113
set protocols l2circuit neighbor 17.30.0.3 interface ge‐0/0/1.113 virtual‐circuit‐id 65114

The neighbor is the remote PE loopback IP address enabled for LDP. An extended LDP session is establish to the neighbors configured for l2circuits. The virtual‐circuit‐id number configured under the local interface should match on both ends of the L2 connection.

BGP based L2VPN (Kompella)

BGP based L2VPNs use an additional BGP family/ NLRI (family l2‐vpn) to signal VPN label information. This type also supports auto-provisioning, which reduces the amount of work that needs to be performed when adding or moving (new) sites.

set interfaces ge-0/0/3 vlan-tagging
set interfaces ge-0/0/3 encapsulation flexible-ethernet-services
set interfaces ge-0/0/3 unit 115 vlan-id 115
set interfaces ge-0/0/3 unit 115 encapsulation vlan-ccc
set interfaces ge-0/0/3 unit 116 vlan-id 116
set interfaces ge-0/0/3 unit 116 encapsulation vlan-ccc
#
set routing-instances CE2 instance-type l2vpn
set routing-instances CE2 interface ge-0/0/3.115
set routing-instances CE2 interface ge-0/0/3.116
set routing-instances CE2 vrf-target target:12345:1002
set routing-instances CE2 protocols l2vpn encapsulation-type ethernet-vlan
set routing-instances CE2 protocols l2vpn site C5S3 site-identifier 3
set routing-instances CE2 protocols l2vpn site C5S3 interface ge-0/0/3.115
set routing-instances CE2 protocols l2vpn site C5S3 interface ge-0/0/3.116

As with L2VPN, we have the same two standards for VPLS, similarly using LDP and BGP, read more on this VPLS overview.

External resources: