Prerequisites for Using Link Layer Discovery Protocol in Multivendor Networks
The Type-Length-Value (TLV) types must be 0 through 127.
The documentation set for this product strives to use bias-free language. For the 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 RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
Link Layer Discovery Protocol (LLDP), standardized by the IEEE as part of 802.1ab, enables standardized discovery of nodes, which in turn facilitates future applications of standard management tools such as Simple Network Management Protocol (SNMP) in multivendor networks. Using standard management tools makes physical topology information available and helps network administrators detect and correct network malfunctions and inconsistencies in configuration.
The Cisco implementation of LLDP is based on the IEEE 802.1ab standard.
The Type-Length-Value (TLV) types must be 0 through 127.
Use of LLDP is limited to 802.1 media types such as Ethernet, Token Ring, and FDDI networks.
IEEE 802.1ab Link Layer Discovery Protocol (LLDP) is an optional link layer protocol for network topology discovery in multivendor networks. Discovery information includes device identifiers, port identifiers, versions, and other details. As a protocol that aids network management, LLDP provides accurate network mapping, inventory data, and network troubleshooting information.
LLDP is unidirectional, operating only in an advertising mode. LLDP does not solicit information or monitor state changes between LLDP nodes. LLDP periodically sends advertisements to a constrained multicast address. Devices supporting LLDP can send information about themselves while they receive and record information about their neighbors. Additionally, devices can choose to turn off the send or receive functions independently. Advertisements are sent out and received on every active and enabled interface, allowing any device in a network to learn about all devices to which it is connected. Applications that use this information include network topology discovery, inventory management, emergency services, VLAN assignment, and inline power supply.
Note |
LLDP and Cisco Discovery Protocol can operate on the same interface. |
The figure below shows a high-level view of LLDP operating in a network node.
When you configure LLDP or Cisco Discovery Protocol location information on a per-port basis, remote devices can send Cisco medianet location information to the switch. For more information, see the Using Cisco Discovery Protocol module.
Link Layer Discovery Protocol (LLDP) uses Type-Length-Values (TLVs) to exchange information between network and endpoint devices. TLV elements are embedded in communications protocol advertisements and used for encoding optional information. The size of the type and length fields is fixed at 2 bytes. The size of the value field is variable. The type is a numeric code that indicates the type of field that this part of the message represents, and the length is the size of the value field, in bytes. The value field contains the data for this part of the message.
By defining a network-policy profile TLV, you can create a profile for voice and voice signalling 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—Allows switches and phones to convey power information, such as how the device is powered on, power priority, and the power required by the device. Supports advertisement of fractional wattage power requirements, endpoint power priority, and endpoint and network connectivity-device power status. However, it does not support power negotiation between the endpoint and the network connectivity devices. When LLDP is enabled and a port is powered on, the power TLV determines the actual power requirement of the endpoint device, so that the system power budget can be adjusted. The switch 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 switch turns off power to the port, generates a syslog message, and updates the power budget.
Note |
A system power budget is the default power allocated to a device based on its device class. However, the total power sourced from a switch is finite, and power budgeting is done by the power module based on the number of ports already being served, total power that can be served, and number of new ports that are requesting. |
Inventory management TLV—Allows an endpoint to send 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.
Follows IEEE 802.1ab standard.
Enables interoperability among multivendor devices.
Facilitates troubleshooting of enterprise networks and uses standard network management tools.
Provides extension for applications such as VoIP.
LLDP is disabled globally by default. This section describes the tasks for enabling and disabling LLDP globally.
Perform this task to enable LLDP globally.
Step 1 |
enable Example:
Enables privileged EXEC mode.
|
||
Step 2 |
configure terminal Example:
Enters global configuration mode. |
||
Step 3 |
lldp run Example:
Enables LLDP globally.
|
||
Step 4 |
end Example:
Returns to privileged EXEC mode. |
Step 1 |
enable Example:
Enables privileged EXEC mode.
|
Step 2 |
configure terminal Example:
Enters global configuration mode. |
Step 3 |
no lldp {hold time seconds | reinit delay | run | timer rate | tlv-select tlv } Example:
Disables LLDP globally. |
Step 4 |
end Example:
Returns to privileged EXEC mode. |
LLDP is enabled by default on all supported interfaces. This section describes the tasks for disabling and enabling LLDP on a supported interface.
Perform this task to disable LLDP on a supported interface.
Step 1 |
enable Example:
Enables privileged EXEC mode.
|
||
Step 2 |
configure terminal Example:
Enters global configuration mode. |
||
Step 3 |
interface type number Example:
Specifies the interface type and number and enters interface configuration mode. |
||
Step 4 |
no lldp {med-tlv-select tlv | receive | transmit } Example:
Disables an LLDP-MED TLV or LLDP packet reception on a supported interface.
|
||
Step 5 |
end Example:
Returns to privileged EXEC mode. |
LLDP information can be transmitted and received only on an interface where LLDP is configured and enabled. Perform this task to enable LLDP.
Step 1 |
enable Example:
Enables privileged EXEC mode.
|
Step 2 |
configure terminal Example:
Enters global configuration mode. |
Step 3 |
interface type number Example:
Specifies the interface type and number and enters interface configuration mode. |
Step 4 |
lldp {tlv-select tlv | receive | transmit } Example:
Enables an LLDP TLV or LLDP packet transmission on a supported interface. |
Step 5 |
end Example:
Returns to privileged EXEC mode. |
Hold time is the duration that a receiving device should maintain LLDP neighbor information before aging it. Perform this task to define a hold time for an LLDP-enabled device.
Step 1 |
enable Example:
Enables privileged EXEC mode.
|
Step 2 |
configure terminal Example:
Enters global configuration mode. |
Step 3 |
lldp holdtime seconds Example:
Specifies the hold time. |
Step 4 |
end Example:
Returns to privileged EXEC mode. |
Perform this task to specify an interval at which the Cisco software sends LLDP updates to neighboring devices.
Step 1 |
enable Example:
Enables privileged EXEC mode.
|
Step 2 |
configure terminal Example:
Enters global configuration mode. |
Step 3 |
lldp timer rate Example:
Specifies the rate at which LLDP packets are sent every second. |
Step 4 |
end Example:
Returns to privileged EXEC mode. |
Perform this task to monitor and maintain LLDP in multivendor networks. This task is optional, and Steps 2 and 3 can be performed in any sequence.
Step 1 |
enable Example:
Enables privileged EXEC mode.
|
||
Step 2 |
show lldp [entry {* | word } | errors | interface [ethernet number ] | neighbors [ethernet number | detail ] | traffic ] Example:
Displays summarized and detailed LLDP information.
|
||
Step 3 |
clear lldp {counters | table } Example:
Resets LLDP traffic counters and tables to zero. |
||
Step 4 |
end Example:
Returns to user EXEC mode. |
LLDP TLV support is enabled by default if LLDP is enabled globally and locally on a supported interface. Specific TLVs, however, can be enabled and suppressed.
Step 1 |
enable Example:
Enables privileged EXEC mode.
|
Step 2 |
configure terminal Example:
Enters global configuration mode. |
Step 3 |
interface type number Example:
Specifies the interface type and number on which to enable LLDP and enters interface configuration mode. |
Step 4 |
lldp {tlv-select tlv | receive | transmit } Example:
Enables an LLDP TLV or LLDP packet transmission on a supported interface. |
Step 5 |
lldp tlv-select tlv Example:
Enables a specific LLDP TLV on a supported interface. |
Step 6 |
end Example:
Returns to privileged EXEC mode. |
Step 1 |
enable Example:
Enables privileged EXEC mode.
|
Step 2 |
configure terminal Example:
Enters global configuration mode. |
Step 3 |
interface type number Example:
Specifies the interface type and number on which to disable LLDP and enters interface configuration mode. |
Step 4 |
no lldp {tlv-select tlv | receive | transmit } Example:
Disables an LLDP TLV or LLDP packet reception on a supported interface. |
Step 5 |
no lldp tlv-select tlv Example:
Disables a specific LLDP TLV on a supported interface. |
Step 6 |
end Example:
Returns to privileged EXEC mode. |
The following example shows how to configure LLDP timer, hold time, and TLVs on two devices in a network. In each case we assume that the Ethernet interfaces being configured are in the UP state.
! Configure LLDP on Device 1 with hold time, timer, and TLV options.
Device1> enable
Device1# configure terminal
Device1(config)# lldp run
Device1(config)# lldp holdtime 150
Device1(config)# lldp timer 15
Device1(config)# lldp tlv-select port-vlan
Device1(config)# lldp tlv-select mac-phy-cfg
Device1(config)# interface ethernet 0/0
Device1(config-if)# end
00:08:32: %SYS-5-CONFIG_I: Configured from console by console
! Show the updated running configuration. LLDP is enabled with hold time, timer, and TLV options configured.
Device1# show running-config
Building configuration...
Current configuration : 1397 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Device1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
clock timezone PST -8
ip subnet-zero
!
!
lldp timer 15
lldp holdtime 150
!
! Configure LLDP on Device 2 with hold time, timer, and TLV options.
Device2> enable
Device2# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Device2(config)# lldp run
Device2(config)# lldp holdtime 150
Device2(config)# lldp timer 15
Device2(config)# lldp tlv-select port-vlan
Device2(config)# lldp tlv-select mac-phy-cfg
Device2(config)# interface ethernet 0/0
Device2(config-if)# end
00:08:32: %SYS-5-CONFIG_I: Configured from console by console
! Show the updated running configuration on Device 2. LLDP is enabled with hold time, timer, and TLV options configured.
Device2# show running-config
Building configuration...
Current configuration : 1412 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
clock timezone PST -8
ip subnet-zero
!
!
lldp timer 15
lldp holdtime 150
!
! After both devices are configured for LLDP, issue the show
command from each device to view traffic and device information.
Device1# show lldp traffic
LLDP traffic statistics:
Total frames out: 20
Total entries aged: 0
Total frames in: 15
Total frames received in error: 0
Total frames discarded: 0
Total TLVs unrecognized: 0
Device1# show lldp neighbors
Capability codes:
(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID Local Intf Hold-time Capability Port ID
Device2 Et0/0 150 R Et0/0
Total entries displayed: 1
Device2# show lldp traffic
LLDP traffic statistics:
Total frames out: 15
Total entries aged: 0
Total frames in: 17
Total frames received in error: 0
Total frames discarded: 2
Total TLVs unrecognized: 0
Device2# show lldp neighbors
Capability codes:
(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID Local Intf Hold-time Capability Port ID
Device1 Et0/0 150 R Et0/0
Total entries displayed: 1
Feature Name |
Release Information |
Description |
---|---|---|
Tagged Packet Support Using Link Layer Discovery Protocol (LLDP) |
Cisco IOS XE Dublin 17.10.1 |
LLDP now supports tagged packet transmission over a service instance with dot1q encapsulation. LLDP advertises information about themselves to their network neighbors, and store the information they discover from other devices. Though both these transmitted frames go through the same physical interface, they can be uniquely identified by the information advertised in the Port ID Type-Length-Value (TLV). You can use the lldp enable command to enable LLDP over a particular service instance. Use the show lldp neighbors and show lldp entry command outputs for neighboring device details. This feature is supported on both Cisco RSP2 and RSP3 modules. |
LLDP packets are untagged, and they don’t contain 802.1Q header information with VLAN identifier and priority tagging. Starting with Cisco IOS XE Dublin 17.10.1 release, LLDP packet transmission now supports tagged packets over a service instance with dot1q encapsulation. LLDP considers the interface and service instance as an individual entity and transmits the LLDP frames individually. A VLAN tag is added to the Ethernet LLDP frame, based on the encapsulation type of the service instance and sent via Ethernet interface.
An Ethernet flow point (EFP) service instance is a logical interface that connects a bridge domain to a physical port or to an Ether Channel. The neighbor discovery happens over a service instance with encapsulation type as dot1q, to advertise their identity, interconnections, and capabilities.
The lldp enable command supports LLDP frames traffic over a service instance. Use this command per service instance, and whenever there is a requirement to run LLDP over a service instance.
The existing commands, lldp run and l2protocol peer lldp under service instance, must be configured to initiate the LLDP process, along with lldp enable command to enable LLDP over a particular service instance.
Starting with Cisco IOS XE Dublin 17.10.1, LLDP supports tagged packets. Also, LLDP is still supported over untagged encapsulated service instance.
The encapsulation untagged packets work, even without lldp enable command.
For LLDP to receive packets, ensure to enable l2protocol peer lldp command with lldp enable command.
The following example shows, how to enable LLDP in a service instance on tagged packets.
Router#configure terminal
Router(config)#lldp run
Router(config)#interface TenGigabitEthernet0/2/0
Router(config-if)#service instance 20 ethernet
Router(config-if-srv)#encapsulation dot1q 20
Router(config-if-srv)#l2protocol peer lldp
Router(config-if-srv)#lldp enable
Router(config-if-srv)#bridge-domain 20
Router(config-if-srv)#exit
The following example shows, how to disable LLDP in a service instance on tagged packets.
Router#configure terminal
Router(config)#interface TenGigabitEthernet0/2/0
Router(config-if)#service instance 20 ethernet
Router(config-if-srv)#encapsulation dot1q 20
Router(config-if-srv)#no l2protocol peer lldp
Router(config-if-srv)#no lldp enable
Router(config-if-srv)#bridge-domain 20
Router(config-if-srv)#exit
The following example shows the global LLDP details.
Router#show lldp
Global LLDP Information:
Status: ACTIVE
LLDP advertisements are sent every 30 seconds
LLDP hold time advertised is 120 seconds
LLDP interface reinitialisation delay is 2 seconds
Router#show lldp neighbor
Capability codes:
(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID Local Intf Hold-time Capability Port ID
CE1 Te0/2/6 120 R Te0/0/12
CE1 Te0/2/1 120 R Te0/0/15
CE1 Te0/2/0 120 R Te0/0/14
CE1 Te0/2/0:2001 120 R Te0/0/14.2001
CE1 Te0/2/0:30 120 R Te0/0/14.30
CE1 Te0/2/0:2000 120 R Te0/0/14.2000
CE1 Te0/2/0:20 120 R Te0/0/14.20 ------> lldp neighbor learnt via service instance,
Port ID with service instance details
PE2 Te0/2/3:20 120 R Te0/8/3.20
PE2 Te0/2/3:30 120 R Te0/8/3.30
PE2 Te0/2/3:1000 120 R Te0/8/3.1000
PE2 Te0/2/2 200 R Te0/4/2
PE2 Te0/2/5 120 R Te0/8/5
PE2 Te0/2/4 120 R Te0/8/4
PE2 Te0/2/3 120 R Te0/8/3
Total entries displayed: 14
Router#show lldp interface TenGigabitEthernet0/2/0
TenGigabitEthernet0/2/0:
Tx: enabled
Rx: enabled
Tx state: IDLE
Rx state: WAIT FOR FRAME
Enabled EFP: 2000 2001 20 30 ------> Displays the list of EFP’s where lldp is enabled
Router#show lldp interface TenGigabitEthernet0/2/0 service-instance 20
TenGigabitEthernet0/2/0:
Service instance: 20 ------> Displays service instance details that is fetched
Tx: enabled
Rx: enabled
Tx state: IDLE
Rx state: WAIT FOR FRAME
Related Topic |
Document Title |
---|---|
Cisco IOS commands: master list of commands with complete command syntax, command mode, command history, defaults, usage guidelines, and examples |
|
Carrier Ethernet commands: complete command syntax, command mode, command history, defaults, usage guidelines, and examples |
Cisco IOS Carrier Ethernet Command Reference |
LLDP |
Link Layer Discovery Protocol |
Per port location configurations |
Per Port Location Configuration |
Standards/RFCs |
Title |
---|---|
IEEE 802.1ab |
Station and Media Access Control Connectivity Discovery |
RFC 2922 |
Physical Topology MIB |
MIB |
MIBs Link |
---|---|
PTOPO MIB |
To locate and download MIBs for selected platforms, Cisco software releases, and feature sets, use Cisco MIB Locator found at the following URL: |
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |