Skip to content
Related Articles
Open in App
Not now

Related Articles

Link Layer Discovery Protocol (LLDP)

Improve Article
Save Article
  • Last Updated : 22 Oct, 2021
Improve Article
Save Article

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.

Disadvantages of LLDP :

  • On VMware switches the only protocol supported for discovery is CDP.
  • More cost of running LLDP over CDP.

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

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!