Discovering Devices with CDP and LLDP — Network Management
Professional Blog / Network Management / Discovering Devices with CDP and LLDP
CDP
Network Management Series Article 1 of 6 🕐 10 min read
🔍

Discovering Devices with CDP and LLDP

Automate network topology mapping and device discovery for real-time infrastructure insights

Published15 July 2025
Updated01 September 2025
AuthorJean Claude Munyakazi

One of the first steps in managing a network is knowing what's connected. Cisco Discovery Protocol (CDP) and Link Layer Discovery Protocol (LLDP) serve this purpose. CDP is Cisco's proprietary Layer 2 protocol, enabled by default on Cisco devices, allowing devices to share information about their neighbors including device IDs, port IDs, and platform details.

LLDP is the open-standard alternative that shines in multi-vendor ecosystems. Designed for interoperability, LLDP enables devices from various manufacturers; Juniper, HP/Aruba, Arista, and virtual platforms like VMware ESXi and Proxmox; to advertise their identity and capabilities across directly connected Layer 2 links.

🎯
Why Neighbor Discovery Matters
In modern enterprise and data center environments where mixed-vendor hardware is the norm, LLDP is not just helpful; it's essential for effective network visibility, topology verification, and troubleshooting without manual inspection.

Cisco Discovery Protocol (CDP)

CDP is Cisco's proprietary Layer 2 protocol, enabled by default on Cisco devices. It sends periodic advertisements to directly connected neighbors, sharing vital information that helps administrators understand their network topology.

CDP Information Elements

Information TypeDescriptionExample
Device IDHostname of the deviceSwitch-Core-01
Port IDLocal and remote interfaceGigabitEthernet0/1
CapabilitiesDevice type and functionsRouter, Switch, IGMP
PlatformHardware modelWS-C3850-24T
IP AddressManagement IP addresses192.168.1.10
Software VersionIOS version information15.2(4)E7
VTP DomainVLAN Trunking Protocol domainCORP_DOMAIN

CDP Configuration

Cisco IOS — CDP Setup
# Enable CDP globally (default on Cisco devices)
Router(config)# cdp run
Router(config)# cdp timer 60       # Advertisement interval (default: 60s)
Router(config)# cdp holdtime 180   # Hold time before aging out (default: 180s)

# Interface-specific configuration
Router(config)# interface gigabitethernet0/1
Router(config-if)# cdp enable
show cdp neighbors — Example Output
Device ID       Local Intrfce  Holdtme  Capability  Platform   Port ID
Core-SW-01      Gig 0/1        157      R S I       WS-C3850   Gig 0/24
Access-SW-02    Gig 0/2        143      S I         WS-C2960   Gig 0/1
Router-WAN      Gig 0/3        168      R           ISR4331    Gig 0/0/0
⚠️
CDP Security Consideration
CDP shares detailed device information to any connected device. Disable CDP on all external-facing interfaces (internet uplinks, DMZ ports, guest network ports) to prevent information leakage to untrusted networks.

Link Layer Discovery Protocol (LLDP)

LLDP is the IEEE 802.1AB open standard for neighbor discovery, using Type-Length-Value (TLV) format to share standardized information across all vendor platforms. It is the preferred protocol in multi-vendor environments.

LLDP TLV Elements

TLV TypeDescriptionMandatory
Chassis IDUnique chassis identifierYes
Port IDPort identifierYes
TTLTime to LiveYes
System NameDevice hostnameOptional
System DescriptionDevice description stringOptional
System CapabilitiesDevice role capabilitiesOptional
Management AddressIP address for managementOptional

Platform Support

Network Devices
  • Cisco IOS, IOS-XE, IOS-XR, NX-OS
  • Juniper Junos
  • HP/Aruba ArubaOS, ProCurve
  • Arista EOS, Dell OS6/OS9/OS10
  • Extreme Networks ExtremeXOS
  • Fortinet FortiOS
Virtual Platforms
  • VMware ESXi / vSphere Distributed Switch
  • Microsoft Hyper-V
  • Linux Open vSwitch
  • Citrix XenServer
  • pfSense (FreeBSD-based)
  • Proxmox VE

LLDP Configuration Examples

Cisco IOS — LLDP Setup
Router(config)# lldp run
Router(config)# lldp timer 30        # Advertisement interval (default: 30s)
Router(config)# lldp holdtime 120    # Hold time (default: 4x timer)

# Interface-specific transmit/receive
Router(config)# interface gigabitethernet0/1
Router(config-if)# lldp transmit
Router(config-if)# lldp receive
show lldp neighbors detail — Example Output
Local Intf: Gi0/1
Chassis id:  00:23:04:ee:be:00
Port id:     24
Port Description: GigabitEthernet1/0/24
System Name: HP-2930F-Stack
System Description: HP 2930F-24G-4SFP+ Switch
System Capabilities: B (Bridge)
Management Addresses:
  IP: 192.168.1.50

CDP vs LLDP Comparison

FeatureCDPLLDP
StandardCisco ProprietaryIEEE 802.1AB Open Standard
Default StateEnabled on CiscoDisabled (must enable)
Vendor SupportCisco onlyAll major vendors
Timer (default)60 seconds30 seconds
Holdtime (default)180 seconds120 seconds
Virtual SupportLimitedVMware, Hyper-V, OVS
PoE NegotiationYes (CDP PoE)Yes (LLDP-MED)
VLAN InfoYesVia LLDP-MED extensions

Modern Discovery Tools

Network Topology Discovery Tools
Netdisco — Open-source LLDP/CDP topology mapper
SolarWinds NTA — Automated topology discovery
PRTG Network Monitor — Discovery + monitoring
LibreNMS — Open-source with LLDP topology maps
Cisco DNA Center — Intent-based topology automation
Nmap — Active host and port discovery

Best Practices

Key Recommendations
  • Enable LLDP on all devices in multi-vendor environments for consistent topology data
  • Disable CDP and LLDP on external-facing, DMZ, and guest-facing interfaces
  • Use show cdp neighbors detail and show lldp neighbors detail for full device information
  • Integrate discovery data with your CMDB or network documentation system
  • Verify cabling by comparing expected vs. actual neighbor relationships
  • Schedule regular topology exports to track infrastructure changes over time
  • Consider LLDP-MED for VoIP environments to enable PoE and VLAN auto-configuration
5 2 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x