Configuring LLDP

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


Note


For complete syntax and usage information for the commands used in this chapter, see the command reference for this release and the “System Management Commands” section in the Cisco IOS Configuration Fundamentals Command Reference, Release 12.2.


This chapter contains the following sections:

About LLDP

The Cisco Discovery Protocol (CDP) is a device discovery protocol that allows network management applications to automatically discover and learn about other Cisco devices that are connected to the network.

To permit the discovery of non-Cisco devices, the switch also supports the Link Layer Discovery Protocol (LLDP), a vendor-neutral device discovery protocol that is defined in the IEEE 802.1ab standard. LLDP allows 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 is a one-way protocol that transmits information about the capabilities and current status of a device and its interfaces. LLDP devices use the protocol to solicit information only from other LLDP devices.

LLDP supports a set of attributes that it uses to discover other devices. These attributes contain type, length, and value (TLV) descriptions. LLDP devices can use TLVs to send and receive information to other devices on the network. Details such as configuration information, device capabilities, and device identity can be advertised using this protocol.

LLDP advertises the following TLVs by default:

  • Management address

  • Port description

  • Port VLAN

  • System capabilities

  • System description

  • System name

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 Series NX-OS High Availability and Redundancy Guide.

Virtualization Support

Only one instance of LLDP is supported in the Cisco Nexus® 3550-T switches.

Guidelines and Limitations for LLDP

LLDP has the following configuration guidelines and limitations:

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

  • LLDP is supported only on physical interfaces.

  • LLDP can discover up to one device per port.

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 receive Enabled, after LLDP is enabled globally
LLDP transmit Enabled, after LLDP is enabled globally

Configuring LLDP

This chapter describes how to configure the Link Layer Discovery Protocol (LLDP) on the Cisco Nexus® 3550-T switch.

Enabling or Disabling LLDP 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

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

[no] feature lldp

Example:

switch(config)# feature lldp

Enables or disables LLDP on the device. LLDP is disabled by default.

Step 3

(Optional) show running-config lldp

Example:

switch(config)# show running-config lldp
(Optional)

Displays the global LLDP configuration. If LLDP is enabled, it shows "feature lldp." If LLDP is disabled, it shows an "Invalid command" error.

Step 4

(Optional) copy running-config startup-config

Example:

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

Copies the running configuration to the startup configuration.

Enabling or Disabling LLDP on an Interface

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.

Before you begin

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

Procedure

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

interface interface slot/port

Example:

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

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

Step 3

[no] lldp transmit

Example:

switch(config-if)# lldp transmit

Enables or disables the transmission of LLDP packets on an interface. After you globally enable LLDP, it is enabled on all supported interfaces by default.

Step 4

[no] lldp receive

Example:

switch(config-if)# lldp receive

Enables or disables the reception of LLDP packets on an interface. After you globally enable LLDP, it is enabled on all supported interfaces by default.

Step 5

(Optional) show lldp interface interface slot/port

Example:

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

Displays the LLDP configuration on the interface.

Step 6

(Optional) copy running-config startup-config

Example:

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

Copies the running configuration to the startup configuration.

Multiple LLDP Neighbors Per Physical Interface

Often times a network device sends multiple LLDP packets, out of which one is from the actual host. If a Cisco Nexus switch is communicating with the device but can only manage a single LLDP neighbor per interface, there is a good chance that becoming a neighbor with the actual required host will fail. To minimize this, Cisco Nexus switch interfaces can support multiple LLDP neighbors creating a better opportunity of becoming an LLDP neighbor with the correct device.

Support for multiple LLDP neighbors over the same interface requires LLDP multi-neighbor support to be configured globally.

Enabling or Disabling LLDP Multi-Neighbor Support

Before you begin

Consider the following before enabling LLDP multi-neighbor support on the interfaces:

  • Make sure that you have globally enabled LLDP on the device (global configuration command feature lldp ).


    Note


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


  • A maximum of three (3) neighbors are supported on an interface.

Procedure
  Command or Action Purpose

Step 1

configure terminal

Example:
switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

[no] lldp multi-neighbor

Example:
switch(config)# lldp multi-neighbor
switch(config)#

Enables or disables LLDP multi-neighbor support for all interfaces globally.

Step 3

interface port / slot

Example:
switch(config)# interface 1/1
switch(config-if)#

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

Step 4

(Optional) [no] lldp transmit

Example:
switch(config-if)# lldp transmit
(Optional)

Disables (or enables) the transmission of LLDP packets on the interface.

Note

 

The transmission of LLDP packets on this interface was enabled using the global feature lldp command. This option is to disable the feature for this specific interface.

Step 5

(Optional) [no] lldp receive

Example:
switch(config-if)# lldp receive
(Optional)

Disables (or enables) the reception of LLDP packets on the interface.

Note

 

The reception of LLDP packets on this interface was enabled using the global feature lldp command. This option is to disable the feature for this specific interface.

Step 6

(Optional) show lldp interfacel port / slot

Example:
switch(config-if)# show lldp interface 1/1
(Optional)

Displays the LLDP configuration on the interface.

Step 7

(Optional) copy running-config startup-config

Example:
switch(config)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Enabling or Disabling LLDP Support on Port-Channel Interfaces

Before you begin

Consider the following before enabling LLDP support on port-channels:

  • Make sure that you have globally enabled LLDP on the device (global configuration command feature lldp ).


    Note


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


  • Applying the lldp transmit and lldp receive configuration commands to a port-channel does not affect the configuration for the members of the port-channel.

  • LLDP neighbors form between the port-channels only when LLDP transmit and receive is configured on both sides of the port-channel.


Note


The LLDP transmit and receive commands do not work on MCT, VPC, fex-fabric, FEX port-channels, and port-channel sub-interfaces.

If you enable the LLDP port-channel feature globally, the LLDP configuration is not applied to any of these port types. If the configuration is removed from the port-channels or the port type feature is disabled globally, you cannot use the lldp port-channel command to enable it on the newly supported port-channels. The command was already issued. To enable LLDP port-channel on the port-channels in question, configure lldp transmit and lldp receive for each port-channel (see steps 4, 5, and 6 in the following procedure).


Procedure

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

[no] lldp port-channel

Example:

switch(config)# lldp port-channel
switch(config)#

Enables or disables LLDP transmit and receive for all port channels globally.

Step 3

interface port-channel [port-channel-number | port-channel-range]

Example:

switch(config)# interface port-channel 3
switch(config-if)#

Example:

Enter a range of port-channel numbers if you are configuring LLDP over more than one port-channel:

switch(config)# interface port-channel 1-3
switch(config-if-range)#

Specifies the interface port-channel on which you are enabling LLDP and enters the interface configuration mode.

Specifies the interface port-channel range on which you are enabling LLDP and enters the interface range configuration mode.

Step 4

(Optional) [no] lldp transmit

Example:

switch(config-if)# lldp transmit
(Optional)

Disables (or enables) the transmission of LLDP packets on the port-channel or range of port-channels.

Note

 

The transmission of LLDP packets on this port-channel was enabled using the global lldp port-channel command in step 3. This option is to disable the feature for this specific port-channel.

Step 5

(Optional) [no] lldp receive

Example:

switch(config-if)# lldp receive
(Optional)

Disables (or enables) the reception of LLDP packets on the port-channel or range of port-channels.

Note

 

The reception of LLDP packets on this port-channel was enabled using the global lldp port-channel command in step 3. This option is to disable the feature for this specific port-channel.

Step 6

(Optional) show lldp interface port-channell port-channel-number

Example:

switch(config-if)# show lldp interface port-channel 3
(Optional)

Displays the LLDP configuration on the port-channel.

Step 7

(Optional) copy running-config startup-config

Example:

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

Copies the running configuration to the startup configuration.

Configuring Optional LLDP 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.

Procedure

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

(Optional) [no] lldp holdtime seconds

Example:

switch(config)# lldp holdtime 200
(Optional)

Specifies the amount of time in seconds that a receiving device should hold the information that is sent by your device before discarding it.

The range is 10 to 255 seconds; the default is 120 seconds.

Step 3

(Optional) [no] lldp reinit seconds

Example:

switch(config)# lldp reinit 5
(Optional)

Specifies the delay time in seconds for LLDP to initialize on any interface.

The range is 1 to 10 seconds; the default is 2 seconds.

Step 4

(Optional) [no] lldp timer seconds

Example:

switch(config)# lldp timer 50
(Optional)

Specifies the transmission frequency of LLDP updates in seconds.

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

Step 5

(Optional) show lldp timers

Example:

switch(config)# show lldp timers
(Optional)

Displays the LLDP hold time, delay time, and update frequency configuration.

Step 6

(Optional) copy running-config startup-config

Example:

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

Copies the running configuration to the startup configuration.

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 neighbors {detail | interface interface slot/port} Displays the LLDP neighbor device status.
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:

switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# feature lldp
switch(config)# interface ethernet 1/9
switch(config-if)# no lldp transmit
switch(config-if)# no lldp receive
switch(config-if)# exit
switch(config)# interface ethernet 1/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