Table Of Contents
Implementing CDP on Cisco IOS XR Software
Contents
Prerequisites for Implementing CDP on Cisco IOS XR Software
Information About Implementing CDP on Cisco IOS XR Software
CDP Functional Overview
How to Implement CDP on Cisco IOS XR Software
Enabling CDP
Modifying CDP Default Settings
Monitoring CDP
Examples
Configuration Examples for Implementing CDP on Cisco IOS XR Software
Enabling CDP: Example
Modifying Global CDP Settings: Example
Additional References
Related Documents
Standards
MIBs
RFCs
Technical Assistance
Implementing CDP on Cisco IOS XR Software
Cisco Discovery Protocol (CDP) is a media- and protocol-independent protocol that runs on all Cisco-manufactured equipment including routers, bridges, access and communication servers, and switches. Using CDP, you can view information about all the Cisco devices that are directly attached to the device.
This module describes the new and revised tasks you need to implement CDP on your Cisco IOS XR network.
Note
For more information about CDP on the Cisco IOS XR software and complete descriptions of the CDP commands listed in this module, refer to the "Related Documents" section of this module. To locate documentation for other commands that might appear in the course of running a configuration task, search online in the Cisco IOS XR software master command index.
Feature History for Implementing CDP on Cisco IOS XR Software Contents
Release
|
Modification
|
Release 2.0
|
This feature was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification
|
Release 3.2
|
This feature was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Contents
•
Prerequisites for Implementing CDP on Cisco IOS XR Software
•
Information About Implementing CDP on Cisco IOS XR Software
•
How to Implement CDP on Cisco IOS XR Software
•
Configuration Examples for Implementing CDP on Cisco IOS XR Software
•
Additional References
Prerequisites for Implementing CDP on Cisco IOS XR Software
You must be in a user group associated with a task group that includes the proper task IDs for CDP commands. 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.
Information About Implementing CDP on Cisco IOS XR Software
To implement CDP you need to understand the following concept:
•
CDP Functional Overview
CDP Functional Overview
CDP is primarily used to obtain protocol addresses of neighboring devices and discover the platform of those devices. CDP can also be used to display information about the interfaces your router uses. CDP is media- and protocol-independent, and runs on all equipment manufactured by Cisco, including routers, bridges, access servers, and switches.
Use of SNMP with the CDP MIB allows network management applications to learn the device type and the SNMP agent address of neighboring devices, and to send SNMP queries to those devices. CDP uses the CISCO-CDP-MIB.
CDP runs on all media that support Subnetwork Access Protocol (SNAP), including LAN, Frame Relay, and ATM physical media. CDP runs over the data link layer only. Therefore, two systems that support different network-layer protocols can learn about each other.
Each device configured for CDP sends periodic messages, known as advertisements, to a multicast address. Each device advertises at least one address at which it can receive SNMP messages. The advertisements also contain time-to-live, or hold-time, information, which indicates the length of time a receiving device should hold CDP information before discarding it. Each device also listens to the periodic CDP messages sent by others to learn about neighboring devices and determine when their interfaces to the media go up or down.
CDP Version-2 (CDPv2) is the most recent release of the protocol and provides more intelligent device tracking features. These features include a reporting mechanism that allows for more rapid error tracking, thereby reducing costly downtime. Reported error messages can be sent to the console or to a logging server, and can cover instances of unmatching native VLAN IDs (IEEE 802.1Q) on connecting ports, and unmatching port duplex states between connecting devices.
CDPv2 show commands can provide detailed output on VLAN Trunking Protocol (VTP) management domain and duplex modes of neighbor devices, CDP-related counters, and VLAN IDs of connecting ports.
Type-length-value fields (TLVs) are blocks of information embedded in CDP advertisements. Table 1 summarizes the TLV definitions for CDP advertisements.
Table 1 Type-Length-Value Definitions for CDPv2
TLV
|
Definition
|
Device-ID TLV
|
Identifies the device name in the form of a character string.
|
Address TLV
|
Contains a list of network addresses of both receiving and sending devices.
|
Port-ID TLV
|
Identifies the port on which the CDP packet is sent.
|
Capabilities TLV
|
Describes the functional capability for the device in the form of a device type; for example, a switch.
|
Version TLV
|
Contains information about the software release version on which the device is running.
|
Platform TLV
|
Describes the hardware platform name of the device, for example, Cisco 4500.
|
VTP Management Domain TLV
|
Advertises the system's configured VTP management domain name-string. Used by network operators to verify VTP domain configuration in adjacent network nodes.
|
Native VLAN TLV
|
Indicates, per interface, the assumed VLAN for untagged packets on the interface. CDP learns the native VLAN for an interface. This feature is implemented only for interfaces that support the IEEE 802.1Q protocol.
|
Full/Half Duplex TLV
|
Indicates status (duplex configuration) of CDP broadcast interface. Used by network operators to diagnose connectivity problems between adjacent network elements.
|
How to Implement CDP on Cisco IOS XR Software
This section contains the following procedures:
•
Enabling CDP (required)
•
Modifying CDP Default Settings (optional)
•
Monitoring CDP (optional)
Enabling CDP
To enable CDP, you must first enable CDP globally on the router and then enable CDP on a per-interface basis. This task explains how to enable CDP globally on the router and then enable CDP on an interface.
SUMMARY STEPS
1.
configure
2.
cdp
3.
interface type number
4.
cdp
5.
end
or
commit
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
cdp
Example:
RP/0/RP0/CPU0:router(config)# cdp
|
Enables CDP globally.
|
Step 3
|
interface type instance
Example:
RP/0/RP0/CPU0:router(config)# interface pos
0/0/0/1
|
Enters interface configuration mode.
|
Step 4
|
cdp
Example:
RP/0/RP0/CPU0:router(config-if)# cdp enable
|
Enables CDP on an interface.
|
Step 5
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config-if)# end
or
RP/0/RP0/CPU0:router(config-if)# commit
|
Saves configuration changes.
• When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before
exiting(yes/no/cancel)?
[cancel]:
– Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
– Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
– Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Modifying CDP Default Settings
This task explains how to modify the default version, hold-time setting, and timer settings.
Note
The commands can be entered in any order.
SUMMARY STEPS
1.
configure
2.
cdp advertise v1
3.
cdp holdtime seconds
4.
cdp timer seconds
5.
end
or
commit
6.
show cdp
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
cdp advertise v1
Example:
RP/0/RP0/CPU0:router(config)# cdp advertise v1
|
Configures CDP to use only version 1 (CDPv1) in communicating with neighboring devices.
• By default, when CDP is enabled, the router sends CDPv2 packets. CDP also sends and receives CDPv1 packets if the device with which CDP is interacting does not process CDPv2 packets.
• In this example, the router is configured to send and receive only CDPv1 packets.
|
Step 3
|
cdp holdtime seconds
Example:
RP/0/RP0/CPU0:router(config)# cdp holdtime 30
|
Specifies the amount of time that the receiving networking device will hold a CDP packet sent from the router before discarding it.
• By default, when CDP is enabled, the receiving networking device holds a CDP packet for 180 seconds before discarding it.
Note The CDP hold time must be set to a higher number of seconds than the time between CDP transmissions, which is set with the cdp timer command.
• In this example, the value of hold-time for the seconds argument is set to 30 seconds.
|
Step 4
|
cdp timer seconds
Example:
RP/0/RP0/CPU0:router(config)# cdp timer 20
|
Specifies the frequency at which CDP update packets are sent.
• By default, when CDP is enabled, CDP update packets are sent at a frequency of once every 60 seconds.
Note A lower timer setting causes CDP updates to be sent more frequently.
• In this example, CDP update packets are configured to be sent at a frequency of once every 20 seconds.
|
Step 5
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config)# end
or
RP/0/RP0/CPU0:router(config)# commit
|
Saves configuration changes.
• When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before
exiting(yes/no/cancel)?
[cancel]:
– Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
– Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
– Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Step 6
|
show cdp
Example:
RP/0/RP0/CPU0:router# show cdp
|
(Optional) Displays global CDP information.
• The output displays the CDP version running on the router, the hold time setting, and the timer setting.
|
Monitoring CDP
This task shows how to monitor CDP.
Note
The commands can be entered in any order.
SUMMARY STEPS
1.
show cdp entry {* | entry-name} [protocol | version]
2.
show cdp interface [type instance | location node-id]
3.
show cdp neighbors [type instance | location node-id] [detail]
4.
show cdp traffic [location node-id]
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
show cdp entry {* | entry-name} [protocol |
version]
Example:
RP/0/RP0/CPU0:router# show cdp entry *
|
Displays information about a specific neighboring device or all neighboring devices discovered using CDP.
|
Step 2
|
show cdp interface [type instance | location
node-id]
Example:
RP/0/RP0/CPU0:router# show cdp interface pos
0/0/0/1
|
Displays information about the interfaces on which CDP is enabled.
|
Step 3
|
show cdp neighbors [type instance | location
node-id] [detail]
Example:
RP/0/RP0/CPU0:router# show cdp neighbors
|
Displays detailed information about neighboring devices discovered using CDP.
|
Step 4
|
show cdp traffic [location node-id]
Example:
RP/0/RP0/CPU0:router# show cdp traffic
|
Displays information about the traffic gathered between devices using CDP.
|
Examples
The following is sample output for the show cdp neighbors command:
RP/0/0/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
router1 Mg0/0/CPU0/0 177 T S WS-C2924M Fa0/12
router2 PO0/4/0/0 157 R 12008/GRP PO0/4/0/1
The following is sample output for the show cdp neighbors command. In this example, the optional type instance arguments are used in conjunction with the detail optional keyword to display detailed information about a CDP neighbor. The output includes information on both IPv4 and IPv6 addresses.
RP/0/0/CPU0:router# show cdp neighbors POS 0/4/0/0 detail
-------------------------
Platform: cisco 12008/GRP, Capabilities: Router
Port ID (outgoing port): POS0/2/0/3
Cisco IOS XR Software, Version 0.0.0[Default]
Copyright (c) 2005 by cisco Systems, Inc.
The following is sample output for the show cdp entry command. In this example, the optional entry argument is used to display entry information related to a specific CDP neighbor.
RP/0/0/CPU0:router# show cdp entry router2
-------------------------
Platform: cisco 12008/GRP, Capabilities: Router
Port ID (outgoing port): POS0/4/0/1
Cisco IOS XR Software, Version 0.48.0[Default]
Copyright (c) 2004 by cisco Systems, Inc.
The following is sample output for the show cdp interface command. In this example, CDP information related to Packet-over-SONET (PoS) interface 0/4/0/0 is displayed.
RP/0/0/CPU0:router# show cdp interface pos 0/4/0/0
Sending CDP packets every 60 seconds
The following is sample output for the show cdp traffic command:
RP/0/0/CPU0:router# show cdp traffic
Packets output: 194, Input: 99
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: 194, Input: 99
Unrecognize Hdr version: 0, File open failed: 0
The following is sample output for the show cdp traffic command. In this example, the optional location keyword and node-id argument are used to display information about the traffic gathered between devices using CDP from the specified node.
RP/0/0/CPU0:router# show cdp traffic location 0/4/cpu0
Packets output: 16, Input: 13
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: 16, Input: 13
Unrecognize Hdr version: 0, File open failed: 0
Configuration Examples for Implementing CDP on Cisco IOS XR Software
This section provides the following configuration examples:
•
Enabling CDP: Example
•
Modifying Global CDP Settings: Example
Enabling CDP: Example
The following example shows how to configure CDP globally and then enable CDP on Packet-over-SONET (POS) interface 0/3/0/0.
Modifying Global CDP Settings: Example
The following example shows how to modify global CDP settings. In this example, the timer setting is set to 20 seconds, the hold-time setting is set 30 seconds, and the version of CDP used to communicate with neighboring devices is set to CDPv1.
The following example shows how to use the show cdp command to verify the CDP global settings:
RP/0/0/CPU0:router# show cdp
Sending CDP packets every 20 seconds
Sending a holdtime value of 30 seconds
Sending CDPv2 advertisements is not enabled
Additional References
The following sections provide references related to implementing CDP on Cisco IOS XR software.
Related Documents
Related Topic
|
Document Title
|
Cisco IOS XR CDP commands
|
CDP Commands on Cisco IOS XR Software module of Cisco IOS XR System Management Command Reference, Release 3.5
|
Cisco IOS XR master command index
|
Cisco IOS XR Commands Master List, Release 3.5
|
Cisco IOS XR XML API material
|
Cisco IOS XR XML API Guide, Release 3.5
|
Cisco IOS XR getting started material
|
Cisco IOS XR Getting Started Guide, Release 3.5
|
Information about user groups and task IDs
|
Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide, Release 3.5
|
Standards
Standards
|
Title
|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
|
—
|
MIBs
RFCs
RFCs
|
Title
|
No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.
|
—
|
Technical Assistance
Description
|
Link
|
The Cisco Technical Support website contains thousands of pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.
|
http://www.cisco.com/techsupport
|