Configuring LLDP

Understanding LLDP

The Link Layer Discovery Protocol (LLDP) is a vendor-neutral data-link layer protocol, used by network devices for advertising their identity, capabilities, and neighbors on an IEEE 802 local area network, principally wired Ethernet.

As protocol runs over the data-link layer, it allows two systems running different network layer protocols to learn about each other. Therefore the protocol allows interoperability between Cisco devices and non-Cisco devices.

LLDP supports a set of attributes that it uses to discover neighboring devices. These attributes contain type, length, and value descriptions and are referred to as type-length-value (TLV) structures. LLDP supported devices can use TLVs to receive and send information to their neighbors. Details such as configuration information, device capabilities, and device identity can be advertised using this protocol.

Configuring LLDP

You can configure LLDP only through the CLI.

The following commands are to be executed in global configuration mode.

Command
Purpose
Example

lldp run

To enable LLDP

ap(config) # lldp run

lldp holdtime seconds

To specify the amount of time a receiving device should hold the information sent by your device before discarding it.

ap(config) # lldp holdtime 120

lldp reinit seconds

To set the delay (in sec) for LLDP initialization on any interface.

ap(config)# lldp reinit 60

lldp timer seconds

To specify the rate at which LLDP packets are sent (in sec)

ap(config)# lldp timer 50

lldp tlv-select tlv_name

To specify the TLVs to send and receive LLDP packets. The available TLVs are dcbxp, management-address, port-description, port-vlan, system-capabilities, system-description, and system-name. All available TLVs are enabled by default.

ap(config)# lldp tlv-select system-name

Default LLDP Configuration

Feature
Default Setting

LLDP global state

Disabled

LLDP holdtime (before discarding)

120 seconds

LLDP timer (packet update frequency)

30 seconds

LLDP reinitialization delay

2 seconds

LLDP tlv-select

Enabled to send and receive all TLVs.

LLDP interface state

Enabled

LLDP receive

Enabled

LLDP transmit

Enabled

Disabling and Re-Enabling LLDP on Gigabit Ethernet Interfaces

To disable LLDP on a Gigabit Ethernet (GbE) interface, perform the following steps.

Command
Purpose

Step 1

configure terminal

Enters global configuration mode.

Step 2

interface interface-id

Specifies the interface on which you are disabling LLDP, and enters interface configuration mode.

Step 3

no lldp transmit

Disallows sending LLDP packets on the interface.

Step 4

no lldp receive

Disallows receiving LLDP packets on the interface.

Step 5

end

Returns to privileged EXEC mode.

Step 6

copy running-config startup-config

Saves your entries in the configuration file.

To re-enable LLDP on a GbE interface, perform the following steps.

Command
Purpose

Step 1

configure terminal

Enters global configuration mode.

Step 2

interface interface-id

Specifies the interface on which you are disabling LLDP, and enters interface configuration mode.

Step 3

lldp transmit

Allows sending LLDP packets on the interface.

Step 4

lldp receive

Allows receiving LLDP packets on the interface.

Step 5

end

Returns to privileged EXEC mode.

Step 6

copy running-config startup-config

Saves your entries in the configuration file.

Viewing and Deleting LLDP Information

The following commands are to be executed in privileged EXEC mode.

Command
Description

show lldp

Displays global information, such as frequency of transmissions, the holdtime for packets being sent, and the delay time for LLDP, to initialize on an interface.

show lldp entry entry-name

Displays information about a specific neighbor. You can enter an asterisk (*) to display all neighbors, or you can enter the name of the neighbor about which you want information.

show lldp errors

Displays LLDP computational errors and overflows.

show lldp interface

Displays information about interfaces where LLDP is enabled. You can limit the display to the interface about which you want information.

show lldp neighbors [interface-id] [detail]

Displays information about neighbors, including device type, interface type and number, holdtime settings, capabilities, and port ID. You can limit the display to neighbors of a specific interface or expand the display to provide more detailed information.

show lldp traffic

Displays LLDP counters, including the number of packets sent and received, number of packets discarded, and number of unrecognized TLVs.

clear lldp counters

Resets the traffic and error counters to zero.

clear lldp table

Deletes the LLDP table of information about neighbors.