- Preface
- Using the Command-Line Interface
- Configuring Cisco IOS Configuration Engine
- Configuring the Cisco Discovery Protocol
- Configuring Simple Network Management Protocol
- Configuring Cache Services Using the Web Cache Communication Protocol
- Configuring Service Level Agreements
- Configuring SPAN and RSPAN
- Configuring Wireshark
- Index
Configuring the Cisco Discovery Protocol
- Finding Feature Information
- Information About CDP
- How to Configure CDP
- Monitoring and Maintaining CDP
- Additional References
- Feature History and Information for Cisco Discovery Protocol
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
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 not required.
Information About CDP
CDP Overview
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.
Feature | Default Setting |
---|---|
CDP global state | Enabled |
CDP interface state | Enabled |
CDP timer (packet update frequency) | 60 seconds |
CDP holdtime (before discarding) | 180 seconds |
CDP Version-2 advertisements | Enabled |
How to Configure CDP
Configuring CDP Characteristics
Note | 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.
DETAILED STEPS
Example
The following example shows how to configure CDP characteristics:
Switch# configure terminal Switch(config)# cdp timer 50 Switch(config)# cdp holdtime 120 Switch(config)# cdp advertise-v2 Switch(config)# end
Use the no form of the CDP commands to return to the default settings.
Disabling CDP
CDP is enabled by default.
Note | Switch clusters and other Cisco devices (such as Cisco IP Phones) regularly exchange CDP messages. Disabling CDP can interrupt cluster discovery and device connectivity. |
Beginning in privileged EXEC mode, follow these steps to disable the CDP device discovery capability.
DETAILED STEPS
Command or Action | Purpose |
---|
You must reenable CDP to use it.
Enabling CDP
CDP is enabled by default.
Note | Switch clusters and other Cisco devices (such as Cisco IP Phones) regularly exchange CDP messages. Disabling CDP can interrupt cluster discovery and device connectivity. |
Beginning in privileged EXEC mode, follow these steps to enable CDP when it has been disabled.
CDP must be disabled, or it cannot be enabled.
DETAILED STEPS
Command or Action | Purpose |
---|
Example
The following example shows how to enable CDP if it has been disabled:
Switch# configure terminal Switch(config)# cdp run Switch(config)# end
Use the show run all command to show that CDP has been enabled. If you enter only show run, the enabling of CDP may not be displayed.
Disabling CDP on an Interface
CDP is enabled by default on all supported interfaces to send and to receive CDP information.
Note | Switch clusters and other Cisco devices (such as Cisco IP Phones) regularly exchange CDP messages. Disabling CDP can interrupt cluster discovery and device connectivity. |
Beginning in privileged EXEC mode, follow these steps to disable CDP on a port.
DETAILED STEPS
Enabling CDP on an Interface
CDP is enabled by default on all supported interfaces to send and to receive CDP information.
Note | Switch clusters and other Cisco devices (such as Cisco IP Phones) regularly exchange CDP messages. Disabling CDP can interrupt cluster discovery and device connectivity. |
Beginning in privileged EXEC mode, follow these steps to enable CDP on a port on which it has been disabled.
CDP must be disabled on the port that you are trying to CDP enable on, or it cannot be enabled.
DETAILED STEPS
Example
The following example shows how to enable CDP on a disabled port:
Switch# configure terminal Switch(config)# interface gigabitethernet1/0/1 Switch(config-if)# cdp enable Switch(config-if)# end
Monitoring and Maintaining CDP
Command | Description |
---|---|
show cdp |
Displays global information, such as frequency of transmissions and the holdtime for packets being sent. |
show cdp entry entry-name [version] [protocol] |
Displays information about a specific neighbor. You can enter an asterisk (*) to display all CDP neighbors, or you can enter the name of the neighbor about which you want information. You can also limit the display to information about the protocols enabled on the specified neighbor or information about the version of software running on the device. |
show cdp interface [interface-id] |
Displays information about interfaces where CDP is enabled. You can limit the display to the interface about which you want information. |
show cdp neighbors [interface-id] [detail] |
Displays information about neighbors, including device type, interface type and number, holdtime settings, capabilities, platform, and port ID. You can limit the display to neighbors of a specific interface or expand the display to provide more detailed information. |
show cdp traffic |
Displays CDP counters, including the number of packets sent and received and checksum errors. |
Additional References
Related Documents
Related Topic | Document Title |
---|---|
System Management Commands |
Configuration Fundamentals Command Reference, Cisco IOS XE Release 3S (Catalyst 3850 Switches) |
Error Message Decoder
Description | Link |
---|---|
To help you research and resolve system error messages in this release, use the Error Message Decoder tool. |
https://www.cisco.com/cgi-bin/Support/Errordecoder/index.cgi |
MIBs
MIB | MIBs Link |
---|---|
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: |
Technical Assistance
Description | Link |
---|---|
The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies. To receive 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) Feeds. Access to most tools on the Cisco Support website requires a Cisco.com user ID and password. |
Feature History and Information for Cisco Discovery Protocol
Release |
Modification |
---|---|
Cisco IOS XE 3.2SE |
This feature was introduced. |