26-3
Software Configuration Guide—Release 15.0(2)SG
OL-23818-01
Chapter 26 Configuring CDP Configuring CDP
Enabling CDP on an Interface
To enable CDP on an interface, use this command:
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, use this command:
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, enter one or more of the following commands:
Command Purpose
Switch(config-if)# [no] cdp enable Enables CDP on an interface.
Use the no keyword to disable CDP on an interface.
Command Purpose
Switch# show cdp interface [type/number]Displays information about interfaces where CDP is
enabled.
Command Purpose
Switch# clear cdp counters Resets the traffic counters to zero.
Switch# clear cdp table Deletes the CDP table of information about neighbors.
Switch# show cdp Displays global information such as frequency of
transmissions and the holdtime for packets being
transmitted.