- Index
- Preface
- Product Overview
- Command-Line Interfaces
- Configuring the Switch for the First Time
- Administering the Switch
- Configuring Interfaces
- Checking Port Status and Connectivity
- Configuring Supervisor Engine Redundancy Using RPR and SSO
- Configuring NSF with SSO Supervisor Engine Redundancy
- Configuring In Service Software Upgrade Process
- Configuring Control Plane Policing
- Environmental Monitoring and Power Management
- Configuring Power over Ethernet
- Configuring Switches with Cisco Network Assistant
- Configuring VLANs, VTP, and VMPS
- Configuring IP Unnumbered Interface
- Configuring Layer 2 Ethernet Interfaces
- Configuring SmartPort Macros
- Configuring STP and MST
- Configuring Optional STP Features
- Configuring EtherChannel
- Configuring IGMP Snooping and Filtering
- Configuring 802.1Q and Layer 2 Protocol Tunneling
- Configuring CDP
- Configuring UDLD
- Configuring Unidirectional Ethernet
- Configuring Layer 3 Interfaces
- Configuring Cisco Express Forwarding
- Configuring IP Multicast
- Configuring Policy-Based Routing
- Configuring VRF-lite
- Configuring QoS
- Configuring Voice Interfaces
- Configuring 802.1X Port-Based Authentication
- Configuring Port Security
- Configuring DHCP Snooping and IP Source Guard
- Configuring Dynamic ARP Inspection
- Configuring the AGM for the First Time
- Configuring Network Security with ACLs
- Configuring Private VLANs
- Configuring Port Unicast and Multicast Flood Blocking
- Configuring Port-Based Traffic Control
- Configuring SPAN and RSPAN
- Configuring System Message Logging
- Configuring SNMP
- Configuring NetFlow
- Configuring RMON
- Performing Diagnostics on the Catalyst 4500 Series Switch
- Configuring WCCPv2 Services
- Configuring MIB Support
- ROM Monitor
- Acronyms
Configuring CDP
This chapter describes how to configure Cisco Discovery Protocol (CDP) on the Catalyst 4500 series switch. It also provides guidelines, procedures, and configuration examples.
This chapter includes the following major sections:
Note For complete syntax and usage information for the Cisco IOS commands used in this chapter, refer to the
Cisco IOS Configuration Fundamentals Configuration Guide, Release 12.4:
http://www.cisco.com/en/US/docs/ios/fundamentals/configuration/guide/12_4/cf_12_4_book.html
and the Cisco IOS Configuration Fundamentals Command Reference, Release 12.2:
http://www.cisco.com/en/US/docs/ios/12_2/configfun/command/reference/ffun_r.html
Note For complete syntax and usage information for the switch commands used in this chapter, look at the Cisco Catalyst 4500 Series Switch Command Reference and related publications at this location:
http://www.cisco.com/en/US/products/hw/switches/ps4324/index.html
If the command is not found in the Catalyst 4500 Command Reference, it is located in the larger Cisco IOS library. Refer to the Catalyst 4500 Series Switch Cisco IOS Command Reference and related publications at this location:
http://www.cisco.com/en/US/products/ps6350/index.html
Overview of CDP
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. CDP 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
The following 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:
|
|
---|---|
Switch(config)# [no] cdp run |
Enables CDP globally. Use the no keyword to disable CDP globally. |
This example shows how to enable CDP globally:
Switch(config)# cdp run
Displaying the CDP Global Configuration
To display the CDP configuration, perform this task:
|
|
---|---|
Switch# show cdp |
Displays global CDP information. |
This example shows how to display the CDP configuration:
Switch# show cdp
Global CDP information:
Sending CDP packets every 120 seconds
Sending a holdtime value of 180 seconds
Sending CDPv2 advertisements is enabled
Switch#
For additional CDP show commands, see the "Monitoring and Maintaining CDP" section.
Enabling CDP on an Interface
To enable CDP on an interface, perform this task:
|
|
---|---|
Switch(config-if)# [no] cdp enable |
Enables CDP on an interface. Use the no keyword to disable CDP on an interface. |
This example shows how to enable CDP on Fast Ethernet interface 5/1:
Switch(config)# interface fastethernet 5/1
Switch(config-if)# cdp enable
This example shows how to disable CDP on Fast Ethernet interface 5/1:
Switch(config)# interface fastethernet 5/1
Switch(config-if)# no cdp enable
Displaying the CDP Interface Configuration
To display the CDP configuration for an interface, perform this task:
|
|
---|---|
Switch# show cdp interface [type/number] |
Displays information about interfaces where CDP is enabled. |
This example shows how to display the CDP configuration of Fast Ethernet interface 5/1:
Switch# 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
Switch#
Monitoring and Maintaining CDP
To monitor and maintain CDP on your device, perform one or more of these tasks:
This example shows how to clear the CDP counter configuration on your switch:
Switch# clear cdp counters
This example shows how to display information about the neighboring equipment:
Switch# 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