Cisco CPT Command Reference Guide CTC and Documentation Release 9.3 and Cisco IOS Release 15.1(01)SA
CDP Command Reference
Downloads: This chapterpdf (PDF - 492.0KB) The complete bookPDF (PDF - 3.26MB) | Feedback

CDP Command Reference

CDP Command Reference

This chapter describes commands used to monitor the router and network using Cisco Discovery Protocol (CDP).

cdp enable

To enable Cisco Discovery Protocol (CDP) on an interface, use the cdp enable command in interface configuration mode. To disable CDP on an interface, use the no form of this command.

cdp enable

no cdp enable

Syntax Description

This command has no arguments or keywords.

Command Default

Enabled at the global level and on all the supported interfaces.

Command Modes

Interface configuration (config-if)

Command History

Release Modification
9.3.0

This command was introduced.

Usage Guidelines

CDP is enabled by default at the global level and on each supported interface to send or receive CDP information.

Examples

The following example shows how to disable CDP only on the TenGigabitEthernet4/1 interface.

Router# config terminal
Router(config)# interface TenGigabitEthernet4/1
Router(config-if)# no cdp enable

Related Commands

Command Description
cdp run

Reenables CDP on a Cisco device.

cdp run

To enable the CDP, use the cdp run command in global configuration mode. To disable CDP, use the no form of this command.

cdp run

no cdp run

Syntax Description

This command has no arguments or keywords.

Command Default

Enabled at the global level and on all the supported interfaces.

Command Modes

Global configuration (config)

Command History

Release Modification
9.3.0

This command was introduced.

Usage Guidelines

CDP is enabled by default at the global level and on each supported interface to send or receive CDP information.

If CDP is disabled globally, you cannot enable it on each interface using the cdp enable interface configuration mode command.

Examples

The following example shows how to enable CDP on the TenGigabitEthernet4/1 interface, when CDP is disabled globally.

Router(config)# no cdp run
Router(config)# end
Router# show cdp
% CDP is not enabled
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# interface TenGigabitEthernet4/1
Router(config-if)# cdp enable
% Cannot enable CDP on this interface, since CDP is not running
Router(config-if)#

Related Commands

Command Description
cdp enable

Enables CDP on a supported interface.

show cdp

To display global CDP information, including timer and hold-time information, use the show cdp command in privileged EXEC mode.

show cdp

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC (#)

Command History

Release Modification
9.3.0

This command was introduced.

Examples

The following is a sample output from the show cdp command that shows that the current router is transmitting CDP advertisements every one minute (the default setting for cdp timer). Also shown is that the current router directs its neighbors to hold its CDP advertisements for 3 minutes (the default for cdp holdtime), and that the router is enabled to transmit CDP version 2 advertisements.

Router# show cdp
Global CDP information:
     Sending CDP packets every 60 seconds
     Sending a holdtime value of 180 seconds
     Sending CDPv2 advertisements is enabled

Related Commands

Command Description
show cdp entry

Displays information about a specific neighbor device listed in the CDP table.

show cdp interface

Displays information about the interfaces on which CDP is enabled.

show cdp neighbors

Displays detailed information about neighboring devices discovered using CDP.

show cdp traffic

Displays traffic information from the CDP table.

show cdp entry

To display information about a specific neighboring device discovered using CDP, use the show cdp entry command in privileged EXEC mode.

show cdp entry { * | entry-name [ protocol | version]}

Syntax Description

*

Wildcard showing all the CDP neighbors.

entry-name

Name of the neighbor.

You can enter an asterisk (*) at the end of an entry-name, such as show cdp entry dev*, which would show information about the neighbor, device.cisco.com.

protocol

(Optional) Limits the display to information about the protocols enabled on a router.

version

(Optional) Limits the display to information about the version of software running on the router.

Command Modes

Privileged EXEC (#)

Command History

Release Modification
9.3.0

This command was introduced.

Examples

The following is sample output from the show cdp entry protocol command. Only information about the protocols enabled on device.cisco.com are displayed.

Router# show cdp entry device.cisco.com protocol
Protocol information for device.cisco.com:
    IP address: 192.168.68.18
    CLNS address: 490001.1111.1111.1111.00
    DECnet address: 10.1

Related Commands

Command Description
show cdp

Displays global CDP information, including timer and hold-time information.

show cdp interface

Displays information about the interfaces on which CDP is enabled.

show cdp neighbors

Displays detailed information about neighboring devices discovered using CDP.

show cdp traffic

Displays traffic information from the CDP table.

show cdp interface

To display information about the interfaces on which CDP is enabled, use the show cdp interface command in privileged EXEC mode.

show cdp interface [ type number]

Syntax Description

type

(Optional) Type of interface.

number

(Optional) Number of the interface.

Command Modes

Privileged EXEC (#)

Command History

Release Modification
9.3.0

This command was introduced.

Examples

The following is sample output from the show cdp interface command with an interface specified. The status information and information about CDP timer and holdtime settings is displayed only for TenGigabitEthernet4/1.

Router# show cdp interface TenGigabitEthernet4/1
TenGigabitEthernet4/1 is up, line protocol is up
   Encapsulation ARPA
   Sending CDP packets every 60 seconds
   Holdtime is 180 seconds

Related Commands

Command Description
show cdp entry

Displays information about a specific neighbor device listed in the CDP table.

show cdp

Displays global CDP information, including timer and hold-time information.

show cdp neighbors

Displays detailed information about neighboring devices discovered using CDP.

show cdp traffic

Displays traffic information from the CDP table.

show cdp neighbors

To display detailed information about neighboring devices discovered using CDP, use the show cdp neighbors command in privileged EXEC mode.

show cdp neighbors [ type number] [ detail]

Syntax Description

type

(Optional) Type of the interface connected to the neighbors.

number

(Optional) Number of the interface connected to the neighbors.

detail

(Optional) Displays detailed information about a neighbor (or neighbors) including network address, enabled protocols, hold time, and software version.

Command Modes

Privileged EXEC (#)

Command History

Release Modification
9.3.0

This command was introduced.

Examples

The following example is sample output from the show cdp neighbors command.

Router# show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
                  D - Remote, C - CVTA, M - Two-port Mac Relay

Device ID        Local Intrfce Holdtme  Capability  Platform  Port ID
10.64.107.251    Gig 37/3      176            R I   CPT 600   Gig 36/41
10.64.107.251    Gig 37/1      174            R I   CPT 600   Gig 36/43
10.64.107.251    Gig 36/41     134            R I   CPT 600   Gig 37/3
10.64.107.251    Gig 36/43     134            R I   CPT 600   Gig 37/1
10.64.107.251    Ten 3/2       132            R I   CPT 600   Ten 4/2
10.64.107.251    Ten 4/2       174            R I   CPT 600   Ten 3/2

The Device ID column in the output indicates the remote node ID and the Port ID column indicates the remote port.

Related Commands

Command Description
show cdp entry

Displays information about a specific neighbor device listed in the CDP table.

show cdp interface

Displays information about the interfaces on which CDP is enabled.

show cdp

Displays global CDP information, including timer and hold-time information.

show cdp traffic

Displays traffic information from the CDP table.

show cdp traffic

To display information about traffic between devices gathered using CDP, use the show cdp traffic command in privileged EXEC mode.

show cdp traffic

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC (#)

Command History

Release Modification
9.3.0

This command was introduced.

Examples

The following example is sample output from the show cdp traffic command that specifies information about traffic between devices.

Router# show cdp traffic
Total packets output: 543, Input: 333
Hdr syntax: 0, Chksum error: 0, Encaps failed: 0
No memory: 0, Invalid: 0, Fragmented: 0
CDP version 1 advertisements output: 191, Input: 187
CDP version 2 advertisements output: 352, Input: 146

Related Commands

Command Description
show cdp entry

Displays information about a specific neighbor device listed in the CDP table.

show cdp interface

Displays information about the interfaces on which CDP is enabled.

show cdp

Displays global CDP information, including timer and hold-time information.

show cdp neighbors

Displays detailed information about neighboring devices discovered using CDP.