Skip to content
  • There are no suggestions because the search field is empty.

Configuring CDP

CDP is enabled on each Cisco device by default, but you can disable it from the global configuration mode or on a port-by-port basis (interface mode) when required.

Network topology consists of two Cisco switches and one Cisco router

When CDP is disabled globally, the device stops sending and accepting hello messages on all interfaces. When it is disabled on a single interface, CDP does not operate on that specific interface only. You can use “no cdp run” to disable CDP globally or “no cdp enable” to disable it on a specific interface.

You need to use the “show cdp” command to view CDP information about the neighbors. It contains several additional arguments, and each one provides a different output. The following output shows the available options:

Show cdp command and its arguments

The command “show cdp neighbors is the most popular one because it provides the basic information about the neighbors, but if you need some extra information, such as the IP address of the neighbor or the operating system that is used, you can add the “detail” argument at the end of this command.

Show cdp neighbors command on a switch and its output

Based on the output above, you can see that switch SW2 has two neighbors, switch SW1 and router R1. SW2 uses the FastEthernet0/1 interface to reach SW1, which also uses the same interface to connect to SW2. The platform used on SW1 is 2960, and the capability of “S” identifies the devices as a switch. 

The hold time parameter (“holdtme”) counts down from 180 seconds. If SW2 does not receive a CDP message in three minutes (3 missed hello messages) from SW1, it assumes the neighbor is down and discards it from the table. The same approach applies to reading the output for neighbor R1.