- Finding Feature Information
- Prerequisites for Using Cisco Discovery Protocol
- Restrictions for Using Cisco Discovery Protocol
- Information About Using Cisco Discovery Protocol
- How to Use Cisco Discovery Protocol
- Disabling and Enabling Cisco Discovery Protocol on a Supported Device
- Disabling and Enabling Cisco Discovery Protocol on a Supported Interface
- Setting the Transmission Timer and Hold Time for Cisco Discovery Protocol Packets
- Disabling and Reenabling Broadcast of Cisco Discovery Protocol Version 2 Advertisements
- Enabling Location TLV
- Configuring Location Support on Cisco Discovery Protocol
- Monitoring and Maintaining Cisco Discovery Protocol
- Configuration Examples for Using Cisco Discovery Protocol
- Additional References
- Feature Information for Configuring Cisco Discovery Protocol
Using Cisco Discovery Protocol
Cisco Discovery Protocol (formerly known as CDP) is a Layer 2 media-independent and network-independent protocol that runs on Cisco devices. Cisco Discovery Protocol enables networking applications to learn about nearby and directly connected devices. Cisco Discovery Protocol facilitates the management of Cisco devices by discovering devices, determining their configuration, and allowing systems using different network-layer protocols to learn about one another.
This module describes Cisco Discovery Protocol and how it functions with Simple Network Management Protocol (SNMP).
- Finding Feature Information
- Prerequisites for Using Cisco Discovery Protocol
- Restrictions for Using Cisco Discovery Protocol
- Information About Using Cisco Discovery Protocol
- How to Use Cisco Discovery Protocol
- Configuration Examples for Using Cisco Discovery Protocol
- Additional References
- Feature Information for Configuring Cisco Discovery Protocol
Finding Feature Information
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 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 document.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Prerequisites for Using Cisco Discovery Protocol
- Interfaces must support Subnetwork Access Protocol (SNAP) headers.
Restrictions for Using Cisco Discovery Protocol
Information About Using Cisco Discovery Protocol
- VLAN Trunking Protocol
- Type, Length, Values
- Cisco Discovery Protocol
- Benefits of Cisco Discovery Protocol
VLAN Trunking Protocol
VLAN Trunking Protocol (VTP) is a discovery technique used by switches. A switch advertises its management domain, configuration revision number, VLANs, and their specific parameters on its trunk ports. A VTP domain is made up of a single device or interconnected devices that share the same VTP domain name. A switch can belong to only one VTP domain.
Type, Length, Values
Type, length, values (TLVs) fields are blocks of information embedded in Cisco Discovery Protocol advertisements. Information in advertisements varies. The TLV frame format allows extension of advertisements when required. The table below summarizes the TLV field definitions.
Table 1 | Type, Length, Values Field Definitions for Cisco Discovery Protocol |
Cisco Discovery Protocol
Cisco Discovery Protocol (formerly known as CDP) is a Layer 2 media-independent, network-independent protocol. The networking devices use Cisco Discovery Protocol to learn about the nearby, and directly connected devices. Cisco Discovery Protocol is enabled by default in all Cisco devices except in Cisco ASR 1000 Series Aggregation Services Router. Each device that supports Cisco Discovery Protocol advertises at least one address at which it can receive announcements from neighbors. The device also sends periodic announcements (messages) to the multicast address 01:00:0C:CC:CC:CC. Devices discover each other by listening to the address specified to receive announcements. By listening to announcements, the devices also learn the interface status (up or down) of other devices.
Each device that supports Cisco Discovery Protocol stores the received announcements in a table. The information in the Cisco Discovery Protocol table is refreshed each time an announcement is received. By default, the Cisco Discovery Protocol announcements are sent every 60 seconds on the interfaces that support Subnetwork Access Protocol (SNAP) headers. The Cisco Discovery Protocol announcements contain the time-to-live information or the hold time, which specifies the lifetime of an entry in the Cisco Discovery Protocol table. The Cisco Discovery Protocol table information is refreshed each time an announcement is received, and the hold time for that entry is reinitialized. If no announcements are received from a device for a period in excess of the hold time, the device information is discarded. By default, the hold time is 180 seconds.
The information contained in Cisco Discovery Protocol announcements depends on the device type and the version of the operating system running on it. The following are examples of the types of information that can be contained in Cisco Discovery Protocol announcements:
- Cisco IOS XE version running on a Cisco device
- Duplex setting
- Hardware platform of the device
- Hostname
- IP addresses of the interfaces on devices
- Interfaces active on a Cisco device, including encapsulation type
- Locally connected devices advertising Cisco Discovery Protocol
- Native VLAN
- VTP domain
Cisco Discovery Protocol Version 2 provides more intelligent device tracking features than Version 1. Version 2 of the protocol supports an enhanced reporting mechanism for more rapid error tracking, which helps to reduce network downtime. Errors reported include mismatched native VLAN IDs (IEEE 802.1Q) on connected ports and mismatched port duplex states between connected devices. Messages about reported errors can be sent to the console or to a logging server.
The show cdp command can provide detailed output on VLAN Trunking Protocol (VTP) management domains and duplex modes of neighboring devices, counters related to Cisco Discovery Protocol, and VLAN IDs of connecting ports.
- Cisco Discovery Protocol and SNMP
- Cisco Discovery Protocol and On-Demand Routing Support for ATM PVCs
- Cisco Discovery Protocol Support in IPv6
- Cisco Discovery Protocol Enhancements for Location Support
Cisco Discovery Protocol and SNMP
Using Cisco Discovery Protocol with SNMP allows network management applications to learn the device type and the SNMP agent address of neighboring devices and to send SNMP queries to the devices.
The SNMP management application learns the protocol addresses and types of neighboring devices by retrieving Cisco Discovery Protocol tables from SNMP agents in those devices. When enabled, the network management module (NMM) SNMP agent discovers neighboring devices and builds a local cache with device information. A management workstation can retrieve the local cache by sending SNMP requests to access the CISCO-CDP-MIB.
Cisco Discovery Protocol and On-Demand Routing Support for ATM PVCs
Cisco Discovery Protocol and On-Demand Routing (ODR) support is available for ATM point-to-point permanent virtual circuits (PVCs). ODR uses Cisco Discovery Protocol to propagate IP address information in hub-and-spoke topologies. When ODR is enabled, spoke routers automatically advertise their subnets using Cisco Discovery Protocol.
Cisco Discovery Protocol is disabled by default on ATM PVC interfaces. To enable Cisco Discovery Protocol, use the cdp run command in global configuration mode and the cdp enable command in interface configuration mode on both ends of the PVC.
To enable ODR, use the router odr command in global configuration mode on the hub router and turn off all dynamic routing protocols in the spoke routers.
Cisco Discovery Protocol Support in IPv6
Cisco Discovery Protocol in IPv6 functions the same as IPv4 and offers the same benefits as in IPv4. IPv6 enhancements allow Cisco Discovery Protocol to exchange IPv6 and neighbor addressing information, provide IPv6 information to network management products, and provide troubleshooting tools.
Cisco Discovery Protocol Enhancements for Location Support
The CDP Medianet Support feature allows Cisco Discovery Protocol to identify the endpoint devices and provides the ability to exchange the medianet location information between the endpoint and switch. Location information can be provisioned statically by the user on the platform, can be received through updates from the location server, or can be received from the endpoint itself through Cisco Discovery Protocol.
The Propagation of Location Information over CDP feature ensures location information to be transmitted from wired switches to the attached end devices.
Cisco Discovery Protocol allows only one wired switch to report the location information by identifying and indicating the location of neighbor ports, thereby ensuring that there is no duplicate location information of the same device.
When you configure Cisco Discovery Protocol location information on a per-port basis, remote devices can send medianet location information to the switch.
Benefits of Cisco Discovery Protocol
How to Use Cisco Discovery Protocol
- Disabling and Enabling Cisco Discovery Protocol on a Supported Device
- Disabling and Enabling Cisco Discovery Protocol on a Supported Interface
- Setting the Transmission Timer and Hold Time for Cisco Discovery Protocol Packets
- Disabling and Reenabling Broadcast of Cisco Discovery Protocol Version 2 Advertisements
- Enabling Location TLV
- Configuring Location Support on Cisco Discovery Protocol
- Monitoring and Maintaining Cisco Discovery Protocol
Disabling and Enabling Cisco Discovery Protocol on a Supported Device
DETAILED STEPS
Disabling and Enabling Cisco Discovery Protocol on a Supported Interface
Note |
If the encapsulation for an interface is changed, Cisco Discovery Protocol is enabled back on that interface, even if Cisco Discovery Protocol was previously disabled. For example, when interface encapsulation changes from Point-to-Point (PPP) to High-Level Data Link Control (HDLC), Cisco Discovery Protocol becomes active even if it is explicitly disabled with the no cdp run command on that interface. This behavior is by design. The encapsulation changes the Layer 2 protocol configured for that interface and resets the interface configuration to its default Cisco Discovery Protocol state of enabled, assuming Cisco Discovery Protocol is enabled globally on the device. |
DETAILED STEPS
Setting the Transmission Timer and Hold Time for Cisco Discovery Protocol Packets
DETAILED STEPS
Disabling and Reenabling Broadcast of Cisco Discovery Protocol Version 2 Advertisements
DETAILED STEPS
Enabling Location TLV
Note |
When you configure location information from various modules, you can use the location prefer command to configure the priority. |
DETAILED STEPS
Configuring Location Support on Cisco Discovery Protocol
Perform this task to configure location support on Cisco Discovery Protocol.
You must configure the location TLV before configuring location support on Cisco Discovery Protocol.
DETAILED STEPS
Monitoring and Maintaining Cisco Discovery Protocol
To monitor and maintain Cisco Discovery Protocol on your device, perform the following steps.
DETAILED STEPS
Configuration Examples for Using Cisco Discovery Protocol
- Example: Disabling and Enabling Cisco Discovery Protocol on a Supported Interface
- Example: Setting the Transmission Timer and Hold Time for Cisco Discovery Protocol Packets
- Example: Monitoring and Maintaining Cisco Discovery Protocol
Example: Disabling and Enabling Cisco Discovery Protocol on a Supported Interface
The following examples show that when the encapsulation for an interface is changed, Cisco Discovery Protocol is reenabled on the interface, even if Cisco Discovery Protocol was previously disabled.
The following example shows that Cisco Discovery Protocol is disabled for an interface with encapsulation PPP:
interface fastethernet 3/0/0.1 no ip address encapsulation ppp shutdown no cdp enable <<<<<<<<<<CDP Disabled end
The following example shows that the encapsulation for the interface is changed from PPP to HDLC:
Device# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Device(config)# interface pos 3/0/0.1 Device(config-if)# encapsulation hdlc <<<<<<<<<<Encapsulation changed from ppp to hdlc. Device(config-if)# do show running interface fastethernet 3/0/0.1 Current configuration : 49 bytes !
The following example shows that Cisco Discovery Protocol is enabled after the encapsulation for the interface is changed:
interface fastethernet 3/0 no ip address shutdown <<<<<<<<<<<<CDP is now back on. You don't see it here previously disabled. end
Example: Setting the Transmission Timer and Hold Time for Cisco Discovery Protocol Packets
In the following example, the timer is set to send updates every 30 seconds and a show cdp interface command is issued to show that the update is effective:
Device# configure terminal Device(config)# cdp timer 30 Device(config)# end Device# show cdp interface gi0/0/0 GigabitEthernet0/0/0 is up, line protocol is up Encapsulation ARPA Sending CDP packets every 30 seconds Holdtime is 120 seconds Device#
In the following example, the hold time is set to 90 seconds and a show cdp interface command is issued to show that the update is effective:
Device# configure terminal Device(config)# cdp holdtime 90 Device(config)# end Device# show cdp interface gi0/0/0 GigabitEthernet0/0/0 is up, line protocol is up Encapsulation ARPA Sending CDP packets every 30 seconds Holdtime is 90 seconds
Example: Monitoring and Maintaining Cisco Discovery Protocol
The following example shows a typical series of commands you can issue to display Cisco Discovery Protocol information:
Device# show cdp Global CDP information: Sending CDP packets every 60 seconds Sending a holdtime value of 180 seconds Sending CDPv2 advertisements is enabled Device# show cdp neighbors Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater Device ID Local Intrfce Holdtme Capability Platform Port ID C2950-1 Fas 0/0 148 S I WS-C2950T-Fas 0/15 RX-SWV.cisco.com Fas 0/1 167 T S WS-C3524-XFas 0/13 Device# show cdp neighbors detail ------------------------- Device ID: C2950-1 Entry address(es): Platform: Cisco WS-C2950T-24, Capabilities: Switch IGMP Interface: FastEthernet0/0, Port ID (outgoing port): FastEthernet0/15 Holdtime : 139 sec Version : Cisco IOS XE C2950 Software (C2950-I6Q4L2-M), Version 12.1(9)EA1, RELEASE SOFTWARE . . . Device# show cdp traffic CDP counters : Total packets output: 81684, Input: 81790 Hdr syntax: 0, Chksum error: 0, Encaps failed: 0 No memory: 0, Invalid packet: 0, Fragmented: 0 CDP version 1 advertisements output: 0, Input: 0 CDP version 2 advertisements output: 81684, Input: 81790
Additional References
Related Documents
Related Topic |
Document Title |
---|---|
Cisco IOS commands |
|
Cisco IOS XE Cisco Discovery Protocol commands |
|
Debugging commands |
|
Configuring SNMP support |
Configuring SNMP Support |
Configuring On-Demand Routing |
Configuring On-Demand Routing |
Standards
Standard |
Title |
---|---|
IEEE 802.1Q |
Virtual LANS |
MIBs
MIB |
MIBs Link |
---|---|
To locate and download MIBs for selected platforms, Cisco software releases, and feature sets, use Cisco MIB Locator found at the following URL: |
Technical Assistance
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
Feature Information for Configuring Cisco Discovery Protocol
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Table 2 | Feature Information for Configuring Cisco Discovery Protocol |
Feature Name |
Releases |
Feature Information |
---|---|---|
Configuring Cisco Discovery Protocol |
Cisco IOS XE Release 2.1 |
Cisco Discovery Protocol is a Layer 2, media-independent and network-independent protocol that runs on Cisco devices and enables networking applications to learn about nearby, directly connected devices. In Cisco IOS XE Release 2.1, this feature was introduced on Cisco ASR 1000 Series Aggregation Services Router . |
Duplication Location Reporting Issue |
Cisco IOS XE Release 3.2.0SG |
The Duplication Location Reporting Issue feature allows only one wired switch to report the location information. |
Propagation of Location Information over Cisco Discovery Protocol |
Cisco IOS XE Release 3.2.0SG |
The Propagation of Location Information over Cisco Discovery Protocol ensures that location information is transmitted from wired switches over Cisco Discovery Protocol to the attached end devices. The following commands were introduced or modified: cdp tlv, debug cdp events, show cdp tlv. |
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.