LLDP - Link Layer Discovery 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 LLDP?** LLDP stands for Link Layer Discovery Protocol. It’s a vendor-neutral Layer 2 protocol used by network devices to advertise their identity and capabilities to directly connected devices. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is LLDP useful?** Without LLDP, network administrators would have to manually trace cables or log into devices to identify what’s connected where. LLDP simplifies network mapping, troubleshooting, and management by automatically sharing device information. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works** * Device sends LLDP advertisements – Each LLDP-enabled device periodically sends out LLDP Data Units (LLDPDUs) on its interfaces. * Neighbor receives and stores info – Connected devices receive these messages and store the information in a neighbor table. * Information includes – Device name, port ID, capabilities, IP address, and more. * Network management tools – Can query this data to build a topology map of the network. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is LLDP used?** * Enterprise networks – For automatic device discovery and documentation. * Data centers – To manage complex interconnections between switches, servers, and routers. * VoIP deployments – Phones use LLDP to learn VLAN and QoS settings from switches. * Multi-vendor environments – Since LLDP is standards-based, it works across different brands. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * LLDP operates at the Data Link Layer (Layer 2). * It uses Ethernet frames with EtherType 0x88CC. * It does not require IP addressing or higher-layer protocols. * It only communicates with directly connected neighbors. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What are the key features of LLDP?** * Vendor-Neutral Standard * Neighbor Discovery * TLV Structure (Type-Length-Value) .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is LLDP-MED?** LLDP-MED is an extension to LLDP used mainly in VoIP and telephony, defined in ANSI/TIA-1057. It provides: * Network policy (voice VLAN, DSCP) * Location data (for 911 services) * Inventory management .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What type of devices support LLDP?** * Switches * Routers * Wireless access points * IP phones * Servers .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What information does LLDP share?** Each LLDP message (called an LLDPDU) includes: * Device name (System Name) * Port ID (interface name/number) * System description * Port description * MAC address * VLAN info * Capabilities (e.g., bridge, router, etc.) * Management IP address .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How long is LLDP information retained?** * The default Time to Live (TTL) is 120 seconds. * If no LLDP messages are received within TTL, the neighbor entry is removed. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is the working flow of LLDP?** * LLDP is enabled on a device * Devices like switches, routers, or servers have LLDP service running. * On Linux, the `lldpd` service does this. LLDP gathers local details such as: * Device name * Port number * System description * VLAN info * Management IP * Capabilities LLDP sends LLDPDU messages: * Sent every 30 seconds by default * Broadcast in Ethernet frames using reserved multicast MAC: `01:80:C2:00:00:0E` Neighbor devices receive and store: * Devices that support LLDP listen for LLDPDUs * Store received neighbor data in an LLDP table * If no LLDP messages are received within TTL, the entry is removed .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is LLDP suitable for real-time applications?** No, LLDP is intended for network discovery and management purposes. It is **not** designed for real-time traffic such as voice, video, or live data streaming. .. 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:`LLDP Version&IEEE Details ` * :ref:`LLDP Basic Setup on Ubuntu using IPv4 ` * :ref:`LLDP Basic Setup on Ubuntu using IPv6 ` * :ref:`LLDP Protocol Packet Details ` * :ref:`LLDP Usecases ` * :ref:`LLDP Basic Features ` * :ref:`LLDP Feature : Vendor Neutral Protocol ` * :ref:`LLDP Feature : Uses TLV Structure ` * :ref:`LLDP Feature : Layer 2 Protocol ` * :ref:`LLDP Feature : Periodic Advertisements ` * :ref:`LLDP Feature : One Way Communication ` * :ref:`LLDP Feature : Supports Optional TLVs ` * :ref:`LLDP Feature : Low Overhead ` * :ref:`LLDP Feature : Fast Link Detection ` * :ref:`LLDP Feature : Supports Multiple Neighbors ` * :ref:`LLDP Feature : Extensible For Custom ` * :ref:`Reference links ` .. _LLDP_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _LLDP_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _LLDP_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _LLDP_step5: .. tab-set:: .. tab-item:: LLDP Version&IEEE Details .. csv-table:: :file: ./LLDP/LLDP_IEEE.csv :widths: 10,10,10,30,40 :header-rows: 1 .. _LLDP_step20: .. tab-set:: .. tab-item:: LLDP Basic Setup on Ubuntu using IPv4 * setup .. _LLDP_step21: .. tab-set:: .. tab-item:: LLDP Basic Setup on Ubuntu using IPv6 * setup .. _LLDP_step6: .. tab-set:: .. tab-item:: LLDP Protocol Packet Details **LLDP CHASSIS ID TLV Packet** .. csv-table:: :file: ./LLDP/LLDP_Chassis_ID_TLV_Packet.csv :widths: 10,20,30,40 :header-rows: 1 **LLDP PORT ID TLV Packet** .. csv-table:: :file: ./LLDP/LLDP_PORT_ID_TLV_Packet.csv :widths: 10,20,30,40 :header-rows: 1 **LLDP TIME TO LIVE TLV Packet** .. csv-table:: :file: ./LLDP/LLDP_Time_to_Live_TLV_Packet.csv :widths: 10,20,30,40 :header-rows: 1 **LLDP SYSTEM NAME TLV Packet** .. csv-table:: :file: ./LLDP/LLDP_System_Name_TLV_Packet.csv :widths: 10,20,30,40 :header-rows: 1 **LLDP SYSTEM DESCRIPTION TLV Packet** .. csv-table:: :file: ./LLDP/LLDP_System_Description_TLV_Packet.csv :widths: 10,20,30,40 :header-rows: 1 **LLDP SYSTEM CAPABILITIES TLV Packet** .. csv-table:: :file: ./LLDP/LLDP_System_Capabilities_TLV_Packet.csv :widths: 10,20,30,40 :header-rows: 1 **LLDP MANAGEMENT ADDRESS TLV Packet** .. csv-table:: :file: ./LLDP/LLDP_Management_address_TLV_Header_Packet.csv :widths: 10,20,30,40 :header-rows: 1 **LLDP END OF LLDPDU TLV Packet** .. csv-table:: :file: ./LLDP/LLDP_End_of_LLDPDU_TLV_Packet.csv :widths: 10,20,30,40 :header-rows: 1 .. _LLDP_step7: .. tab-set:: .. tab-item:: LLDP Usecases .. csv-table:: :file: ./LLDP/LLDP_Use_Cases.csv :widths: 10,20,30 :header-rows: 1 .. _LLDP_step8: .. tab-set:: .. tab-item:: LLDP Basic Features .. csv-table:: :file: ./LLDP/LLDP_Features.csv :widths: 10,10,30 :header-rows: 1 .. _LLDP_step9: .. tab-set:: .. tab-item:: LLDP Feature : Vendor Neutral Protocol **Vendor Neutral Protocol - Testcases** .. csv-table:: :file: ./LLDP/LLDP_Feature1_Vendor_Neutral_Protocol_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _LLDP_step10: .. tab-set:: .. tab-item:: LLDP Feature : Uses TLV Structure **Uses TLV Structure - Testcases** .. csv-table:: :file: ./LLDP/LLDP_Feature2_Uses_TLV_Structure_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _LLDP_step11: .. tab-set:: .. tab-item:: LLDP Feature : Layer 2 Protocol **Layer 2 Protocol - Testcases** .. csv-table:: :file: ./LLDP/LLDP_Feature3_Layer2_Protocol_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _LLDP_step12: .. tab-set:: .. tab-item:: LLDP Feature : Periodic Advertisements **Periodic Advertisements - Testcases** .. csv-table:: :file: ./LLDP/LLDP_Feature4_Periodic_Advertisements_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _LLDP_step13: .. tab-set:: .. tab-item:: LLDP Feature : One Way Communication **One Way Communication - Testcases** .. csv-table:: :file: ./LLDP/LLDP_Feature5_One_Way_Communication_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _LLDP_step14: .. tab-set:: .. tab-item:: LLDP Feature : Supports Optional TLVs **Support Optional TLVs - Testcases** .. csv-table:: :file: ./LLDP/LLDP_Feature6_Supports_optional_TLVs_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _LLDP_step15: .. tab-set:: .. tab-item:: LLDP Feature : Low Overhead **Low Overheaad - Testcases** .. csv-table:: :file: ./LLDP/LLDP_Feature7_LowOverhead_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _LLDP_step16: .. tab-set:: .. tab-item:: LLDP Feature : Fast Link Detection **Fast Link Detection - Testcases** .. csv-table:: :file: ./LLDP/LLDP_Feature8_Fast_link_Detection_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _LLDP_step17: .. tab-set:: .. tab-item:: LLDP Feature : Supports Multiple Neighbors **Supports Multiple Neighbors - Testcases** .. csv-table:: :file: ./LLDP/LLDP_Feature9_Supports_Multiple_Neighbors_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _LLDP_step18: .. tab-set:: .. tab-item:: LLDP Feature : Extensible For Custom **Extensible For Custom - Testcases** .. csv-table:: :file: ./LLDP/LLDP_Feature10_Extensible_for_Custom_Test_Cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _LLDP_step19: .. tab-set:: .. tab-item:: Reference links * Reference links