Cisco Discovery Protocol (CDP) is a proprietary Layer 2 network protocol developed by Cisco Systems that enables network devices to discover and learn about neighboring Cisco devices connected on the same network segment. CDP operates at the Data Link Layer and is enabled by default on most Cisco d…Cisco Discovery Protocol (CDP) is a proprietary Layer 2 network protocol developed by Cisco Systems that enables network devices to discover and learn about neighboring Cisco devices connected on the same network segment. CDP operates at the Data Link Layer and is enabled by default on most Cisco devices, including routers, switches, and access points.
CDP works by sending periodic advertisements, known as CDP packets, to a multicast address every 60 seconds by default. These packets contain valuable information about the sending device, which neighboring devices can collect and store. The information shared through CDP includes device identifiers (hostname), port identifiers, device capabilities, platform information, IP addresses, native VLAN, duplex settings, and VTP domain name.
Network administrators find CDP extremely useful for network discovery and troubleshooting. When connected to an unfamiliar network, CDP allows administrators to quickly identify neighboring devices, determine how devices are interconnected, and verify physical layer connectivity. The command 'show cdp neighbors' displays a summary of connected devices, while 'show cdp neighbors detail' provides comprehensive information including IP addresses and software versions.
CDP has a default holdtime of 180 seconds, meaning if a device stops receiving CDP packets from a neighbor, it will retain that neighbor's information for this duration before removing it from the CDP table.
From a security perspective, CDP can pose risks because it shares detailed device information. Malicious actors could potentially gather network topology information by capturing CDP packets. Therefore, security best practices recommend disabling CDP on ports connected to untrusted networks or end-user devices using the command 'no cdp enable' at the interface level or 'no cdp run' globally.
CDP version 2 (CDPv2) is the current version and provides additional information compared to the original version, making it more valuable for network management and troubleshooting tasks in Cisco environments.
Cisco Discovery Protocol (CDP) - Complete Guide
Why is Cisco Discovery Protocol Important?
Cisco Discovery Protocol (CDP) is a fundamental tool for network administrators and is a critical topic on the CCNA exam. Understanding CDP is essential because it allows you to discover and document network topology, troubleshoot connectivity issues, and verify physical layer connections between Cisco devices. In real-world scenarios, CDP helps administrators quickly identify neighboring devices, their IP addresses, and platform information, making network management significantly more efficient.
What is Cisco Discovery Protocol?
CDP is a Layer 2 (Data Link Layer) proprietary protocol developed by Cisco Systems. It operates on Cisco devices such as routers, switches, and IP phones to discover information about other Cisco devices that are connected on the same network segment. Key characteristics include:
• Proprietary Protocol: CDP only works between Cisco devices • Layer 2 Operation: Functions at the Data Link Layer, meaning it works regardless of whether IP is configured • Multicast-based: Uses multicast address 01:00:0C:CC:CC:CC • Enabled by Default: CDP is enabled on all Cisco interfaces by default • Advertisement Timer: Sends updates every 60 seconds by default • Hold Time: Information is held for 180 seconds (3 times the advertisement timer)
How Does CDP Work?
CDP operates by sending periodic advertisements (CDP frames) out of all CDP-enabled interfaces. These advertisements contain information about the sending device, including:
• Device ID (hostname) • IP address(es) • Platform and capabilities • Interface information (local and remote ports) • Software version • Native VLAN • Duplex settings • VTP domain name
When a Cisco device receives a CDP advertisement, it stores the information in its CDP neighbor table. This information remains in the table until the hold time expires or until a new advertisement is received.
Essential CDP Commands:
• show cdp - Displays CDP global settings (timers and hold time) • show cdp neighbors - Shows summary of all neighboring devices • show cdp neighbors detail - Shows comprehensive information including IP addresses • show cdp entry [device-name] - Shows detailed information for a specific neighbor • show cdp interface - Shows CDP status on each interface • show cdp traffic - Displays CDP packet statistics
CDP Configuration Commands:
• cdp run - Enables CDP globally (enabled by default) • no cdp run - Disables CDP globally • cdp enable - Enables CDP on a specific interface • no cdp enable - Disables CDP on a specific interface • cdp timer [seconds] - Changes the advertisement interval • cdp holdtime [seconds] - Changes the hold time
Security Considerations:
CDP can be a security risk because it reveals detailed information about network devices. Best practices include:
• Disable CDP on interfaces connected to untrusted networks • Disable CDP on interfaces facing external networks or the internet • Consider using LLDP (Link Layer Discovery Protocol) in multi-vendor environments
Exam Tips: Answering Questions on Cisco Discovery Protocol (CDP)
1. Remember the Default Values: • Advertisement timer: 60 seconds • Hold time: 180 seconds • CDP is enabled by default on all interfaces
2. Know the Layer: CDP operates at Layer 2. This means it can discover neighbors even when Layer 3 (IP) is not configured. Exam questions often test this concept.
3. Understand Command Output: Be familiar with what each show command displays. The show cdp neighbors command shows basic information, while show cdp neighbors detail includes IP addresses.
4. Cisco Proprietary vs LLDP: Remember that CDP is Cisco proprietary. For multi-vendor environments, LLDP (IEEE 802.1AB) is the industry standard alternative.
5. Interface vs Global Commands: Understand the difference between disabling CDP globally (no cdp run) versus on a specific interface (no cdp enable).
6. Troubleshooting Scenarios: When presented with troubleshooting questions, remember that CDP can help identify misconfigured duplex settings, native VLAN mismatches, and verify physical connectivity.
7. Platform Information: CDP provides platform information (device model), which helps identify the type of neighboring device. This is useful for exam questions about network documentation.