Configuring LLDP

This chapter describes how to configure the Link Layer Discovery Protocol (LLDP) in order to discover other devices on the local network.

This chapter includes the following sections:

Overview

The Cisco Discovery Protocol (CDP) and Link Layer Discovery Protocol (LLDP) are device discovery protocols that allow network management applications to automatically discover and learn about other devices connected to the network.

  • CDP is a Cisco proprietary protocol for device discovery on the network.

  • LLDP is a vendor-neutral protocol defined in IEEE 802.1ab, enabling discovery of non-Cisco devices.

  • LLDP uses Type, Length, and Value (TLV) attributes to advertise configuration information, device capabilities, and device identity.

LLDP Advertised TLVs

LLDP advertises the following TLVs by default:

  • DCBXP

  • Management address

  • Port description

  • Port VLAN

  • System capabilities

  • System description

  • System name

Data Center Bridging Exchange Protocol (DCBXP)

The Data Center Bridging Exchange Protocol (DCBXP) is an extension of LLDP. It is used to announce, exchange, and negotiate node parameters between peers. DCBXP parameters are packaged as DCBXP TLVs in the LLDP packet. If CEE is used, DCBXP will use an acknowledgment mechanism over LLDP. When the port comes up, DCBX TLVs are sent and any DCBX TLVs received are processed. By default, the DCBX protocol is set to auto-detect, and the latest protocol version supported by both the peers is used.

Features that need to exchange and negotiate parameters with peer nodes using DCBXP are as follows:

  • Priority-based Flow Control (PFC)—PFC is an enhancement to the existing Pause mechanism in Ethernet. It enables Pause based on user priorities or classes of service. A physical link that is divided into eight virtual links with PFC provides the capability to use Pause on a single virtual link without affecting traffic on the other virtual links. Enabling Pause on a per-user-priority basis allows administrators to create lossless links for traffic requiring no-drop service while retaining packet-drop congestion management for IP traffic.

  • Enhanced Transmission Selection (ETS)—ETS enables optimal bandwidth management of virtual links. ETS is also called priority grouping. It enables differentiated treatments within the same priority classes of PFC. ETS provides prioritized processing based on bandwidth allocation, low latency, or best effort, resulting in per-group traffic class allocation. For example, an Ethernet class of traffic may have a high-priority designation and a best effort within that same class. ETS allows differentiation between traffic of the same priority class, thus creating priority groups.

  • Application Priority Configuration—Carries information about the priorities that are assigned to specific protocols.

  • Priority to DSCP Mapping—The mapping of the DSCP and COS values configured in the QoS policy are sent in the Application Priority TLV.


Note


For information on the quality of service (QoS) features, see the Cisco Nexus 9000 Series NX-OS Quality of Service Configuration Guide.

DCBXP is enabled by default, provided LLDP is enabled. When LLDP is enabled, DCBXP can be enabled or disabled using the [no] lldp tlv-select dcbxp command. DCBXP is disabled on ports where LLDP transmit or receive is disabled.

Supported Features

  • High Availability - The LLDP feature supports stateless and stateful restarts. After a reboot or supervisor switchover, the running configuration is applied.

    For more information on high availability, see the Cisco Nexus 9000 Series NX-OS High Availability and Redundancy Guide.

  • Virtualization Support - One instance of LLDP is supported.

Default Settings

This table lists the LLDP default settings.

Parameters Default
Global LLDP Disabled
LLDP on interfaces Enabled, after LLDP is enabled globally
LLDP hold time (before discarding) 120 seconds
LLDP reinitialization delay 2 seconds
LLDP timer (packet update frequency) 30 seconds
LLDP TLVs Enabled
LLDP receive Enabled, after LLDP is enabled globally
LLDP transmit Enabled, after LLDP is enabled globally
DCBXP Enabled, provided LLDP is enabled
DCBXP version Auto-detect

High Availability

The LLDP feature supports stateless and stateful restarts. After a reboot or supervisor switchover, the running configuration is applied.

For more information on high availability, see the Cisco Nexus 9000 Series NX-OS High Availability and Redundancy Guide.

Virtualization Support

One instance of LLDP is supported.

Guidelines and Limitations for LLDP

LLDP has the following configuration guidelines and limitations:

  • The LLDP feature must be enabled on the device before you can enable or disable the LLDP protocol on any interfaces.

  • LLDP is supported only on physical interfaces.

  • LLDP can discover up to one device per port.

  • DCBXP is not supported for LLDP.

Default Settings for LLDP

This table lists the LLDP default settings.

Parameters Default
Global LLDP Disabled
LLDP on interfaces Enabled, after LLDP is enabled globally
LLDP hold time (before discarding) 120 seconds
LLDP reinitialization delay 2 seconds
LLDP timer (packet update frequency) 30 seconds
LLDP TLVs Enabled
LLDP receive Enabled, after LLDP is enabled globally
LLDP transmit Enabled, after LLDP is enabled globally
DCBXP Enabled, provided LLDP is enabled
DCBXP version Auto-detect

Configuring LLDP


Note


Cisco NX-OS commands for this feature may differ from Cisco IOS commands for a similar feature.

Enable or Disable Globally

You can enable or disable LLDP globally on a device. You must enable LLDP globally to allow a device to send and receive LLDP packets.

Procedure


Step 1

Enter global configuration mode using the command configure terminal

Example:

switch# configure terminal
	switch(config)#
					

Step 2

Enable or disable LLDP on the device using the command [ no ] feature lldp

Example:

switch(config)# feature lldp
					

LLDP is disabled by default.

Step 3

Display the global LLDP configuration using the command show running-config lldp

Example:

switch(config)# show running-config lldp
					

This is an optional step. If LLDP is enabled, it shows "feature lldp." If LLDP is disabled, it shows an "Invalid command" error.

Step 4

Copy the running configuration to the startup configuration using the command copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
					

This is an optional step.


This example shows how to enable LLDP on a device; disable LLDP on some interfaces; configure optional parameters such as hold time, delay time, and update frequency; and disable several LLDP TLVs:

switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# feature lldp
switch(config)# interface ethernet 7/9
switch(config-if)# no lldp transmit
switch(config-if)# no lldp receive
switch(config-if)# exit
switch(config)# interface ethernet 7/10
switch(config-if)# no lldp transmit
switch(config-if)# no lldp receive
switch(config-if)# exit
switch(config)# lldp holdtime 200
switch(config)# lldp reinit 5
switch(config)# lldp timer 50
switch(config)# no lldp tlv-select port-vlan
switch(config)# no lldp tlv-select system-name

What to do next

To display the LLDP configuration, perform one of the following tasks:

Command Purpose
show running-config lldp Displays the global LLDP configuration.
show lldp interface interface slot/port Displays the LLDP interface configuration.
show lldp timers Displays the LLDP hold time, delay time, and update frequency configuration.
show lldp tlv-select Displays the LLDP TLV configuration.
show lldp neighbors {detail | interface interface slot/port} Displays the LLDP neighbor device status.
show lldp traffic Displays the LLDP counters, including the number of LLDP packets sent and received by the device, the number of discarded packets, and the number of unrecognized TLVs.
show lldp traffic interface interface slot/port Displays the number of LLDP packets sent and received on the interface.

Use the clear lldp counters command to clear the LLDP statistics.

Enable or Disable on an Interface

Use this task to enable or disable LLDP on a specific interface after it has been globally enabled on the device.

After you globally enable LLDP, it is enabled on all supported interfaces by default. However, you can enable or disable LLDP on individual interfaces or selectively configure an interface to only send or only receive LLDP packets.


Note


Cisco NX-OS commands for this feature may differ from Cisco IOS commands for a similar feature.

Before you begin

Make sure that you have globally enabled LLDP on the device.

Procedure


Step 1

Enter global configuration mode using the command configure terminal

Example:

switch# configure terminal
	switch(config)#
					

Step 2

Specify the interface on which you are enabling LLDP and enters the interface configuration mode using the command interface interface slot / port

Example:

switch(config)# interface ethernet 7/1
		switch(config-if)#
					

Step 3

Enable or disable the transmission of LLDP packets on an interface using the command [ no ] lldp transmit

Example:

switch(config-if)# lldp transmit
					

After you globally enable LLDP, it is enabled on all supported interfaces by default.

Step 4

Enable or disable the reception of LLDP packets on an interface using the command [ no ] lldp receive

Example:

switch(config-if)# lldp receive
					

After you globally enable LLDP, it is enabled on all supported interfaces by default.

Step 5

Display the LLDP configuration on the interface using the command show lldp interface interface slot / port

Example:

switch(config-if)# show lldp interface ethernet 7/1
					

This is an optional step.

Step 6

Copy the running configuration to the startup configuration using the command copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
					

This is an optional step.


Configure Optional Parameters

You can configure the frequency of LLDP updates, the amount of time for a receiving device to hold the information before discarding it, and the initialization delay time. You can also select the TLVs to include in LLDP packets.

Procedure


Step 1

Enter global configuration mode using the command configure terminal

Example:

switch# configure terminal
	switch(config)#
					

Step 2

Specify the amount of time in seconds that a receiving device should hold the information that is sent by your device before discarding it using the command [ no ] lldp holdtime seconds

Example:

switch(config)# lldp holdtime 200
					

This is an optional step. The range is 10 to 255 seconds; the default is 120 seconds.

Step 3

Specify the delay time in seconds for LLDP to initialize on any interface using the command [ no ] lldp reinit seconds

Example:

switch(config)# lldp reinit 5
					

This is an optional step. The range is 1 to 10 seconds; the default is 2 seconds.

Step 4

Specify the transmission frequency of LLDP updates in seconds using the command [ no ] lldp timer seconds

Example:

switch(config)# lldp timer 50
					

This is an optional step. The range is 5 to 254 seconds; the default is 30 seconds.

Step 5

Display the LLDP hold time, delay time, and update frequency configuration using the command show lldp timers

Example:

switch(config)# show lldp timers
					

This is an optional step.

Step 6

Specify the TLVs to send and receive in LLDP packets using the command [ no ] lldp tlv-select tlv

Example:

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

This is an optional step. The available TLVs are management-address, port-description, port-vlan, system-capabilities, system-description, and system-name. All available TLVs are enabled by default. Use the no form of the command to disable the TLV.

Step 7

Display the LLDP TLV configuration using the command show lldp tlv-select

Example:

switch(config)# show lldp tlv-select
					

This is an optional step.

Step 8

Copy the running configuration to the startup configuration using the command copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
					

This is an optional step.


Verifying the LLDP Configuration

To display the LLDP configuration, perform one of the following tasks:

Command Purpose
show running-config lldp Displays the global LLDP configuration.
show lldp interface interface slot/port Displays the LLDP interface configuration.
show lldp timers Displays the LLDP hold time, delay time, and update frequency configuration.
show lldp tlv-select Displays the LLDP TLV configuration.
show lldp neighbors {detail | interface interface slot/port} Displays the LLDP neighbor device status.
show lldp traffic Displays the LLDP counters, including the number of LLDP packets sent and received by the device, the number of discarded packets, and the number of unrecognized TLVs.
show lldp traffic interface interface slot/port Displays the number of LLDP packets sent and received on the interface.

Use the clear lldp counters command to clear the LLDP statistics.

Configuration Example for LLDP

This example shows how to enable LLDP on a device; disable LLDP on some interfaces; configure optional parameters such as hold time, delay time, and update frequency; and disable several LLDP TLVs:

switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# feature lldp
switch(config)# interface ethernet 7/9
switch(config-if)# no lldp transmit
switch(config-if)# no lldp receive
switch(config-if)# exit
switch(config)# interface ethernet 7/10
switch(config-if)# no lldp transmit
switch(config-if)# no lldp receive
switch(config-if)# exit
switch(config)# lldp holdtime 200
switch(config)# lldp reinit 5
switch(config)# lldp timer 50
switch(config)# no lldp tlv-select port-vlan
switch(config)# no lldp tlv-select system-name