Cisco "show cdp neighbors" Command Explained
show cdp neighbors — lists directly connected Cisco devices — who's on the other end of each link, without touching a cable. Runs in privileged EXEC mode.
Syntax and common variants
| Variant | Purpose |
|---|---|
show cdp neighbors | Summary: neighbour, local port, their port |
show cdp neighbors detail | Adds IP addresses, platform, IOS version |
show lldp neighbors | The multi-vendor (LLDP) equivalent |
Reading the output
| Output field | Meaning |
|---|---|
Device ID | Neighbour hostname |
Local Intrfce | YOUR port toward them |
Port ID | THEIR port toward you |
Capability | R router, S switch… |
Platform | Hardware model |
When to use it
Topology discovery and documentation in one command — invaluable on unfamiliar networks, and the detail variant hands you the neighbour's management IP for your next hop. Security habit: disable CDP on ports facing untrusted networks. Browse more in the command reference or practise in the free labs.
Frequently asked questions
What's the difference between Local Intrfce and Port ID?
Local Intrfce is your side of the cable; Port ID is the neighbour's side — read them as this-end/that-end.
How do I get the neighbour's IP address?
show cdp neighbors detail — it includes management addresses plus platform and software version.
Should CDP ever be disabled?
On untrusted/edge-facing ports, yes — it advertises topology details an attacker could use.
Related articles
Want hands-on training?
Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.