Sections:
Overview:
Use Case Scenarios:
Lab Topology
How CDP Works
CDP uses multicast frames addressed to '01.00.0c.cc.cc.cc' to send periodic advertisements from a Cisco device to its directly connected neighbors. The multicast frames contain information such as the device's identity hostname, IP address, capabilities, and other information including software image, native VLAN, duplex, etc. Cisco devices listen for these CDP advertisements and use this information to build a map of the network topology. It is important to note that Cisco devices never forward CDP packets received from its neighbors. All Cisco devices receive these packets, process them and cache the information in the packet.
CDP Packet Capture
Enabling CDP
CDP is enabled by default on most Cisco devices including routers and switches and is typically enabled globally for all interfaces on the device. Although CDP is enabled globally, it can be disabled on individual interfaces if needed. In this lab example, CDP is enabled by default on the virtual switches but let's demonstrate enabling CDP on the Access switch globally and follow up with disabling CDP globally and lastly enabling CDP globally but disabling CDP on unused interfaces. While CDP can be useful for network topology discovery and troubleshooting, there may be cases to disable CDP globally or on unused interfaces for secure environments.
Enabling CDP Globally
Disabling CDP Globally
Enabling CDP globally but disabling CDP on unused interfaces
Verifying CDP Neighbors
There are various CDP show commands available to verify neighbors on a Cisco device. In this lab example, let's demonstrate the multitude of ways to monitor and maintain CDP on the Access switch. CDP show commands provide valuable insights into the topology of a network and helps in troubleshooting, and verifying network configuration changes.
Display information about a specific neighbor
Display information about overall traffic statistics
Display information about interfaces
Display detailed or summarized information about neighbors
Adjust CDP Timers
Cisco Discovery Protocol uses several timers to control the frequency and timing of CDP advertisements and their hold times. These timers are configurable, and understanding them can help troubleshoot issues. Below let's demonstrate the advertise and hold timers and change the timers on the Access switch in the lab topology.
Hold Timer
Advertise Timer
Configuring Advertise and Hold Timers
Summarizing CDP Advertise and Hold timers, it is important to note if the timers are changed on one switch, it is recommended to change the timers on all devices. This helps to minimize the risk of errors and performance degradation due to mismatched timer values. The goal of changing the timers is to lead to a more stable and efficient network environment.
Analyze CDP Error Types
While CDP itself is not directly associated with many errors, there are some common issues that may occur when using CDP and can be broken down into various causes:
Aside from the CDP show commands to troubleshoot probable issues, issuing a debug command is an alternative way to analyze what is occurring behind the scenes. On the Access switch in the lab topology, let's demonstrate a debug command to ensure the switch is sending out CDP packets out of its interfaces.
Debug Commands