19-3
Software Configuration Guide—Release 12.2(25)SG
OL-7659-03
Chapter19 Understanding and Conf iguring CDP
Configuring CDP
Enabling CDP on an Interface
To enable CDP on an interface, perform this task:
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:
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:
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.