Cisco Discovery Protocol (CDP) is a Layer 2, media-independent, and network-independent protocol that runs on Cisco devices to learn about directly connected devices.
This protocol facilitates the management of Cisco devices by discovering the directly connected devices, determining how they are configured and allowing systems, using different network-layer protocols, to learn about each other.
Restrictions for Using Cisco Discovery Protocol
Cisco Discovery Protocol is not supported on Frame Relay multipoint sub-interfaces.
Prerequisites for using CDP
Interfaces must support Subnetwork Access Protocol (SNAP) headers.
- CDP is a proprietary protocol so it works only on cisco devices.
- CDP is a Layer 2 protocol.
- Primary function of CDP is to learn about directly connected cisco devices.
- CDP is enabled by default
- Each device sends periodic messages to the well-known multicast MAC address ( 01:00:0C:CC:CC:CC )
- Hellos are sent on every 60 seconds and expiration time is 180 seconds.
Type-Length-Value (TLV) fields are blocks of information embedded into CDP frames. TLV frame format allows for extending advertisement when needed.
Each TLV field is as below (output captured in Wireshark) :
To view these TLVs use following command.
By default CDP is enabled on all interfaces to send and receive CDP information. As security concern, It might be risky to share this type of information. The Secure Cisco Discovery Protocol feature allows users to select the type, length, value (TLV) fields that are sent on a particular interface to filter information sent through Cisco Discovery Protocol. (will discuss in next blog)
To disable it, use “no cdp run” global configuration command & use “no cdp enable” interface specific command.