Cisco Discovery Protocol (CDP)

Cisco Discovery Protocol (CDP) is a proprietary protocol developed by Cisco that provides a quick and easy way to find out about neighboring Cisco devices on your network. Enabled by default, CDP provides a variety of information on neighboring Cisco routers and switches. CDP messages use the Ethernet SNAP frame type.

To view information about neighboring Cisco devices, use the show cdp neighbors command.

cisco2501#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
accra Eth 0 146 R 2500 Eth 0

The information provided shows that our Cisco 2501 has received CDP announcements from one other piece of equipment – in this case, another Cisco 2500 router. Notice the capability codes listed first. These provide you with an overview of the different types of equipment that can be found via CDP – R designates a router, S a switch, and so forth. These codes are then associated with the devices found, under the Capability header.
Obviously a variety of information is provided by the show CDP neighbors command, but what does it all mean? Each section is looked at below.

  • Device ID. The hostname of the neighboring device.
  • Local Interface. The interface on which this router received information about the neighboring device.
  • Holdtime. The amount of time the router will store this information before dropping it from memory, if additional CDP packets are not received.
  • Capability. The type of device that announced itself using CDP.
  • Platform. The hardware platform of the neighboring equipment.
  • Port ID. The port from which the CDP packet was sent on the neighboring device.

To obtain more detailed information on any CDP neighboring device, use the show cdp neighbor detail command.

cisco2501#show cdp neighbor detail
Device ID: accra
Entry address(es):
IP address:
Novell address: 101A.0060.5cc4.f41b
Platform: cisco 2500, Capabilities: Router
Interface: Ethernet0, Port ID (outgoing port): Ethernet0
Holdtime : 178 sec

Version :
Cisco Internetwork Operating System Software
IOS ™ 2500 Software (C2500-D-L), Version 12.0(5), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1999 by cisco Systems, Inc.
Compiled Tue 15-Jun-99 20:08 by phanguye

This command provides six primary pieces of information about neighboring devices including its hostname, logical addresses (CDP will provide one logical address per protocol), platform, connected interface, CDP holdtime, and IOS version. If you’re looking for a simple way to determine an IP or IPX address of a neighboring device, this command is also the way to go.

By default, CDP packets are sent out every 60 seconds. The default holdtime is set to 180 seconds – again, this is the length of time that the device will hold information provided by CDP if an update is not received.

To view the CDP holddown and timer values currently configured on your router, use the show cdp command.

cisco2501#show cdp
Global CDP information:
Sending CDP packets every 60 seconds
Sending a holdtime value of 180 seconds

To reconfigure either value, use the cdp timer and cdp holdtime commands, as shown below. We’ll set the holdtime on the router to 200 seconds, and the timer value to 70 seconds. Remember that in order to change just about any setting, you will need to be in global configuration mode.

cisco2501#config t
Enter configuration commands, one per line. End with CNTL/Z.
cisco2501(config)#cdp holdtime 200
cisco2501(config)#cdp timer 70

In some cases, you may not want CDP enabled on a given interface. To turn it off for a single interface, access the interface’s configuration and issue the no cdp enable command.

cisco2501(config)#int e0
cisco2501(config-if)#no cdp enable

In the example above, I disabled CDP, but only on interface Ethernet 0. If you change your mind and want to re-enable CDP on an interface, use the cdp enable command. To globally enable or disable CDP, use the cdp run or no cdp run commands respectively from global configuration mode.

cisco2501(config)#cdp run
cisco2501(config)#no cdp run

To view the CDP properties of all interfaces on your router, use the show cdp interface command.

cisco2501#show cdp interface
Ethernet0 is up, line protocol is up
Encapsulation ARPA
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Serial0 is down, line protocol is down
Encapsulation HDLC
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Serial1 is down, line protocol is down
Encapsulation HDLC
Sending CDP packets every 60 seconds
Holdtime is 180 seconds

Author: Dan DiNicolo

Dan DiNicolo is a freelance author, consultant, trainer, and the managing editor of He is the author of the CCNA Study Guide found on this site, as well as many books including the PC Magazine titles Windows XP Security Solutions and Windows Vista Security Solutions. Click here to contact Dan.