In this article, there is another command which is important to be looked out for. It is the command which is executed in the command prompt of Cisco’s network device generally. It can be classified as generally Cisco-based command since it is using CDP (Cisco Discovery Protocol).
CDP itself is a propietary protocol designed by Cisco Systems. For detail information specified in Wikipedia site, CDP or The Cisco Discovery Protocol (CDP) is a proprietary Data Link Layer protocol developed by Cisco Systems. It is used to share information about other directly connected Cisco equipment, such as the operating system version and IP address. CDP can also be used for On-Demand Routing, which is a method of including routing information in CDP announcements so that dynamic routing protocols do not need to be used in simple networks.
For further information about CDP, please refer to this link in Wikipedia or in the Cisco official page. One of the command specifically using the CDP (Cisco Discovery Protocol) is the command below :
show cdp neighbors
The command itself is executed in the privileged mode of a Cisco based network device such as Router for an example. It is used to inform and provide information to the users especially network administrators about Cisco devices.
By adding an additional parameter neighbors, it is actually specifying information about neighboring device which can be found from the network device where the command is being executed. And the process of discovering those devices are using the CDP (Cisco Discovery Protocol). Basically, those network devices which are directly connected with the network device where the ‘show cdp neighbors’ command is being executed will be listed as the output of this command.
Below is an example of the output of the above executed command in Packet Tracer :
The above output’s command execution is empty because there are no available neigboring device specified in the simulation design. But if there are neighboring device or any devices attached with the network device where the command is being executed, below is the example of the output which will look like :
Switch# show cdp neighbor Capability Codes: R - Router, T - Trans-Bridge, B - Source-Route-Bridge S - Switch, H - Host, I - IGMP, r - Repeater, V - VoIP-Phone, D - Remotely-Managed-Device, s - Supports-STP-Dispute Device-ID Local Intrfce Hldtme Capability Platform Port ID Switch-XXX xxxxxx 999 X X X XX-XXXXX-XXX GigX/xx Switch(XXX) Ethx/xx 999 X X X XXXXX-XXX-XXX Ethx Switch(XXX) Ethx/xx 999 X X X XX-XXXXX GigX/xx Switch(XXX) Ethx/xx 999 X X X XX-XXXXX GigX/xx Switch(XXX) Ethx/xx 999 X X X XX-XXXXX GigX/xx Switch(XXX) Ethx/xx 999 X X X XX-XXXXX GigX/xx Switch(XXX) Ethx/xx 999 X X X XX-XXXXX EthX/x Switch#
The output of the above command vary depends on the environment surrounding the network device where the command is executed.