1
CDP (Cisco Discovery Protocol)
CDP is a Cisco proprietary protocol. It is enabled by default on Cisco devices such as routers, switches,
firewalls, etc. CDP messages are periodically sent to multicast MAC address 0100. 0CCC.CCCC.
When a device receives a CDP message, it processes the received message and save the information to
its CDP neighbor table and discards the message, because CDP messages does NOT forward to other
devices in the network.
A CDP enable interface will send and receive CDP messages (can’t perform a single task).
We can use TLV (Time, length value) to filter the information which we don’t want to send to our
neighbors.
Timers:
By default, CDP messages are sent once every 60 seconds.
By default, the CDP hold time is 180 seconds. If a message isn’t received from a neighbor for 180
seconds, the neighbor is removed from the CDP neighbor table.
CDPv2 messages are sent by default.
We will use this network to understand CDP and its commands.
Page 1|5
2
Command 1)
R1#show cpd
It is used to see CDP version and timers.
If CDP is enabled on that device, output will be like.
If CDP is disabled on that device, output will be like.
Command 2)
It is used to enable CDP on the device.
R1(config)#cdp run
Command 3)
It is used to see the send and received CDP traffic.
R1#show cdp traffic
Command 4)
It is used to see CDP neighbors.
R1#show cdp neighbors
Command 5)
It is used to see CDP neighbors received detail.
Page 2|5
3
R1#show cdp neighbors detail
Command 6)
It is used to see a specific CDP neighbor received detail.
R1#show cdp entry R2
Some other useful CDP configuration Commands.
CDP is enable globally and on each interface on the cisco devices by default. Let’s see how we can
enable and disable CDP globally and on a specific interface.
1)Enable CDP Globally:
R1#cdp run
2)Disable CDP Globally:
Page 3|5
4
R1#no cdp run
3)Enable CDP on a specific interface:
R1(config-if)#cdp enable
4)Disable CDP on a specific interface:
R1(config-if)#no cdp enable
5) Configure the CDP timer:
R1(config)#cdp timer Seconds
6) Configure the CDP Hold-timer:
R1(config)#cdp holdtime Seconds
7) Enable/disable CDPv2:
R1(config)#[no] cdp advertise-v2
We can configure TLV list to filter the information which we don’t want to send to our neighbors.
Configuring TLV Globally
R1> enable
R1# configure terminal
R1 (config)# cdp filter-tlv-list AList
R1(config)# cdp tlv-list Alist
R1(config-tlv-list)#! Entries you don’t want to send to neighbors
R1(config-tlv-list)#address
R1(config-tlv-list)#native-vlan
R1 (config)# cdp filter-tlv-list AList
Command to see configured TLV list.
R1# show cdp tlv-list
Configuring TLV on interface
R1> enable
R1# configure terminal
Page 4|5
5
R1(config)# interface ethernet 0/9
R1 (config-if)# cdp filter-tlv-list AList
R1(config)# cdp tlv-list Alist
R1(config-tlv-list)#! Enter entries you don’t want to send to neighbors
R1(config-tlv-list)#address
R1(config-tlv-list)#native-vlan
R1 (config-if)# cdp filter-tlv-list AList
Page 5|5