What information does the show cdp neighbors command provide?
Per directly connected Cisco neighbor it shows device ID (hostname), network address, local/remote port, capabilities (L2/L3), and platform; add detail to reveal the neighbor's IP address.
CDP is a Cisco-proprietary Layer 2 protocol: every CDP-enabled device periodically announces itself to its directly connected neighbors, so a router or switch can learn who is physically attached to each of its ports without needing any IP configuration. That's its real power for troubleshooting and mapping — you can stand on one device and discover the hostname, port, capabilities (Layer 2 vs Layer 3 switch), and platform of each neighbor, then hop device-to-device to reconstruct the topology even when documentation is missing or addresses are misconfigured. The basic show cdp neighbors output omits the neighbor's IP address; show cdp neighbors detail adds it, which is how you'd catch a neighbor that has the wrong IP configured. Because CDP only sees one hop away, you discover the whole network by walking it neighbor by neighbor.
The show cdp neighbors Command:
CDP (Cisco Discovery Protocol) provides information about each CDP neighbor device.
Information provided:
| Field | Description |
|---|---|
| Device identifiers | Configured host name of switch, router, or other device |
| Address list | Up to one network layer address for each protocol supported |
| Port identifier | Name of local and remote port (e.g., FastEthernet0/0) |
| Capabilities list | Whether device is Layer 2 switch or Layer 3 switch |
| Platform | Hardware platform of the device |
Extended command:
show cdp neighbors detail
This command reveals the IP address of a neighboring device.
Key insight: CDP is useful for discovering the network topology and identifying directly connected Cisco devices without needing to know their IP addresses.
Go deeper:
Wikipedia — Cisco Discovery Protocol (CDP) — the device ID, address, port, capability, and platform fields CDP advertises every 60 seconds.