Link Layer Discovery Protocol (LLDP)

Link Layer Discovery Protocol (LLDP) is a vendor-neutral link layer protocol defined in IEEE standard 802.1AB. Just like Cisco’s CDP, LLDP is used by network devices to advertise their identity, capabilities, and neighbors on a local Ethernet network. However, since LLDP is an open standard, it has one big advantage over CDP – it can be used on non-Cisco devices.

LLDP is disabled by default on Cisco devices. To enable it, use the lldp run command in the config mode:

R1(config)#lldp run

To display information about the LLDP neighbors, run the show lldp neighbors command:

R1#show lldp neighbors
Capability codes:
    (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
    (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID           Local Intf     Hold-time  Capability      Port ID
R2                  Gig0/0         120        R               Gig0/0

Total entries displayed: 1

As you can see from the output above, R1 has a single neighbor. Here is the description of the fields in the output:

  • Device ID – the neighbor’s host name
  • Local Intf – the local device interface on which the neighbor is connected to
  • Hold-time – the time the receiving device should hold the information sent by this device before discarding it.
  • Capability – the type of the device. R means router, T means telephone, etc.
  • Port ID – neighboring device’s interface

 

To get more detail information about LLDP neighbors, run the show lldp neighbors detail command:

R1#show lldp neighbors detail 
------------------------------------------------
Chassis id: 0002.4A13.6C01
Port id: Gig0/0
Port Description: GigabitEthernet0/0
System Name: R2
System Description:
Cisco IOS Software, C1900 Software (C1900-UNIVERSALK9-M), Version 15.1(4)M4, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2012 by Cisco Systems, Inc.
Compiled Thurs 5-Jan-12 15:41 by pt_team
Time remaining: 90 seconds
System Capabilities: R
Enabled Capabilities: R
Management Addresses - not advertised
Auto Negotiation - supported, enabled
Physical media capabilities:
1000baseT(FD)
100baseT(FD)
Media Attachment Unit type: 10
Vlan ID: 1

Total entries displayed: 1
NOTE
To get information about a specific neighbor, run the show lldp entry DEVICE_ID command.

 

To display global LLDP information, run the show lldp command:

R2#show lldp
Global LLDP Information:
Status: ACTIVE
LLDP advertisements are sent every 30 seconds
LLDP hold time advertised is 120 seconds
LLDP interface reinitialisation delay is 2 seconds

This command displays information about whether LLDP is active on the device, the frequency of LLDP transmissions, the holdtime for packets being sent, and the delay time for LLDP to initialize on an interface.

You can also configure whether you would like your device to send or receive LLDP packets on a particular interface using the no lldp transmit and no lldp receive interface mode commands. For example, to only receive LLDP packets on the Gi0/0 interface, I would use the following command to disable the sending of LLDP packets:

R1(config-if)#no lldp transmit
upravnik