Open In App

Link Layer Discovery Protocol (LLDP)

Improve
Improve
Like Article
Like
Save
Share
Report

LLDP stands for Link Layer Discovery Protocol. It is an open IEEE-standard (802.1AB) Layer 2 protocol. LLDP is the open-source alternative for CDP (Cisco Discovery Protocol) which is also a device discovery protocol that runs over Layer 2 (the data link layer) only on Cisco-manufactured devices (routers, bridges, access servers, and switches).

LLDP runs over the data link layer which allows two different devices to gather hardware and protocol information about neighboring devices that is useful in troubleshooting the network.

It supports a defined set of attributes that it uses to discover neighbor devices and are referred to as TLVs which are as follows:

  • T- type 
  • L- length
  • V- value descriptions

Devices running LLDP, on one of their interfaces, uses TLVs to receive and send information to their neighbors. These devices store the information of neighboring devices in a local table that can be accessed using SNMP (Simple Network Management Protocol). Information stored by the devices includes:

  • System name & description
  • Port name & description
  • IP management address
  • VLAN
  • Capabilities of the neighbor device
  • MAC address
  • MDI power
  • Link aggregation

Features of LLDP : 
LLDP enabled devices can 

  • Discover neighboring devices.
  • Advertise information about their layer-2 configurations to their neighbors.
  • Be troubleshot and fixed easily.
  • Use a level of Plug-and-Play configuration of peripheral devices.

Default LLDP configuration :

  • LLDP global state – Disabled
  • LLDP hold time – 120 seconds
  • LLDP timer (packet update frequency) – 30 seconds
  • LLDP reinitialization delay – 2 seconds
  • LLDP tlv-select – to send and receive all TLVs.
  • LLDP interface state – Enabled
  • LLDP receive – Enabled
  • LLDP transmit Enabled
  • LLDP med-tlv-select – to send all LLDP-MED TLVs

LLDP Packet Format :
LLDP information is transmitted and/or received by neighbor devices via each of their LLDP enabled interfaces at a fixed interval of time in the form an Ethernet frame. Each Ethernet frame contains an LLDP data unit (LLDPDU). LLDPDU is a sequence of TLV structures. LLDP ethernet frame starts with the following compulsory TLVs :

  • Chassis ID
  • Port ID
  • Time to Live (TTL)
LLDP Packet Format

LLDP Packet Format

Applications of LLDP :

  • This protocol is used in data center bridging requirements.
  • It is used to advertise Power over Ethernet (PoE).

Advantages of LLDP :

  • It can run on cisco and non-cisco devices.
  • It is an open standard protocol recommended by CISCO too.
  • LLDP – MED extension gives an edge over CDP.
  • LLDP is vendor-neutral: Unlike Cisco’s proprietary CDP protocol, LLDP is an open standard protocol that is supported by a wide range of networking vendors. This means that it can be used on a variety of devices from different vendors, making it more flexible and interoperable.
  • Efficient use of network resources: LLDP enables devices to dynamically discover neighboring devices and their capabilities, which helps in the efficient use of network resources. This allows network administrators to optimize network topology, configure devices, and troubleshoot issues more effectively.
  • Low network overhead: LLDP packets are small and simple, which minimizes the network overhead and reduces the potential for network congestion.
  • Supports Power over Ethernet (PoE): The LLDP-MED (Media Endpoint Discovery) extension supports Power over Ethernet (PoE) devices, allowing devices to negotiate power requirements and receive power over the network cable.
  • Provides valuable information: LLDP can provide valuable information about neighboring devices, such as device type, software version, and port information, which can be used for inventory management, troubleshooting, and network optimization.
  • Helps in security: LLDP can help in identifying rogue devices on the network by providing information about neighboring devices. This can be useful for detecting unauthorized devices and preventing security breaches.
  • Helps in network documentation: LLDP information can be used for network documentation, providing a better understanding of network topology and device capabilities. This can help in network planning, maintenance, and upgrades.

Disadvantages of LLDP :

  • On VMware switches the only protocol supported for discovery is CDP.
  • More cost of running LLDP over CDP.
  • Limited support on some devices: Although LLDP is an open standard protocol, some devices may not support it fully or may have limited support. For example, on some virtual switches like VMware, only CDP is supported for device discovery.
  • Higher cost of implementation: The implementation of LLDP may require more resources and configuration than other protocols like CDP, which can result in a higher cost of implementation.
  • Security risks: LLDP can potentially expose sensitive information about network devices, which can be exploited by attackers. For example, an attacker can use LLDP to identify network topology, device types, and software versions to plan attacks or gather intelligence about the network.
  • Limited backward compatibility: LLDP may not be backward compatible with older devices or legacy systems that do not support the protocol. This can limit its use in environments that have a mix of new and old devices.
  • Limited functionality: LLDP only provides basic information about network devices, such as device type, software version, and port information. This may not be sufficient for some applications that require more advanced features, such as quality of service (QoS) or network policy enforcement.
  • Interoperability issues: Although LLDP is an open standard protocol, different vendors may implement it differently, which can result in interoperability issues. This can make it difficult to exchange information between devices from different vendors or to integrate LLDP with other network management systems.
  • Limited scope: LLDP only provides device discovery and information exchange between neighboring devices. It does not provide advanced features such as network policy enforcement or traffic shaping. This can limit its usefulness in large or complex networks.

LLDP Configuration :

  • Disabling and enabling LLDP globally 
# enabling LLDP

R1# configure terminal
R1(config)# lldp run
#disabling LLDP

R1# configure terminal
R1(config)# no lldp run
  • Disabling and Enabling LLDP protocol on an Interface 
#enabling LLDP on interface

R1# configure terminal
R1(config)# interface GigabitEthernet 1/1
R1(config-if)# lldp transmit
R1(config-if)# lldp receive
#disabling LLDP on interface

R1# configure terminal
R1(config)# interface GigabitEthernet 1/1
R1(config-if)# no lldp transmit
R1(config-if)# no lldp receive
  • Configuring a hold time, delay time, and  update frequency 
R1(config)# lldp holdtime 120
R1(config)# lldp reinit 5
R1(config)# lldp timer 15

Note: Use the “no” form of each of the above LLDP commands to return to the default setting on the device.

LLDP Router Configuration

LLDP Router Configuration

Execute the same configuration for the R2 router to make it an LLDP neighbor of the R1 router in the above network.

  • To view the LLDP configuration on the router 
R1# show lldp 
LLDP command result

LLDP command result

  • To view the detailed information about the LLDP neighbor devices 
R1# show lldp neighbors
LLDP configuration

LLDP neighbors command result



Last Updated : 09 May, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads