![]() |
Table Of Contents
Configuring the CDP Characteristics
Disabling and Enabling CDP on an Interface
CDP and Ethernet Flow Points (EFPs)
Monitoring and Maintaining CDP
Configuring CDP
This chapter describes how to configure Cisco Discovery Protocol (CDP) on the Cisco ME 3800X and ME 3600X switch.
Note
For complete syntax and usage information for the commands used in this chapter, see the command reference for this release and the Cisco IOS Configuration Fundamentals Command Reference at
http://www.cisco.com/en/US/docs/ios-xml/ios/fundamentals/command/Cisco_IOS_Configuration_Fundamentals_Command_Reference.html
•
Monitoring and Maintaining CDP
Understanding CDP
CDP is a device discovery protocol that runs over Layer 2 (the data link layer) on all Cisco-manufactured devices (routers, bridges, access servers, and switches) and allows network management applications to discover Cisco devices that are neighbors of already known devices. With CDP, network management applications can learn the device type and the Simple Network Management Protocol (SNMP) agent address of neighboring devices running lower-layer, transparent protocols. This feature enables applications to send SNMP queries to neighboring devices.
CDP runs on all media that support Subnetwork Access Protocol (SNAP). Because CDP runs over the data-link layer only, two systems that support different network-layer protocols can learn about each other.
Each CDP-configured device sends periodic messages to a multicast address, advertising at least one address at which it can receive SNMP messages. The advertisements also contain time-to-live, or holdtime information, which is the length of time a receiving device holds CDP information before discarding it. Each device also listens to the messages sent by other devices to learn about neighboring devices.
The switch supports CDP Version 2.
Configuring CDP
•
Configuring the CDP Characteristics
•
Disabling and Enabling CDP on an Interface
•
CDP and Ethernet Flow Points (EFPs)
Default CDP Configuration
Configuring the CDP Characteristics
You can configure the frequency of CDP updates, the amount of time to hold the information before discarding it, and whether or not to send Version-2 advertisements.
Beginning in privileged EXEC mode, follow these steps to configure the CDP timer, holdtime, and advertisement type.
Note
Steps 2 through 4 are all optional and can be performed in any order.
Use the no form of the CDP commands to return to the default settings.
This example shows how to configure CDP characteristics.
Switch# configure terminalSwitch(config)# cdp timer 50Switch(config)# cdp holdtime 120Switch(config)# cdp advertise-v2Switch(config)# endFor additional CDP show commands, see the "Monitoring and Maintaining CDP" section.
Disabling and Enabling CDP
CDP is enabled by default.
Note
Cisco devices (such as Cisco IP Phones) regularly exchange CDP messages with connected devices. Disabling CDP can interrupt device connectivity.
Beginning in privileged EXEC mode, follow these steps to globally disable the CDP device discovery capability:
Command PurposeStep 1
configure terminal
Enter global configuration mode.
Step 2
no cdp run
Disable CDP.
Step 3
end
Return to privileged EXEC mode.
Beginning in privileged EXEC mode, follow these steps to globally enable CDP when it has been disabled:
Command PurposeStep 1
configure terminal
Enter global configuration mode.
Step 2
cdp run
Enable CDP after disabling it.
Step 3
end
Return to privileged EXEC mode.
This example shows how to globally enable CDP if it has been disabled.
Switch# configure terminal
Switch(config)# cdp run
Switch(config)# end
Disabling and Enabling CDP on an Interface
CDP is enabled by default to send and to receive CDP information.
Beginning in privileged EXEC mode, follow these steps to disable CDP on a port:
Beginning in privileged EXEC mode, follow these steps to enable CDP on a port when it has been disabled:
This example shows how to enable CDP on a port when it has been disabled.
Switch# configure terminalSwitch(config)# interface gigabitethernet0/1Switch(config-if)# cdp enableSwitch(config-if)# endCDP and Ethernet Flow Points (EFPs)
For CDP to peer with a neighbor on a port that has an Ethernet Virtual Connection (EVC) EFP service instance configured, you need to enter the l2 protocol peer cdp service-instance configuration command on the service instance. See the "Configuring Ethernet Virtual Connections (EVCs)" chapter for more information on EFPs.
This example shows how to configure Layer 2 protocol peer on a service instance:
Switch (config)#
interface gigabitethernet0/1Switch (config-if)#
switchport mode trunkSwitch (config-if)#
switchport trunk allowed vlan noneSwitch (config-if)#
service instance 1 EthernetSwitch (config-if-srv)#
encapsulation untaggedSwitch (config-if-srv)#
l2protocol peer cdpSwitch (config-if-srv)#
bridge-domain 10Switch (config-if-srv)#
endMonitoring and Maintaining CDP
To monitor and maintain CDP on your device, use one or more of these commands in privileged EXEC mode.