Routing & Switching

How to Enable | Disable Cisco CDP

Enable Cisco Discovery Protocol globally:

R1(config)#cdp ?
  advertise-v2      CDP sends version-2 advertisements
  filter-tlv-list   Apply tlv-list globally
  holdtime          Specify the holdtime (in sec) to be sent in packets
  log               Log messages generated by CDP
  run               Enable CDP
  source-interface  Insert the interface's IP in all CDP packets
  timer             Specify the rate at which CDP packets are sent (in sec)
  tlv               Enable exchange of specific tlv information
  tlv-list          Configure tlv-list
R1(config)#cdp advertise-v2 
R1(config)#cdp run 

You can also enable CDP per interface:

R1(config)#int gi0/0
R1(config-if)#cdp ?
  enable           Enable CDP on interface
  filter-tlv-list  Apply tlv list filter on interface
  log              Log messages generated by CDP
  tlv              Enable exchange of specific tlv information
R1(config-if)#cdp enable 

To disable CDP you simple start your syntax with NO:

R1(config)#no cdp advertise-v2 
R1(config)#no cdp run 
R1(config)#int gi0/0
R1(config-if)#no cdp enable


R1#show cdp neighbors 
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, 
                  D - Remote, C - CVTA, M - Two-port Mac Relay 

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
R2               Gig 0/0           174              R B             Gig 0/0
Total cdp entries displayed : 1
R1#show cdp interface gi0/0
GigabitEthernet0/0 is up, line protocol is up
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
R1#show cdp entry *
Device ID: R2
Entry address(es): 
  IP address:
Platform: Cisco ,  Capabilities: Router Source-Route-Bridge 
Interface: GigabitEthernet0/0,  Port ID (outgoing port): GigabitEthernet0/0
Holdtime : 168 sec

Version :
Cisco IOS Software, IOSv Software (VIOS-ADVENTERPRISEK9-M), Version 15.6(2)T, RELEASE SOFTWARE (fc2)
Technical Support:
Copyright (c) 1986-2016 by Cisco Systems, Inc.
Compiled Tue 22-Mar-16 16:19 by prod_rel_team

advertisement version: 2
Management address(es): 
  IP address:
R1#show cdp traffic 
CDP counters :
        Total packets output: 41, Input: 34
        Hdr syntax: 0, Chksum error: 0, Encaps failed: 0
        No memory: 0, Invalid packet: 0, 
        CDP version 1 advertisements output: 0, Input: 0
        CDP version 2 advertisements output: 41, Input: 34

Wireshark CDP capture

cisco enable disable cdp
cisco enable disable cdp