Cisco IOS XR System Management Command Reference, Release 3.4
CDP Commands on Cisco IOS XR Software
Downloads: This chapterpdf (PDF - 521.0KB) The complete bookPDF (PDF - 5.84MB) | Feedback

CDP Commands on Cisco IOS XR Software

Table Of Contents

CDP Commands on Cisco IOS XR Software

cdp

cdp advertise v1

cdp holdtime

cdp log adjacency changes

cdp timer

clear cdp counters

clear cdp table

show cdp

show cdp entry

show cdp interface

show cdp neighbors

show cdp traffic


CDP Commands on Cisco IOS XR Software


This chapter describes the Cisco IOS XR software commands for monitoring the networking device and network using Cisco Discovery Protocol (CDP).

For detailed information about CDP concepts, configuration tasks, and examples, refer to the Implementing CDP on Cisco IOS XR Software module.

cdp

To enable the Cisco Discovery Protocol (CDP) globally or on a 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 arguments or keywords.

Defaults

CDP is disabled.

Command Modes

Global configuration
Interface configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.
The enable and disable keywords were removed.

Release 3.3.0

No modification.

Release 3.4.0

No modification.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

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.

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 Packet-over-SONET (POS) interface 0/0/0/1:

RP/0/RP0/CPU0:router(config)# interface POS 0/0/0/1
RP/0/RP0/CPU0:router(config-if)# cdp
 
   

The following example shows how to disable CDP on Packet-over-SONET (POS) interface 0/0/0/1:

RP/0/RP0/CPU0:router(config)# interface POS 0/0/0/1 
RP/0/RP0/CPU0:router(config-if)# no cdp

Related Commands

Command
Description

show cdp

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


cdp advertise v1

To change the version of Cisco Discovery Protocol (CDP) that is used to communicate with neighboring devices to version 1 (CDPv1), use the cdp advertise v1 command in global configuration mode. To remove the cdp advertise v1 command from the configuration file and restore the system to its default condition with respect to this command, use the no form of this command.

cdp advertise v1

no cdp advertise [v1]

Syntax Description

v1

Configures CDP to send and receive version 1 (CDPv1) advertisements only.


Defaults

Version 2 is enabled.

Command Modes

Global configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

The v2 keyword was removed.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

CDPv2 packets are sent by default. CDP also sends and receives CDPv1 packets if the device with which CDP is interacting does not process CDPv2 packets.

CDPv2 adds device information over CDPv1. The additional information that is contained in the CDPv2 messages relates to Native VLAN, VLAN Trunking Protocol (VTP) Management Domain, Ethernet Duplex, and other features.

Task ID

Task ID
Operations

cdp

read, write


Examples

The following example shows how to set a networking device to send and receive only CDPv1 advertisements:

RP/0/RP0/CPU0:router(config)# cdp advertise v1
 
   

The following example shows how to restore the default condition (sending and receiving CDPv2 advertisements):

RP/0/RP0/CPU0:router(config)# no cdp advertise

Related Commands

Command
Description

cdp

Enables CDP on a supported interface.

show cdp

Displays global CDP information.


cdp holdtime

To specify the time for which the receiving device should hold a Cisco Discovery Protocol (CDP) packet from your networking device before discarding it, use the cdp holdtime command in global configuration mode. To remove the cdp holdtime global configuration command from the configuration file and restore the system to its default condition with respect to this command, use the no form of this command.

cdp holdtime seconds

no cdp holdtime

Syntax Description

seconds

Hold time to be sent in the CDP update packets. Range is 10 seconds to 255 seconds. The default is 180 seconds.


Defaults

seconds: 180 seconds

Command Modes

Global configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

CDP packets are sent with a time-to-live value, or hold time, that is nonzero after an interface is enabled.

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.

Task ID

Task ID
Operations

cdp

read, write


Examples

The following example shows how to specify that the CDP packets sent from the networking device are 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 networking device changes often and you want the receiving devices to purge this information more quickly.

RP/0/RP0/CPU0:router(config)# cdp holdtime 60
 
   

The following example shows how to use the no form of the command to set the hold time to the default of 180 seconds:

RP/0/RP0/CPU0:router(config)# no cdp holdtime

Related Commands

Command
Description

cdp timer

Specifies how often the software sends CDP updates.

show cdp

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


cdp log adjacency changes

To log changes to the Cisco Discovery Protocol (CDP) adjacency table, use the cdp log adjacency changes command in global configuration mode. To disable the logging, use the no form of this command.

cdp log adjacency changes

no cdp log adjacency changes

Syntax Description

No keywords or arguments.

Defaults

CDP adjacency table logging is disabled.

Command Modes

Global configuration

Command History

Release
Modification

Release 3.3.0

This command was first supported on the Cisco CRS-1 and Cisco XR 12000 Series Routers.

Release 3.4.0

No modification.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

When CDP adjacency table logging is enabled, a syslog is generated each time a CDP neighbor is added or removed.

Task ID

Task ID
Operations

cdp

read, write


Examples

The following example shows how to enable CDP adjacency table logging.

RP/0/RP0/CPU0:router# configure 
RP/0/RP0/CPU0:router(config)# cdp log adjacency changes 
 
   

When CDP adjacency table logging is enabled, a syslog is generated each time a CDP neighbor is added or removed. The following is an example of the log entry:

LC/0/5/CPU0:Jun 5 10:51:18.081 : cdp[109]: %L2-CDP-6-DELETED_NEIGHBOR : 
CDP Neighbour TBA04110127 on interface GigabitEthernet0/5/0/0 has been deleted, remote 
interface 3/2 
 
   
LC/0/5/CPU0:Jun  5 10:51:33.120 : cdp[109]: %L2-CDP-6-NEW_NEIGHBOR : New CDP neighbor 
TBA04110127 detected on interface GigabitEthernet0/5/0/0, remote interface 3/2
 
   

Related Commands

Command
Description

show cdp

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


cdp timer

To specify how often the software sends Cisco Discovery Protocol (CDP) updates, use the cdp timer command in global configuration mode. To remove the cdp timer global configuration command from the configuration file and restore the system to its default condition with respect to this command, use the no form of this command.

cdp timer seconds

no cdp timer

Syntax Description

seconds

Frequency with which the Cisco IOS XR software sends CDP updates. Range is 5 seconds to 254 seconds. The default is 60 seconds.


Defaults

seconds: 60 seconds

Command Modes

Global configuration

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

A lower timer setting causes CDP updates to be sent more frequently.

Task ID

Task ID
Operations

cdp

read, write


Examples

The following example shows how to set the CDP timer to 80 seconds, which is less frequent than the default setting of 60 seconds:

RP/0/RP0/CPU0:router(config)# cdp timer 80

Related Commands

Command
Description

cdp holdtime

Specifies the time for which the receiving device should hold a CDP packet sent by your networking device before discarding it.

show cdp

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


clear cdp counters

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

clear cdp counters [location node-id]

Syntax Description

location node-id

(Optional) Clears CDP traffic counters for the designated node. The node-id argument is entered in the rack/slot/module notation.


Defaults

The counters are set to zero.

Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Task ID

Task ID
Operations

cdp

read, write


Examples

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

RP/0/RP0/CPU0:router# clear cdp counters
RP/0/RP0/CPU0: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, Truncated: 0
        CDP version 1 advertisements output: 0, Input: 0
        CDP version 2 advertisements output: 0, Input: 0
        Unrecognize Hdr version: 0, File open failed: 0

Related Commands

Command
Description

clear cdp table

Clears the table that contains CDP information about neighbors.

show cdp traffic

Displays traffic information between devices gathered using CDP.


clear cdp table

To clear and automatically resize the table that contains Cisco Discovery Protocol (CDP) information about neighbors, use the clear cdp table command in EXEC mode.

clear cdp table [location node-id]

Syntax Description

location node-id

(Optional) Clears and resizes the CDP table for the designated node. The node-id argument is entered in the rack/slot/module notation.


Defaults

No default behavior or values

Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the clear cdp table command to clear and resize the CDP table that contains the neighbor entries. The new table size is calculated according to the recommended hash table size, as seen in the show cdp command output.

Task ID

Task ID
Operations

cdp

read, write


Examples

The following example shows how to clears and resize the CDP table. The output of the show cdp neighbors command before and after use of the clear cdp table command shows that all information has been deleted from the table:

RP/0/RP0/CPU0: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
TBA04341195(15la Mg0/RP1/CPU0/0    171        T S         WS-C2924  0/1     
 
   
RP/0/RP0/CPU0:router# clear cdp table 
RP/0/RP0/CPU0: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
 
   

The show cdp command shows that the table has been resized:

RP/0/RP0/CPU0: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

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

show cdp neighbors

Displays information about neighboring devices using CDP.


show cdp

To display global Cisco Discovery Protocol (CDP) information, including CDP version, timer, and hold-time information, use the show cdp command in EXEC mode.

show cdp

Syntax Description

This command has no arguments or keywords.

Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the show cdp command to display CDP version, timer, and hold-time information relative to CDP operations.

Task ID

Task ID
Operations

cdp

read


Examples

The following example shows how to use the show cdp command to verify the CDP global settings:

RP/0/0/CPU0:router# show cdp
 
   
Global CDP information:
        Sending CDP packets every 20 seconds
        Sending a holdtime value of 30 seconds
        Sending CDPv2 advertisements is not enabled
 
   

Table 1 describes the significant fields shown in the display.

Table 1 show cdp Field Descriptions 

Field
Definition

Sending CDP packets every 20 seconds

Interval between transmissions of CDP advertisements. This field is controlled by the cdp timer command.

Sending a holdtime value of 30 seconds

Time for which 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 not enabled

State of being enabled or disabled for the transmission of CDP version 2-type advertisements. This field is controlled by the cdp advertise v1 command.


Related Commands

Command
Description

cdp advertise v1

Changes the version of CDP that is used to communicate with neighboring devices to CDPv1.

cdp holdtime

Specifies the time for which the receiving device should hold a CDP packet sent by your networking device before discarding it.

cdp timer

Specifies how often the Cisco IOS XR software sends CDP updates.

clear cdp table

Clears and resizes the table that contains CDP information about neighbors.

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 information about neighboring devices using CDP.

show cdp traffic

Displays traffic information between devices gathered using CDP.


show cdp entry

To display information about a specific neighboring device or all neighboring devices discovered using Cisco Discovery Protocol (CDP), use the show cdp entry command in EXEC mode.

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

Syntax Description

*

Displays all CDP neighbors.

entry-name

Name of a neighbor about which you want information.

protocol

(Optional) Displays protocol information associated with CDP neighbor entries.

version

(Optional) Displays version information associated with CDP neighbor entries.


Defaults

This command displays information on a particular device that has been discovered by CDP.

Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Task ID

Task ID
Operations

cdp

read, write


Examples

The following is sample output from the show cdp entry command. Information about device ID, address, platform, interface, hold time, and version is displayed.

RP/0/RP0/CPU0:router# show cdp entry TBA04341195 
 
   
-------------------------
Device ID: TBA04341195(sys-235)
SysName : sys-235
Entry address(es):
  IP address: 172.16.23.9
Platform: WS-C6006,  Capabilities: Trans-Bridge Switch
Interface: MgmtEth0/RP1/CPU0/0
Port ID (outgoing port): 4/18
Holdtime : 157 sec
 
   
Version :
WS-C6006 Software, Version McpSW: 7.2(2) NmpSW: 7.2(2)
Copyright (c) 1995-2002 by Cisco Systems
 
   
advertisement version: 2
VTP Management Domain: 'sys'
Native VLAN: 125
Duplex: full
 
   

Table 2 describes the significant fields shown in the display.

Table 2 show cdp entry Field Descriptions

Field
Description

Device ID

ID code assigned during installation of the router.

Entry address(es)

Addresses of the platform, selected interface, and port ID.

Platform

Platform name.

Capabilities

Special functions that the platform can perform (in this case the platform is a trans-bridge switch).

Interface

Interface location expressed as rack/slot/instance module/port.

Port ID (outgoing port)

Location of the port in use by the interface.

Holdtime

Time (in seconds) for which the device directs the neighbor to hold a CDP advertisement before discarding it. This field is controlled by the cdp holdtime command.

Version

Software version.

advertisement version

Version number of the advertising protocol.

VTP Management Domain

VLAN Trunking Protocol (VTP) domain name of neighbor device.

Native VLAN

VLAN ID.

Duplex

Duplex setting: half or full.


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 information about neighboring devices discovered by CDP.

show cdp traffic

Displays traffic information between devices gathered using CDP.


show cdp interface

To display information about the interfaces on which Cisco Discovery Protocol (CDP) is enabled, use the show cdp interface command in EXEC mode.

show cdp interface [type instance | location node-id]

Syntax Description

type

Interface type. For more information, use the question mark (?) online help function.

instance

Either a physical interface instance or a virtual interface instance as follows:

Physical interface instance. Naming notation is rack/slot/module/port and a slash between values is required as part of the notation.

rack: Chassis number of the rack.

slot: Physical slot number of the modular services card or line card.

module: Module number. A physical layer interface module (PLIM) is always 0.

port: Physical port number of the interface.

Note In references to a Management Ethernet interface located on a route processor card, the physical slot number is alphanumeric (RP0 or RP1) and the module is CPU0.
Example: interface MgmtEth0/RP1/CPU0/0.

Virtual interface instance. Number range varies depending on interface type.

For more information about the syntax for the router, use the question mark (?) online help function.

location node-id

(Optional) Displays detailed CDP information for the designated node. The node-id argument is entered in the rack/slot/module notation.


Defaults

This command displays information about the interfaces on which CDP has been enabled.

Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

This command was first supported on the Cisco XR 12000 Series Router.

Release 3.3.0

No modification.

Release 3.4.0

No modification.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the show cdp interface command to display information about any CDP interfaces. When an interface is specified in the command syntax, information is displayed about the specific interface. Not specifying the interface displays information about all interfaces.

Task ID

Task ID
Operations

cdp

read, write


Examples

The following is sample output from the show cdp interface command. Information about the status, CDP timer, and hold-time settings is displayed for all interfaces on which CDP is enabled.

RP/0/RP0/CPU0:router# show cdp interface 
 
   
POS0/2/0/0 is Up
  Encapsulation HDLC
  Sending CDP packets every 120 seconds
  Holdtime is 240 seconds
POS0/2/0/1 is Up
  Encapsulation HDLC
  Sending CDP packets every 120 seconds
  Holdtime is 240 seconds
POS0/2/0/2 is Up
  Encapsulation HDLC
  Sending CDP packets every 120 seconds
  Holdtime is 240 seconds
POS0/2/0/3 is Up
  Encapsulation HDLC
  Sending CDP packets every 120 seconds
  Holdtime is 240 seconds
MgmtEth0/RP1/CPU0/0 is Up
  Encapsulation ARPA
  Sending CDP packets every 120 seconds
  Holdtime is 240 seconds
 
   

The following is sample output from the show cdp interface command with an interface specified. Information about the status, CDP timer, and hold time settings is displayed for Packet-over-SONET (POS) interface 0/2/0/1 only.

RP/0/RP0/CPU0:router# show cdp interface POS 0/2/0/1 
 
   
POS0/2/0/1 is Up
  Encapsulation HDLC
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
 
   

Table 3 describes the significant fields shown in the display.

Table 3 show cdp interface Field Descriptions

Field
Description

POS0/2/0/1 is Up

Current condition of POS interface 0/0/2/1.

Encapsulation HDLC

Interface is encoding packets using the Cisco HDLC layer 2 encapsulation.

Sending CDP packets every 60 seconds

Interval between transmissions of CDP advertisements. This field is controlled by the cdp timer command.

Holdtime is 180 seconds

Time for which the device directs the neighbor to hold a CDP advertisement before discarding it. This field is controlled by the cdp holdtime command.


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 information about neighboring devices using CDP.

show cdp traffic

Displays traffic information between devices gathered using CDP.


show cdp neighbors

To display detailed information about neighboring devices discovered using Cisco Discovery Protocol (CDP), use the show cdp neighbors command in EXEC mode.

show cdp neighbors [type instance | location node-id] [detail]

Syntax Description

type

Interface type. For more information, use the question mark (?) online help function.

instance

Either a physical interface instance or a virtual interface instance as follows:

Physical interface instance. Naming notation is rack/slot/module/port and a slash between values is required as part of the notation.

rack: Chassis number of the rack.

slot: Physical slot number of the modular services card or line card.

module: Module number. A physical layer interface module (PLIM) is always 0.

port: Physical port number of the interface.

Note In references to a Management Ethernet interface located on a route processor card, the physical slot number is alphanumeric (RP0 or RP1) and the module is CPU0.
Example: interface MgmtEth0/RP1/CPU0/0.

Virtual interface instance. Number range varies depending on interface type.

For more information about the syntax for the router, use the question mark (?) online help function.

location node-id

(Optional) Displays detailed CDP information for the designated node. The node-id argument is entered in the rack/slot/module notation.

detail

(Optional) Displays detailed information about a neighbor or neighbors, including network address, enabled protocols, hold time, and software version. The output includes information on both IPv4 and IPv6 addresses.


Defaults

No default behavior or values

Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

No modification.

Release 3.3.0

Revised output for the detail keyword to display IPv6 neighbors.

Release 3.4.0

No modification.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Use the show cdp neighbors command to display information on any CDP neighbors. When a location is specified in the command syntax, information on the neighbor is displayed for the specified node. Not specifying the location displays information about the neighbor for all interfaces.

Use the show cdp neighbors command with the detail keyword to display additional information, including IPv6 neighbors.

Task ID

Task ID
Operations

cdp

read


Examples

The following is sample output from the show cdp neighbors command:

RP/0/RP0/CPU0: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
 
   
cisco_1          Mg0/0/CPU0/0    139      T S         WS-C2924M Fa0/6
cisco_2          PO0/3/0/0       173      R           CRS-1     PO0/3/0/0
TBA04110127      Gi0/7/0/0       173      T S         WS-C6506  3/9
cisco_3          Gi0/7/0/2       171      R           CRS-1     Gi0/4/0/2
 
   

Table 4 describes the significant fields shown in the display.

Table 4 show cdp neighbors Field Descriptions 

Field
Description

Capability Codes

Type of device that can be discovered.

Device ID

Name of the neighbor device.

Local Intrfce

Protocol being used by the connectivity media and the interface number.

Holdtme

Remaining time, in seconds, for which the current device holds the CDP advertisement from a sending router before discarding it.

Capability

Type of the device listed in the CDP Neighbors table. Values are as follows:

R—Router

T—Transparent bridge

B—Source-routing bridge

S—Switch

H—Host

I—Internet Group Management Protocol (IGMP) device

r—Repeater

Platform

Product number of the device.

Port ID

Protocol and port number of the device.


The following is sample output for IPv4 and IPv6 neighbors from the show cdp neighbors detail command:

RP/0/0/CPU0:router# show cdp neighbor detail
 
   
-------------------------
Device ID: uut-user
SysName : uut-user
Entry address(es):
IPv4 address: 1.1.1.1
IPv6 address: 1::1
IPv6 address: 2::2
Platform: cisco 12008/GRP, Capabilities: Router
Interface: POS0/4/0/3
Port ID (outgoing port): POS0/2/0/3
Holdtime : 177 sec
 
   
Version :
Cisco IOS XR Software, Version 0.0.0[Default]
Copyright (c) 2005 by cisco Systems, Inc.
 
   
advertisement version: 2
 
   

Table 5 describes the significant fields shown in the display.

Table 5 show cdp neighbors detail Field Descriptions 

Field
Definition

Device ID

Name of the neighbor device.

Entry address(es)

List of network addresses of neighbor devices. The address can be in IP, or Connectionless Network Service (CLNS) protocol conventions.

Platform

Product name and number of the neighbor device.

Capabilities

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

Interface being used by the connectivity medium.

Port ID

Port number of the port on the current device.

Holdtime

Remaining time (in seconds) for which the current device holds the CDP advertisement from a sending router before discarding it.

Version

Software version of the neighbor device.

advertisement version

Version number of the advertising protocol.


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


show cdp traffic

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

show cdp traffic [location node-id]

Syntax Description

location node-id

(Optional) Displays detailed CEF information for the designated node. The node-id argument is entered in the rack/slot/module notation.


Command Modes

EXEC

Command History

Release
Modification

Release 2.0

This command was introduced on the Cisco CRS-1.

Release 3.0

No modification.

Release 3.2

No modification.

Release 3.3.0

No modification.

Release 3.4.0

No modification.


Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.

Task ID

Task ID
Operations

cdp

read


Examples

The following is sample output from the show cdp traffic command:

RP/0/RP0/CPU0:router# show cdp traffic 
 
   
CDP counters :
        Packets output: 50662, Input: 40414
        Hdr syntax: 0, Chksum error: 0, Encaps failed: 0
        No memory: 0, Invalid packet: 0, Truncated: 0
        CDP version 1 advertisements output: 0, Input: 0
        CDP version 2 advertisements output: 50662, Input: 40414
        Unrecognize Hdr version: 0, File open failed: 0
 
   

Table 6 describes the significant fields shown in the display.

Table 6 show cdp traffic Field Descriptions 

Field
Definition

Packets output

Number of CDP advertisements sent by the local device. Note that this value is the sum of the CDP version 1 advertisements output and CDP version 2 advertisements output fields.

Input

Number of CDP advertisements received by the local device. Note that this value is the sum of the CDP version 1 advertisements input and CDP version 2 advertisements input fields.

Hdr syntax

Number of CDP advertisements having bad headers that have been received by the local device.

Chksum error

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

Encaps failed

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

No memory

Number of times that 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 packet

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

Truncated

Number of times truncated CDP advertisements were sent because there was not enough space in the CDP packet to hold all CDP Type-Length-Values (TLVs).

CDP version 1 advertisements output

Number of CDP version 1 advertisements sent by the local device.

Input

Number of CDP version 1 advertisements received by the local device.

CDP version 2 advertisements output

Number of CDP version 2 advertisements sent by the local device.

Input

Number of CDP version 2 advertisements received by the local device.

Unrecognize Hdr version

Number of packets received from a CDP version that was outside the current configuration.

File open failed

Number of times that CDP failed to connect to one of the underlying services it uses.


Related Commands

Command
Description

show cdp

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

show cdp entry

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

show cdp interface

Displays information about the interfaces on which CDP is enabled.

show cdp neighbors

Displays information about neighboring devices using CDP.