Configuring LLDP, LLDP-MED, and Wired Location Service

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 .

Information About LLDP, LLDP-MED, and Wired Location Service

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 and Cisco Device Stacks

A device stack appears as a single device in the network. Therefore, LLDP discovers the device stack, not the individual stack members.

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. It specifically provides support for voice over IP (VoIP) applications and provides additional TLVs for capabilities discovery, network policy, Power over Ethernet, inventory management and location information. By default, all LLDP-MED TLVs are enabled.

LLDP-MED Supported TLVs

LLDP-MED supports these TLVs:

  • LLDP-MED capabilities TLV

    Allows LLDP-MED endpoints to determine the capabilities that the connected device supports and 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 to any device, obtain its VLAN number, and then start communicating with the call control.

    By defining a network-policy profile TLV, you can create a profile for voice and voice-signaling by specifying the values for VLAN, class of service (CoS), differentiated services code point (DSCP), and tagging mode. These profile attributes are then maintained centrally on the switch and propagated to the phone.

  • Power management TLV

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

    LLDP-MED also supports an extended power TLV to advertise fine-grained power requirements, end-point power priority, and end-point and network connectivity-device power status. LLDP is enabled and power is applied to a port, the power TLV determines the actual power requirement of the endpoint device so that the system power budget can be adjusted accordingly. The device processes the requests and either grants or denies power based on the current power budget. If the request is granted, the switch updates the power budget. If the request is denied, the device turns off power to the port, generates a syslog message, and updates the power budget. If LLDP-MED is disabled or if the endpoint does not support the LLDP-MED power TLV, the initial allocation value is used throughout the duration of the connection.

    You can change power settings by entering the power inline {auto [max max-wattage] | never | static [max max-wattage]} interface configuration command. By default the PoE interface is in auto mode; If no value is specified, the maximum is allowed (30 W).

  • Inventory management TLV

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

  • Location TLV

    Provides location information from the device to the endpoint device. The location TLV can send this information:

    • Civic location information

      Provides the civic address information and postal information. Examples of civic location information are street address, road name, and postal community name information.

    • ELIN location information

      Provides the location information of a caller. The location is determined by the Emergency location identifier number (ELIN), which is a phone number that routes an emergency call to the local public safety answering point (PSAP) and which the PSAP can use to call back the emergency caller.

    • Geographic location information

      Provides the geographical details of a switch location such as latitude, longitude, and altitude of a switch.

    • custom location

      Provides customized name and value of a switch location.

Wired Location Service

The device uses the location service feature to send location and attachment tracking information for its connected devices to a Cisco Mobility Services Engine (MSE). The tracked device can be a wireless endpoint, a wired endpoint, or a wired device or controller. The device notifies the MSE of device link up and link down events through the Network Mobility Services Protocol (NMSP) location and attachment notifications.

The MSE starts the NMSP connection to the device, which opens a server port. When the MSE connects to the device there are a set of message exchanges to establish version compatibility and service exchange information followed by location information synchronization. After connection, the device periodically sends location and attachment notifications to the MSE. Any link up or link down events detected during an interval are aggregated and sent at the end of the interval.

When the device determines the presence or absence of a device on a link-up or link-down event, it obtains the client-specific information such as the MAC address, IP address, and username. If the client is LLDP-MED- or CDP-capable, the device obtains the serial number and UDI through the LLDP-MED location TLV or CDP.

Depending on the device capabilities, the device obtains this client information at link up:

  • Slot and port specified in port connection

  • MAC address specified in the client MAC address

  • IP address specified in port connection

  • 802.1X username if applicable

  • Device category is specified as a wired station

  • State is specified as new

  • Serial number, UDI

  • Model number

  • Time in seconds since the device detected the association

Depending on the device capabilities, the device obtains this client information at link down:

  • Slot and port that was disconnected

  • MAC address

  • IP address

  • 802.1X username if applicable

  • Device category is specified as a wired station

  • State is specified as delete

  • Serial number, UDI

  • Time in seconds since the device detected the disassociation

When the device shuts down, it sends an attachment notification with the state delete and the IP address before closing the NMSP connection to the MSE. The MSE interprets this notification as disassociation for all the wired clients associated with the device.

If you change a location address on the device, the device sends an NMSP location notification message that identifies the affected ports and the changed address information.

Default LLDP Configuration

Table 1. 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

Disabled to send and receive all TLVs

LLDP interface state

Disabled

LLDP receive

Disabled

LLDP transmit

Disabled

LLDP med-tlv-select

Disabled to send all LLDP-MED TLVs. When LLDP is globally enabled, LLDP-MED-TLV is also enabled.

How to Configure LLDP, LLDP-MED, and Wired Location Service

Enabling LLDP

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. lldp run
  4. interface interface-id
  5. lldp transmit
  6. lldp receive
  7. end
  8. show lldp
  9. copy running-config startup-config

DETAILED STEPS

  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:


Device (config)# interface 
gigabitethernet2/0/1

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.

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 send and receive.


Note

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


SUMMARY STEPS

  1. enable
  2. configure terminal
  3. lldp holdtime seconds
  4. lldp reinit delay
  5. lldp timer rate
  6. lldp tlv-select
  7. interface interface-id
  8. lldp med-tlv-select
  9. end
  10. show lldp
  11. copy running-config startup-config

DETAILED STEPS

  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

lldp tlv-select

Example:


Device(config)# tlv-select

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

Step 7

interface interface-id

Example:


Device (config)# interface 
gigabitethernet2/0/1

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

Step 8

lldp med-tlv-select

Example:


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

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

Step 9

end

Example:


Device (config-if)# end

Returns to privileged EXEC mode.

Step 10

show lldp

Example:


Device# show lldp

Verifies the configuration.

Step 11

copy running-config startup-config

Example:


Device# copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

Configuring LLDP-MED TLVs

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

By using the lldp interface configuration command, you can configure the interface not to send the TLVs listed in the following table.

Table 2. LLDP-MED TLVs

LLDP-MED TLV

Description

inventory-management

LLDP-MED inventory management TLV

location

LLDP-MED location TLV

network-policy

LLDP-MED network policy TLV

power-management

LLDP-MED power management TLV

Follow these steps to enable a TLV on an interface:

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. interface interface-id
  4. lldp med-tlv-select
  5. end
  6. copy running-config startup-config

DETAILED STEPS

  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

interface interface-id

Example:


Device (config)# interface 
gigabitethernet2/0/1

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

Step 4

lldp med-tlv-select

Example:


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

Specifies the TLV to enable.

Step 5

end

Example:


Device(config-if)# end

Returns to privileged EXEC mode.

Step 6

copy running-config startup-config

Example:


Device# copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

Configuring Network-Policy TLV

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. network-policy profile profile number
  4. {voice | voice-signaling } vlan [vlan-id {cos cvalue | dscp dvalue}] | [[dot1p {cos cvalue | dscp dvalue}] | none | untagged ]
  5. exit
  6. interface interface-id
  7. network-policy profile number
  8. lldp med-tlv-select network-policy
  9. end
  10. show network-policy profile
  11. copy running-config startup-config

DETAILED STEPS

  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

network-policy profile profile number

Example:


Device(config)# network-policy profile 1

Specifies the network-policy profile number, and enter network-policy configuration mode. The range is 1 to 4294967295.

Step 4

{voice | voice-signaling } vlan [vlan-id {cos cvalue | dscp dvalue}] | [[dot1p {cos cvalue | dscp dvalue}] | none | untagged ]

Example:


Device(config-network-policy)# voice vlan 100 cos 4

Configures the policy attributes:

  • voice —Specifies the voice application type.

  • voice-signaling —Specifies the voice-signaling application type.

  • vlan —Specifies the native VLAN for voice traffic.

  • vlan-id —(Optional) Specifies the VLAN for voice traffic. The range is 1 to 4094.

  • cos cvalue —(Optional) Specifies the Layer 2 priority class of service (CoS) for the configured VLAN. The range is 0 to 7; the default is 5.

  • dscp dvalue —(Optional) Specifies the differentiated services code point (DSCP) value for the configured VLAN. The range is 0 to 63; the default is 46.

  • dot1p —(Optional) Configures the telephone to use IEEE 802.1p priority tagging and use VLAN 0 (the native VLAN).

  • none —(Optional) Do not instruct the IP telephone about the voice VLAN. The telephone uses the configuration from the telephone key pad.

  • untagged —(Optional) Configures the telephone to send untagged voice traffic. This is the default for the telephone.

  • untagged —(Optional) Configures the telephone to send untagged voice traffic. This is the default for the telephone.

Step 5

exit

Example:


Device(config)# exit

Returns to global configuration mode.

Step 6

interface interface-id

Example:


Device (config)# interface gigabitethernet2/0/1

Specifies the interface on which you are configuring a network-policy profile, and enter interface configuration mode.

Step 7

network-policy profile number

Example:


Device(config-if)# network-policy 1

Specifies the network-policy profile number.

Step 8

lldp med-tlv-select network-policy

Example:


Device(config-if)# lldp med-tlv-select network-policy

Specifies the network-policy TLV.

Step 9

end

Example:


Device(config)# end

Returns to privileged EXEC mode.

Step 10

show network-policy profile

Example:


Device# show network-policy profile

Verifies the configuration.

Step 11

copy running-config startup-config

Example:


Device# copy running-config startup-config 

(Optional) Saves your entries in the configuration file.

Configuring Location TLV and Wired Location Service

Beginning in privileged EXEC mode, follow these steps to configure location information for an endpoint and to apply it to an interface.

SUMMARY STEPS

  1. configure terminal
  2. location {admin-tag string | civic-location identifier {id | host } | elin-location string identifier id | custom-location identifier {id | host } | geo-location identifier {id | host }}
  3. exit
  4. interface interface-id
  5. location {additional-location-information word | civic-location-id {id | host } | elin-location-id id | custom-location-id {id | host } | geo-location-id {id | host } }
  6. end
  7. Use one of the following:
    • show location admin-tag string

    • show location civic-location identifier id

    • show location elin-location identifier id
  8. copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose
Step 1

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 2

location {admin-tag string | civic-location identifier {id | host } | elin-location string identifier id | custom-location identifier {id | host } | geo-location identifier {id | host }}

Example:


Device(config)# location civic-location identifier 1
Device(config-civic)# number 3550
Device(config-civic)# primary-road-name "Cisco Way"
Device(config-civic)# city "San Jose"
Device(config-civic)# state CA
Device(config-civic)# building 19
Device(config-civic)# room C6
Device(config-civic)# county "Santa Clara"
Device(config-civic)# country US

Specifies the location information for an endpoint.

  • admin-tag —Specifies an administrative tag or site information.

  • civic-location —Specifies civic location information.

  • elin-location —Specifies emergency location information (ELIN).

  • custom-location —Specifies custom location information.

  • geo-location —Specifies geo-spatial location information.

  • identifier id —Specifies the ID for the civic, ELIN, custom, or geo location.

  • host —Specifies the host civic, custom, or geo location.

  • string —Specifies the site or location information in alphanumeric format.

Step 3

exit

Example:


Device(config-civic)# exit

Returns to global configuration mode.

Step 4

interface interface-id

Example:


Device (config)# interface gigabitethernet2/0/1

Specifies the interface on which you are configuring the location information, and enter interface configuration mode.

Step 5

location {additional-location-information word | civic-location-id {id | host } | elin-location-id id | custom-location-id {id | host } | geo-location-id {id | host } }

Example:


Device(config-if)# location elin-location-id 1

Enters location information for an interface:

  • additional-location-information —Specifies additional information for a location or place.

  • civic-location-id —Specifies global civic location information for an interface.

  • elin-location-id —Specifies emergency location information for an interface.

  • custom-location-id —Specifies custom location information for an interface.

  • geo-location-id —Specifies geo-spatial location information for an interface.

  • host —Specifies the host location identifier.

  • word —Specifies a word or phrase with additional location information.

  • id —Specifies the ID for the civic, ELIN, custom, or geo location. The ID range is 1 to 4095.

Step 6

end

Example:


Device(config-if)# end

Returns to privileged EXEC mode.

Step 7

Use one of the following:

  • show location admin-tag string

  • show location civic-location identifier id

  • show location elin-location identifier id

Example:


Device# show location admin-tag

or


Device# show location civic-location 
identifier

or


Device# show location elin-location 
identifier

Verifies the configuration.

Step 8

copy running-config startup-config

Example:


Device# copy running-config 
startup-config

(Optional) Saves your entries in the configuration file.

Enabling Wired Location Service on the Device

Before you begin

For wired location to function, you must first enter the ip device tracking global configuration command.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. nmsp notification interval {attachment | location } interval-seconds
  4. end
  5. show network-policy profile
  6. copy running-config startup-config

DETAILED STEPS

  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

nmsp notification interval {attachment | location } interval-seconds

Example:


Device(config)# nmsp notification interval location 10

Specifies the NMSP notification interval.

attachment —Specifies the attachment notification interval.

location —Specifies the location notification interval.

interval-seconds —Duration in seconds before the device sends the MSE the location or attachment updates. The range is 1 to 30; the default is 30.

Step 4

end

Example:


Device(config)# end

Returns to privileged EXEC mode.

Step 5

show network-policy profile

Example:


Device# show network-policy profile

Verifies the configuration.

Step 6

copy running-config startup-config

Example:


Device# copy running-config startup-config

(Optional) Saves your entries in the configuration file.

Configuration Examples for LLDP, LLDP-MED, and Wired Location Service

Configuring Network-Policy TLV: Examples

This example shows how to configure VLAN 100 for voice application with CoS and to enable the network-policy profile and network-policy TLV on an interface:


# configure terminal
(config)# network-policy 1
(config-network-policy)# voice vlan 100 cos 4
(config-network-policy)# exit
(config)# interface gigabitethernet1/0/1
(config-if)# network-policy profile 1
(config-if)# lldp med-tlv-select network-policy

This example shows how to configure the voice application type for the native VLAN with priority tagging:


config-network-policy)# voice vlan dot1p cos 4
config-network-policy)# voice vlan dot1p dscp 34

Monitoring and Maintaining LLDP, LLDP-MED, and Wired Location Service

Commands for monitoring and maintaining LLDP, LLDP-MED, and wired location service.

Command

Description

clear lldp counters

Resets the traffic counters to zero.

clear lldp table

Deletes the LLDP neighbor information table.

clear nmsp statistics

Clears the NMSP statistic counters.

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 ]

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.

show lldp traffic

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

show location admin-tag string

Displays the location information for the specified administrative tag or site.

show location civic-location identifier id

Displays the location information for a specific global civic location.

show location elin-location identifier id

Displays the location information for an emergency location

show network-policy profile

Displays the configured network-policy profiles.

show nmsp

Displays the NMSP information

Additional References for LLDP, LLDP-MED, and Wired Location Service

MIBs

MIB MIBs Link

All the supported MIBs for this release.

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

http://www.cisco.com/go/mibs

Technical Assistance

Description Link

The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies.

To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds.

Access to most tools on the Cisco Support website requires a Cisco.com user ID and password.

http://www.cisco.com/support

Feature Information for LLDP, LLDP-MED, and Wired Location Service

Release

Modification

Cisco IOS XE 3.2SE

This feature was introduced.