CDP / LLDPGlobal Config

cdp run

Enables Cisco Discovery Protocol (CDP) globally on the device to discover directly connected Cisco devices and gather information about them.

Syntax·Global Config
cdp run

When 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 run
Router(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 cdp
Global 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

1.

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.

2.

CCNA exam tip: CDP is Cisco proprietary; for multi-vendor environments, use LLDP (IEEE 802.1AB) instead.

3.

CCNA exam tip: CDP operates at Layer 2 and discovers only directly connected neighbors; it does not traverse routers.

4.

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

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions