set cdp state

Use this command to enable or disable the CDP discovery protocol on one or more ports.

Syntax

set cdp state {auto | disable | enable} [port-string]

Parameters

auto | disable | enable Auto-enables, disables, or enables the CDP protocol on the specified ports. In auto-enable mode, which is the default mode for all ports, a port automatically becomes CDP-enabled upon receiving its first CDP message.
port-string (Optional) Enables or disables CDP on specific ports.

Defaults

If port-string is not specified, the CDP state will be globally set.

Mode

All command modes.

Examples

This example shows how to globally enable CDP:

System(rw)->set cdp state enable

This example shows how to enable CDP for port ge.1.2:

System(rw)->set cdp state enable ge.1.2

This example shows how to disable CDP for port ge.1.2:

System(rw)->set cdp state disable ge.1.2