cdp run
Enables Cisco Discovery Protocol (CDP) globally on the device to discover directly connected Cisco devices and gather information about them.
cdp runWhen to Use This Command
- Enable CDP on a new router to automatically discover neighboring Cisco devices and verify Layer 2 connectivity.
- Re-enable CDP after it was globally disabled for security hardening, to assist in network troubleshooting.
- Enable CDP on a switch to map the network topology and identify connected devices before configuring interfaces.
- Enable CDP temporarily during a network audit to collect neighbor information for documentation.
Command Examples
Enable CDP globally
Router(config)# cdp runRouter(config)#
No output is displayed upon successful execution. The command simply enables CDP globally. Use 'show cdp' to verify that CDP is running.
Verify CDP is enabled
Router# show cdpGlobal CDP information: Sending CDP packets every 60 seconds Sending a holdtime value of 180 seconds Sending CDPv2 advertisements is enabled
The output confirms CDP is globally enabled. 'Sending CDP packets every 60 seconds' shows the default update interval. 'Holdtime value of 180 seconds' indicates how long a neighbor is kept before being removed. 'Sending CDPv2 advertisements is enabled' means CDP version 2 is active, which provides more detailed information.
Understanding the Output
The 'cdp run' command itself produces no output. To verify that CDP is enabled, use 'show cdp'. The output shows global CDP parameters: the update interval (default 60 seconds), holdtime (default 180 seconds), and CDP version (v2). A holdtime of 180 seconds means a neighbor is considered down if no update is received for 180 seconds. If CDP is disabled, 'show cdp' will indicate 'CDP is not enabled'. In a real network, ensure CDP is enabled on devices that need to discover neighbors; if security policies require disabling CDP, use 'no cdp run' globally or 'no cdp enable' per interface.
CCNA Exam Tips
CCNA exam tip: CDP is enabled by default on Cisco devices; you may need to disable it for security. Know that 'cdp run' enables it globally.
CCNA exam tip: CDP is Cisco proprietary; for multi-vendor environments, use LLDP (IEEE 802.1AB) instead.
CCNA exam tip: CDP operates at Layer 2 and discovers only directly connected neighbors; it does not traverse routers.
CCNA exam tip: The 'show cdp neighbors' command is commonly tested; remember it shows Device ID, Local Interface, Holdtime, Capability, Platform, and Port ID.
Common Mistakes
Mistake 1: Using 'cdp run' in interface configuration mode instead of global configuration mode. This will result in an invalid command error.
Mistake 2: Forgetting to use 'no cdp run' to disable CDP globally; instead, operators may disable it per interface, which is less efficient.
Mistake 3: Confusing 'cdp run' with 'cdp enable'; 'cdp run' is global, while 'cdp enable' is per interface.
Related Commands
cdp enable
Enables Cisco Discovery Protocol (CDP) on a specific interface to allow the device to advertise itself and discover neighboring Cisco devices.
no cdp run
Globally disables Cisco Discovery Protocol (CDP) on the router or switch to prevent device discovery and reduce unnecessary traffic.
show cdp neighbors
Displays information about directly connected Cisco devices discovered via CDP, used to verify neighbor relationships and gather device details.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions