What is the Cisco Discovery Protocol (CDP)?
CDP is a Cisco proprietary protocol that runs on all Cisco IOS-enabled devices. It is used to gather information about directly connected neighboring devices. CDP operates at Layer 2 of the OSI model and is media-independent. With CDP, you can tell the hardware type, device identifier, address list, software version, and active interfaces on neighboring Cisco devices. CDP is enabled by default on all Cisco equipment. It uses a nonroutable SNAP frame to communicate between devices.Note: Because CDP is media-independent it can operate over most media types. The only media types CDP cannot operate over are X.25, because it doesn't support SNAP encapsulation, and Frame Relay point-to-multipoint interfaces.What are three reasons to disable CDP?
Three reasons to disable CDP are as follows:
. To save network bandwidth by not exchanging CDP frames.
. If you are connecting to non-Cisco devices.
. Security. CDP broadcasts information about the device every 60 seconds. Sniffers and other devices can view these broadcasts to discover information about your network.How do you disable CDP on Cisco routers?
Two commands disable CDP on a Cisco router. To disable CDP on the entire device, use the no cdp run global command:
RouterB(config)#no cdp run
To disable CDP on an interface only, use the no cdp enable interface command:
RouterB(config-if)#no cdp enable
This disables CDP on Ethernet interface 0.What does the show CDP command display?
The show CDP command displays global CDP information about the device. It tells you when the device will send CDP packets and the CDP holdtime:
Global CDP information:
Sending CDP packets every 60 seconds
Sending a holdtime value of 180 secondsNote: For the CCNA test, remember that the default time a device will send out CDP information is 60 seconds and the default holdtime is 180 seconds.On a Cisco router, what does the show cdp neighbors command display?
The show cdp neighbors command displays the following:
· Device ID (name of the device)
· The local interface (local outgoing port)
· The holdtime displayed in seconds
· The device's capability code (this tells you if the device is a router, switch, or repeater)
· Hardware platform of the neighboring device (what type of Cisco device it is and the model)
· Port ID of the neighboring device (remote port)
RouterB#show cdp neighbors
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
RouterA Ser 0 146 R 2505 Ser 0 What does the show cdp neighbors detail command display?
The show cdp neighbors detail and show cdp entry * commands show the same output. They both display the following:
· Device ID (host name) of the remote neighbor
· Layer 3 address of the remote device (if the device has more than one Layer 3 address on its interface, only the primary address is shown)
· Device platform and capabilities· Local interface and outgoing port ID
· Remote device holdtime in seconds
· IOS type and version
RouterB#show cdp neighbors detail
Device ID: RouterA
IP address: 192.168.2.1
Platform: cisco 2505, Capabilities: Router
Interface: Serial1, Port ID (outgoing port): Serial1
Holdtime : 164 sec Version :Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-D-L), Version 12.0(13), RELEASE SOFTWARE
(fc1)Copyright (c) 1986-2000 by cisco Systems, Inc.Compiled Wed 06-Sep-00 01:08 by LindaWhat does the show cdp traffic command display?
The show cdp traffic command displays information about interface traffic. This includes the number of CDP packets sent and received and CDP errors:
RouterB#show cdp traffic
CDP counters :
Packets output: 105, Input: 103
Hdr syntax: 0, Chksum error: 0, Encaps failed:
No memory: 0, Invalid packet: 0, Fragmented: 0