The Cisco Discovery Protocol (CDP) is used to obtain information from routers and switches that are connected locally. The CDP is a Cisco proprietary protocol, for neighbor discovery and is independent of the media and the routing protocol. Although the CDP will only display information about directly connected neighbors, this is a very useful tool.
The CDP Protocol is a Layer 2 protocol that connects lower physical media with the network protocols of the upper layers.
The command show cdp neighbors include the following information:
• Device ID
• Local interface
• Timeout
• Capacity
• Platform
• Port ID
The following data is added in the CDPv2:
• Administration of VTP domain name
• Native VLAN
• Full or half-duplex
For the names and types of neighboring routers platform, name and version of Cisco IOS image:
Show cdp neighbors
For details of neighboring routers in more detail:
Show cdp neighbors detail
For CDP traffic that occurs in the router.
Router # show cdp traffic
There are two ways to disable CDP on an interface one is specific and the other in general.
From an interface:
Router # configure terminal
Router (config) # [interface number]
Router (config-if) # no cdp enable
To disable CDP on the router:
Router (config) # no cdp run
To enable CDP on the router:
Router (config) # cdp run
Show cdp interface
Displays the status of all interfaces that have CDP enabled.
To reset counters:
Router # clear cdp counters
To clear the information contained in the neighbor table:
Router # clear cdp table
The following commands can be used to display the version, upgrade information, tables and traffic:
• show cdp traffic
• show debugging
• Adjacency cdp debug
• debug cdp events
• debug cdp ip
• debug cdp packets
• cdp timer
• cdp holdtime
• show cdp
Example of a Show cdp neighbors
Router # show cdp neighbors
Capability Codes: R-Router, T-Trans Bridge, B-Sours
Route Bridge S-Switch, H-Host, I-IGMP, r-Repeater
Local DeviceID Interfce Holdtme Capablyt Platform Port ID
Router3 Ser0 / Ser0 1150 R 2600 / 1
Router4 Ser0 / 0142 R 4500 SER1 / 0
Switch FastEt0 / 0120 S 2950 Fast0 / 5