Link Layer Discovery Protocol (LLDP)
Cisco created CDP to address an issue left unresolved by any open standard protocol. Eventually, a standard protocol was released, defined by IEEE standard 802.1AB, and it’s called Link Layer Discovery Protocol (LLDP). LLDP provides many of the same features as CDP, but the similarities don’t end there because LLDP shares many of the same configurations and show commands as CDP.
We cover LLDP in our Cisco CCNA course as well as our free CCNA study guide online.
Please bear in mind that both your IOS release and platform (router or switch model) must support LLDP if you want to use it. I only bring this up for those of you using a home lab. LLDP is supported in Packet Tracer, but the commands are somewhat limited. If you have some out-of-date routers running older IOS versions, then LLDP may not be supported.
Here is an example of some common LLDP commands:
R1#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
IDSW1 Gi0/2 105 B Gi0/1
R2 Fa0/13 91 R Gi0/1
Total entries displayed: 2
SW2#show lldp entry R2
Capability codes: (R) Router, (B) Bridge, (T) Telephone,
(C) DOCSIS Cable Device (W) WLAN Access Point,
(P) Repeater, (S) Station, (O) Other
Chassis id: 0200.2222.2222
Port id: Gi0/1
Port Description: GigabitEthernet0/1
System Name: R2
System Description:Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.4(3)M3, RELEASE SOFTWARE (fc2)Technical Support: http://www.cisco.com/techsupportCopyright (c) 1986-2015 by Cisco Systems, Inc.Compiled Fri 05-Jun-15 13:24 by prod_rel_team
Time remaining: 100 seconds
System Capabilities: B,REnabled Capabilities: R
Management Addresses: IP: 10.1.1.9
Auto Negotiation – not supported
Physical media capabilities – not advertised
Media Attachment Unit type – not advertised
Vlan ID: – not advertised
Total entries displayed: 1
Based on what you know about CDP, the LLDP output should look very familiar. Most importantly, the interface information, such as local and remote port information, is the same between both protocols and is very useful when analyzing or troubleshooting a network. You can enable LLDP globally or per interface.
Enabling and Disabling LLDP
Unlike CDP, LLDP is disabled globally on all supported interfaces, which (of course) means that you must enable LLDP globally to allow a device to send LLDP packets. However, no changes are required at the interface level. The following example shows how to globally enable LLDP:
Switch#configure terminal
Switch(config)#lldp run
Switch(config)#end
You can configure the interface to selectively not send and receive LLDP packets with the
no lldp transmit and no lldp receive commands.
The following example demonstrates how to enable LLDP on an interface:
Switch#configure terminal
Switch(config)#interface GigabitEthernet1/1
Switch(config-if)#lldp transmit
Switch(config-if)#lldp receive
Switch(config-if)#end
As with CDP, leaving LLDP turned on any edge network devices represents a security risk. We will cover this in the security notes (and the following lab).
CDP/LLDP LAB
Topology
Purpose
Learn how to verify and configure CDP and LLDP settings on Cisco switches.
CDP is enabled by default on Cisco devices. LLDP is disabled.
For this lab, I simply connected two 2960 switches using a crossover cable on port G0/1 on Cisco Packet Tracer.
Walkthrough
- Check the current CDP settings on your switch.
Switch#show cdp neighbors
Capability Codes: R – Router, T – Trans Bridge, B – Source Route Bridge
S – Switch, H – Host, I – IGMP, r – Repeater, P – Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch Gig 0/1 121 S 2960 Gig 0/1
Switch#show cdp neighbors detail
Device ID: Switch
Entry address(es):
Platform: cisco 2960, Capabilities: Switch
Interface: GigabitEthernet0/1, Port ID (outgoing port): GigabitEthernet0/1
Holdtime: 172
Version :
Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Wed 12-Oct-05 22:05 by pt_team
advertisement version: 2
Duplex:full
- Turn CDP off on the remote interface. Clear the CDP entry on the switch, and check the outputs again. The entry should be blank.
Switch1(config)#int g0/1
Switch1(config-if)#no cdp ?
enable Enable CDP on interface
Switch1(config-if)#no cdp enable
Switch#clear cdp table
Switch#show cdp neighbors
Capability Codes: R – Router, T – Trans Bridge, B – Source Route Bridge
S – Switch, H – Host, I – IGMP, r – Repeater, P – Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch#
- Check the LLDP entry for Switch1, note that LLDP is disabled, and then enable it on both sides.
Switch#show lldp neighbors
% LLDP is not enabled
Switch#conf t
Switch(config)#lldp run
Switch1(config)#lldp run
- Check the LLDP entry again, normal and detailed.
Switch#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
Switch1 Gig0/1 120 B Gig0/1
Total entries displayed: 1
Switch#show lldp neighbors detail
————————————————
Chassis id: 0001.64EE.CB19
Port id: Gig0/1
Port Description: GigabitEthernet0/1
System Name: Switch1
System Description:
Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Wed 12-Oct-05 22:05 by pt_team
Time remaining: 90 seconds
System Capabilities: B
Enabled Capabilities: B
Management Addresses – not advertised
Auto Negotiation – supported, enabled
Physical media capabilities:
100baseT(HD)
1000baseT(FD)
1000baseT(HD)
Media Attachment Unit type: 10
Vlan ID: 1
Total entries displayed: 1
Switch#Name: Gig0/1
- Check the commands to enable LLDP per interface and disable per device.
Switch1(config-if)#lldp ?
receive Enable LLDP reception on interface
transmit Enable LLDP transmission on interface
Switch1(config-if)#exit
Switch1(config)#no lldp ?
run Enable LLDP
Switch1(config)#no lldp run
Leave a Reply