Back to Command Reference
Privileged EXECDomain 1.0

show cdp neighbors

Displays a summary of directly connected Cisco equipment. The Cisco Discovery Protocol (CDP) is a proprietary Layer 2 messaging system that runs automatically on all Cisco devices. It allows engineers to map out physical network topologies without knowing any IP addresses or login credentials.

Reading the Output

RouterA# show cdp neighbors
Device ID    Local Intrfce   Holdtme   Capability   Platform    Port ID
Switch_Core  Gig 0/0         164       S I          WS-C3850    Gig 1/0/24
RouterB      Ser 0/0/0       120       R            C1900       Ser 0/0/1

CCNA Exam Gotchas

[!]

Finding the IP Address

The standard show cdp neighbors command does not show IP addresses. If you need to Telnet/SSH into that discovered switch, you must append the detail keyword (e.g., show cdp neighbors detail) to reveal the management IP and the exact IOS version it is running.

[!]

The Security Threat

Because CDP broadcasts detailed device schematics in clear text, it is a massive reconnaissance vector for attackers. Industry best practice mandates disabling it on all user-facing access ports using the interface command no cdp enable, or turning it off entirely across the whole box with the global command no cdp run.