Configuring LLDP and LLDP-MED

This chapter describes how to configure the Link Layer Discovery Protocol (LLDP) and LLDP Media Endpoint Discovery (LLDP-MED) on the Cisco Industrial Ethernet 2000U Series (IE 2000U) and Connected Grid Switches, hereafter referred to as switch .


NoteFor complete syntax and usage information for the commands used in this chapter, see the documents listed in the“Related Documents” section.


This chapter includes the following sections:

Information About LLDP and LLDP-MED

This section includes the following topics:

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, and switches). 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 switch 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 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. Details such as configuration information, device capabilities, and device identity can be advertised using this protocol.

LLDP is enabled by default on network node interfaces (NNIs). It is disabled on enhanced network interfaces (ENIs), but you can enable it. LLDP is not supported on user network interfaces (UNIs).

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

  • Port description TLV
  • System name TLV
  • System description
  • 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-MED

LLDP for Media Endpoint Devices (LLDP-MED) is an extension to LLDP that operates between endpoint devices such as IP phones and network devices such as switches. It specifically provides support for voice over IP (VoIP) applications and provides additional TLVs for capabilities discovery, network policy, Power over Ethernet, and inventory management.

LLDP-MED supports these TLVs:

  • LLDP-MED capabilities TLV

Allows LLDP-MED endpoints to determine the capabilities that the connected device supports and what capabilities the device has enabled.

  • Network policy TLV

Allows both network connectivity devices and endpoints to advertise VLAN configurations and associated Layer 2 and Layer 3 attributes for the specific application on that port. For example, the switch can notify a phone of the VLAN number that it should use. The phone can connect into any switch, obtain its VLAN number, and then start communicating with the call control.

  • Power management TLV

Enables advanced power management between LLDP-MED endpoint and network connectivity devices. Allows switches and phones to convey power information, such as how the device is powered, power priority, and how much power the device needs.

  • Inventory management TLV

Allows an endpoint to transmit detailed inventory information about itself to the switch, including information hardware revision, firmware version, software version, serial number, manufacturer name, model name, and asset ID TLV.

Prerequisites

  • Type-Length-Value (TLV) types 0 through 127
  • To support LLDP-MED, the following organizationally specific TLVs must be implemented:

Extended Power-via-Media Dependent Interface (MDI)

Inventory

LLDP-MED Capabilities

MAC/PHY Configuration Status

Network Policy

Port VLAN ID

Guidelines and Limitations

  • Use of LLDP is limited to 802.1 media types such as Ethernet, Token Ring, and Fiber Distributed Data Interface (FDDI) networks.
  • The maximum number of neighbor entries per chassis is limited on MED-capable network connectivity devices.

Default Settings

 

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

Disabled to send and receive all TLVs

LLDP interface state

Disabled

LLDP receive

Enabled on network node interfaces (NNIs) Disabled on enhanced network interfaces (ENIs) Not supported on user network interfaces (UNIs)

LLDP transmit

Enabled on NNIs
Disabled on ENIs
Not supported on UNIs

LLDP med-tlv-select

Disabled to send all LLDP-MED TLVs

Configuring LLDP and LLDP-MED

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 and LLDP-MED TLVs to be sent and received.

BEFORE YOU BEGIN

Review the “Information About LLDP and LLDP-MED” section.

DETAILED STEPS


NoteSteps 2 through 5 are all optional and can be performed in any order.


 

Command
Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

lldp holdtime seconds

(Optional) Specify the amount of time a receiving device should hold the information sent by your device before discarding it.

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

Step 3

lldp reinit

(Optional) Specify the delay time in seconds for LLDP to initialize on any interface.

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

Step 4

lldp timer seconds

(Optional) Set the transmission frequency of LLDP updates in seconds.

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

Step 5ll

lldp tlv-select

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

Step 6

lldp med-tlv-select

(Optional) Specify the LLDP-MED TLVs to send or receive.

Step 7

copy running-config startup-config

(Optional) Save your entries in the configuration file.

Use the no form of each of the LLDP commands to return to the default setting.

EXAMPLE

This example shows how to configure LLDP characteristics:

Switch# configure terminal
Switch(config)# lldp holdtime 120
Switch(config)# lldp reinit 2
Switch(config)# lldp timer 30
Switch(config)# end
 

Disabling and Enabling LLDP Globally

LLDP is disabled globally by default and is enabled on NNIs. It is disabled by default on ENIs, but can be enabled per interface. LLDP is not supported on UNIs.

Disabling LLDP

BEFORE YOU BEGIN

Review the “Information About LLDP and LLDP-MED” section.

DETAILED STEPS

 

Command
Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

no lldp run

Disable LLDP.

Step 3

end

Return to privileged EXEC mode.

EXAMPLE

This example shows how to globally disable LLDP:

Switch# configure terminal
Switch(config)# no lldp run
Switch(config)# end

Enabling LLDP

BEFORE YOU BEGIN

Review the “Information About LLDP and LLDP-MED” section.

DETAILED STEPS

 

Command
Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

lldp run

Enable LLDP.

Step 3

end

Return to privileged EXEC mode.

EXAMPLE

This example shows how to globally enable LLDP:

Switch# configure terminal
Switch(config)# lldp run
Switch(config)# end

Disabling and Enabling LLDP on an Interface

LLDP is disabled by default on all NNIs to send and to receive LLDP information. It is disabled by default on ENIs, but it can be enabled by entering the lldp transmit and lldp receive interface configuration commands. LLDP is not supported on UNIs.


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


Disabling LLDP on an Interface

BEFORE YOU BEGIN

Review the “Information About LLDP and LLDP-MED” section.

DETAILED STEPS

 

Command
Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

interface interface-id

Specify the interface on which you are disabling LLDP, and enter interface configuration mode. The interface must be an NNI or ENI for the lldp commands to be available.

Step 3

no lldp transmit

No LLDP packets are sent on the interface.

Step 4

no lldp receive

No LLDP packets are received on the interface.

Step 5

end

Return to privileged EXEC mode.

Step 6

copy running-config startup-config

(Optional) Save your entries in the configuration file.

EXAMPLE

This example shows how to disable LLDP on an interface:

Switch# configure terminal
Switch(config)# interface GigabitEthernet1/0/1
Switch(config-if)# no lldp transmit
Switch(config-if)# no lldp receive
Switch(config-if)# end

Enabling LLDP on an Interface

BEFORE YOU BEGIN

Review the “Information About LLDP and LLDP-MED” section.

DETAILED STEPS

 

Command
Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

interface interface-id

Specify the interface on which you are enabling LLDP, and enter interface configuration mode. LLDP is supported only on NNIs and ENIs. It is not supported on UNIs. If necessary, use the port-type { eni | nni } interface configuration command to change the port type.

Step 3

no shutdown

If necessary, enable the port. By default NNIs are enabled, and ENIs and UNIs are disabled.

Step 4

lldp transmit

LLDP packets are sent on the interface.

Step 5

lldp receive

LLDP packets are received on the interface.

Step 6

end

Return to privileged EXEC mode.

Step 7

copy running-config startup-config

(Optional) Save your entries in the configuration file.

EXAMPLE

This example shows how to enable LLDP on an interface:

Switch# configure terminal
Switch(config)# interface GigabitEthernet1/0/1
Switch(config-if)# no shutdown
Switch(config-if)# port-type nni
Switch(config-if)# lldp transmit
Switch(config-if)# lldp receive
Switch(config-if)# end

Configuring LLDP-MED TLVs

By default, the switch only sends LLDP packets until it receives LLDP-MED packets from the end device. It will then send LLDP packets with MED TLVs as well. When the LLDP-MED entry has been aged out, it only sends LLDP packets again.

Using the lldp interface configuration command, you can configure the interface not to send the TLVs listed in Table 8-1 .

 

Table 8-1 LLDP-MED TLVs

LLDP-MED TLV
Description

inventory-management

LLDP-MED inventory management TLV

network-policy

LLDP-MED network policy TLV

power-management

LLDP-MED power management TLV

Disabling a TLV

BEFORE YOU BEGIN

Review the “Information About LLDP and LLDP-MED” section.

DETAILED STEPS

 

Command
Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

interface interface-id

Specify the interface on which you are configuring a LLDP-MED TLV, and enter interface configuration mode.

Step 3

no lldp med-tlv-select tlv

Specify the TLV to disable.

Step 4

end

Return to privileged EXEC mode.

Step 5

copy running-config startup-config

(Optional) Save your entries in the configuration file.

EXAMPLE

This example shows how to disable a TLV:

Switch# configure terminal
Switch(config)# interface GigabitEthernet1/0/1
Switch(config-if)# no lldp med-tlv-select inventory-management
Switch(config-if)# end
 

Enabling a TLV

BEFORE YOU BEGIN

Review the “Information About LLDP and LLDP-MED” section.

DETAILED STEPS

 

Command
Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

interface interface-id

Specify the interface on which you are configuring an LLDP-MED TLV, and enter interface configuration mode.

Step 3

lldp med-tlv-select tlv

Specify the TLV to enable.

Step 4

end

Return to privileged EXEC mode.

Step 5

copy running-config startup-config

(Optional) Save your entries in the configuration file.

EXAMPLE

This example shows how to enable a TLV on an interface:

Switch# configure terminal
Switch(config)# interface GigabitEthernet1/0/1
Switch(config-if)# lldp med-tlv-select inventory-management
Switch(config-if)# end

Verifying Configuration

 

Command
Description

clear lldp counters

Reset the traffic counters to zero.

clear lldp table

Delete the LLDP table of information about neighbors.

show lldp

Display 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

Display 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 interface [ interface-id ]

Display 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 ]

Display 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

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

Configuration Example

This example shows how to configure LLDP characteristics:

Switch# configure terminal
Switch(config)# lldp holdtime 120
Switch(config)# lldp reinit 2
Switch(config)# lldp timer 30
Switch(config)# end
 

This example shows how to globally disable LLDP:

Switch# configure terminal
Switch(config)# no lldp run
Switch(config)# end
 

This example shows how to globally enable LLDP:

Switch# configure terminal
Switch(config)# lldp run
Switch(config)# end
 

This example shows how to disable LLDP on an interface:

Switch# configure terminal
Switch(config)# interface GigabitEthernet1/0/1
Switch(config-if)# no lldp transmit
Switch(config-if)# no lldp receive
Switch(config-if)# end
 

This example shows how to enable LLDP on an interface:

Switch# configure terminal
Switch(config)# interface GigabitEthernet1/0/1
Switch(config-if)# no shutdown
Switch(config-if)# port-type nni
Switch(config-if)# lldp transmit
Switch(config-if)# lldp receive
Switch(config-if)# end
 

This example shows how to disable a TLV:

Switch# configure terminal
Switch(config)# interface GigabitEthernet1/0/1
Switch(config-if)# no lldp med-tlv-select inventory-management
Switch(config-if)# end
 

This example shows how to enable a TLV on an interface:

Switch# configure terminal
Switch(config)# interface GigabitEthernet1/0/1
Switch(config-if)# lldp med-tlv-select inventory-management
Switch(config-if)# end
 

Related Documents

Feature History

Platform
First Supported Release

IE 2000U

Cisco IOS Release 15.0(2)EH

CGS 2520

Cisco IOS Release 12.2(53)EX

Ethernet Switch Module (ESM) for CGR 2010

Cisco IOS Release 12.2(53)EX