En xarxes el protocol Layer 2 Tunneling Protocol (aka L2TP) és un tunneling protocol utilitzat per donar suport a Xarxes Privades Virtuals. De per si és un protocol que no proporciona confidencialitat ni tan sols autenticació i per això normalment es combina amb IPSec donant peu al terme L2PP/IPsec. L'estandard es defineix al RFC 2661.
L2TP utilitza UDP com a protocol de transport.
NOTA: Observeu que altres protocols VPN com OpenVPN suporten tant UDP com TCP
L2TP normalment transporta trànsit IP utilitzant PPP. L2TP encapsula PPP en línias virtuals que s'executen normalment sobre una xarxa IP (tot i que també suporta Frame Relay i altres protocols d'enllaç).
Amb L2TP es poden fer tant VPNs per a connectar nodes remots a una xarxa privada com per a itnerconnectar xarxes privades entre si (consulteu Tipus de VPN).
TODO:
L2TP incorporates PPP and MPPE (Microsoft Point to Point Encryption) to make encrypted links. The purpose of this protocol is to allow the Layer 2 and PPP endpoints to reside on different devices interconnected by a packet-switched network. With L2TP, a user has a Layer 2 connection to an access concentrator - LAC (e.g., modem bank, ADSL DSLAM, etc.), and the concentrator then tunnels individual PPP frames to the Network Access Server - NAS. This allows the actual processing of PPP packets to be separated from the termination of the Layer 2 circuit. From the user's perspective, there is no functional difference between having the L2 circuit terminate in a NAS directly or using L2TP.
També pot ser útils utilitzar L2TP just com qualsevol altre protocol de túnels amb xifratge o sense xifratge.
Amb cada connexió L2TP es pot fer autenticació i accounting. Les dades AAA poden emmagatzemar-se en local al dispositiu Mikrotik o a un servidors Radius extern.
És utilitzat habitualment com un mecanisme que permet revendre connectivitat ADSL a nivell 2 i també per operadors de cable.
Se suporta MPPE 40bit RC4 and MPPE 128bit RC4
El protocol va ser publicat al 1999 i proposat a l'estandard RFC 2661 i està basat sobretot en dos protocols PPP antics: Cisco's Layer 2 Forwarding Protocol (L2F) i US Robotics Point-to-Point Tunneling Protocol (PPTP).
Es va publicar una nova versió (L2TPv3) al 2005 per tal de proveir qüestions de seguretat extres, una encapsulació millorada.
L2TP utilitza el protocol UDP tant per als paquets de control com els paquets de dades. El port UDP és el 1701. Cal però tenir en compte que el port 1701 només s'utilitza per establir el link i que després les dades s'envien per qualsevol port UDP disponible de forma que L2TP pot ser utilitzat a la majoria de encaminadors i firewall deixan passar els paquets UDP.
Els dos punts remots d'un túnel L2TP són anomenats LACs (L2TP Access Concentrator) i the LNS (L2TP Network Server) donant peu a una arquitectura client-servidor.
El estandard L2TP indica que la forma més segura d'utilitzar L2TP és en combinació amb IPSec per tal de xifrar les dades.
Aquest és el mode per defecte en la majoria de clients per a la majoria de sistemes operatius.
TODO
Because of the lack of confidentiality inherent in the L2TP protocol, it is often implemented along with IPsec. This is referred to as L2TP/IPsec, and is standardized in IETF RFC 3193. The process of setting up an L2TP/IPsec VPN is as follows:
When the process is complete, L2TP packets between the endpoints are encapsulated by IPsec. Since the L2TP packet itself is wrapped and hidden within the IPsec packet, no information about the internal private network can be garnered from the encrypted packet. Also, it is not necessary to open UDP port 1701 on firewalls between the endpoints, since the inner packets are not acted upon until after IPsec data has been decrypted and stripped, which only takes place at the endpoints.
A potential point of confusion in L2TP/IPsec is the use of the terms 'tunnel' and 'secure channel'. The term 'tunnel' refers to a channel which allows untouched packets of one network to be transported over another network. In the case of L2TP/PPP, it allows L2TP/PPP packets to be transported over IP. A 'secure channel' refers to a connection within which the confidentiality of all data is guaranteed. In L2TP/IPsec, first IPsec provides a secure channel, then L2TP provides a tunnel.
Multilink PPP (MP) es suportat pel protocol L2TP per tal de proveir MRRU i també suportat [[[bridging]] en enllaços PPP. ( utilitzant Bridge Control Protocol (BCP) que permet enviar frames Ethernet tal qual a través de enllaços PPP).
D'aquesta forma és possible disposar d'una alternativa a EoIP. Cal tenir en compte que el bridge haurà de tenir una Adreça MAC d'administració o una interfície Ethernet en el bridge ja que els enllaços PPP no tenen adreces MAC.
Consulteu routerOS L2TP.
Consulteu PPP#Comparaci.C3.B3_entre_protocols_PPP
TODO:
$ apt-cache search l2tp kvpnc - vpn clients frontend for KDE4 l2tpns - layer 2 tunnelling protocol network server (LNS) radiusd-livingston - Remote Authentication Dial-In User Service (RADIUS) server xl2tpd - a layer 2 tunneling protocol implementation
TODO
Recursos:
Els dispositius mòbils Android porten suport incorporat de sèrie per a L2TP ( també per a [PPTP]]).
Altres sistemes VPN poden ser utilitzats instal·lant aplicacions (OpenVPN es pot instal·lar en dispositius rootejats.)
Consulteu routerOS L2TP