Courseiva
CDP / LLDPPrivileged EXEC

show cdp neighbors detail

Displays detailed information about directly connected Cisco devices discovered via CDP, including IP addresses, IOS version, platform, and interface details, useful for verifying neighbor relationships and troubleshooting Layer 2 connectivity.

Definition: show cdp neighbors detail is a Cisco IOS privileged exec command. Displays detailed information about directly connected Cisco devices discovered via CDP, including IP addresses, IOS version, platform, and interface details, useful for verifying neighbor relationships and troubleshooting Layer 2 connectivity.

Overview

The 'show cdp neighbors detail' command is a fundamental tool in Cisco network troubleshooting and discovery. It provides an exhaustive view of directly connected Cisco devices discovered via the Cisco Discovery Protocol (CDP). CDP is a proprietary Layer 2 protocol that runs on all Cisco devices, enabling them to advertise their identity, capabilities, and connectivity to neighboring devices.

This command is essential for network engineers to verify neighbor relationships, understand the network topology, and troubleshoot Layer 2 connectivity issues. Unlike 'show cdp neighbors' which gives a summary table, the detail version reveals critical information such as the neighbor's IP address(es), IOS version, platform, device ID, native VLAN, and the local and remote interfaces. This data is invaluable when planning network changes, diagnosing mismatched configurations, or simply documenting the network.

The command is often the first step in a troubleshooting workflow, especially when connectivity issues arise, as it confirms whether two devices can communicate at Layer 2. It is also used to verify that CDP is enabled and functioning correctly. Alternatives like LLDP (Link Layer Discovery Protocol) provide similar information but are not Cisco-proprietary.

The command runs in privileged EXEC mode (enable) and does not affect the running configuration. Output can be lengthy in large networks, so it is often piped to 'include' or 'begin' for filtering. Understanding this command is crucial for CCNA and CCNP candidates as it appears frequently in exam scenarios and real-world network management.

Syntax·Privileged EXEC
show cdp neighbors detail

When to Use This Command

  • Verify that a newly connected switch or router is properly linked and exchanging CDP information.
  • Identify the IP address and IOS version of a neighboring device to determine compatibility or plan upgrades.
  • Troubleshoot a missing route by checking if the expected neighbor is reachable via CDP.
  • Document the network topology by collecting detailed neighbor information from multiple devices.

Command Examples

Basic CDP neighbor detail output

show cdp neighbors detail
-------------------------
Device ID: R2
Entry address(es):
  IP address: 192.168.1.2
Platform: Cisco 7206VXR,  Capabilities: Router
Interface: GigabitEthernet0/0,  Port ID (outgoing port): GigabitEthernet0/1
Holdtime : 135 sec

Version :
Cisco IOS Software, 7200 Software (C7200-ADVENTERPRISEK9-M), Version 15.2(4)M6, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Mon 02-Mar-15 00:00 by prod_rel_team

advertisement version: 2
VTP Management Domain: ''
Duplex: full
Power drawn: 0.00 Watts

-------------------------
Device ID: SW1
Entry address(es):
  IP address: 10.0.0.2
Platform: cisco WS-C2960-24TT-L,  Capabilities: Switch IGMP
Interface: GigabitEthernet0/1,  Port ID (outgoing port): FastEthernet0/24
Holdtime : 150 sec

Version :
Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2012 by Cisco Systems, Inc.
Compiled Mon 18-Jun-12 00:00 by prod_rel_team

advertisement version: 2
VTP Management Domain: ''
Duplex: full
Power drawn: 0.00 Watts

Device ID: Hostname of the neighbor. Entry address(es): IP address(es) of the neighbor (usually the management IP). Platform: Hardware model. Capabilities: Device type (Router, Switch, IGMP, etc.). Interface: Local interface on this device connecting to the neighbor. Port ID: Neighbor's interface connected to us. Holdtime: Remaining seconds before CDP entry expires. Version: Detailed IOS version string. advertisement version: CDP version (2 is common). VTP Management Domain: VTP domain (blank if not configured). Duplex: Negotiated duplex mode. Power drawn: PoE power consumption (0 if not PoE).

Filtering output for a specific interface

show cdp neighbors detail gigabitethernet 0/0
-------------------------
Device ID: R2
Entry address(es):
  IP address: 192.168.1.2
Platform: Cisco 7206VXR,  Capabilities: Router
Interface: GigabitEthernet0/0,  Port ID (outgoing port): GigabitEthernet0/1
Holdtime : 135 sec

Version :
Cisco IOS Software, 7200 Software (C7200-ADVENTERPRISEK9-M), Version 15.2(4)M6, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Mon 02-Mar-15 00:00 by prod_rel_team

advertisement version: 2
VTP Management Domain: ''
Duplex: full
Power drawn: 0.00 Watts

This variant shows only CDP neighbors reachable via GigabitEthernet0/0. Useful when troubleshooting a specific link. The output is identical in format but limited to that interface.

Understanding the Output

The output lists each neighbor separated by dashed lines. 'Device ID' is the hostname of the neighbor. 'Entry address(es)' shows the IP address(es) the neighbor advertises; this is critical for management and routing.

'Platform' indicates hardware model, useful for capacity planning. 'Capabilities' tells you if the device is a router, switch, or other (e.g., 'Switch IGMP' means a switch with IGMP snooping). 'Interface' is the local interface connecting to the neighbor, and 'Port ID' is the neighbor's interface.

'Holdtime' counts down from 180 seconds; if it reaches 0, the neighbor is considered lost. 'Version' provides the exact IOS version, helpful for compatibility checks. 'Duplex' should be 'full' for modern links; 'half' may indicate a duplex mismatch.

'Power drawn' is relevant for PoE devices. In a real network, you would use this to verify that all expected neighbors appear, check IP addresses for consistency with your documentation, and ensure IOS versions are compatible. Missing neighbors or incorrect IPs indicate configuration or connectivity issues.

Configuration Scenarios

Verify CDP Neighbor Details Between Two Routers

A network engineer needs to confirm that two routers are directly connected and exchanging CDP information. This scenario verifies the neighbor relationship and captures key details like IP addresses and IOS versions.

Topology

R1(Gi0/0)---10.0.12.0/30---(Gi0/0)R2

Steps

  1. 1.Step 1: Enter privileged EXEC mode on R1: R1> enable
  2. 2.Step 2: Run the command: R1# show cdp neighbors detail
  3. 3.Step 3: Examine the output for the neighbor entry for R2, noting the Device ID, Platform, IP address, and Local Interface.
Configuration
! No configuration is required for this verification; CDP is enabled by default.
! To ensure CDP is enabled globally: R1(config)# cdp run
! To enable CDP on an interface: R1(config-if)# cdp enable

Verify: R1# show cdp neighbors detail ------------------------- Device ID: R2 Entry address(es): IP address: 10.0.12.2 Platform: cisco ISR4321, Capabilities: Router Interface: GigabitEthernet0/0, Port ID (outgoing port): GigabitEthernet0/0 Holdtime : 135 sec Version : Cisco IOS Software, ISR Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.9.4, RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2019 by Cisco Systems, Inc. Compiled Tue 16-Jul-19 16:31 by mcpre

Watch out: If the neighbor does not appear, ensure CDP is enabled globally and on the interface. Also, check that the neighbor is a Cisco device and that there is no Layer 1 issue.

Troubleshoot Missing CDP Neighbor on a Switch

A switch is not showing a connected router in CDP output. The engineer uses the detail command to identify if the issue is due to CDP being disabled on the interface or a version mismatch.

Topology

SW1(Gi0/1)---10.0.12.0/30---(Gi0/0)R1

Steps

  1. 1.Step 1: Enter privileged EXEC mode on SW1: SW1> enable
  2. 2.Step 2: Run the command: SW1# show cdp neighbors detail
  3. 3.Step 3: Observe that no neighbor is listed. Then check CDP status on the interface: SW1# show cdp interface gigabitEthernet 0/1
  4. 4.Step 4: If CDP is disabled, enable it: SW1(config)# interface gigabitEthernet 0/1; SW1(config-if)# cdp enable
  5. 5.Step 5: Verify again: SW1# show cdp neighbors detail
Configuration
! Enable CDP globally if not already: SW1(config)# cdp run
! Enable CDP on the interface: SW1(config)# interface gigabitEthernet 0/1; SW1(config-if)# cdp enable

Verify: After enabling CDP, the output should show the neighbor: SW1# show cdp neighbors detail ------------------------- Device ID: R1 Entry address(es): IP address: 10.0.12.1 Platform: cisco ISR4321, Capabilities: Router Interface: GigabitEthernet0/1, Port ID (outgoing port): GigabitEthernet0/0 Holdtime : 150 sec Version : Cisco IOS Software, ISR Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.9.4, RELEASE SOFTWARE (fc2) ...

Watch out: A common mistake is forgetting that CDP is enabled globally but disabled on the interface by default on some IOS versions. Always check both levels.

Troubleshooting with This Command

When troubleshooting Layer 2 connectivity, 'show cdp neighbors detail' is often the first command to run. A healthy output shows a list of directly connected Cisco devices with their IP addresses, platforms, and IOS versions. The key fields to focus on are 'Device ID' (should match the hostname of the neighbor), 'IP address' (should be the management or interface IP of the neighbor), 'Interface' (the local interface connecting to the neighbor), and 'Holdtime' (should be decrementing from 180 seconds; if it reaches 0, the neighbor is lost).

Problem indicators include: no output at all (CDP disabled globally or on interfaces, or Layer 1 issue), missing expected neighbors (Layer 2 misconfiguration, non-Cisco device, or CDP version mismatch), or incorrect IP addresses (duplicate IP or misconfigured management address). Common symptoms this command helps diagnose include: inability to ping a directly connected device (check if CDP shows the neighbor with an IP address), routing protocol neighbor not forming (verify Layer 2 connectivity first), or interface errors (CDP may still show neighbor even with errors, but holdtime may be low). A step-by-step diagnostic flow: 1) Run 'show cdp neighbors' to see a summary; if no neighbors, check 'show cdp interface' to see if CDP is enabled on interfaces. 2) If neighbors appear but not all, run 'show cdp neighbors detail' for the missing neighbor to see if it appears with a different interface. 3) Check 'show cdp traffic' to see if CDP packets are being sent/received. 4) Correlate with 'show interface' to check for errors or down/down status. 5) Use 'debug cdp packets' (with caution) to see real-time CDP exchanges.

The command's output can be correlated with 'show lldp neighbors detail' if LLDP is also enabled. In summary, this command is a quick and reliable way to confirm Layer 2 adjacency and gather critical device information for further troubleshooting.

CCNA Exam Tips

1.

Remember that CDP is Cisco proprietary and enabled by default; the exam may ask about its Layer 2 nature.

2.

Know that 'show cdp neighbors detail' provides IP addresses, which 'show cdp neighbors' does not.

3.

Be aware that CDP version 2 is the default; version 1 is rarely used but may appear in legacy scenarios.

4.

The holdtime is typically 180 seconds; if you see a lower value, the neighbor may be flapping.

Common Mistakes

Confusing 'show cdp neighbors' with 'show cdp neighbors detail' — the latter gives IP addresses and IOS version.

Assuming CDP works across routers without IP connectivity; CDP is Layer 2 and does not require IP.

Forgetting that CDP is disabled on some interfaces by default (e.g., on certain IOS versions or security configurations).

Misinterpreting 'Holdtime' as the time since last update; it is the remaining time before expiration.

show cdp neighbors detail vs show cdp neighbors

Both commands display CDP neighbor information, but `show cdp neighbors detail` provides significantly more verbose output including IP addresses and IOS version, while `show cdp neighbors` gives a concise table. They are often compared when deciding how much detail is needed for diagnostics or inventory.

Aspectshow cdp neighbors detailshow cdp neighbors
Output DetailFull detail: Device ID, Local/Remote Interface, Holdtime, Capabilities, Platform, Port ID, IP addresses, IOS version, Duplex, VTP domain, Native VLANSummary table: Device ID, Local Interface, Holdtime, Capabilities, Platform, Port ID
ScopeOne neighbor per section; multiple neighbors shown sequentiallyList of all neighbors in compact table
Typical UseTroubleshooting Layer 2 connectivity, verifying IP and IOS detailsQuick inventory of neighbor devices and interface mappings
Command ModePrivileged EXECPrivileged EXEC
Performance ImpactHeavier output, may be slower on large networksLighter, faster for routine checks

Use `show cdp neighbors detail` when you need specific neighbor IP addresses, IOS version, or duplex settings for detailed troubleshooting or documentation.

Use `show cdp neighbors` for a fast overview of directly connected devices and their interfaces without extraneous details.

Platform Notes

In IOS-XE, the command syntax and output are identical to classic IOS, but the output may include additional fields like 'Native VLAN' and 'Duplex' for switches. On NX-OS, the equivalent command is 'show cdp neighbors detail' as well, but note that CDP is enabled by default only on certain interfaces; use 'show cdp all' to see global status. On ASA firewalls, CDP is not supported; use 'show lldp neighbors detail' instead.

For IOS-XR, CDP is not available; use LLDP with 'show lldp neighbors detail'. Between IOS versions (12.x vs 15.x vs 16.x), the output format is consistent, but newer versions may include additional details like 'VTP Management Domain' or 'Power Consumption'. Always ensure the device is running a version that supports CDP (all Cisco IOS, IOS-XE, and NX-OS devices do).

The command is available in all privilege levels that allow 'show' commands, but 'detail' requires privileged EXEC mode.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with practice questions covering all CCNA 200-301 exam domains.

Practice CCNA 200-301 Questions