cdp
To enable the Cisco Discovery Protocol (CDP) globally or on an interface, use the cdp command in the appropriate configuration mode. To disable CDP globally or on an interface, use the no form of this command.
cdp
no cdp
Syntax Description
This command has no keywords or arguments.
Command Default
CDP is disabled.
Command Modes
Interface configuration
Command History
Release |
Modification |
---|---|
Release 2.0 |
This command was introduced. |
Release 3.2 |
The enable and disable keywords were removed. |
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
By default, CDP is disabled globally. To enable CDP, CDP must be enabled globally and then enabled for each interface.
To enable CDP globally, use the cdp command in global configuration mode. To disable CDP globally, use the no form of this command in global configuration mode.
To enable CDP on a specific interface, use the cdp command in interface configuration mode. To disable CDP on a specific interface, use the no form of this command in interface configuration mode.
The following interface types do not support CDP:
-
802.1Q VLAN subinterfaces
-
ATM interfaces and ATM subinterfaces
-
Bundle Interfaces
-
Loopback interfaces
-
Service interfaces
-
Tunnel Interfaces
Task ID
Task ID |
Operations |
---|---|
cdp |
read, write |
Examples
The following example shows how to globally enable CDP:
RP/0/RP0/CPU0:router(config)# cdp
The following example shows how to enable CDP on an interface:
RP/0/RP0/CPU0:router(config-if)# cdp