Cisco Discovery Protocol

Understanding How CDP Works

CDP is a media and protocol independent protocol that runs on all Cisco-manufactured equipment including routers, bridges, access and communication servers, and switches. Using CDP, you can view information about all the Cisco devices directly attached to the switch. In addition, CDP detects native VLAN and port duplex mismatches.

CDP can be disabled with the no cdp run command in global configuration mode (conf t).

Getting Neighbor Information

Because the router stores the CDP information in its cache memory, you can view it with a show command. It will only show information about directly connected devices since CDP packet aren't passed through the device.

Show CDP Neighbors Detail

The following is a sample output for one neighbor from the show cdp neighbors detail command. Additional detail is shown about neighbors, including network address, enabled protocols, and
software version.

The number of CDP advertisements transmitted by the local device. Note this value is the sum of the CDP Version-1 advertisements output and CDP Version-2 advertisements output
fields.

Input

The number of CDP advertisements received by the local device. Note this value is the sum of the CDP Version-1 advertisements input and CDP Version-2 advertisements input
fields.

Hdr syntax

The number of CDP advertisements with bad headers, received by the local device.

Chksum error

The number of times the checksum (verifying) operation failed on incoming CDP advertisements.

Encaps failed

The number of times CDP failed to transmit advertisements on an interface because of a failure caused by the local device's bridge port.

No memory

The number of times the local device did not have enough memory to store the CDP advertisements in the advertisement cache table when the device was attempting to assemble
advertisement packets for transmission and parse them when receiving them.

Invalid

The number of invalid CDP advertisements received and transmitted by the local device.

Fragmented

The number of times fragments or portions of a single CDP advertisement were received by the local device instead of the complete advertisement.

CDP version 1 advertisements output

The number of CDP Version-1 advertisements transmitted by the local device.

Input

The number of CDP Version-1 advertisements received by the local device.

CDP version 2 advertisements output

The number of CDP Version-2 advertisements transmitted by the local device.

Input

The number of CDP Version-2 advertisements received by the local device.

Show CDP Interface

To display information about the interfaces on which CDP is enabled, use the show cdp interface privileged EXEC command.

Router#sh cdp interface [type number]

type
(Optional) Type of interface about which you want information.

number
(Optional) Number of the interface about which you want information.

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