cc/td/doc/product/software/ios121/121cgcr/fun_r
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

CDP Commands

CDP Commands

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

For system management configuration tasks and examples, refer to the "Configuring Cisco Discovery Protocol (CDP)" chapter in the Release 12.1 Cisco IOS Configuration Fundamentals Configuration Guide.

cdp advertise-v2

To enable Cisco Discovery Protocol Version 2 (CDPv2) advertising functionality on a device, use the cdp advertise-v2 global configuration command. To disable advertising CDPv2 functionality, use the no form of the command.

cdp advertise-v2

no cdp advertise-v2

Syntax Description

This command has no arguments or keywords.

Defaults

Enabled

Command Modes

Global configuration

Command History
Release Modification

12.0(3)T

This command was introduced.

Usage Guidelines

Three new TLVs have been added to CDP Version 2. They are VTP Management Domain Name, Native VLAN, and full/half-Duplex TLVs.

Examples

The following example enables a device called router1 to send CDP Version 2 advertisements:

cdp advertise-v2

Related Commands
Command Description

cdp enable

Enables CDP on a supported interface.

cdp run

Reenables CDP on a Cisco device.

cdp enable

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

cdp enable

no cdp enable

Syntax Description

This command has no arguments or keywords.

Defaults

Enabled at the global level and on all supported interfaces.

Command Modes

Interface configuration

Command History
Release Modification

10.3

This command was introduced.

Usage Guidelines

CDP is enabled by default at the global level and on each supported interface in order to send or receive CDP information. However, some interfaces, such as ATM interfaces, do not support CDP.


Note The cdp enable, cdp timer, and cdp run commands affect the operation of the IP on demand routing feature (that is, the router odr global configuration command). For more information on the router odr command, see the "On-Demand Routing Commands"   chapter in the Cisco IOS IP and IP Routing Command Reference.

Examples

The following example enables CDP on Ethernet interface 0:

interface ethernet 0
 cdp enable

Related Commands
Command Description

cdp run

Reenables CDP on a Cisco device.

cdp holdtime

To specify the amount of time the receiving device should hold a Cisco Discovery Protocol (CDP) packet from your router before discarding it, use the cdp holdtime global configuration command. Use the no form of this command to revert to the default setting.

cdp holdtime seconds

no cdp holdtime

Syntax Description

seconds

Specifies the hold time to be sent in the CDP update packets.

Defaults

180 seconds

Command Modes

Global configuration

Command History
Release Modification

10.3

This command was introduced.

Usage Guidelines

CDP packets are sent with time-to-live, or hold time, that is nonzero after an interface is enabled and a hold time of 0 immediately before an interface is idled down.

The CDP hold time must be set to a higher number of seconds than the time between CDP transmissions, which is set using the cdp timer command.

Examples

In the following example, the CDP packets being sent from your router should be held by the receiving device for 60 seconds before being discarded. You might want to set the hold time lower than the default setting of 180 seconds if information about your router changes often and you want the receiving devices to purge this information more quickly.

cdp holdtime 60

Related Commands
Command Description

cdp timer

Specifies how often the Cisco IOS software sends CDP updates.

show cdp

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

cdp run

To enable Cisco Discovery Protocol, use the cdp run global configuration command. Use the no form of this command to disable CDP.

cdp run

no cdp run

Syntax Description

This command has no arguments or keywords.

Defaults

Enabled

Command Modes

Global configuration

Command History
Release Modification

10.3

This command was introduced.

Usage Guidelines

CDP is enabled on your router by default, which means the Cisco IOS software will receive CDP information. CDP also is enabled on supported interfaces by default. To disable CDP on an interface, use the no cdp enable interface configuration command.


Note The cdp enable, cdp timer, and cdp run commands affect the operation of the IP on demand routing feature (that is, the router odr global configuration command). For more information on the router odr command, see the "On-Demand Routing Commands"   chapter in the Cisco IOS IP and IP Routing Command Reference.

Examples

The following example disables CDP:

no cdp run

Related Commands
Command Description

cdp enable

Enables CDP on a supported interface.

cdp timer

To specify how often the Cisco IOS software sends Cisco Discovery Protocol updates, use the cdp timer global configuration command. Use the no form of this command to revert to the default setting.

cdp timer seconds

no cdp timer

Syntax Description

seconds

Specifies how often the Cisco IOS software sends CDP updates.

Defaults

60 seconds

Command Modes

Global configuration

Command History
Release Modification

10.3

This command was introduced.

Usage Guidelines

The trade-off with sending more frequent transmissions is providing up-to-date information versus using bandwidth more often.


Note The cdp enable, cdp timer, and cdp run commands affect the operation of the IP on demand routing feature (that is, the router odr global configuration command). For more information on the router odr command, see the "On-Demand Routing Commands"   chapter in the Cisco IOS IP and IP Routing Command Reference.

Examples

In the following example, CDP updates are sent every 80 seconds, less frequently than the default setting of 60 seconds. You might want to make this change if you are concerned about preserving bandwidth.

cdp timer 80

Related Commands
Command Description

cdp holdtime

Specifies the amount of time the receiving device should hold a CDP packet from your router before discarding it.

show cdp

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

clear cdp counters

To reset Cisco Discovery Protocol traffic counters to zero (0), use the clear cdp counters privileged EXEC command.

clear cdp counters

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC

Command History
Release Modification

10.3

This command was introduced.

Examples

The following example clears the CDP counters. The show cdp traffic output shows that all of the traffic counters have been reset to zero (0).

Router# clear cdp counters
Router# show cdp traffic
 
CDP counters:
        Packets output: 0, Input: 0
        Hdr syntax: 0, Chksum error: 0, Encaps failed: 0
        No memory: 0, Invalid packet: 0, Fragmented: 0

Related Commands
Command Description

clear cdp table

Clears the table that contains CDP information about neighbors.

show cdp traffic

Displays traffic information from the CDP table.

clear cdp table

To clear the table that contains Cisco Discovery Protocol information about neighbors, use the clear cdp table privileged EXEC command.

clear cdp table

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC

Command History
Release Modification

10.3

This command was introduced.

Examples

The following example clears the CDP table. The output of the show cdp neighbors command shows that all information has been deleted from the table.

Router# clear cdp table 
 
CDP-AD: Deleted table entry for neon.cisco.com, interface Ethernet0
CDP-AD: Deleted table entry for neon.cisco.com, interface Serial0
Router# show cdp neighbors
 
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP
 
Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID

Related Commands
Command Description

show cdp neighbors

Displays information about neighbors.

show cdp

To display global Cisco Disovery Protocol information, including timer and hold-time information, use the show cdp privileged EXEC command.

show cdp

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC

Command History
Release Modification

10.3

This command was introduced.

12.0(3)T

The output of this command was modified to include CDPv2 information.

Examples

The following example 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 three 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
 

Table 57 describes the fields shown in the example.


Table 57: show cdp Field Descriptions
Field Definition

Sending CDP packets every XX seconds

The interval, in seconds, between transmissions of CDP advertisements. This field is controlled by the cdp timer command.

Sending a holdtime value of XX seconds

The amount of time, in seconds, the device directs the neighbor to hold a CDP advertisement before discarding it. This field is controlled by the cdp holdtime command.

Sending CDPv2 advertisements is XX

The state of whether CDP Version-2 type advertisements are enabled to be transmitted. Possible states are enabled or disabled. This field is controlled by the cdp advertise v2 command.

Related Commands
Command Description

cdp advertise-v2

Enables CDP Version 2 advertising functionality on a device.

cdp holdtime

Specifies the amount of time the receiving device should hold a CDP packet from your router before discarding it.

cdp timer

Specifies how often the Cisco IOS software sends CDP updates.

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 information about traffic between devices gathered using CDP.

show cdp entry

To display information about a specific neighboring device discovered using Cisco Discovery Protocol, use the show cdp entry privileged EXEC command.

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

Syntax Description

*

Shows all of the CDP neighbors.

entry-name

Name of neighbor about which you want information.

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

10.3

This command was introduced.

Examples

The following is sample output from the show cdp entry command with no limits. Information about the neighbor device.cisco.com is displayed, including device ID, address and protocol, platform, interface, hold time, and version.

Router# show cdp entry device.cisco.com
 
-------------------------
Device ID: device.cisco.com
Entry address(es):
  IP address: 192.168.68.18
  CLNS address: 490001.1111.1111.1111.00
  DECnet address: 10.1
Platform: cisco 4500,  Capabilities: Router
Interface: Ethernet0/1,  Port ID (outgoing port): Ethernet0
Holdtime : 125 sec
 
Version :
Cisco Internetwork Operating System Software
IOS (tm) 4500 Software (C4500-J-M), Version 11.1(10.4), MAINTENANCE INTERIM SOFTWARE
Copyright (c) 1986-1997 by cisco Systems, Inc.
Compiled Mon 07-Apr-97 19:51 by dschwart
 

The following is sample output from the show cdp entry protocol command. Only information about the protocols enabled on device.cisco.com is 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
 

The following is sample output from the show cdp entry version command. Only information about the version of software running on device.cisco.com is displayed.

Router# show cdp entry device.cisco.com version 
 
Version information for device.cisco.com:
  Cisco Internetwork Operating System Software
IOS (tm) 4500 Software (C4500-J-M), Version 11.1(10.4), MAINTENANCE INTERIM SOFTWARE
Copyright (c) 1986-1997 by cisco Systems, Inc.
Compiled Mon 07-Apr-97 19:51 by dschwart

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 Cisco Discovery Protocol is enabled, use the show cdp interface privileged EXEC command.

show cdp interface [type number]

Syntax Description

type

(Optional) Type of interface about which you want information.

number

(Optional) Number of the interface about which you want information.

Command Modes

Privileged EXEC

Command History
Release Modification

10.3

This command was introduced.

Examples

The following sample output form the show cdp interface command. Status information and information about CDP timer and hold time settings is displayed for all interfaces on which CDP is enabled.

Router# show cdp interface
 
Serial0 is up, line protocol is up, encapsulation is SMDS
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
Ethernet0 is up, line protocol is up, encapsulation is ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
 

The following is sample output from the show cdp interface command with an interface specified. Status information and information about CDP timer and holdtime settings is displayed for Ethernet interface 0 only.

Router# show cdp interface ethernet 0
 
Ethernet0 is up, line protocol is up, encapsulation is ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds

Related Commands
Command Description

show cdp

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

show cdp entry

Displays information about a specific neighbor device or all neighboring devices discovered using CDP.

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 Cisco Discovery Protocol (CDP), use the show cdp neighbors privileged EXEC command.

show cdp neighbors [type number] [detail]

Syntax Description

type

(Optional) Type of the interface connected to the neighbors about which you want information.

number

(Optional) Number of the interface connected to the neighbors about which you want information.

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

10.3

This command was introduced.

12.0(3)T

The output for the detail form of this command was expanded to include CDPv2 information.

Examples

The following example specifies information related to 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
Device ID Local Intrfce							Holdtme			Capability			Platform  				Port ID
joe		Eth 0 					133 						4500 				Eth 0
sam			Eth 0 				152 			R        			AS5200    				Eth 0
terri			Eth 0 				144 						3640      				Eth 0/0
maine			Eth 0 				141 						RP1       				Eth 0/0
sancho		Eth 0 					164 						7206 				Eth 1/0
 

Table 58 describes the fields shown in the example.


Table 58: show cdp neighbors Field Descriptions
Field Definition

Capability Codes

The type of device that can be discovered.

Device ID

The name of the neighbor device and either the MAC address or the serial number of this device.

Local Intrfce

The protocol being used by the connectivity media.

Holdtme

The remaining amount of time, in seconds, the current device will hold the CDP advertisement from a transmitting router before discarding it.

Capability

The type of the device listed in the CDP Neighbors table. Possible values are:

R---Router

T---Transparent bridge

B---Source-routing bridge

S---Switch

H---Host

I---IGMP device

r---Repeater

Platform

The product number of the device.

Port ID

The protocol and port number of the device.

The following is sample output for one neighbor from the show cdp neighbors detail command. Additional detail is shown about neighbors, including network address, enabled protocols, and software version.

router# show cdp neighbors detail
 
Device ID: 008024 1EEB00 (milan-sw-1-cat9k)
Entry address(es):
		 IP address: 1.15.28.10
Platform: CAT5000, Capabilities: Switch
Interface: Ethernet1/0, Port ID (outgoing port): 2/7
Holdtime : 162 sec
 
Version :
Cisco Catalyst 5000
Duplex Mode: full
Native VLAN: 42
VTP Management Domain: `Accounting Group'
 

Table 59 describes field descriptions shown in the example.


Table 59: show cdp neighbors detail Field Descriptions
Field Definition

Device ID

The name of the neighbor device and either the MAC address or the serial number of this device.

Entry address(es)

A list of network addresses of neighbor devices.

[network protocol] address

The network address of the neighbor device. The address can be in IP, IPX, AppleTalk, DECnet, or CLNS protocol conventions.

Platform

The product name and number of the neighbor device.

Capabilities

The device type of the neighbor. This device can be a router, a bridge, a transparent bridge, a source-routing bridge, a switch, a host, an IGMP device, or a repeater.

Interface

The protocol and port number of the port on the current device.

Holdtime

The remaining amount of time, in seconds, the current device will hold the CDP advertisement from a transmitting router before discarding it.

Version

The software version of the neighbor device.

Duplex Mode

The duplex state of connection between the current device and the neighbor device.

Native VLAN

The ID number of the VLAN on the neighbor device.

VTP Management Domain

A string that is the name of the collective group of VLANs associated with the neighbor device.

Related Commands
Command Description

show cdp

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

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 traffic

Displays information about traffic between devices gathered using CDP.

show cdp traffic

To display information about traffic between devices gathered using Cisco Discovery Protocol(CDP), use the show cdp traffic privileged EXEC command.

show cdp traffic

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC

Command History
Release Modification

10.3

This command was introduced.

Examples

The following example specifies information associated with the show cdp traffic command:

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
 

Table 59 describes the fields shown in the example.


Table 60: show cdp traffic Field Descriptions
Field Definition

Total packets output

The number of CDP advertisements sent by the local device. Note this value is the sum of the CDP Version 1 advertisements output and CDP Version 2 advertisements output fields.

Input

The number of CDP advertisements received by the local device. Note this value is the sum of the CDP Version-1 advertisements input and CDP Version 2 advertisements input fields.

Hdr syntax

The number of CDP advertisements with bad headers, received by the local device.

Chksum error

The number of times the checksum (verifying) operation failed on incoming CDP advertisements.

Encaps failed

The number of times CDP failed to transmit advertisements on an interface because of a failure caused by the bridge port of the local device.

No memory

The number of times the local device did not have enough memory to store the CDP advertisements in the advertisement cache table when the device was attempting to assemble advertisement packets for transmission and parse them when receiving them.

Invalid

The number of invalid CDP advertisements received and sent by the local device.

Fragmented

The number of times fragments or portions of a single CDP advertisement were received by the local device instead of the complete advertisement.

CDP version 1 advertisements output

The number of CDP Version 1 advertisements sent by the local device.

     Input

The number of CDP Version 1 advertisements received by the local device.

CDP version 2 advertisements output

The number of CDP Version 2 advertisements sent by the local device.

     Input

The number of CDP Version 2 advertisements received by the local device.

Related Commands
Command Description

show cdp

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

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.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Mon May 1 21:03:27 PDT 2000
Copyright 1989 - 2000©Cisco Systems Inc.