CDP, or Cisco Discovery Protocol, runs on Cisco devices to learn about directly connected devices. It runs on Layer 2 and sends to multicast address 01:00:0C:CC:CC:CC.
Embedded within CDP advertisements are TLVs, or type-length-value. The advertisements contain time-to-live information and are sent every 60 seconds. Additional information is inside an advertisement:
- Cisco IOS Version
- Hardware platform
- IP addresses of interfaces
- Locally connected devices advertising CDP
- Active interfaces
- Duplex setting
- VTP domain
- Native VLAN
CDP can be enabled and disabled globally with the
cdp run command. To disable, add the no keyword in front.
To enable/disable CDP on an interface:
config t interface g1/0/1 no cdp enable
The CDP transmission time specifies the frequency of transmitting CDP packets. It can be tuned with the
cdp timer seconds command.
The CDP hold time specifies the time for which a receiving device should hold information before discarding it and the command to tune the hold time is
cdp holdtime seconds.
CDP version 2 is the latest release and in order to enable or disable CDP v2 advertisements use the
cdp advertise-v2 command.
Monitoring and Maintaining CDP
There are number of commands used to monitor CDP. There are two clear cdp commands used to reset and clear information. The other five are show commands.
clear cdp counters will reset the CDP traffic counters on the switch.
clear cdp table will remove the CDP information about neighbors from the table.
show cdp will display information such as interval between advertisements, holdtime value, and whether CDPv2 advertisements are enabled. [Read more…] about CCNP SWITCH – Configuring and Verifying CDP