CDP / LLDPInterface Config

cdp enable

Enables Cisco Discovery Protocol (CDP) on a specific interface to allow the device to advertise itself and discover neighboring Cisco devices.

Syntax·Interface Config
cdp enable

When to Use This Command

  • Enable CDP on a newly configured interface to quickly verify connectivity and discover directly connected Cisco devices.
  • Re-enable CDP on an interface after it was disabled globally or per-interface for troubleshooting network topology.
  • Enable CDP on a trunk port to identify neighboring switches and verify VLAN configurations.
  • Enable CDP on a WAN interface to discover the remote router's platform and IP address for inventory management.

Command Examples

Enable CDP on a GigabitEthernet interface

interface GigabitEthernet0/1 cdp enable
Router(config-if)# cdp enable
Router(config-if)#

No output is displayed upon successful execution. The command is entered in interface configuration mode. Use 'show cdp interface' to verify CDP is enabled on the interface.

Enable CDP on a Serial interface

interface Serial0/0/0 cdp enable
Router(config-if)# cdp enable
Router(config-if)#

Same as above; no output confirms the command was accepted. Verify with 'show cdp neighbors' to see discovered devices on this interface.

Understanding the Output

The 'cdp enable' command itself produces no output. To verify CDP is enabled on an interface, use 'show cdp interface [interface-id]'. The output shows CDP status (administratively up/down), packet frequency (default 60 seconds), holdtime (default 180 seconds), and version. A 'good' status shows 'Sending CDP packets every 60 seconds' and 'Holdtime is 180 seconds'. If CDP is disabled, you'll see 'CDP is not enabled on the interface'. Watch for 'CDP is not enabled' which indicates the interface is not participating in CDP. Also, 'show cdp neighbors' lists discovered devices; an empty output may indicate CDP is disabled or no neighbors are present.

CCNA Exam Tips

1.

CDP is enabled globally by default on Cisco devices; you only need 'cdp enable' on an interface if CDP was globally disabled with 'no cdp run'.

2.

CDP is a Layer 2 protocol and works only on directly connected Cisco devices; it does not cross routers or switches.

3.

The CCNA exam may test that CDP is Cisco proprietary and can be disabled per interface for security reasons.

4.

Remember that 'cdp enable' is an interface command, while 'cdp run' is global; disabling globally overrides per-interface settings.

Common Mistakes

Mistake: Applying 'cdp enable' in global configuration mode instead of interface configuration mode — results in '% Invalid input detected' error.

Mistake: Forgetting that CDP is enabled by default; unnecessary use of 'cdp enable' when it's already active.

Mistake: Assuming 'cdp enable' on an interface will enable CDP globally — it only affects that specific 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