L2TP - Layer 2 Tunneling Protocol ==================================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is L2TP?** L2TP (Layer 2 Tunneling Protocol) is a tunneling protocol that encapsulates Layer 2 frames for transmission over IP networks. When used outside of VPN, L2TP provides tunneling functionality without encryption, often for transporting non-IP traffic or enabling ISP services. Think of it as a virtual tunnel that carries data link layer frames across IP networks. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is L2TP important outside VPN?** * Protocol Flexibility: Can tunnel non-IP protocols like PPP. * Service Delivery: Used by ISPs to deliver broadband services. * Separation of Tunneling and Security: Allows modular design—encryption can be added separately (e.g., IPsec). * Lightweight: Minimal overhead when encryption is not required. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How L2TP works (in simple steps):** * A tunnel is established between two L2TP endpoints (e.g., client and LNS). * Layer 2 frames (e.g., PPP) are encapsulated into L2TP packets. * These packets are transmitted over an IP network. * The receiving endpoint decapsulates the frames. * The original Layer 2 data is delivered to the destination. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is L2TP used (outside VPN)?** * ISP Broadband Services: For DSL or fiber access aggregation. * PPP Tunneling: To carry PPP sessions over IP networks. * Remote Access Aggregation: Centralizing access from multiple dial-in servers. * Non-IP Traffic Transport: Useful in legacy systems or hybrid networks. * MPLS and Carrier Networks: As part of Layer 2 VPN services. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI Layer does this protocol belong to?** * L2TP operates at Layer 2 of the OSI model. * It encapsulates data link layer frames, not just IP packets. * This allows it to tunnel non-IP protocols and maintain link-layer characteristics. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`L2TP Version&RFC Details ` * :ref:`L2TP Basic Setup on Ubuntu using IPv4 ` * :ref:`L2TP Basic Setup on Ubuntu using IPv6 ` * :ref:`L2TP Protocol Packet Details ` * :ref:`L2TP Usecases ` * :ref:`L2TP Basic Features ` * :ref:`L2TP Feature : Tunneling ` * :ref:`L2TP Feature : Session Multiplexing ` * :ref:`L2TP Feature : Control and Data Separation ` * :ref:`L2TP Feature : Protocol Independence ` * :ref:`L2TP Feature : UDP-Based Transport ` * :ref:`L2TP Feature : No Native Encryption ` * :ref:`L2TP Feature : AVP-Based Control Messages ` * :ref:`L2TP Feature : Reliability for Control Messages ` * :ref:`L2TP Feature : Tunnel and Session IDs ` * :ref:`L2TP Feature : Extensibility (L2TPv3) ` * :ref:`Reference links ` .. _L2TP_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _L2TP_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _L2TP_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _L2TP_step5: .. tab-set:: .. tab-item:: L2TP Version&RFC Details .. csv-table:: :file: ./L2TP/L2TP_Version&RFC_Details.csv :widths: 10,10,10,30 :header-rows: 1 .. _L2TP_step20: .. tab-set:: .. tab-item:: L2TP Basic Setup on Ubuntu using IPv4 **Setup** .. _L2TP_step21: .. tab-set:: .. tab-item:: L2TP Basic Setup on Ubuntu using IPv6 **Setup** .. _L2TP_step6: .. tab-set:: .. tab-item:: L2TP Protocol Packet Details **L2TP Control Message** .. csv-table:: :file: ./L2TP/L2TP_packetdetails1.csv :widths: 10,20,30,10 :header-rows: 1 **L2TP Data Message** .. csv-table:: :file: ./L2TP/L2TP_packetdetails2.csv :widths: 10,20,30,10 :header-rows: 1 .. _L2TP_step7: .. tab-set:: .. tab-item:: L2TP Usecases .. csv-table:: :file: ./L2TP/L2TP_Use_Cases.csv :widths: 10,20,30 :header-rows: 1 .. _L2TP_step8: .. tab-set:: .. tab-item:: L2TP Basic Features .. csv-table:: :file: ./L2TP/L2TP_Basic_Features.csv :widths: 10,10,30 :header-rows: 1 .. _L2TP_step9: .. tab-set:: .. tab-item:: L2TP Feature : Tunneling **Tunneling - Testcases** .. csv-table:: :file: ./L2TP/L2TP_Feature1_Tunneling_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _L2TP_step10: .. tab-set:: .. tab-item:: L2TP Feature : Session Multiplexing **Session Multiplexing - Testcases** .. csv-table:: :file: ./L2TP/L2TP_Feature2_Session_Multiplexing_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _L2TP_step11: .. tab-set:: .. tab-item:: L2TP Feature : Control and Data Separation **Control and Data Separation - Testcases** .. csv-table:: :file: ./L2TP/L2TP_Feature3_Control_and_Data_Separation_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _L2TP_step12: .. tab-set:: .. tab-item:: L2TP Feature : Protocol Independence **Protocol Independence - Testcases** .. csv-table:: :file: ./L2TP/L2TP_Feature4_Protocol_Independence_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _L2TP_step13: .. tab-set:: .. tab-item:: L2TP Feature : UDP-Based Transport **UDP-Based Transport - Testcases** .. csv-table:: :file: ./L2TP/L2TP_Feature5_UDP_Based_Transport_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _L2TP_step14: .. tab-set:: .. tab-item:: L2TP Feature : No Native Encryption **No Native Encryption - Testcases** .. csv-table:: :file: ./L2TP/L2TP_Feature6_No_Native_Encryption_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _L2TP_step15: .. tab-set:: .. tab-item:: L2TP Feature : AVP-Based Control Messages **AVP-Based Control Messages - Testcases** .. csv-table:: :file: ./L2TP/L2TP_Feature7_AVP_Based_Control_Messages_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _L2TP_step16: .. tab-set:: .. tab-item:: L2TP Feature : Reliability for Control Messages **Reliability for Control Messages - Testcases** .. csv-table:: :file: ./L2TP/L2TP_Feature8_Reliability_for_Control_Messages_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _L2TP_step17: .. tab-set:: .. tab-item:: L2TP Feature : Tunnel and Session IDs **Tunnel and Session IDs - Testcases** .. csv-table:: :file: ./L2TP/L2TP_Feature9_Tunnel_and_Session_IDs_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _L2TP_step18: .. tab-set:: .. tab-item:: L2TP Feature : Extensibility (L2TPv3) **Extensibility (L2TPv3) - Testcases** .. csv-table:: :file: ./L2TP/L2TP_Feature10_Extensibility(L2TPv3)_TestCases.csv :widths: 10,10,30,20 :header-rows: 1 .. _L2TP_step19: .. tab-set:: .. tab-item:: Reference links * Reference links