hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

CDP Additions for Cisco IOS

Feature Summary

Platforms

Supported MIBs and RFCs

Functional Description

Configuring, Monitoring and Maintaining Tasks

Command Reference

What to Do Next

CDP Additions for Cisco IOS

Feature Summary

The Cisco Discovery Protocol (CDP) is a media-independent device discovery protocol that runs on all Cisco manufactured equipment, including routers, bridges, access servers, and switches. CDP Version-2 is the most recent release of the protocol and provides more intelligent device tracking features. This feature module describes the following additions to CDP that provide CDP Version-2 functionality:

Each device sends periodic messages to a multicast address and listens to the periodic messages sent by others in order to learn about neighboring devices and determine when their interfaces to the media go up or down. Each device advertises at least one address at which it can receive SNMP messages. The advertisements contain holdtime, information, which indicates the period of time a receiving device should hold CDP information from a neighbor before discarding it.

With CDP, network management applications can learn the device type and the SNMP agent address of neighboring devices. This process enables applications to send SNMP queries to neighboring devices.

Benefits

List of Terms

advertisement---An updated information packet sent periodically by the CDP process.

holdtime---The amount of time, in seconds, the receiving device should hold a CDP advertisement from a neighbor before discarding it.

neighbor---A remote system, connected to the subject system on one or more of its interfaces.

Type Length Value (TLV)---A piece of information in a CDP advertisement.

VLAN Trunking Protocol (VTP)---A discovery technique deployed by switches where each switch advertises its management domain on its trunk ports, its configuration revision number, and its known VLANs and their specific parameters. A VTP domain is made up of one or more interconnected devices that share the same VTP domain name. A switch can be configured to be in only one VTP domain.

Platforms

This feature is supported on the following routers and access servers:

Supported MIBs and RFCs

This feature supports the CISCO CDP-MIB.

Functional Description

New Type Length Values

Type Length Values (TLVs) are blocks of information embedded in CDP advertisements. Table 1 summarizes existing TLVs.


Table 1: Existing TLV Descriptions
TLV Definition

Device-ID

Identifies the device name in the form of a character string.

Address TLV

Contains a list of network addresses of both receiving and transmitting devices.

Port-ID

Identifies the port on which the CDP packet is sent.

Capabilities

Describes the device's functional capability in the form of a device type, for example, a switch.

Version

Contains information about the software release version on which the device is running.

Platform

Describes the hardware platform name of the device, for example, Cisco 4500.

IP Network Prefix

Contains a list of network prefixes to which the sending device can forward IP packets. This information is in the form of the interface protocol and port number, for example, Eth 1/0.

CDP can now advertise new features, using the following new TLVs:

New Error Messages Sent to the Console

CDP sends error messages to the console (and, optionally, to a logging server on another system) during operation. CDP now sends error messages that detail:

Unmatching Duplex States

Instances where unmatching duplex states are reported between two devices are displayed in the console in the following format:


Error Message   
%DUPLEX_MISMATCH: duplex mismatch discovered on [local interface (local interface duplex mode)], with [neighbor name neighbor interface (neighbor duplex mode)]
 

Explanation   

CDP discovered a mismatch of duplex configuration. The received duplex TLV does not match the interface's configuration:

Recommended Action   

Configure the interfaces so that they have the same duplex mode.

Table 2 describes field descriptions shown in the error message syntax statement.

Unmatching Duplex Error Message Field Descriptions

Field Definition

local interface

The protocol and port number of the local device.

local interface duplex mode

The duplex mode of the local device, either full or half.

neighbor name

The name of the connecting device.

neighbor interface

The protocol and port number of the connecting device.

neighbor duplex mode

The duplex mode of the connecting device, either full or half.

An example of a system log message reporting unmatching duplex states is as follows:

%DUPLEX_MISMATCH: duplex mismatch discovered on Ethernet1/0 (half), with other-router Ethernet2/3 (full).
 

Note that interface Ethernet1/0 is operating at half duplex and interface Ethernet2/3 is operating at full duplex.

Unmatching VLAN Port IDs

Instances where unmatching VLAN IDs are reported between two devices are displayed in the console in the following format:


Error Message   
%NATIVE_VLAN_MISMATCH: native VLAN mismatch discovered on [local interface (local interface VLAN ID),] with [neighbor name neighbor interface (neighbor VLAN ID)]
 

Explanation   

CDP discovered a mismatch of native VLAN configuration. The received native VLAN TLV does not match the interface's configuration.

Recommended Action   

Configure the interfaces so that they have the same native VLAN ID.

Table 3 describes the fields shown in the error message syntax statement.


Table 2: Unmatching Native VLAN ID Error Message Field Descriptions
Field Definition

local interface

The protocol and port number of the local device.

local interface VLAN ID

The ID number assigned to the VLAN of the local device.

neighbor name

The name of the connecting device.

neighbor interface

The protocol and port number of the connecting device.

neighbor VLAN ID

The ID number assigned to the VLAN of the connecting device.

An example of a system log message reporting unmatching native VLAN IDs is as follows:

Native VLAN mismatch discovered on Ethernet1/0 (5), with 
router1 Ethernet2/3 (27).
 

Note that interface Ethernet1/0 has a native VLAN ID of 5 and interface Ethernet 2/3 has a native VLAN ID of 27.

Configuring, Monitoring and Maintaining Tasks

This section describes configuring, monitoring and maintaining CDP activity.

To enable CDP Version-2 advertisements, use the following command in global configuration mode:
Command Purpose

cdp advertise-v2

Enable CDP Version-2 advertising functionality on a device.

Monitor and Maintain CDP Activity

To show display information about CDP commands, use one of the following commands in privileged EXEC mode:
Command Purpose

show cdp

Displays the interval between transmissions of CDP advertisements, the number of seconds the CDP advertisement is valid for a given port, and the version of the advertisement.

show cdp neighbors

Displays the type of device that has been discovered, the name of the device, the number and type of the local interface (port), the number of seconds the CDP advertisement is valid for the port, the device type, the device product number, and the port ID. Issuing the detail keyword displays information on the native VLAN ID, the duplex mode, and the VTP domain name associated with neighbor devices.

show cdp traffic

Displays counters related to CDP activity.

Command Reference

This section documents the following new or modified commands. All other commands used with this feature are documented in the Cisco IOS Release 12.0 command references.

cdp advertise-v2

To enable advertising CDP Version-2 functionality on a device, use the cdp advertise-v2 global configuration command. To disable advertising CDP Version-2 functionality, use the no form of the command.

cdp advertise-v2
no cdp advertise-v2

Syntax Description

This command has no keywords or arguments.

Default

Enabled

Command Mode

Global configuration

Usage Guidelines

This command first appeared in Cisco IOS Release 12.0(3)T. Three new TLVs have been added to CDP Version-2. They are VTP management domain, native VLAN, and full/half duplex TLVs.

Example

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

router1(config)# cdp advertise-v2

Related Commands

cdp enable
cdp run

show cdp

To display global CDP information, including timer and holdtime information, use the show cdp EXEC command.

show cdp

Syntax Description

This command has no keywords or arguments.

Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 10.3.

Example

The following example shows that the current router is transmitting CDP advertisements every one minute. Also shown is that the current router directs its neighbors to hold its CDP advertisements for three minutes, 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 4 describes the fields shown in the example.


Table 3: 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

cdp advertise-v2
cdp holdtime
cdp timer
show cdp entry
show cdp interface
show cdp neighbors
show cdp traffic

show cdp neighbors

To display information about neighbors, use the show cdp neighbors EXEC command.

show cdp neighbors [type number] [detail]

Syntax Description

type

(Optional) Type of 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.

Default

None

Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 10.3.

Example

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 5 describes the fields shown in the example.


Table 4: 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 6 describes field descriptions shown in the example.


Table 5: 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

show cdp
show cdp entry
show cdp interface
show cdp traffic

show cdp traffic

To display information from the CDP table, use the show cdp traffic EXEC command.

show cdp traffic

Syntax Description

This command has no keywords or arguments.

Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 10.3.

Example

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 7 describes the fields shown in the example.


Table 6: show cdp traffic Fields
Field Definition

Total packets output

The number of CDP advertisements transmitted 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 local device's bridge port.

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 transmitted 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 transmitted 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 transmitted by the local device.

Input

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

Related Commands

show cdp
show cdp entry
show cdp interface
show cdp neighbors

What to Do Next

For more information, see sections on IP configuration in the Network Protocols Configuration Guide, Part 1 and the Configuration Fundamentals Configuration Guide.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Thu Mar 4 11:48:10 PST 1999
Copyright 1989-1999©Cisco Systems Inc.