- Index
- Preface
- Product Overview
- Command-Line Interfaces
- Initial Switch Configuration
- Supervisor Engine 720 Configuration
- Supervisor Engine 32 Configuration
- Supervisor Engine 2 and Switch Fabric Module Configuration
- NSF with SSO Supervisor Engine Redundancy
- RPR and RPR+ Supervisor Engine Redundancy
- Interface Configuration
- Layer 2 Ethernet Interface Configuration
- Flex Links
- Layer 3 and Layer 2 EtherChannel
- VLAN Trunking Protocol (VTP)
- VLANs
- Private VLANs (PVLANs)
- Cisco IP Phone Support
- IEEE 802.1Q Tunneling
- Layer 2 Protocol Tunneling (L2PT)
- Standard-Compliant IEEE MST
- STP and IEEE 802.1s MST
- STP Features
- Layer 3 Interface Configuration
- UDE and UDLR
- Multiprotocol Label Switching (MPLS)
- IPv4 Multicast VPN Support
- IP Unicast Layer 3 Switching
- IPv6 Multicast Layer 3 Switching
- IPv4 Multicast Layer 3 Switching
- IGMP Snooping
- PIM Snooping
- MLDv2 Snooping
- Router-Port Group Management Protocol (RGMP)
- Network Security
- Understanding Cisco IOS ACL Support
- VLAN ACLs (VACLs)
- Denial of Service (DoS) Protection
- DHCP Snooping
- Dynamic ARP Inspection (DAI)
- Traffic-Storm Control
- Unknown Unicast and Multicast Flood Blocking
- PFC QoS
- MPLS QoS
- PFC QoS Statistics Data Export
- Cisco IOS Firewall Feature Set
- Network Admission Control (NAC)
- IEEE 802.1X Port-Based Authentication
- Port Security
- Cisco Discovery Protocol (CDP)
- UniDirectional Link Detection (UDLD)
- NetFlow Table Configuration
- NetFlow Data Export (NDE)
- Local SPAN, Remote SPAN (RSPAN), and Encapsulated RSPAN
- SNMP IfIndex Persistence
- Power Management and Environmental Monitoring
- Online Diagnostic Configuration
- Top N Utility Reports
- Using the Layer 2 Traceroute Utility
- Online Diagnostic Tests
- Acronyms
Configuring CDP
This chapter contains information about how to configure Cisco Discovery Protocol (CDP) on the Catalyst 6500 series switches, which supplements the information in these publications:
•The Cisco IOS Configuration Fundamentals Configuration Guide, Release 12.2, "System Management," "Configuring Cisco Discovery Protocol (CDP)" at this URL:
http://www.cisco.com/en/US/docs/ios/12_2/configfun/configuration/guide/fcf015.html
•The Cisco IOS Configuration Fundamentals Command Reference, Release 12.2, "System Management Commands," "CDP Commands" publication at this URL:
http://www.cisco.com/en/US/docs/ios/12_2/configfun/command/reference/frf015.html
This chapter consists of these sections:
Tip For additional information about Cisco Catalyst 6500 Series Switches (including configuration examples and troubleshooting information), see the documents listed on this page:
http://www.cisco.com/en/US/products/hw/switches/ps708/tsd_products_support_series_home.html
Participate in the Technical Documentation Ideas forum
Understanding How CDP Works
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 the time-to-live, or holdtime information, which indicates the length of time a receiving device should hold CDP information before discarding it.
Configuring CDP
These sections describe how to configure CDP:
•Displaying the CDP Global Configuration
•Displaying the CDP Interface Configuration
•Monitoring and Maintaining CDP
Enabling CDP Globally
To enable CDP globally, perform this task:
|
|
---|---|
Router(config)# cdp run |
Enables CDP globally. |
Router(config)# no cdp run |
Disables CDP globally. |
This example shows how to enable CDP globally:
Router(config)# cdp run
Displaying the CDP Global Configuration
To display the CDP configuration, perform this task:
|
|
---|---|
Router# show cdp |
Displays global CDP information. |
This example shows how to display the CDP configuration:
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.
Enabling CDP on a Port
To enable CDP on a port, perform this task:
|
|
|
---|---|---|
Step 1 |
Router(config)# interface {{type1 slot/port} | {port-channel number}} |
Selects the port to configure. |
Step 2 |
Router(config-if)# cdp enable |
Enables CDP on the port. |
Router(config-if)# no cdp enable |
Disables CDP on the port. |
1 type = ethernet, fastethernet, gigabitethernet, or tengigabitethernet |
This example shows how to enable CDP on Fast Ethernet port 5/1:
Router(config)# interface fastethernet 5/1
Router(config-if)# cdp enable
Displaying the CDP Interface Configuration
To display the CDP configuration for a port, perform this task:
|
|
---|---|
Router# show cdp interface [{{type1 slot/port} | {port-channel number}}] |
Displays information about ports where CDP is enabled. |
1 type = ethernet, fastethernet, gigabitethernet, or tengigabitethernet |
This example shows how to display the CDP configuration of Fast Ethernet port 5/1:
Router# show cdp interface fastethernet 5/1
FastEthernet5/1 is up, line protocol is up
Encapsulation ARPA
Sending CDP packets every 120 seconds
Holdtime is 180 seconds
Router#
Monitoring and Maintaining CDP
To monitor and maintain CDP on your device, perform one or more of these tasks:
|
|
---|---|
Router# clear cdp counters |
Resets the traffic counters to zero. |
Router# clear cdp table |
Clears information about neighbors from the CDP table. |
Router# show cdp |
Displays global information such as frequency of transmissions and the holdtime for packets being transmitted. |
Router# show cdp entry entry_name [protocol | version] |
Displays information about a specific neighbor. The display can be limited to protocol or version information. |
Router# show cdp interface [type1 slot/port}] |
Displays information about interfaces on which CDP is enabled. |
Router# show cdp neighbors [type1 slot/port] [detail] |
Displays 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 |
Displays CDP counters, including the number of packets sent and received and checksum errors. |
Router# show debugging |
Displays information about the types of debugging that are enabled. Refer to the Debug Command Reference for more information about CDP debug commands. |
1 type = ethernet, fastethernet, gigabitethernet, or tengigabitethernet |
This example shows how to clear CDP counter configuration:
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
Tip For additional information about Cisco Catalyst 6500 Series Switches (including configuration examples and troubleshooting information), see the documents listed on this page:
http://www.cisco.com/en/US/products/hw/switches/ps708/tsd_products_support_series_home.html
Participate in the Technical Documentation Ideas forum