|
|
This chapter describes how to configure Cisco Discovery Protocol (CDP) on the Catalyst 6000 family switches.
This chapter consists of these sections:
CDP is a protocol that runs over Layer 2 (the data link layer) on all Cisco routers, bridges, access servers, and switches. CDP allows network management applications to discover Cisco devices that are neighbors of already known devices, in particular, neighbors running lower-layer, transparent protocols.With CDP, network management applications can learn the device type and the SNMP agent address of neighboring devices. This feature enables applications to send SNMP queries to neighboring devices.
CDP runs on all LAN and WAN media that support Subnetwork Access Protocol (SNAP).
Each CDP-configured device sends periodic messages 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 holdtime information, which indicates the length of time a receiving device should hold CDP information before discarding it.
To configure CDP, perform these tasks in the following sections:
To set the frequency of CDP transmissions and the holdtime for CDP packets, perform this task:
| Step | Command | Purpose | ||
|---|---|---|---|---|
| Router(config)# cdp timer seconds | Set the transmission frequency of CDP updates. | ||
| Router(config)# cdp holdtime seconds | Specify the amount of time a receiving device should hold the information sent by your device before discarding it. | ||
| Router(config)# cdp advertise-v2 | Configure CDP to send version-2 advertisements. |
This example shows how to configure the CDP timer to 120 seconds on the Catalyst 6000 family switch:
Router(config)# cdp timer 120
CDP is enabled by default. If you prefer not to use the CDP device discovery capability, you can disable it with the no cdp run command.
To reenable CDP after disabling it, perform this task:
| Command | Purpose |
|---|---|
Router(config)# cdp run | Enable CDP. |
This example shows how to enable CDP on the Catalyst 6000 family switch:
Router(config)# cdp run
To show the CDP configuration of the Catalyst 6000 family switch, perform this task:
| Command | Purpose |
|---|---|
Router# show cdp | Display global information such as frequency of transmissions and the holdtime for packets being transmitted. |
This example shows the CDP configuration of the Catalyst 6000 family switch:
Router# show cdp
Global CDP information:
Sending CDP packets every 120 seconds
Sending a holdtime value of 180 seconds
Sending CDPv2 advertisements is enabled
Router#
For additional CDP show commands, see the "Monitoring and Maintaining CDP" section.
CDP is enabled by default on all supported interfaces to send and receive CDP information. However, some interfaces, such as ATM interfaces, do not support CDP. You can disable CDP on an interface that supports CDP with the no cdp enable command.
To reenable CDP on an interface after disabling it, perform this task:
| Command | Purpose |
|---|---|
Router(config-if)# cdp enable | Enable CDP on an interface. |
This example shows how to enable CDP on Fast Ethernet interface 5/1:
Router(config)# interface fastEther 5/1 Router(config-if)# cdp enable
To show the CDP configuration for an interface, perform this task:
| Command | Purpose |
|---|---|
Router# show cdp interface [type number] | Display information about interfaces where CDP is enabled. |
This example shows the CDP configuration of Fast Ethernet interface 5/1:
Router# show cdp interface fastether 5/1 FastEthernet5/1 is up, line protocol is up Encapsulation ARPA Sending CDP packets every 120 seconds Holdtime is 180 seconds Router#
To monitor and maintain CDP on your device, perform one or more of these tasks:
| Command | Purpose |
|---|---|
Router# clear cdp counters | Reset the traffic counters to zero. |
Router# clear cdp table | Delete the CDP table of information about neighbors. |
Router# show cdp | Display global information such as frequency of transmissions and the holdtime for packets being transmitted. |
Router# show cdp entry entry-name [protocol | version] | Display information about a specific neighbor. Display can be limited to protocol or version information. |
Router# show cdp interface [type number] | Display information about interfaces on which CDP is enabled. |
Router# show cdp neighbors [type number] [detail] | Display information about neighbors. The display can be limited to neighbors on a specific interface and expanded to provide more detailed information. |
Router# show cdp traffic | Display CDP counters, including the number of packets sent and received and checksum errors. |
Router# show debugging | Display information about the types of debugging that are enabled for your Catalyst 6000 family switch. Refer to the Debug Command Reference publication for more information about CDP debug commands. |
This example shows how to clear CDP counter configuration of the Catalyst 6000 family switch:
Router# clear cdp counters
This example shows how to display information about the neighboring equipment:
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
JAB023807H1 Fas 5/3 127 T S WS-C2948 2/46
JAB023807H1 Fas 5/2 127 T S WS-C2948 2/45
JAB023807H1 Fas 5/1 127 T S WS-C2948 2/44
JAB023807H1 Gig 1/2 122 T S WS-C2948 2/50
JAB023807H1 Gig 1/1 122 T S WS-C2948 2/49
JAB03130104 Fas 5/8 167 T S WS-C4003 2/47
JAB03130104 Fas 5/9 152 T S WS-C4003 2/48
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Mon Jan 3 14:07:20 PST 2000
Copyright 1989-1999©Cisco Systems Inc.