Working with Cisco Discovery Protocol (CDP) - dummies

Working with Cisco Discovery Protocol (CDP)

By Edward Tetz

Cisco Discovery Protocol (CDP) is data link layer protocol that allows you to find information about the connections between devices. CDP is useful and easy to use, so you should start exploring a bit of your network using this default tool from Cisco.

Because CDP runs on all modern Cisco equipment, you may as well work with this tool or at least know what it is doing over your network, even if you do not use the information it generates.

You can use the show command to see whether CDP is currently operating on your device. The following output shows the currently configured CDP settings on Switch1, which are actually the default settings. The default settings send CDP packets every 60 seconds, using CDPv2 as the protocol version, and the receiving device retains that information for 180 seconds.

Switch1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch1#show cdp
Global CDP information:
        Sending CDP packets every 60 seconds
        Sending a holdtime value of 180 seconds
        Sending CDPv2 advertisements is enabled

If you want to change from the default values, you can set CDP packets to send every 5 to 254 seconds. The CDP hold timer can be configured from 10 seconds to 255 seconds, with the holdtime always larger than the CDP packet timer; otherwise, other devices could remove the information about their neighbor right before getting the second CDP packet, which does not make much sense.

The standard recommendation is that the holdtime be at least three times the value of the CDP time. That way, information about neighboring devices will remain in your CDP data even if you fail to receive two out of the three CDP data frames that are sent.