Your software release
may not support all the features documented in this module. For the latest
feature information and caveats, see the release notes for your platform and
Use Cisco Feature
Navigator to find information about platform support and Cisco software image
support. To access Cisco Feature Navigator, go to
http://www.cisco.com/go/cfn. An account on Cisco.com is
Information About CDP
CDP is a device discovery protocol that runs over Layer 2 (the data-link layer) on all Cisco-manufactured devices (routers, bridges, access servers, controllers, and switches) and allows network management applications to discover Cisco devices that are neighbors of already known devices. With CDP, network management applications can learn the device type and the Simple Network Management Protocol (SNMP) agent address of neighboring devices running lower-layer, transparent protocols. This feature enables applications to send SNMP queries to neighboring devices.
CDP runs on all media that support Subnetwork Access Protocol (SNAP). Because CDP runs over the data-link layer only, two systems that support different network-layer protocols can learn about each other.
Each CDP-configured device sends periodic messages to a multicast address, advertising at least one address at which it can receive SNMP messages. The advertisements also contain time-to-live, or holdtime information, which is the length of time a receiving device holds CDP information before discarding it. Each device also listens to the messages sent by other devices to learn about neighboring devices.
On the switch, CDP enables Network Assistant to display a graphical view of the network. The switch uses CDP to find cluster candidates and maintain information about cluster members and other devices up to three cluster-enabled devices away from the command switch by default.
CDP and Stacks
A switch stack appears as a single switch in the network. Therefore, CDP discovers the switch stack, not the individual stack members. The switch stack sends CDP messages to neighboring network devices when there are changes to the switch stack membership, such as stack members being added or removed.
Default CDP Configuration
This table shows the default CDP configuration.
CDP global state
CDP interface state
CDP timer (packet update frequency)
CDP holdtime (before discarding)
CDP Version-2 advertisements
How to Configure CDP
Configuring CDP Characteristics
You can configure these CDP characteristics:
Frequency of CDP updates
Amount of time to hold the information before discarding it
Whether or not to send Version-2 advertisements
Steps 2 through 4 are all optional and can be performed in any order.
Beginning in privileged EXEC mode, follow these steps to configure these characteristics.
Command or Action
Switch# configure terminal
Enters the global configuration mode.
Switch(config)# cdp timer 20
(Optional) Sets the transmission frequency of CDP updates in seconds.
The range is 5 to 254; the default is 60 seconds.
Switch(config)# cdp holdtime 60
(Optional) Specifies the amount of time a receiving device should hold the information sent by your device before discarding it.
The range is 10 to 255 seconds; the default is 180 seconds.
Switch(config)# cdp advertise-v2
(Optional) Configures CDP to send Version-2 advertisements.
This is the default state.
Returns to privileged EXEC mode.
The following example shows how to configure CDP characteristics:
Support website provides extensive online resources, including documentation
and tools for troubleshooting and resolving technical issues with Cisco
products and technologies.
security and technical information about your products, you can subscribe to
various services, such as the Product Alert Tool (accessed from Field Notices),
the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS)
most tools on the Cisco Support website requires a Cisco.com user ID and