Cisco Discovery Protocol (CDP)
Cisco Discovery Protocol (CDP) is a proprietary protocol designed by Cisco to help administrators collect information about both locally attached and remote devices. By using CDP, you can gather hardware and protocol information about neighbor devices, which is useful info for troubleshooting the network.CDP messages are generated every 60 seconds as multicast messages on each of its active interfaces.
The information shared in a CDP packet about a Cisco device includes the following:
- Name of the device configured with the hostname command
- IOS software version
- Hardware capabilities, such as routing, switching, and/or bridging
- Hardware platform, such as 2600, 2950, or 1900
- The layer-3 address(es) of the device
- The interface the CDP update was generated on
CDP allows devices to share basic configuration information without even configuring any protocol specific information and is enabled by default on all interfaces. CDP is a Datalink Protocol occurring at Layer 2 of the OSI model. CDP is not routable and can only go over to directly connected devices.
CDP is enabled, by default, on all Cisco devices. CDP updates are generated as multicasts every 60 seconds with a hold-down period of 180 seconds for a missing neighbor.
|#cdp run||This command enables cdp globally|
|#no cdp run||turns off CDP for entire router (global config)|
|#no cdp enable||turns off CDP on specific interface|
|#sh cdp neighbor||shows directly connected neighbors|
|#sh cdp int||shows which interfaces are running CDP|
|#sh cdp int eth 0/0||show CDP info for specific interface|
|#sh cdp entry <cdp neighbor here>||shows CDP neighbor detail|
|#cdp timer 120||change how often CDP info is sent (default cdp timer is 60)|
|#cdp holdtime 240||how long to wait before removing a CDP neighbor (default CDP holdtime is 180)|
|#sh cdp run||shows if CDP turned on|