6 mins read

L2VPN – LDP based L2VPN

1. Intro

LDP based L2VPN, often referred as Martini L2VPN, is 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.

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.

2. Minimal configuration

The minimal LDP based L2VPN configuration is the following:

We can also see Wireshark captures. LDP message exchange for Martini L2Circuit setup:

And an encapsulated ping going from PE1 to PE2:

### Notice how the L2 Ethernet header is encapsulated with MPLS labels. 
### 1st label is for transport (SR), and 2nd label is for our L2Cirucuit. 

> Frame 174: Packet, 128 bytes on wire (1024 bits), 128 bytes captured (1024 bits)
> Ethernet II, Src: 56:04:0d:00:28:1e (56:04:0d:00:28:1e), Dst: 56:04:0d:00:7a:14 (56:04:0d:00:7a:14)
> MultiProtocol Label Switching Header, Label: 801007, Exp: 0, S: 0, TTL: 255
    1100 0011 1000 1110 1111 .... .... .... = MPLS Label: 801007 (0xc38ef)
    .... .... .... .... .... 000. .... .... = MPLS Experimental Bits: 0
    .... .... .... .... .... ...0 .... .... = MPLS Bottom Of Label Stack: 0
    .... .... .... .... .... .... 1111 1111 = MPLS TTL: 255
> MultiProtocol Label Switching Header, Label: 41, Exp: 0, S: 1, TTL: 255
    0000 0000 0000 0010 1001 .... .... .... = MPLS Label: 41 (0x00029)
    .... .... .... .... .... 000. .... .... = MPLS Experimental Bits: 0
    .... .... .... .... .... ...1 .... .... = MPLS Bottom Of Label Stack: 1
    .... .... .... .... .... .... 1111 1111 = MPLS TTL: 255
> PW Ethernet Control Word
    Sequence Number: 0
> Ethernet II, Src: 56:04:0d:00:54:71 (56:04:0d:00:54:71), Dst: 56:04:0d:00:56:93 (56:04:0d:00:56:93)
  > Destination: 56:04:0d:00:56:93 (56:04:0d:00:56:93)
        .... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
  > Source: 56:04:0d:00:54:71 (56:04:0d:00:54:71)
        .... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
    Type: 802.1Q Virtual LAN (0x8100)
    [Stream index: 6]
> 802.1Q Virtual LAN, PRI: 0, DEI: 0, ID: 501
    000. .... .... .... = Priority: Best Effort (default) (0)
    ...0 .... .... .... = DEI: Ineligible
    .... 0001 1111 0101 = ID: 501
    Type: IPv4 (0x0800)
> Internet Protocol Version 4, Src: 10.50.1.1, Dst: 10.50.1.7
> Internet Control Message Protocol

3. L2Circuit requirements

For a VPWS/L2Circuit pseudowire, the exact checks vary slightly by vendor, but these are the parameters that generally must match between the two PEs for the PW to come up:

  • VC ID
  • VC Type – Typically ethernet (0x0005) or ethernet-vlan (0x0004)
  • Control Word – usually disabled
  • MTU
  • PW Status

In case you are troubleshooting a L2Circuit, we can extend the list with the following:

  • Targeted LDP session must be in place (LDP activated on Lo0)
  • MPLS transport labels must be configured correctly (LDP, RSVP, SR)