Cisco Discovery Protocol
Cisco Discovery Protocol (CDP) is a proprietary Layer 2 network protocol that operates on Cisco devices. It enables devices to discover directly connected Cisco equipment and gather vital information about neighboring devices, facilitating network management and troubleshooting.
CDP operates in two primary versions:
-
CDPv1: This initial version provides basic information about directly connected Cisco devices. This includes details such as their device ID, the local interface connected, the platform type, the device's capabilities (e.g., router, switch, host), its Cisco IOS version, and its IP address.
-
CDPv2: This enhanced version builds upon CDPv1 by adding more detailed information. This includes the VLAN Trunking Protocol (VTP) domain name, the native VLAN used on the connected port, the duplex mode of the interface, and power consumption details for Power over Ethernet (PoE) devices.
CDP offers several advantages for network administrators, enhancing network visibility and simplifying operations:
-
Network Topology Discovery: CDP automatically maps the network topology by identifying how Cisco devices connect to each other. This eliminates the need for manual mapping, which is particularly beneficial in large or complex network environments.
-
Troubleshooting Connectivity Issues: By displaying comprehensive information about directly connected devices and their configurations, CDP helps you quickly identify and resolve common connectivity problems, such as duplex mismatches or incorrect VLAN assignments.
-
Inventory Management: CDP provides a real-time inventory of connected Cisco devices, including their specific hardware platforms and software versions. This assists in asset tracking and compliance.
-
Simplified Configuration: CDP can facilitate the auto-configuration of certain devices, such as Cisco IP phones, by providing them with necessary network parameters like VLAN information.
After understanding Cisco Discovery Protocols, you will be able to:
-
Identify the version of CDP running on your devices.
-
Verify information about directly connected Cisco devices.
-
Leverage CDP for network discovery and basic troubleshooting.
How Cisco Discovery Protocol Works
CDP-enabled devices periodically send multicast advertisements to directly connected neighboring devices. These advertisements contain various pieces of information about the sending device, including its identity, capabilities, and configuration details. Receiving devices store this information in a local CDP table. You can then view this table using Command Line Interface (CLI) commands to gain insights into your network's immediate connections.
Configure Cisco Discovery Protocol
Procedure
| Command or Action | Purpose | |
|---|---|---|
|
Step 1 |
cdp run Example:
|
To enable CDP globally on a device, enter global configuration mode. Use the cdp run command. |
|
Step 2 |
no cdp run Example:
|
To disable CDP globally, enter global configuration mode. Use the no cdp run command. |
|
Step 3 |
cdp enable Example:
|
To enable CDP on a specific interface, enter interface configuration mode for the desired interface. Use the cdp enable command. |
|
Step 4 |
no cdp enable Example:
|
To disable CDP on a specific interface, enter interface configuration mode for the desired interface. Use the no cdp enable command. |
Verify Cisco Discovery Protocol
You can verify CDP status and view the information about neighboring devices using various show cdp commands.
Procedure
| Command or Action | Purpose |
|---|---|
|
show cdp neighbors Example:
|
To view information about directly connected Cisco devices, enter the show cdp neighbors command in privileged EXEC mode. |
Feedback