|
|
This chapter describes how the Cisco Discovery Protocol (CDP) works with SNMP to identify other devices in your network..
For a complete description of the router monitoring commands mentioned in this chapter, refer to the "CDP Commands" chapter in the "System Management" part of the Release 12.1 Cisco IOS Configuration Fundamentals Command Reference. To locate documentation of other commands that appear in this chapter, use the command reference master index or search online.
Cisco Discovery Protocol (CDP) is primarily used to obtain protocol addresses of neighboring devices and discover the platform of those devices. CDP can also be used to show information about the interfaces your router uses. CDP is media- and protocol-independent, and runs on all Cisco-manufactured equipment including routers, bridges, access servers, and switches.
Use of SNMP with the CDP Management Information Base (MIB) allows network management applications to learn the device type and the SNMP agent address of neighboring devices, and to send SNMP queries to those devices. Cisco Discovery Protocol uses the CISCO-CDP-MIB.
CDP runs on all media that support Subnetwork Access Protocol (SNAP), including local-area network (LAN), Frame Relay, and Asynchronous Transfer Mode (ATM) physical media. CDP runs over the data link layer only. Therefore, two systems that support different network-layer protocols can learn about each other.
Each device configured for CDP sends periodic messages, known as advertisements, to a multicast address. Each device advertises at least one address at which it can receive SNMP messages. The advertisements also contain time-to-live, or holdtime, information, which indicates the length of time a receiving device should hold CDP information before discarding it. Each device also listens to the periodic CDP messages sent by others in order to learn about neighboring devices and determine when their interfaces to the media go up or down.
CDP Version-2 (CDPv2) is the most recent release of the protocol and provides more intelligent device tracking features. These features include a reporting mechanism which allows for more rapid error tracking, thereby reducing costly downtime. Reported error messages can be sent to the console or to a logging server, and cover instances of unmatching native VLAN IDs (IEEE 802.1Q) on connecting ports, and unmatching port duplex states between connecting devices. See the Cisco IOS Software System Error Messages document for detailed examples of CDP error messages.
CDPv2 show commands can provide detailed output on VLAN Trunking Protocol (VTP) management domain and duplex modes of neighbor devices, CDP-related counters, and VLAN IDs of connecting ports.
Type Length Values (TLVs) are blocks of information embedded in CDP advertisements. Table 18 summarizes TLVs.
| TLV | Definition |
|---|---|
Device-ID TLV | Identifies the device name in the form of a character string. |
Address TLV | Contains a list of network addresses of both receiving and transmitting devices. |
Port-ID TLV | Identifies the port on which the CDP packet is sent. |
Capabilities TLV | Describes the device's functional capability in the form of a device type, for example, a switch. |
Version TLV | Contains information about the software release version on which the device is running. |
Platform TLV | Describes the hardware platform name of the device, for example, Cisco 4500. |
IP Network Prefix TLV | Contains a list of network prefixes to which the sending device can forward IP packets. This information is in the form of the interface protocol and port number, for example, Eth 1/0. |
VTP Management Domain TLV | Advertises a system's configured VTP management domain name-string. Used by network operators to verify VTP domain configuration in adjacent network nodes. |
Native VLAN TLV | Indicates, per interface, the assumed VLAN for untagged packets on the interface. CDP learns the native VLAN for an interface. This feature is implemented only for interfaces that support the IEEE 802.1Q protocol. |
Full/half Duplex TLV | Indicates status (duplex configuration) of CDP broadcast interface. Used by network operators to diagnose connectivity problems between adjacent network elements. |
To configure CDP, perform the tasks in the following sections:
![]() |
Note The cdp enable, cdp timer, and cdp run commands affect the operation of the IP on demand routing feature (that is, the router odr global configuration command). For more information on the router odr command, see the "On-Demand Routing Commands" chapter in the Cisco IOS IP and IP Routing Command Reference. |
To set the frequency of CDP transmissions and the hold time for CDP packets, use the following commands in global configuration mode:
| Command | Purpose | |
|---|---|---|
Step 1 | cdp timer seconds | Specifies frequency of transmission of CDP updates. |
Step 2 | cdp holdtime seconds | Specifies the amount of time a receiving device should hold the information sent by your device before discarding it. |
CDP is enabled on Cisco routers by default. If you prefer not to use the CDP device discovery capability, you can disable it with the no cdp run command.
To reenable CDP after disabling it, use the following command in global configuration mode:
| Command | Purpose |
|---|---|
cdp run | Enable CDP. |
The broadcasting of CDPv2 advertisements is enabled on Cisco routers by default. You can disable CDPv2 advertisements with the no cdp advertise-v2 command.
To reenable CDPv2 advertisements, use the following command in global configuration mode:
| Command | Purpose |
|---|---|
cdp advertise-v2 | Enables CDP Version-2 advertising functionality on a device. |
CDP is enabled by default on all supported interfaces (except for Frame Relay multipoint subinterfaces) to send and receive CDP information. However, some interfaces, such as ATM interfaces, do not support CDP.
You can disable CDP on an interface which supports CDP with the no cdp enable command.
To reenable CDP on an interface after disabling it, use the following command in interface configuration mode:
| Command | Purpose |
|---|---|
cdp enable | Enables CDP on an interface. |
To monitor and maintain CDP on your device, use one or more of the following commands in privileged EXEC mode:
| Command | Purpose |
|---|---|
clear cdp counters | Resets the traffic counters to zero. |
clear cdp table | Deletes the CDP table of information about neighbors. |
show cdp | Displays the interval between transmissions of CDP advertisements, the number of seconds the CDP advertisement is valid for a given port, and the version of the advertisement. |
show cdp entry entry-name [protocol | version] | Displays information about a specific neighbor. Display can be limited to protocol or version information. |
show cdp interface [type number] | Displays information about interfaces on which CDP is enabled. |
show cdp neighbors [type number] [detail] | Displays the type of device that has been discovered, the name of the device, the number and type of the local interface (port), the number of seconds the CDP advertisement is valid for the port, the device type, the device product number, and the port ID. Issuing the detail keyword displays information on the native VLAN ID, the duplex mode, and the VTP domain name associated with neighbor devices. |
show cdp traffic | Displays CDP counters, including the number of packets sent and received and checksum errors. |
show debugging | Displays information about the types of debugging that are enabled for your router. See the Cisco IOS Debug Command Reference for more information about CDP debug commands. |
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Fri Aug 18 09:17:04 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.