Ad space (banner)
📡Networking Lessons
Lesson 35 / 39

Discovering Neighbors with show cdp neighbors

When you want to identify the Cisco device at the far end of a cable without tracing the cable, use show cdp neighbors. It displays information about directly connected neighboring Cisco devices, gathered via CDP (Cisco Discovery Protocol).

The syntax is show cdp neighbors, in privileged EXEC mode.

Running show cdp neighbors lists each neighbor's hostname, the local and remote ports of the link, and the device type.

A common stumble is a device where CDP has been disabled — then nothing shows up at all. Confirm CDP is enabled before drawing conclusions.

In real work, it is invaluable for quickly mapping the physical topology of a messily cabled network.

Networking
Try it (type this into the pseudo terminal)
show cdp neighbors

🧑‍💻 You can type this command into the Networking pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)