Configuring CDP

This chapter describes how to configure Cisco Discovery Protocol (CDP) on your access point.

note.gif

Noteblank.gif For complete syntax and usage information for the commands used in this chapter, refer to the Cisco Aironet IOS Command Reference for Access Points and Bridges for this release and the Cisco IOS Configuration Fundamentals Command Reference for Release 12.2.


Understanding CDP

Cisco Discovery Protocol (CDP) is a device-discovery protocol that runs on all Cisco network equipment. Each device sends identifying messages to a multicast address, and each device monitors the messages sent by other devices. Information in CDP packets is used in network management software such as Cisco Prime Infrastructure2000.

CDP is used in network management to know about the neighbors of a given network device. CDP is enabled on the access point radio port only when the radio is associated to another wireless infrastructure device, such as an access point or a bridge. CDP is sent on the lowest VLAN number configured on the access point. When more than on VLAN is used in a wireless network, We recommend that the lowest VLAN number configured be used as the native VLAN

note.gif

Noteblank.gif For best performance on your wireless LAN, disable CDP on all radio interfaces and on sub-interfaces if VLANs are enabled on the access point.


Configuring CDP

This section contains CDP configuration information and procedures:

Default CDP Configuration

Table 17-1 lists the default CDP settings.

 

Table 17-1 Default CDP Configuration

Feature
Default Setting

CDP global state

Enabled

CDP interface state

Enabled

CDP holdtime (packet holdtime in seconds)

180

CDP timer (packets sent every x seconds)

60

Configuring the CDP Characteristics

You can configure the CDP holdtime (the number of seconds before the access point discards CDP packets) and the CDP timer (the number of seconds between each CDP packets the access point sends).

Beginning in Privileged Exec mode, follow these steps to configure the CDP holdtime and CDP timer.

 

Command
Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

cdp holdtime seconds

(Optional) Specify the amount of time a receiving device should hold the information sent by your device before discarding it.

The range is from 10 to 255 seconds; the default is 180 seconds.

Step 3

cdp timer seconds

(Optional) Set the transmission frequency of CDP updates in seconds.

The range is from 5 to 254; the default is 60 seconds.

Step 4

cdp advertise-v2

(Optional) For CDP to send version-2 advertisements

Step 5

cdp log mismatch duplex

(Optional) Log the duplex-mismatches generated by CDP

Step 6

cdp source-interface BVI1

(Optional) Insert the BVI1 interface IP address in all CDP messages

Step 7

end

Return to Privileged Exec mode.

Use the no form of the CDP commands to return to the default settings.

This example shows how to configure and verify CDP characteristics:

AP# configure terminal
AP(config)# cdp holdtime 120
AP(config)# cdp timer 50
AP(config)# end
 
AP# show cdp
Global CDP information:
Sending a holdtime value of 120 seconds
Sending CDP packets every 50 seconds
 

For additional CDP show commands, see the “Monitoring and Maintaining CDP” section.

Disabling and Enabling CDP

CDP is enabled by default. Beginning in Privileged Exec mode, follow these steps to disable the CDP device discovery capability.

 

Command
Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

no cdp run

Disable CDP.

Step 3

end

Return to Privileged Exec mode.

Beginning in privileged EXEC mode, follow these steps to enable CDP:

 

Command
Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

cdp run

Enable CDP after disabling it.

Step 3

end

Return to privileged EXEC mode.

This example shows how to enable CDP.

AP# configure terminal
AP(config)# cdp run
AP(config)# end

Disabling and Enabling CDP on an Interface

CDP is enabled by default on all supported interfaces to send and receive CDP information.

Beginning in privileged EXEC mode, follow these steps to disable CDP on an interface:

 

Command
Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

interface interface-id

Enter interface configuration mode, and enter the interface on which you are disabling CDP.

Step 3

no cdp enable

Disable CDP on an interface.

Step 4

end

Return to privileged EXEC mode.

Step 5

copy running-config startup-config

(Optional) Save your entries in the configuration file.

Beginning in privileged EXEC mode, follow these steps to enable CDP on an interface:

 

Command
Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

interface interface-id

Enter interface configuration mode, and enter the interface on which you are enabling CDP.

Step 3

cdp enable

Enable CDP on an interface after disabling it.

Step 4

end

Return to privileged EXEC mode.

Step 5

copy running-config startup-config

(Optional) Save your entries in the configuration file.

This example shows how to enable CDP on an interface.

AP# configure terminal
AP(config)# interface x
AP(config-if)# cdp enable
AP(config-if)# end

Monitoring and Maintaining CDP

To monitor and maintain CDP on your device, perform one or more of these tasks, beginning in privileged EXEC mode.

 

Command
Description

clear cdp counters

Reset the traffic counters to zero.

clear cdp table

Delete the CDP table of information about neighbors.

show cdp

Display global information, such as frequency of transmissions and the holdtime for packets being sent.

show cdp entry entry-name [ protocol | version ]

Display information about a specific neighbor.

You can enter an asterisk (*) to display all CDP neighbors, or you can enter the name of the neighbor about which you want information.

You can also limit the display to information about the protocols enabled on the specified neighbor or information about the version of software running on the device.

show cdp interface [ type number ]

Display information about interfaces where CDP is enabled.

You can limit the display to the type of interface or the number of the interface about which you want information (for example, entering gigabitethernet 0/1 displays information only about Gigabit Ethernet port 1).

show cdp neighbors [ type number ] [ detail ]

Display information about neighbors, including device type, interface type and number, holdtime settings, capabilities, platform, and port ID.

You can limit the display to neighbors on a specific type or number of interface or expand the display to provide more detailed information.

show cdp traffic

Display CDP counters, including the number of packets sent and received and checksum errors.

Below are six examples of output from the CDP show privileged EXEC commands:

AP # show cdp

Global CDP information:
Sending CDP packets every 50 seconds
Sending a holdtime value of 120 seconds
 
AP# show cdp entry *
-------------------------
Device ID: AP
Entry address(es):
IP address: 10.1.1.66
Platform: cisco WS-C3550-12T, Capabilities: Switch IGMP
Interface: GigabitEthernet0/2, Port ID (outgoing port): GigabitEthernet0/2
Holdtime : 129 sec
 
Version :
Cisco Internetwork Operating System Software
IOS (tm) C3550 Software (C3550-I5Q3L2-M), Experimental Version 12.1(20010612:021
316) [jang-flamingo 120]
Copyright (c) 1986-2001 by cisco Systems, Inc.
Compiled Fri 06-Jul-01 18:18 by jang
 
advertisement version: 2
Protocol Hello: OUI=0x00000C, Protocol ID=0x0112; payload len=27, value=0000000
0FFFFFFFF010221FF00000000000000024B293A00FF0000
VTP Management Domain: ''
Duplex: full
 
-------------------------
Device ID: idf2-1-lab-l3.cisco.com
Entry address(es):
IP address: 10.1.1.10
Platform: cisco WS-C3524-XL, Capabilities: Trans-Bridge Switch
Interface: GigabitEthernet0/1, Port ID (outgoing port): FastEthernet0/10
Holdtime : 141 sec
 
Version :
Cisco Internetwork Operating System Software
IOS (tm) C3500XL Software (C3500XL-C3H2S-M), Version 12.0(5.1)XP, MAINTENANCE IN
TERIM SOFTWARE
Copyright (c) 1986-1999 by cisco Systems, Inc.
Compiled Fri 10-Dec-99 11:16 by cchang
 
advertisement version: 2
Protocol Hello: OUI=0x00000C, Protocol ID=0x0112; payload len=25, value=0000000
0FFFFFFFF010101FF000000000000000142EFA400FF
VTP Management Domain: ''
 
AP# show cdp entry * protocol
Protocol information for talSwitch14 :
IP address: 172.20.135.194
Protocol information for tstswitch2 :
IP address: 172.20.135.204
IP address: 172.20.135.202
Protocol information for tstswitch2 :
IP address: 172.20.135.204
IP address: 172.20.135.202
 
AP# show cdp interface
GigabitEthernet0/1 is up, line protocol is up
Encapsulation ARPA
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
GigabitEthernet0/2 is up, line protocol is down
Encapsulation ARPA
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
GigabitEthernet0/3 is administratively down, line protocol is down
Encapsulation ARPA
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
GigabitEthernet0/4 is up, line protocol is down
Encapsulation ARPA
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
GigabitEthernet0/5 is up, line protocol is up
Encapsulation ARPA
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
GigabitEthernet0/6 is up, line protocol is up
Encapsulation ARPA
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
GigabitEthernet0/7 is up, line protocol is down
Encapsulation ARPA
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
GigabitEthernet0/8 is up, line protocol is down
Encapsulation ARPA
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
 
AP# show cdp neighbor
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater
 
Device ID Local Interface Holdtme Capability Platform Port ID
Perdido2 Gig 0/6 125 R S I WS-C3550-1Gig 0/6
Perdido2 Gig 0/5 125 R S I WS-C3550-1Gig 0/5
 
AP# show cdp traffic
CDP counters :
Total packets output: 50882, Input: 52510
Hdr syntax: 0, Chksum error: 0, Encaps failed: 0
No memory: 0, Invalid packet: 0, Fragmented: 0
CDP version 1 advertisements output: 0, Input: 0
CDP version 2 advertisements output: 50882, Input: 52510

 

Enabling CDP Logging

You can enable CDP logging. To log errors related to duplex-mismatches identified through CDP, use the global configuration command cdp log mismatch duplex. To log errors related to duplex mismatches reported through CDP on a particular interface, use the same command at the interface level.

The following example enables logging for errors related to duplex-mismatches identified through CDP on the gigabit Ethernet interface, but disables logging for errors related to duplex-mismatches identified through CDP on the Radio 0 interface.

ap(config)# int gigabitEthernet 0
ap(config-if)# cdp log mismatch duplex
ap(config)# interface dot11Radio 0
ap(config-if)# no cdp log mismatch duplex
ap(config-if)# end