Many network vendors have developed proprietary layer two discovery protocols (e.g. Cisco's CDP, Extreme's EDP, and so on) to help administrators document and troubleshoot physical links. As there is much overlap in the features these protocols provide, an effort was made to develop a standardized protocol in IEEE 802.1AB, dubbed Link Layer Discovery Protocol (LLDP).
Only relatively new switches such as the Catalyst 3560 support LLDP. This article provides a brief look at configuring LLDP on a Catalyst switch and what information can be ascertained from LLDP neighbors.
LLDP is not (at the time of this writing) enabled by default on Cisco Catalyst switches. So, our first step is to enable LLDP globally on the switch.
S1(config)# lldp run
Similar to CDP, we can use the command
show lldp to view basic LLDP statistics, and LLDP neighbors are displayed with the command
show lldp neighbors.
S1# 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 S1# 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 S2 Fa0/13 120 B Gi0/13 Total entries displayed: 1
As you can see, the format of the LLDP neighbors display is very similar to that of CDP.
S1# 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 S2 Fas 0/13 142 S I WS-C3560G Gig 0/13
We can obtain more detailed output by appending the
detail command argument.
S1# show lldp neighbors detail Chassis id: 0019.2fa7.b28d Port id: Gi0/13 Port Description: GigabitEthernet0/13 System Name: S2.cisco.com System Description: Cisco IOS Software, C3560 Software (C3560-ADVIPSERVICESK9-M), Version 12.2(44)SE, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2008 by Cisco Systems, Inc. Compiled Sat 05-Jan-08 00:15 by weiliu Time remaining: 114 seconds System Capabilities: B,R Enabled Capabilities: B Management Addresses - not advertised Auto Negotiation - supported, enabled Physical media capabilities: 10base-T(HD) 10base-T(FD) 100base-TX(HD) 100base-TX(FD) 1000baseT(HD) 1000baseT(FD) Media Attachment Unit type: 16 --------------------------------------------- Total entries displayed: 1
One interesting feature of LLDP on IOS is that it will communicate the description assigned to an interface, if any. Although, it strikes me as odd that the administrative description is shown under port ID rather than port description. It seems like the values of the two attributes should be swapped.
S2(config)# interface g0/13 S2(config-if)# description Uplink to S1
S1# show lldp neighbors detail Chassis id: 0019.2fa7.b28d Port id: Uplink to S1 Port Description: GigabitEthernet0/13 System Name: S2.cisco.com ...
Finally, here's a packet capture of LLDP and CDP across a common link if you're interested in comparing and contrasting the two protocols.