Fact-checked by Grok 2 weeks ago

Layer 2 Tunneling Protocol

The Layer 2 Tunneling Protocol (L2TP) is a connection-oriented that enables the transportation of () packets across packet-switched networks, such as the , in a manner transparent to both end-users and PPP applications. Defined in 2661, L2TP operates at the (Layer 2 of the ) by encapsulating PPP frames into L2TP packets over networks, allowing the separation of 2 termination from PPP session processing to support virtual private networks (VPNs) and remote access services. This protocol facilitates multi-protocol support over PPP while relying on underlying transport protocols like / for delivery, without providing inherent mechanisms for link establishment or encryption. L2TP emerged in the late 1990s as a collaborative effort between Cisco Systems and to combine the strengths of two predecessor protocols: Cisco's Layer 2 Forwarding (L2F) protocol, which focused on tunneling over arbitrary networks, and Microsoft's (PPTP), which emphasized remote access tunneling over . Standardized by the (IETF) as a Proposed Standard in August 1999 through RFC 2661, L2TP addressed limitations in earlier protocols by providing a vendor-neutral framework for compulsory and voluntary tunneling scenarios, particularly for Internet Service Providers (ISPs) delivering dial-up and broadband services. Subsequent extensions, such as RFC 3931 in 2005, introduced L2TP version 3 (L2TPv3) to broaden support beyond to other Layer 2 payloads like Ethernet and , enhancing its applicability in provider-provisioned VPNs (PPVPNs). At its core, L2TP architecture involves two primary endpoints: the L2TP Access Concentrator (LAC), which handles the user's initial Layer 2 connection (e.g., via dial-up or DSL) and initiates tunneling of frames, and the L2TP Network Server (LNS), which acts as the PPP termination point and provides , , and () services. Communication occurs over logical tunnels that carry both control messages—for tunnel and session establishment, maintenance, and teardown using reliable sequenced delivery—and data messages that encapsulate PPP datagrams without reliability guarantees, relying instead on PPP's own error handling. L2TP employs as its protocol on port 1701 for both control and data channels, enabling operation over networks while supporting features like multi-session within a single tunnel and optional host during setup. While L2TP excels in flexibility for networks and cost reduction by avoiding dedicated leased lines, it lacks built-in security features such as or payload integrity, making it vulnerable to and requiring integration with protocols like for secure VPN deployments. In practice, L2TP/ combinations are widely used for remote access VPNs, supporting protocols like (CHAP) and (EAP) for user verification, and it remains a key enabler for aggregation and wholesale-retail ISP interconnections.

Overview

Description

The Layer 2 Tunneling Protocol (L2TP) is a computer networking protocol that enables the tunneling of (PPP) frames across packet-switched networks, such as the , in a manner that remains largely transparent to end-users and applications. Developed as a standard method for extending PPP sessions over networks, L2TP combines features from earlier protocols like Layer 2 Forwarding (L2F) and (PPTP) to support virtual private networking (VPN) and remote access services. L2TP relies on two primary components for tunnel establishment and operation: the L2TP Access Concentrator (LAC) and the L2TP Server (LNS). The LAC, typically located at the access provider's edge, acts as the initial endpoint, encapsulating PPP frames from a remote user's device and forwarding them to the LNS over the intervening . The LNS, situated at the destination (such as a corporate ), serves as the peer endpoint, terminating the logical PPP session and handling , , and further routing of the tunneled traffic. Positioned at the data link layer (Layer 2) of the OSI model, L2TP provides tunneling services over the network (Layer 3) and transport (Layer 4) layers by encapsulating PPP frames within L2TP headers and then within User Datagram Protocol (UDP) packets for transport over IP. The protocol operates using UDP port 1701 for both control messages, which establish and manage the tunnel, and data messages, which carry the encapsulated PPP payloads. Once the L2TP tunnel is set up via an exchange of control messages between the LAC and LNS, PPP session negotiation occurs within the tunnel to authenticate users and configure the connection parameters. L2TP itself does not provide encryption or confidentiality, and it is commonly paired with IPsec to secure the tunneled traffic.

Applications

The Layer 2 Tunneling Protocol (L2TP) is primarily employed in virtual private networks (VPNs) to facilitate remote access, enabling users to securely connect to corporate networks from distant locations, as well as site-to-site connections that link multiple office branches over public infrastructures. It is also used for VPN connections on mobile devices, such as smartphones and tablets, enabling secure access over networks like and cellular data. In (ISP) environments, L2TP plays a key role in tunneling (PPPoE) or legacy dial-up sessions from to centralized backend and routing servers, thereby decoupling access termination from core network functions. This architecture permits ISPs to aggregate subscriber traffic efficiently while maintaining compatibility with existing PPP-based mechanisms. L2TP finds further application in broadband aggregation, where it consolidates from diverse technologies like DSL and into IP cores, and in wholesale models that enable providers to lease network capacity to retail partners without exposing underlying topologies. In virtualized networks, it supports multi-tenant environments by allowing ISPs to virtualize delivery, such as offering segmented services to partners through isolated tunnels. Key benefits of L2TP include its inherent compatibility with legacy PPP infrastructure, which eases integration into established dial-up and systems without requiring overhauls. It supports multiple PPP sessions within a single , optimizing resource use by user connections over shared paths. Additionally, its design promotes for high-volume deployments, handling thousands of sessions in and ISP settings through dynamic management. In contemporary deployments as of 2025, L2TP continues to be used in broadband network gateways (BNGs) for subscriber management, including in fixed wireless access and applications, where access concentrators hand off user traffic to ISPs. For example, L2TP-enabled SIM cards provide secure tunneling for devices to LANs, and it is used for of base stations by separating access from service delivery.

History

Development

The Layer 2 Tunneling Protocol (L2TP) originated as a collaborative effort between and Systems to develop a vendor-neutral standard for tunneling (PPP) frames over networks. The initial work began in 1996, when engineers from both companies recognized the need to merge the strengths of their respective proprietary protocols—'s (PPTP), introduced in 1995, and 's Layer 2 Forwarding (L2F) protocol, developed around the same period—to address fragmentation in VPN tunneling solutions. PPTP provided robust PPP session management but was limited to Microsoft ecosystems, while L2F offered flexible forwarding across diverse network access servers yet lacked broad ; the joint development aimed to create a unified that leveraged PPP's and multilink capabilities while enabling seamless extension of dial-up sessions over IP infrastructures. Key contributors included Gurdeep Singh Pall and Glen Zorn from , who brought expertise in PPTP's session control mechanisms, and W. Mark Townsley and Andrew Valencia from , who integrated L2F's tunneling architecture. The first Internet-Draft, titled "Layer Two Tunneling Protocol 'L2TP'", was submitted to the IETF's Point-to-Point Protocol Extensions (PPPEXT) working group in August 1996 by Pall, Valencia, and others, outlining the core protocol design for encapsulating packets in datagrams. This draft was influenced by emerging IETF requirements for efficient transport over , emphasizing transparency to end-users and support for virtual private dial-up networks (VPDN). Development progressed through iterative revisions, with the protocol designed to support both LAC-initiated tunnels (where the access concentrator handles initial negotiation) and LNS-initiated tunnels (where the network server manages sessions), providing flexibility for client-side and server-side deployments in enterprise and ISP environments. A significant milestone occurred in May 1997, when and publicly demonstrated interoperability between their L2TP implementations at an industry event, validating the protocol's cross-vendor compatibility during its third draft stage. This demonstration highlighted L2TP's potential to replace siloed solutions with a standardized approach, driven by the growing demand for secure remote access amid the Internet's expansion. By , further refinements addressed IETF feedback on multilink support and header efficiency, setting the stage for formal while ensuring the protocol's core focus on combining PPTP's encryption hooks with L2F's forwarding model for broader adoption.

Standardization

The Layer 2 Tunneling Protocol (L2TP) was formally standardized by the (IETF) in RFC 2661, published on August 9, 1999, as a Proposed Standard. This document establishes the foundational specification for L2TP, detailing protocol versions, control and data message types, and the Attribute-Value Pair (AVP) mechanism for extensible parameter exchange between tunnel endpoints. RFC 2661 builds on the (PPP) framework from RFC 1661, enabling the tunneling of PPP sessions across IP networks while maintaining compatibility with existing dial-up and (VPN) infrastructures. Subsequent extensions expanded L2TP's capabilities beyond its initial PPP-centric design. RFC 3931, published on March 8, 2005, defines Layer Two Tunneling Protocol Version 3 (L2TPv3), which introduces support for non-PPP payloads and facilitates the tunneling of arbitrary Layer 2 protocols, including Ethernet , , and circuits, over or other packet-switched networks. This version enhances flexibility for service providers by allowing emulation without relying on PPP encapsulation. Additionally, 3193, published in November 2001, outlines the integration of L2TP with to provide tunnel , confidentiality, and integrity protection through Encapsulating Security Payload () or Authentication Header () mechanisms. For and authorization, 2868, published in June 2000, specifies attributes tailored for tunnel protocols like L2TP, enabling centralized management of compulsory tunneling in dial-up environments. L2TPv3's support for Ethernet transport was further detailed in RFC 4719, published on November 2006, which describes the encapsulation and establishment procedures for carrying Ethernet frames over L2TPv3 sessions. No major new core RFCs for L2TP have been issued since around , though extensions like RFC 5515 (April 2009) added AVPs for access line information to convey physical line attributes in scenarios. As of 2025, L2TP continues to see practical application and citation in vendor documentation, such as Cisco's configurations for L2TP-based subscriber management in Cloud Native Network Gateway (CN-BNG) deployments, underscoring its ongoing utility in ISP hand-off and VPN services, despite Microsoft's October 2024 announcement to deprecate L2TP in future versions. The protocol's specifications remain active as Proposed Standards, with IETF-maintained errata addressing minor clarifications but no formal obsoletions or advancements to status recorded.

Protocol Operation

Tunneling Models

The Layer 2 Tunneling Protocol (L2TP) supports several architectural models for deploying tunnels, primarily centered around the roles of the L2TP Access Concentrator (LAC) and the L2TP Network Server (LNS). In the standard LAC-LNS model, the LAC serves as the access device, such as a (NAS), which encapsulates and forwards (PPP) frames from a remote client over an intervening to the LNS. The LNS acts as the logical termination point for the PPP session, often integrated with a server for , , and accounting (AAA). This model decouples PPP authentication and session management from the tunneling mechanism, allowing the LAC to handle initial access while centralizing user management at the LNS. A variant of this architecture is the LNS-LAC model, where the LNS initiates the tunnel to the LAC to establish outgoing connections, such as for dial-out scenarios. In this setup, the LNS receives traffic destined for a remote and sends an Outgoing Call Request (OCRQ) message to the LAC, which then dials out to the target using . This enables scalable outbound dialing from a central server to distributed access points, with load balancing across multiple LACs if needed. L2TP also accommodates a peer-to-peer model, where equal nodes establish direct tunnels without a strict client-server , commonly used for site-to-site virtual private networks (VPNs). Here, both endpoints function symmetrically, potentially acting as both LAC and LNS to exchange Layer 2 traffic bidirectionally over networks. These models support key topologies, including voluntary tunneling—where the client explicitly initiates the connection—and compulsory tunneling, enforced by the . Additionally, L2TP tunnels can host multiple sessions within a single control connection, optimizing resource use for concurrent streams.

Message Types and Packet Exchange

The Layer 2 Tunneling Protocol (L2TP) employs two primary categories of messages: control messages for establishing, maintaining, and tearing down tunnels and sessions, and data messages for transporting encapsulated (PPP) frames. Control messages operate over a reliable channel using port 1701, incorporating sequence numbers for ordered delivery and acknowledgments to ensure reliability, while data messages use an unreliable channel without inherent retransmission mechanisms. Tunnel establishment begins with the Start-Control-Connection-Request (SCCRQ) message sent by the tunnel initiator, such as a L2TP Access Concentrator (LAC) to a L2TP Network Server (LNS), containing attributes for negotiation like protocol version and framing capabilities. The responder replies with a Start-Control-Connection-Reply (SCCRP) if it accepts the parameters, potentially adjusting them via Attribute-Value Pairs (AVPs). Upon agreement, the initiator sends a Start-Control-Connection-Connected (SCCCN) message to confirm the tunnel, followed by Zero-Length Body (ZLB) acknowledgments from both ends to verify receipt and establish the reliable control connection, which uses a with retransmissions on timeouts. Periodic Hello messages may be exchanged to detect tunnel liveness during operation. Within an established tunnel, sessions are created to carry individual PPP connections, supporting both incoming and outgoing call models depending on the LAC-LNS architecture. For an incoming call, the LAC sends an Incoming-Call-Request (ICRQ) to the LNS, specifying session parameters such as the called number; the LNS responds with an Incoming-Call-Reply (ICRP) if acceptable, followed by an Incoming-Call-Connected (ICCN) from the LAC to finalize the session, with ZLB acknowledgments ensuring control message delivery. In the outgoing call scenario, the LNS initiates with an Outgoing-Call-Request (OCRQ) to the LAC, which replies via Outgoing-Call-Reply (OCRP) and confirms with Outgoing-Call-Connected (OCCN) upon successful PPP negotiation. Data messages in L2TP simply encapsulate PPP frames within the tunnel, prefixed with a short header that may include optional sequence numbers for reordering at the receiver, but they rely on the underlying transport for delivery without reliability guarantees, allowing efficient forwarding of user traffic once sessions are active. Sessions are torn down using a Call-Disconnect-Notify (CDN) , sent by either with an indicating the reason, such as user request or administrative closure, followed by ZLB acknowledgment to close the session gracefully. Tunnel teardown occurs similarly via a Stop-Control-Connection-Notification (StopCCN) from either side, which triggers the closure of all associated sessions and the control connection, again confirmed with ZLB. Error handling in message exchanges primarily relies on ZLB packets as acknowledgments for control messages, enabling retransmissions in the reliable control channel via timers when acknowledgments are not received, while data channel errors are managed at the PPP layer rather than L2TP itself.

Packet Format

The Layer 2 Tunneling Protocol (L2TP) encapsulates its packets within datagrams for transport over networks, using port 1701 as the standard destination port for both control and data messages. This encapsulation allows L2TP to traverse and environments, with the entire L2TP packet—including header and payload—carried as the payload. Optionally, L2TP packets may be further protected by Encapsulating Security Payload () for confidentiality and integrity, where wraps the / packet. L2TP packets share a common two-octet flags at the start of the header, followed by optional fields, with the total header size varying from a minimum of 8 bytes (when no optional fields are present) up to 20 bytes or more including . The flags is 16 bits long and includes the type bit (T: 0 for data packets, 1 for packets), length bit (L: 1 if the length is present), bit (S: 1 if numbers are present), offset bit (O: 1 if offset is present), priority bit (P: 1 for preferential forwarding of data packets), and version bits (set to 2 for L2TP version 2). If the L bit is set, a 16-bit length follows, specifying the total length of the L2TP message in octets (mandatory for packets). Next are the 16-bit tunnel ID (identifying the L2TP tunnel) and 16-bit (identifying the specific session within the tunnel), both locally significant to the sender. Optional 16-bit numbers (Ns for the sent and Nr for the expected next ) follow if the S bit is set, providing reliability for messages. If the O bit is set, a 16-bit offset size indicates the length of optional offset (always 0 for packets), followed by the variable-length pad to align the . Control messages consist of the header followed by one or more Attribute Value Pairs (AVPs), which are encoded in a Type-Length-Value (TLV) format to convey configuration and management information. Each AVP begins with a 16-bit flags field (including M for mandatory and H for hidden AVPs), a 16-bit length (indicating total AVP size from 6 to 1023 octets), an optional 16-bit vendor ID (0 for IETF-defined AVPs), and a 16-bit attribute type, followed by the variable-length value field. Mandatory AVPs (M bit set) must be recognized by the peer, or the session or tunnel is terminated; hidden AVPs (H bit set) are obscured using a shared secret for security. Examples include the Message Type AVP (type 0, 16-bit value specifying control message types like Start-Control-Connection-Request), Assigned Tunnel ID AVP (type 1, 16-bit value assigning the peer's tunnel ID), and Framing Capabilities AVP (type 3, 32-bit bitmask indicating support for synchronous or asynchronous PPP framing). Data messages carry the tunneled payload immediately after the header (and any offset padding), typically encapsulating a PPP frame with its own header and data. The PPP frame is prefixed by the L2TP session header but retains its protocol field to indicate the encapsulated datalink protocol. L2TP version 3 (L2TPv3) extends the protocol for pseudowire applications, introducing a revised header format without reliance on PPP and supporting direct IP encapsulation (protocol number 115) in addition to UDP. The L2TPv3 data session header consists of a 32-bit session ID, optional 32- or 64-bit cookie for added security, and optional L2-specific sublayer fields including a 24-bit sequence number; pseudowire types are indicated via control AVPs like Pseudowire Type (type 68, 16-bit value specifying payloads such as Ethernet or Frame Relay). Control headers in L2TPv3 mirror version 2 but use 32-bit IDs and include AVPs for pseudowire capabilities (type 62, variable list of supported types). The payload in L2TPv3 data packets directly carries the Layer 2 frame corresponding to the pseudowire type, without PPP encapsulation.
FieldSize (bits)DescriptionOptional?
Flags16T (type), L (length), f (reserved), S (), O (), P (), f (reserved), v (: 2 for L2TPv2)No
16Total L2TP message length in octetsYes (L bit)
Tunnel ID16Tunnel identifierNo
16Session identifierNo
Ns ()16Next sent sequence numberYes (S bit)
Nr ()16Next expected receive sequenceYes (S bit)
Offset Size16Length of offset padYes (O bit)
Offset PadVariablePadding bytes to align Yes (O bit)
This table illustrates the L2TPv2 header fields, with AVPs or PPP payload following for control or data messages, respectively.

Security

Integration with IPsec

The Layer 2 Tunneling Protocol (L2TP) is often integrated with IPsec to address its inherent lack of encryption and authentication, creating a secure virtual private network (VPN) solution known as L2TP/IPsec. This combination encapsulates L2TP packets within an IPsec Encapsulating Security Payload (ESP) tunnel, providing confidentiality, data integrity, and optional replay protection for both control and data traffic. The architecture employs double encapsulation, where Point-to-Point Protocol (PPP) frames are tunneled via L2TP over UDP port 1701, and the resulting L2TP packets are then protected by IPsec ESP, forming the outermost IP layer. This setup, standardized in RFC 3193 published in November 2001 by authors including B. Patel, B. Aboba, W. Dixon, and G. Zorn, is widely adopted in VPN clients for remote access scenarios. IPsec operates in two primary modes when securing L2TP: transport mode, which is mandatory and provides end-to-end protection between L2TP Access Concentrator (LAC) and L2TP Network Server (LNS) peers by securing the L2TP payload directly; and tunnel mode, which is optional and suits gateway-to-gateway deployments by adding a new for through security gateways. In transport mode, the ESP header follows the original of the L2TP packet, authenticating and encrypting the UDP-encapsulated L2TP content. Tunnel mode, conversely, encapsulates the entire L2TP within a new , enabling secure transit across untrusted networks. The establishment of L2TP/IPsec connections relies on Internet Key Exchange (IKE) negotiation. In Phase 1, IKE creates an ISAKMP Security Association (SA) using pre-shared keys or certificates in Main or Aggressive mode, establishing a for subsequent exchanges. Phase 2 then negotiates the SA, specifying protocols like to protect L2TP traffic on port 1701 (or dynamic ports for data sessions), including and port selectors to filter only relevant packets. This ensures that L2TP control messages and data are authenticated and optionally encrypted end-to-end. To facilitate deployment behind (NAT) devices and firewalls, L2TP/IPsec incorporates (NAT-T), which encapsulates IPsec ESP packets in (typically port 4500) to enable port address translation. NAT-T is negotiated during IKE 1 via the NAT-Traversal payload, allowing detection of NAT presence and switching to UDP-encapsulated ESP if needed, thus preventing packet drops in NAT environments common to enterprise and home networks. This mechanism, defined in RFC 3947 and RFC 3948, ensures compatibility without compromising the security provided by the inner L2TP/IPsec layers.

Limitations and Vulnerabilities

The Layer 2 Tunneling Protocol (L2TP) lacks native and mechanisms, making it inherently insecure when deployed without an outer protocol such as for protecting the tunnel. This design choice means that L2TP alone provides no , , or replay protection for tunneled frames, leaving data vulnerable to , modification, or eavesdropping on untrusted networks. As a result, L2TP must always be paired with to achieve any meaningful , but even then, the protocol's reliance on external protections introduces potential points of failure if not configured correctly. Key vulnerabilities in L2TP stem from its integration with PPP for authentication and its use of UDP for transport. During the PPP phase, L2TP commonly employs MS-CHAPv2, which is susceptible to offline attacks such as rainbow table lookups due to its predictable challenge-response mechanism and lack of proper salting, allowing attackers to crack captured credentials relatively quickly. Additionally, as a UDP-based protocol operating on port 1701, L2TP is prone to denial-of-service (DoS) attacks through IP spoofing, where forged packets can overwhelm endpoints or trigger resource exhaustion without authentication. Historical implementation flaws have further exposed risks; for instance, a stack-based buffer overflow in certain Cisco ASA/FTD software versions handling L2TP advanced configuration (CVE-2022-41021) could enable remote code execution via crafted requests. More recent reports highlight issues like pre-shared key (PSK) exposure in L2TP/IPsec setups using aggressive mode IKE, particularly in misconfigured NAT environments where traversal failures leak sensitive negotiation data. The double encapsulation required by L2TP/IPsec—first within the L2TP header and then IPsec—imposes significant performance overhead due to increased packet size and processing demands. This latency can be particularly noticeable in high-bandwidth or mobile scenarios, limiting L2TP's suitability for modern, speed-sensitive applications. To mitigate these limitations, L2TP deployments should exclusively use IPsec with robust ciphers such as AES-256-GCM for encryption and enable NAT traversal (NAT-T) to address compatibility issues. Regular patching of implementation-specific vulnerabilities is essential, and for new systems, alternatives like WireGuard are recommended for their lighter overhead and built-in security without reliance on legacy tunneling. As of 2025, while L2TP/IPsec remains FIPS 140-2 compliant when using validated modules for IPsec cryptography, it has been deprecated in Microsoft Windows Server future releases and is disabled by default in Windows Server 2025, favoring IKEv2 or newer protocols.

Implementations

Operating System Support

Microsoft Windows has provided native support for L2TP as both a client and server since , enabling (VPN) connections through the built-in Dial-Up Networking (DUN) components. Server functionality is handled via the Routing and Remote Access Service (RRAS), which allows administrators to configure L2TP/ tunnels for inbound remote access, often integrated with version 1 (IKEv1) for securing the outer IPsec layer. However, beginning with 2025, L2TP is deprecated and not enabled by default in new RRAS installations, though it remains available for manual configuration. The Windows implementation supports (EAP) methods for authentication in L2TP connections, making it suitable for enterprise environments where certificate-based or password-integrated remote access is required. macOS and include a built-in VPN client that supports L2TP over , configurable through the (or System Preferences in older versions) for establishing secure connections to compatible servers, with options for preshared keys or certificate authentication. Server-side L2TP support was previously available through the macOS Server application, which facilitated VPN hosting; however, Apple deprecated many of its advanced services, including the integrated VPN server, starting with in 2018, shifting focus to profile-based management while allowing manual configuration of underlying services. Linux distributions offer kernel-level support for L2TP through the l2tp_ppp module, which handles framing over L2TP tunnels, integrated into the network stack since kernel version 2.6.23. User-space configuration typically involves the daemon (pppd) combined with tools like xl2tpd for managing L2TP sessions, enabling both client and server setups with encapsulation via libraries such as strongSwan or libreswan. Android provides a default built-in VPN client supporting L2TP/IPsec protocol since version 4.0 (), accessible via device settings for adding configurations with preshared keys or certificates; however, starting with , new L2TP/IPsec PSK connections are restricted and may require workarounds or third-party apps, though it lacks native server capabilities. As of 2025, L2TP support is facing deprecation in several platforms due to its lack of built-in security features. For instance, has deprecated L2TP in 2025, and similar trends are observed in other ecosystems, with recommendations to migrate to more secure protocols like IKEv2 or .

Service Provider Usage

Service providers deploy Layer 2 Tunneling Protocol (L2TP) primarily to facilitate access by tunneling (PPPoE) sessions from , such as DSL or cable modems, to a (BRAS). In this architecture, the BRAS functions as an L2TP Access Concentrator (LAC), encapsulating PPP frames into L2TP tunnels and forwarding them to an L2TP Network Server (LNS) located in the service provider's core network or at a partner ISP. This setup enables efficient aggregation of subscriber traffic from access nodes to centralized authentication and routing points, supporting scalable delivery of services over Ethernet-based infrastructures. In wholesale models, L2TP allows providers to hand off subscriber sessions to partner networks, enabling shared infrastructure without exposing sensitive customer data. Wholesale carriers establish L2TP tunnels to route authenticated sessions from their LACs to the LNS of downstream ISPs, supporting multi-tenant environments where multiple service providers share the same physical links. This model is particularly useful for regional aggregators providing to smaller ISPs, ensuring of traffic through dedicated tunnels per wholesale client. L2TP integrates with for subscriber management features, including dynamic assignment via negotiation, (QoS) mapping through downloadable profiles, and accounting for usage tracking. servers authorize L2TP sessions by providing attributes such as IP pools for dynamic assignment and QoS parameters that enable per-session shaping and queuing on the LNS to enforce agreements. Accounting records, including session duration and data volume, are relayed via to support billing and monitoring. These capabilities allow providers to apply , such as limits or priority queuing, tailored to individual subscribers. Modern deployments leverage L2TP in virtualized environments, such as Cisco's Cloud Native Broadband Network Gateway (cnBNG), for handling subscriber handoffs in next-generation networks, including fixed wireless access (FWA). In cnBNG setups, L2TP tunnels support high-scale session management for FWA scenarios, where PPP-encapsulated traffic from home gateways is tunneled to core LNS for processing, integrating with (SDN) for dynamic tunnel provisioning and orchestration. LNS platforms can terminate thousands of concurrent sessions, as demonstrated in scalability testing, enabling efficient support for large-scale and FWA subscriber bases in DSL and emerging environments. Major U.S. providers continue to utilize L2TP for DSL aggregation, ensuring compatibility with existing infrastructure during network transitions.

Open-Source Tools

One of the most widely used open-source implementations of the Layer 2 Tunneling Protocol (L2TP) is xl2tpd, a user-space daemon primarily developed for and systems. It provides support for L2TPv2 as defined in RFC 2661, enabling the tunneling of sessions over for VPN applications. xl2tpd integrates seamlessly with the daemon (pppd) to handle and encapsulation, making it suitable for establishing remote connections. The project, maintained as the official Xelerance , features a active community on where developers contribute bug fixes and enhancements, with ongoing support for integration in firewall distributions like and . strongSwan serves as a robust open-source IPsec implementation that extends to L2TP support, particularly for creating secure VPN gateways combining L2TP with encryption. This toolkit, written , offers modular plugins for handling L2TP over IPsec tunnels, including pre-shared key authentication and capabilities for enterprise deployments. Its focus on interoperability with standards like IKEv1 and IKEv2 makes it a preferred choice for Linux-based servers requiring encrypted L2TP sessions. The strongSwan project maintains a vibrant community through its official documentation and mailing lists, with regular releases ensuring compatibility with modern kernel versions. OpenL2TP is a C-based open-source L2TP client and server designed specifically for environments, allowing developers to embed L2TP functionality into custom applications for VPN or tunneling use cases. It supports both L2TPv2 control and data messages, with features for session management and integration, though its development has been largely inactive since the . The project originated from efforts by Katalix Systems and remains available via , where archived code and documentation support legacy implementations. Community interest persists through references in embedded distributions, but no major forks or updates were noted as of 2025. For high-performance scenarios, Accel-PPP stands out as an open-source server implementation supporting L2TP alongside protocols like PPTP, SSTP, and . This userspace daemon, rewritten from scratch in C, emphasizes multi-threaded I/O for handling large-scale deployments, including integration for authentication and built-in . It excels in Linux-based access servers, offering scalability for thousands of concurrent sessions without relying on PPP modules. The Accel-PPP community, hosted on , actively maintains the project with contributions focused on performance optimizations and protocol extensions. Community-driven efforts have also enhanced L2TPv3 support in open-source environments, particularly for Ethernet pseudowires over IP networks as per 3931 and 4719. Linux kernel patches, discussed on netdev mailing lists since 2010, enable unmanaged L2TPv3 tunnels with Ethernet payload handling, integrated into tools like for configuration. Projects such as Tunneldigger leverage these kernel features for simple L2TPv3-based VPNs in wireless mesh networks, with ongoing contributions from open-source developers ensuring with modern hardware. These patches prioritize standards compliance and are available through the source tree.

References

  1. [1]
    RFC 2661: Layer Two Tunneling Protocol "L2TP"
    L2TP facilitates the tunneling of PPP packets across an intervening network in a way that is as transparent as possible to both end-users and applications.
  2. [2]
    RFC 3931: Layer Two Tunneling Protocol - Version 3 (L2TPv3)
    L2TPv3 defines the base control protocol and encapsulation for tunneling multiple Layer 2 connections between two IP nodes.
  3. [3]
    Configuring Layer 2 Tunneling Protocol (L2TP) over IPSec - Cisco
    Jan 19, 2006 · Introduction. Layer 2 tunneling protocols, such as L2TP, do not provide encryption mechanisms for the traffic it tunnels.
  4. [4]
    Layer 2 Tunneling of PPP Packets | Junos OS - Juniper Networks
    L2TP is defined in RFC 2661, Layer Two Tunneling Protocol (L2TP) . L2TP facilitates the tunneling of PPP packets across an intervening network in a way that ...
  5. [5]
    10 Protocols of VPN | IPSec, PPTP, L2TP, MPLS etc. ⋆ IPCisco
    There are two main typed of VPN: Remote Access VPN and Site to Site VPN. There are also different types of VPN Protocols like, IPSec, PPTP, L2TP, MPLS etc.
  6. [6]
    Common Types of VPNs & VPN Protocols - Netmaker
    Aug 20, 2024 · L2TP/IPsec is a popular VPN protocol choice that combines two protocols to offer a secure and reliable connection. Let me break it down for you.Remote Access Vpn · The Most Common Vpn... · L2tp/ipsec
  7. [7]
    Mobile VPN with L2TP - WatchGuard
    Mobile VPN with L2TP supports connections from most L2TPv2 VPN clients that comply with the L2TP RFC 2661 standard. Mobile VPN with L2TP supports local ...
  8. [8]
    What Is an L2TP VPN and Is It Still Safe to Use in 2025?
    Oct 15, 2025 · It can hold a connection steady while switching networks (say, from Wi-Fi to 5G) without needing to reconnect. L2TP, on the other hand, ...What Is An L2tp Vpn? · How Does L2tp/ipsec Work? · L2tp Vs. Other Vpn Protocols...
  9. [9]
    L2TP for Subscriber Access Overview | Junos OS - Juniper Networks
    The Layer 2 Tunneling Protocol (L2TP) is a client-server protocol that allows the Point-to-Point Protocol (PPP) to be tunneled across a network.
  10. [10]
    [PDF] L2TP Subscriber Management - Cisco
    In cnBNG, the L2TP performs the hand-off task of the subscriber traffic to the Internet service provider (ISP). To do this, L2TP uses two network components: • ...Missing: 5G edge computing
  11. [11]
    [PDF] Broadband Access Aggregation and DSL Configuration Guide - Cisco
    ... Broadband Access Aggregation. Virtual Access ... applications such as virtual profiles, virtual private dialup networks (VPDNs), and protocol translation.
  12. [12]
    L2TP Network Server - Nokia Documentation Center
    Jul 3, 2025 · L2TP is typically used for wholesaling residential broadband services. In this scenario, the LAC resides in the wholesaler's network and has a ...Configuration · L2tp Tunnel Setup · Qos
  13. [13]
    [PDF] MR-229 - Broadband Forum
    Multicast in the context of L2 wholesale access networks largely relates to the provision of a L2. Ethernet wholesale service across the aggregation and access ...
  14. [14]
    Layer Two Tunneling Protocol (L2TP) - TechTarget
    Oct 5, 2021 · If the circuit concentrator is local, long-distance charges are eliminated. Additional benefits are reliability, stability, compatibility, ...
  15. [15]
    Understanding the Differences and Pros & Cons of PPTP, L2TP, and ...
    Mar 6, 2024 · Scalability: L2TP is designed to support a large number of users and can scale well in enterprise environments. Disadvantages of L2TP:.
  16. [16]
    What Is L2TP? Understanding Network Protocols By WireX Systems
    Apr 13, 2023 · L2TP operates at the data link layer (Layer 2) of the OSI model, which is responsible for establishing and maintaining direct connections ...Benefits Of L2tp · How Does L2tpwork · Security Concerns Of L2tp
  17. [17]
    FB2900 Management of a 5G network using L2TP - FireBrick
    The FireBrick FB2900 acts as an L2TP server, allowing remote devices to connect to the internet network, and provides access to remote base stations.
  18. [18]
    L2TP IoT SIMs for Secure Connections - Cellhire
    Oct 3, 2024 · Discover all the benefits of our L2TP-enabled IoT SIM card​​ Connects cellular 4G and 5G networks directly to your LAN, making remote devices act ...
  19. [19]
    draft-ietf-pppext-l2tp-00
    draft-ietf-pppext-l2tp-00. Internet-Draft. Title, Layer Two Tunneling Protocol ... Date: August 1996 Morgan Littlewood Cisco Systems Gurdeep Singh Pall ...
  20. [20]
    Cisco and Microsoft Demonstrate Interoperability Of Next ...
    May 21, 1997 · Cisco Systems Inc. and Microsoft Corp. last week demonstrated interoperability of their layer 2 tunneling protocol (L2TP) implementations.Missing: history 1998
  21. [21]
    RFC 2661 - Layer Two Tunneling Protocol "L2TP" - IETF Datatracker
    Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol.
  22. [22]
    RFC 3931 - Layer Two Tunneling Protocol - Version 3 (L2TPv3)
    L2TPv3 defines the base control protocol and encapsulation for tunneling multiple Layer 2 connections between two IP nodes.
  23. [23]
    RFC 3193 - Securing L2TP using IPsec - IETF Datatracker
    This document discusses how L2TP (Layer Two Tunneling Protocol) may utilize IPsec to provide for tunnel authentication, privacy protection, integrity checking ...
  24. [24]
    RFC 2868 - RADIUS Attributes for Tunnel Protocol Support
    This document defines a set of RADIUS attributes designed to support the provision of compulsory tunneling in dial-up networks.
  25. [25]
    RFC 4719 - Transport of Ethernet Frames over Layer 2 Tunneling ...
    RFC 4719 Transport of Ethernet Frames over L2TPv3 November 2006 Note that an L2TP Outgoing Call is essentially a method of controlling the originating point ...
  26. [26]
  27. [27]
  28. [28]
  29. [29]
  30. [30]
  31. [31]
  32. [32]
  33. [33]
  34. [34]
  35. [35]
  36. [36]
  37. [37]
  38. [38]
  39. [39]
  40. [40]
  41. [41]
  42. [42]
  43. [43]
  44. [44]
  45. [45]
  46. [46]
  47. [47]
  48. [48]
  49. [49]
  50. [50]
  51. [51]
  52. [52]
  53. [53]
  54. [54]
  55. [55]
  56. [56]
    RFC 3193: Securing L2TP using IPsec
    This document discusses how L2TP (Layer Two Tunneling Protocol) may utilize IPsec to provide for tunnel authentication, privacy protection, integrity checking ...
  57. [57]
  58. [58]
    What Is L2TP (Layer 2 Tunnel Protocol)? - Palo Alto Networks
    L2TP is a tunneling protocol that encapsulates data for secure transmission over public networks, often used with VPNs. It does not encrypt data itself.
  59. [59]
    Layer 2 Tunnel Protocol (L2TP) - Check Point Software
    How Does L2TP Work. Framing it through the OSI model, L2TP creates a layer 2 (Data Link Layer) tunnel that “encapsulates” data to securely send it over a layer ...
  60. [60]
    Microsoft Security Advisory 2743314
    Aug 20, 2012 · The purpose of this advisory is to notify customers that detailed exploit code has been published for known weaknesses in the MS-CHAP v2 protocol.
  61. [61]
    What to know about UDP vulnerabilities and security - TechTarget
    Oct 20, 2023 · UDP is a simple protocol, but it has inherent vulnerabilities that make it prone to attacks, such as limited packet verification, IP spoofing and DDoS attacks.
  62. [62]
  63. [63]
    Best VPN Protocols Comparison | Use Cases Explained - NordLayer
    Double encapsulation adds extra overheads to every packet transmission. TLS uses more data than IKEv2 and NordLynx, but should consume less than OpenVPN. Device ...
  64. [64]
  65. [65]
    FIPS 140-3 Level 1 - Sophos Firewall
    Jan 30, 2025 · IPsec (remote access) and L2TP (remote access): For authentication based on Digital certificate, you can use only FIPS-compliant certificates. ...
  66. [66]
    PPTP and L2TP deprecation: A new era of secure connectivity
    Oct 8, 2024 · We are deprecating the PPTP (Point-to-Point Tunneling Protocol) and L2TP (Layer 2 Tunneling Protocol) protocols from future Windows Server versions.Missing: FIPS | Show results with:FIPS
  67. [67]
    Configure VPN protocols in Routing and Remote Access on ...
    Jun 21, 2024 · This article shows you how to configure Routing and Remote Access to enable L2TP and PPTP based VPN connections using the Routing and Remote Access Microsoft ...
  68. [68]
    VPN authentication options - Microsoft Learn
    Jan 28, 2025 · You can only configure EAP-based authentication if you select a built-in VPN type (IKEv2, L2TP, PPTP or Automatic). Windows supports a number of ...
  69. [69]
    Change options for L2TP over IPSec VPN connections on Mac
    On your Mac, use VPN settings to set session options, such as when to disconnect, for an L2TP over IPSec VPN connection.
  70. [70]
    About macOS Server 5.7.1 and later - Apple Support
    Apr 15, 2025 · As of April 21, 2022, Apple has discontinued macOS Server. Existing macOS Server customers can continue to download and use the app with macOS Monterey.
  71. [71]
    L2TP — The Linux Kernel documentation
    L2TP¶. Layer 2 Tunneling Protocol (L2TP) allows L2 frames to be tunneled over an IP network. This document covers the kernel's L2TP subsystem.
  72. [72]
    xelerance/xl2tpd: Official Xelerance fork of L2TPd - GitHub
    xl2tpd uses a pseudo-tty to communicate with pppd. It runs in userspace but supports kernel mode L2TP. xl2tpd supports IPsec SA Reference tracking to enable ...
  73. [73]
    Set up VPN on Android devices - Google Help
    Android includes a built-in (PPTP, L2TP/IPSec, and IPSec) VPN client. Devices running Android 4.0 and later also support VPN apps. You might need a VPN app ...
  74. [74]
    Cisco ISG Design and Deployment Guide: ATM Aggregation Using ...
    Mar 22, 2006 · This document uses model networks tested in a Cisco lab to describe how to deploy a service provider broadband-based network using Cisco ...
  75. [75]
    Internet access L2TP using PPPoE. - ResearchGate
    The BRAS serves as the LAC as defined in L2TP to set up L2TP tunnels with LNSs of various ISPs.
  76. [76]
    6. Layer 2 Tunneling Protocol (L2TP) - Nokia Documentation Center
    Tunnel probing refers to the mechanism where the blacklisted tunnel or an end-point can be selected to serve only a single L2TP session initialization request.
  77. [77]
    Layer-2 Tunneling Protocol (L2TP) - Documentation Overview
    Note, that a tunnel can carry multiple sessions, so once a subscriber initiates a PPP session, the tunnel may or may not already established. The ICRQ ...Missing: per | Show results with:per
  78. [78]
    [PDF] L2TP Subscriber Management - Cisco
    In such cases, the subscribers are tunneled between wholesale and retail ISPs using the Layer 2 Tunneling Protocol (L2TP) protocol. L2TP Overview. In cnBNG, the ...
  79. [79]
    RADIUS Authentication for L2TP | Junos OS - Juniper Networks
    On an M10i or M7i router, L2TP supports RADIUS authentication and accounting for users with one set of RADIUS servers under the [edit access] hierarchy.
  80. [80]
    QoS: Per-Session Shaping and Queuing on LNS - Cisco
    Feb 28, 2006 · The ability to shape or queue traffic on a per-session basis helps to avoid traffic congestion and allows the ISP to adhere to the Service Level ...
  81. [81]
    Cloud Native BNG Control Plane Configuration Guide, Release ...
    Aug 25, 2025 · In cnBNG, the L2TP performs the hand-off task of the subscriber traffic to the Internet service provider (ISP). To do this, L2TP uses two ...
  82. [82]
    Connecting 5G homes to copper enhanced FWA
    Feb 26, 2020 · The L2TP tunnel solution allows for the operators to implement 3A management and traffic management of FWA home users by the traditional fixed- ...
  83. [83]
    [PDF] Spirent TestCenter™
    Spirent TestCenter L2TP package validates subscriber scalability, emulates L2TPv2/v3, tests tunnel capacity, and can emulate thousands of sessions.
  84. [84]
    strongSwan - IPsec VPN for Linux, Android, FreeBSD, macOS ...
    strongSwan is an open-source, modular and portable IPsec-based VPN solution. ... SupportFree and commecial support is available. strongSwan Project. Downloads ...Documentation · Download · About · Support
  85. [85]
    OpenL2TP download | SourceForge.net
    May 11, 2018 · OpenL2TP is an L2TP client/server written specifically for Linux. It has been designed for use as an enterprise L2TP VPN server or for use ...Missing: library github
  86. [86]
    accel-ppp/accel-ppp: High performance PPTP/L2TP/SSTP ... - GitHub
    The ACCEL-PPP v1.0 is completly new implementation of PPTP/PPPoE/L2TP/SSTP which was written from scratch. Userspace daemon has its own PPP implementation.
  87. [87]
    L2TP - The Linux Kernel documentation
    Layer 2 Tunneling Protocol (L2TP) allows L2 frames to be tunneled over an IP network. This document covers the kernel's L2TP subsystem.Missing: pppd | Show results with:pppd
  88. [88]
    wlanslovenija/tunneldigger: L2TPv3 VPN tunneling solution - GitHub
    Tunneldigger is one of the projects of wlan slovenija open wireless network. It is a simple VPN tunneling solution based on the Linux kernel support for L2TPv3 ...