CDP / LLDPEXEC

show cdp neighbors detail

Displays detailed information about neighboring devices discovered via the Cisco Discovery Protocol (CDP), including device ID, platform, capabilities, and IP addresses.

Overview

The 'show cdp neighbors detail' command is a fundamental tool for network discovery and troubleshooting on Cisco NX-OS devices. CDP (Cisco Discovery Protocol) is a Layer 2, media-independent protocol that runs on all Cisco devices, enabling them to advertise their identity, capabilities, and connectivity to directly connected neighbors. This command provides a detailed view of each neighbor, including device hostname, IP address, hardware platform, software version, and the local and remote interface identifiers. On NX-OS, CDP is enabled by default on all interfaces and operates over Ethernet, Frame Relay, and ATM. The command is invaluable for building network topology maps, verifying physical connectivity, and diagnosing issues such as incorrect cabling, mismatched VLANs, or duplex mismatches. In troubleshooting workflows, it is often the first step after verifying interface status, as it confirms Layer 2 adjacency without requiring IP connectivity. Unlike LLDP, CDP is Cisco proprietary, so it only works between Cisco devices. The detailed output includes the CDP advertisement version (typically version 2), native VLAN, and duplex status, which are critical for ensuring consistent configuration across links. Network engineers use this command during initial deployment, change management, and fault isolation to quickly identify neighboring devices and their configurations.

Syntax·EXEC
show cdp neighbors detail [interface <interface>] [vlan <vlan-id>]

When to Use This Command

  • Verify connectivity and device identity of a newly connected switch or router.
  • Troubleshoot Layer 2 adjacency issues by checking CDP neighbor details.
  • Document network topology by collecting device IDs and IP addresses of neighbors.
  • Identify unsupported or unauthorized devices connected to the network.

Parameters

ParameterSyntaxDescription
interfaceinterface <interface>Specifies a particular interface to filter CDP neighbor details. Only neighbors discovered on that interface are displayed. Useful for focusing on a specific link.
vlanvlan <vlan-id>Filters CDP neighbors by VLAN ID. Only neighbors whose native VLAN matches the specified VLAN are shown. Helps isolate neighbors in a specific VLAN.

Command Examples

Basic CDP Neighbor Detail

show cdp neighbors detail
-------------------------
Device ID: N9K-C93180YC-FX
Entry address(es):
  IP address: 10.1.1.2
Platform: cisco N9K-C93180YC-FX,  Capabilities: Router Switch
Interface: Ethernet1/1,  Port ID (outgoing port): Ethernet1/1
Holdtime : 150 sec

Version :
Cisco NX-OS(tm) n9000, Version 9.3(5)

advertisement version: 2
Native VLAN: 1
Duplex: full

Device ID: hostname of neighbor; IP address: management IP; Platform: hardware model; Capabilities: device roles; Interface: local port; Port ID: neighbor's port; Holdtime: remaining validity; Version: NX-OS version; Native VLAN: default VLAN; Duplex: link duplex.

CDP Neighbor Detail for Specific Interface

show cdp neighbors detail interface ethernet 1/2
-------------------------
Device ID: N5K-C5596T
Entry address(es):
  IP address: 10.2.2.2
Platform: cisco N5K-C5596T,  Capabilities: Router Switch
Interface: Ethernet1/2,  Port ID (outgoing port): Ethernet1/1
Holdtime : 120 sec

Version :
Cisco NX-OS(tm) n5000, Version 7.3(0)N1(1)

advertisement version: 2
Native VLAN: 1
Duplex: full

Filters output to show only neighbors discovered on Ethernet1/2. Useful for isolating a specific link.

Understanding the Output

The output begins with a separator line followed by the Device ID, which is the hostname of the neighboring device. The 'Entry address(es)' section lists IP addresses, typically the management IP. 'Platform' indicates the hardware model, and 'Capabilities' show device roles (e.g., Router, Switch). 'Interface' is the local port where the neighbor is connected, and 'Port ID' is the neighbor's outgoing port. 'Holdtime' is the remaining time in seconds before the CDP entry expires (default 180 seconds, healthy values > 60). 'Version' displays the neighbor's NX-OS version. 'Native VLAN' and 'Duplex' provide Layer 2 details. A healthy output shows consistent device IDs, matching IPs, and full duplex. Problems include missing entries (CDP disabled), mismatched VLANs, or half-duplex links.

Configuration Scenarios

Verifying a New Switch Connection

A new Nexus 93180YC-FX switch is connected to an existing Nexus 9508 core switch. The engineer needs to confirm the link is working and the new switch is recognized.

Topology

[N9K-1] -- Eth1/1 --- Eth1/2 [N9K-2]

Steps

  1. 1.Connect the new switch to the core using a fiber cable.
  2. 2.On the core switch, enter EXEC mode.
  3. 3.Run 'show cdp neighbors detail' to see the new switch.
  4. 4.Verify the Device ID matches the new switch hostname.
  5. 5.Check the IP address for management access.
Configuration
! No configuration needed; CDP is enabled by default.

Verify: Output shows Device ID: N9K-2, Platform: N9K-C93180YC-FX, Interface: Ethernet1/1, Port ID: Ethernet1/2.

Watch out: If the new switch has CDP disabled globally, it will not appear. Ensure 'cdp enable' is configured on both sides.

Troubleshooting with This Command

When troubleshooting connectivity issues on Cisco NX-OS, 'show cdp neighbors detail' is a powerful first step. If a neighbor is not listed, check that CDP is enabled globally with 'show cdp' and per interface with 'show cdp interface'. Common issues include CDP being disabled on one side, mismatched native VLANs (CDP runs on native VLAN), or interface errors. If the neighbor appears but with incorrect IP or platform, suspect a misconfiguration or counterfeit device. A low holdtime (e.g., < 60 seconds) may indicate intermittent connectivity or flapping. Duplex mismatch is a classic problem: if the output shows 'half' on one side and 'full' on the other, the link will have errors. Use 'show interface' to confirm duplex settings. Also, if the neighbor's IP is not reachable, verify routing or management VLAN. In NX-OS, CDP version 2 is used, which includes VLAN and duplex info. If you see 'advertisement version: 1', the neighbor is an older device. For security, CDP can be disabled on untrusted ports. Always compare the local interface and remote port ID to ensure correct cabling. In summary, this command provides a quick, reliable way to validate Layer 2 adjacency and device identity.

CCNA Exam Tips

1.

Remember that CDP is Cisco proprietary and enabled by default on NX-OS.

2.

Know that 'show cdp neighbors detail' is used to verify Layer 2 connectivity and device identity.

3.

Be aware that CDP holdtime default is 180 seconds; a low holdtime may indicate flapping or misconfiguration.

Common Mistakes

Assuming CDP is enabled on all interfaces; it may be disabled globally or per interface.

Confusing CDP with LLDP; CDP is Cisco proprietary, LLDP is standards-based.

Overlooking that CDP runs on Layer 2 and requires no IP configuration to discover neighbors.

Platform Notes

On Cisco NX-OS, CDP is enabled by default on all interfaces, unlike IOS where it is enabled globally but may be disabled per interface. The command syntax is similar to IOS, but NX-OS supports additional filtering by VLAN. The output format is consistent across Nexus platforms, though some fields like 'Native VLAN' may not appear on IOS. Equivalent commands on other platforms: 'show lldp neighbors detail' for standards-based discovery, or 'show cdp neighbors detail' on IOS. On Juniper, use 'show lldp neighbors detail' or 'show cdp neighbors detail' if CDP is supported. On Arista, 'show lldp neighbors detail' is common. NX-OS also supports 'show cdp neighbors' for a summary view. Note that CDP is not supported on all NX-OS interfaces (e.g., management ports may have it disabled). Always verify with 'show cdp interface'.

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions