Configuring LLDP

Information About LLDP

The documentation set for this product strives to use bias-free language. For purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on standards documentation, or language that is used by a referenced third-party product.

LLDP

The Cisco Discovery Protocol (CDP) is a device discovery protocol that runs over Layer 2 (the data link layer) on all Cisco-manufactured devices (routers, bridges, access servers, switches, and controllers). CDP allows network management applications to automatically discover and learn about other Cisco devices connected to the network.

To support non-Cisco devices and to allow for interoperability between other devices, the device supports the IEEE 802.1AB Link Layer Discovery Protocol (LLDP). LLDP is a neighbor discovery protocol that is used for network devices to advertise information about themselves to other devices on the network. This protocol runs over the data-link layer, which allows two systems running different network layer protocols to learn about each other.

LLDP Supported TLVs

LLDP supports a set of attributes that it uses to discover neighbor devices. These attributes contain type, length, and value descriptions and are referred to as TLVs. LLDP supported devices can use TLVs to receive and send information to their neighbors. This protocol can advertise details such as configuration information, device capabilities, and device identity.

The switch supports these basic management TLVs. These are mandatory LLDP TLVs.

  • Port description TLV

  • System name TLV

  • System description TLV

  • System capabilities TLV

  • Management address TLV

These organizationally specific LLDP TLVs are also advertised to support LLDP-MED.

  • Port VLAN ID TLV (IEEE 802.1 organizationally specific TLVs)

  • MAC/PHY configuration/status TLV (IEEE 802.3 organizationally specific TLVs)

LLDP TLVs are used by Common Industrial Protocol, (CIP) in industrial automation applications. The switch supports the following CIP Identification TLVs:

  • Vendor Id

  • Product Type

  • Product Code

  • Product Major Revision

  • Product Minor Revision

  • Product CIP Serial Number

For information about CIP, see CIP and MODBUS Configuration Guide, Cisco Catalyst IE3x00 Rugged, IE3400 Heavy Duty, and ESS3300 Series Switches.

The show lldp neighbors detail tlv-dump command displays LLDP TLVs. See Monitoring and Maintaining LLDP for more information about show lldp commands.

Default LLDP Configuration

Table 1. Default LLDP Configuration

Feature

Default Setting

LLDP global state

Enabled

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

Restrictions for LLDP

  • If the interface is configured as a tunnel port, LLDP is automatically disabled.

  • If you first configure a network-policy profile on an interface, you cannot apply the switchport voice vlan command on the interface. If the switchport voice vlan vlan-id is already configured on an interface, you can apply a network-policy profile on the interface. This way the interface has the voice or voice-signaling VLAN network-policy profile applied on the interface.

  • You cannot configure static secure MAC addresses on an interface that has a network-policy profile.

  • When Cisco Discovery Protocol and LLDP are both in use within the same switch, it is necessary to disable LLDP on interfaces where Cisco Discovery Protocol is in use for power negotiation. LLDP can be disabled at interface level with the commands no lldp tlv-select power-management or no lldp transmit / no lldp receive .

Enabling LLDP

Procedure

  Command or Action Purpose
Step 1

enable

Example:


Device> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 3

lldp run

Example:


Device(config)# lldp run

Enables LLDP globally on the device.

Step 4

interface interface-id

Example:

Specifies the interface on which you are enabling LLDP, and enter interface configuration mode.

Step 5

lldp transmit

Example:


Device(config-if)# lldp transmit

Enables the interface to send LLDP packets.

Step 6

lldp receive

Example:


Device(config-if)# lldp receive

Enables the interface to receive LLDP packets.

Step 7

end

Example:


Device(config-if)# end

Returns to privileged EXEC mode.

Step 8

show lldp

Example:


Device# show lldp

Verifies the configuration.

Step 9

copy running-config startup-config

Example:


Device# copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

Disabling LLDP

The PROFINET protocol relies on LLDP for its functionality, and PROFINET is enabled by default on the switch. If you disable LLDP using the no lldp run command, followed by the wr mem and reload commands, on boot up PROFINET is globally enabled. PROFINET then re-enables LLDP automatically.

If you want to disable LLDP on the switch and maintain the configuration across reloads, you must also globally disable the PROFINET protocol. Follow these steps to disable both LLDP and PROFINET globally:

Procedure


Step 1

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 2

no profinet

Example:


Device(config)# no profinet

Globally disables PROFINET.

Step 3

no lldp run

Example:


Device(config)# no lldp run

Globally disables LLDP.

Step 4

end

Example:


Device(config-if)# end

Returns to priviledged EXEC mode.

Step 5

write memory

Example:


Device# write memory

Saves the running configuration to the nonvolatile random-access memory (NVRAM).

Step 6

reload

Example:


Device# reload

Reloads the switch operating system.


Example


Device# configure terminal
Device(config)#no profinet
Device(config)#no lldp
Device(config)#end
Device#write memory
Device#reload

Configuring LLDP Characteristics

You can configure the frequency of LLDP updates, the amount of time to hold the information before discarding it, and the initialization delay time. You can also select the LLDP TLVs to send and receive.


Note

Steps 3 through 6 are optional and can be performed in any order.


Procedure

  Command or Action Purpose
Step 1

enable

Example:


Device> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 3

lldp holdtime seconds

Example:


Device(config)# lldp holdtime 120

(Optional) Specifies the amount of time a receiving device should hold the information from your device before discarding it.

The range is 0 to 65535 seconds; the default is 120 seconds.

Step 4

lldp reinit delay

Example:


Device(config)# lldp reinit 2

(Optional) Specifies the delay time in seconds for LLDP to initialize on an interface.

The range is 2 to 5 seconds; the default is 2 seconds.

Step 5

lldp timer rate

Example:


Device(config)# lldp timer 30

(Optional) Sets the sending frequency of LLDP updates in seconds.

The range is 5 to 65534 seconds; the default is 30 seconds.

Step 6

interface interface-id

Example:


Device(config)# interface 
gigabitethernet2/1

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

Step 7

lldp tlv-select tlv

Example:


 Device(config-if)# lldp tlv-select inventory management

(Optional) Specifies the LLDP TLVs to send or receive.

Note 

To disable LLDP TLVs, use the no lldp tlv-select tlv command.

Step 8

end

Example:


Device(config-if)# end

Returns to privileged EXEC mode.

Step 9

show lldp

Example:


Device# show lldp

Verifies the configuration.

Step 10

copy running-config startup-config

Example:


Device# copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

Monitoring and Maintaining LLDP

Commands for monitoring and maintaining LLDP.

Command

Description

clear lldp counters

Resets the traffic counters to zero.

clear lldp table

Deletes the LLDP neighbor information table.

show lldp

Displays global information, such as frequency of transmissions, the holdtime for packets being sent, and the delay time before LLDP initializes 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 neighbor name.

show lldp interface [interface-id]

Displays information about interfaces with LLDP enabled.

You can limit the display to a specific interface.

show lldp neighbors [interface-id] [detail] [tlv-dump]

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 for more detailed information.

The tlv-dump option displays LLDP TLV attributes.

show lldp traffic

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

show cip object lldp-management instance

Displays CIP LLDP management and data objects.

show cip object lldp-management class

show cip object lldp-datatable instance <0-1000>

show cip object lldp-datatable class