Cisco Discovery Protocol (CDP)

How Cisco devices discover directly connected neighbors and identify the ports between them.

Read the local and remote ports

CDP is Cisco’s Layer 2 discovery protocol. Enabled interfaces send periodic announcements to directly connected devices. An announcement can identify the device, its remote port, its platform and capabilities, and a management address. The receiver knows which local port received the frame.

The sender advertises how long the receiver should keep the information. A receiver refreshes the entry when another advertisement arrives and removes it when the hold time expires. CDP and LLDP are separate protocols and can coexist where both devices support them.

Try it in a lab

  1. Connect two CDP-capable devices and compare the local interface and advertised remote port with the cable layout. Capture an advertisement and identify the device ID and hold time.
  2. Disable CDP transmission on one end of the lab link and watch the far end’s entry age out. Confirm that the Ethernet link itself is still up.

Sources