Introduction to the Cisco Discovery Protocol (CDP)

Introduction to Cisco Discovery Protocol

The Cisco Discovery Protocol (CDP) is a Cisco proprietary layer 2 protocol which is enabled on most of Cisco devices regardless of type. It enables the ability to survey which devices are connected to each of the active interfaces on a device; it is interface type agnostic. This article takes a look at how CDP works on Cisco devices and how it can be disabled if required on an interface or on the whole device.

As Cisco folks have known for a while, the CDP protocol can be a very useful tool, especially when working with new networks. The concept is very basic; on a configured update interval (default is 60 seconds) CDP will send out a multicast layer 2 frame with information to the device including the platform, OS version, interfaces, addresses, and capabilities among other pieces of information. This traffic is on layer 2 so it is not routed and is kept on the local network, which is very important from a security perspective. Once the CDP is populated with the information for a device it is kept for a specific hold time (default is 180 seconds). If the device is not heard from in that amount of time then the information is timed out of the CDP table.

Figure 1 shows an example of the information gathered by CDP.

Figure 1 – show cdp neighbors

One thing that can be seen from Figure 1 is that it is possible for Windows devices to also support CDP. In fact, some older Windows devices actually included support for CDP. Another very important company that includes support for CDP is VMware; all VMware network interfaces support CDP and will report capability information to neighbors.

It is also possible to take a peek at a more detailed look at the CDP table on a Cisco device by using the show cdp neighbors detail command; this is shown in Figure 2.

Figure 2 – show cdp neighbors detail

From this information the user can ascertain that the device R2 is a neighbor connected through R1’s F0/0 and is connected to R1 via its F0/0 interface. R1 is a 7206VXR router running IOS version 12.4(24)T. All of this information can be very useful when trying to figure out the topology of a network that is not easily able to be physical inspected.

While it is very helpful for CDP to be enabled by default, there are situations when the CDP protocol should not be used. Some of these situations include when equipment is connected to other devices outside the private network. In these situations it is typically best practice to not advertise the internal connectivity of the devices on a network. There are two different ways to disable CDP: disabling it on the whole device or disabling it per interface (or switchport). Follow the steps shown in Table 1 to disable CDP on the whole device:

Table 1 – Globally disabling CDP

1 Enter privileged EXEC mode router>enable
2 Enter device configuration mode router#configure terminal
3 Disable CDP on the device router(config)#no cdp run

It is also possible to leave CDP enabled on a device but disabling it on a specific interface, follow the steps shown in Table 2 to perform this:

Table 2 – Disabling CDP on an Interface

1 Enter privileged EXEC mode router>enable
2 Enter device configuration mode router#configure terminal
3 Enter interface configuration mode router(config)#interface interface
4 Disable CDP on the interface router(config-if)#no cdp enable


CDP has long been a very useful tool for Cisco engineers to use when using Cisco-only deployments; its now gaining wider spread use with Windows, Linux and VMware support available. When implementing or using CDP keep in mind its advantages and disadvantages and make sure they are both weighted as part of the decision making process. Hopefully the content of this article will enable a better understanding of CDP and what it offers to network and systems engineers.

 in Cisco


This site uses Akismet to reduce spam. Learn how your comment data is processed.