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
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.