- Index
- Preface
- Product Overview
- Command-Line Interfaces
- Configuring the Switch for the First Time
- Configuring a Supervisor Engine 32 PISA
- Configuring NSF with SSO Supervisor Engine Redundancy
- Configuring RPR Supervisor Engine Redundancy
- Configuring Interfaces
- Configuring Layer 2 Ethernet Interfaces
- Configuring Flex Links
- Configuring Layer 3 and Layer 2 EtherChannel
- Configuring VLAN Trunking Protocol (VTP)
- Configuring VLANs
- Configuring Private VLANs (PVLANs)
- Configuring Cisco IP Phone Support
- Configuring IEEE 802.1Q Tunneling
- Configuring Layer 2 Protocol Tunneling (L2PT)
- Configuring STP and MST
- Configuring STP Features
- Configuring Layer 3 Interfaces
- Configuring UDE and UDLR
- Configuring PFC3BXL and PFC3B Multiprotocol Label Switching (MPLS)
- Configuring IPv4 Multicast VPN Support
- Configuring IP Unicast Layer 3 Switching
- Configuring IPv6 Multicast Layer 3 Switching
- Configuring IPv4 Multicast Layer 3 Switching
- Configuring MLDv2 Snooping
- Configuring IGMP Snooping
- Configuring PIM Snooping
- Configuring Router-Port Group Management Protocol (RGMP)
- Configuring Network Security
- Understanding Cisco IOS ACL Support
- Configuring VLAN ACLs (VACLs)
- Configuring Denial of Service (DoS) Protection
- Configuring DHCP Snooping
- Configuring Dynamic ARP Inspection (DAI)
- Configuring Traffic-Storm Control
- Configuring Unknown Unicast and Multicast Flood Blocking
- Configuring PFC QoS
- Configuring PFC3BXL or PFC3B Mode MPLS QoS
- Configuring PFC QoS Statistics Data Export
- Configuring Network Admission Control (NAC)
- Configuring 802.1X Port-Based Authentication
- Configuring Port Security
- Configuring Cisco Discovery Protocol (CDP)
- Configuring UniDirectional Link Detection (UDLD)
- Configuring the NetFlow Table
- Configuring NetFlow Data Export (NDE)
- Configuring Local SPAN, Remote SPAN (RSPAN), and Encapsulated RSPAN
- Configuring SNMP IfIndex Persistence
- Power Management and Environmental Monitoring
- Configuring Online Diagnostics
- Configuring 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:
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