Professional Documents
Culture Documents
Cisco Discovery Protocol (CDP) is a proprietary protocol designed by Cisco to help in nding information about
neighboring devices. Devices connected to each other exchange CDP packets to learn about each other. This can be
useful in troubleshooting and documenting the network.
CDP is enabled on all interfaces of all Cisco routers and switches. You can disable CDP globally using the no cdp run
command in the global con guration mode. It can be enabled again using the cdp run command. CDP can be disabled
on an interface using the no cdp enable command in the interface con guration mode.
Each device running CDP sends out a packet every 60 seconds to its neighbors. The timers associated with CDP on a
device can be seen using the show cdp command in the privilege exec mode as shown below: Cisco CCNA 200-120
Standard Kit
$499.99
myRouter#show cdp
Global CDP information:
Sending CDP packets every 60 seconds
Sending a holdtime value of 180 seconds
Sending CDPv2 advertisements is enabled
http://www.freeccnastudyguide.com/studyguides/ccna/ch3/39ciscodiscoveryprotocolcdp/ 1/7
30/3/2017 39CiscoDiscoveryProtocol(CDP)FreeCCNAStudyGuide
In the above output you can see that CDP is sending packets every 60 seconds. Each neighbor will keep the information
contained in a packet for 180 seconds. The timers can be changed using the cdp timer command and the cdp holdtime
command in the global con guration mode as shown below:
myRouter(con g)#cdp ?
advertise-v2 CDP sends version-2 advertisements
holdtime Specify the holdtime (in sec) to be sent in packets
log Log messages generated by CDP
Cisco CCNA 200-120
run Enable CDP
Premium Kit
source-interface Insert the interfaces IP in all CDP packets
799.99
timer Specify rate (in sec) at which CDP packets are sent
As mentioned, earlier CDP can be used to troubleshoot as well as document a network. When you need information
regarding devices directly connected to a device, you can check the neighbors learned by CDP using the show cdp
neighbor command. An example is shown below:
http://www.freeccnastudyguide.com/studyguides/ccna/ch3/39ciscodiscoveryprotocolcdp/ 2/7
30/3/2017 39CiscoDiscoveryProtocol(CDP)FreeCCNAStudyGuide
The output shows that myRouter is directly connect to a device named Switch3. Each column in the output gives
information regarding Switch3. Each column is explained below:
DeviceID This column gives the hostname of the directly connected device. In this case, the router is directly
connected only to a single device named Switch3.
Local Intrface This column shows the local interface of the device that is connected to the remote device. In
this case, fa0/0 interface of myRouter is connected to Switch3
Holdtme This column shows the amount of time in seconds, that the local device will keep the information
about the remote device, if no further packets are received from it. In this example, if Switch3 does not send any
more CDP packets before 172 seconds, it will be removed from the neighbor table of myRouter. The remote
device advertises the holdtime.
Capability This column shows the capabilities of the remote device. The meaning of each letter in that column
is shown at the beginning of the output. In this example, Switch3 is shown as a Switch and has IGMP enabled on
it.
Platform This column shows the device model of the remote device. In this output you can see that Switch3 is
a Cisco 2960 device.
Port ID This column shows the interface number of the remote device that connects to this device. In this
example, myRouter is connected to fa0/8 interface of Switch3.
The show cdp neighbor commands provides brief information on all directly connect device. A more detailed
information of a neighbor can be see using the show cdp neighbors detail command as shown below:
http://www.freeccnastudyguide.com/studyguides/ccna/ch3/39ciscodiscoveryprotocolcdp/ 3/7
30/3/2017 39CiscoDiscoveryProtocol(CDP)FreeCCNAStudyGuide
Version :
Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(50)SE4, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2010 by Cisco Systems, Inc.
Compiled Fri 26-Mar-10 09:14 by prod_rel_team
advertisement version: 2
Protocol Hello: OUI=0x00000C, Protocol ID=0x0112; payload len=27,
value=00000000FFFFFFFF010221FF000000000000000AB875A380FF0000
VTP Management Domain: test.com
Native VLAN: 26
Duplex: full
In the output above you will notice that apart from the information shown by the show cdp neighbor command, this
output shows the IOS version, VTP and VLAN information as well as the duplex of the connection to the remote device.
This output also shows the IP address of the remote device. This can be very useful if you want to connect to the remote
device for troubleshooting. At this stage do not worry about VLAN and VTP. They are covered in the next chapter.
The exact same output can also be seen using the show cdp entry * command. An example of the output is shown
below again:
http://www.freeccnastudyguide.com/studyguides/ccna/ch3/39ciscodiscoveryprotocolcdp/ 4/7
30/3/2017 39CiscoDiscoveryProtocol(CDP)FreeCCNAStudyGuide
Version :
Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(50)SE4, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2010 by Cisco Systems, Inc.
Compiled Fri 26-Mar-10 09:14 by prod_rel_team
advertisement version: 2
Protocol Hello: OUI=0x00000C, Protocol ID=0x0112; payload len=27,
value=00000000FFFFFFFF010221FF000000000000000AB875A380FF0000
VTP Management Domain: test.com
Native VLAN: 26
Duplex: full
While the output of both show cdp neighbors detail and show cdp entry * are the same, the latter gives you the option
to just see the layer 3 protocol information or just the IOS version information from the remote device as shown below:
http://www.freeccnastudyguide.com/studyguides/ccna/ch3/39ciscodiscoveryprotocolcdp/ 5/7
30/3/2017 39CiscoDiscoveryProtocol(CDP)FreeCCNAStudyGuide
In the above output, notice that show cdp entry * protocol gives only the IP address (layer 3 information) while show
cdp entry * version gives only the IOS version of directly connected devices.
CDP is a simple protocol that just works always. There will hardly be a need to troubleshoot CDP but in case you ever
need to do that, you can use the show cdp traf c and show cdp interface commands. The show cdp traf c command
displays information regarding the CDP packets sent and received. If CDP traf c is not being sent or received or if there
are errors, the output of this command will show that. An example of the output is shown below:
The show cdp interface command on the other hand will show CDP information related to each interface of the device.
This command will show you if CDP is enabled on an interface or not and what are the timers associated with each
interface. It will also show the status of the interface itself. An example of the output is given below:
One drawback of CDP is that it is a Cisco proprietary protocol and will not work if you have another vendors devices
connected to a Cisco device. In such cases, you can use the Link Layer Discovery Protocol (LLDP). LLDP is an open
standard protocol that does the same work as CDP but can be used between devices belonging to different vendors.
http://www.freeccnastudyguide.com/studyguides/ccna/ch3/39ciscodiscoveryprotocolcdp/ 6/7
30/3/2017 39CiscoDiscoveryProtocol(CDP)FreeCCNAStudyGuide
Not all Cisco devices currently support LLDP and it is not covered in CCNA, but you should know that it could be used in
place of CDP.
http://www.freeccnastudyguide.com/studyguides/ccna/ch3/39ciscodiscoveryprotocolcdp/ 7/7