CDP is a protocol used in Cisco devices that shows neighboring devices directly connected to a device. It is used in all network devices such as Router, Switcher, Access Server, Bridge. This protocol is a protocol used in OSI, Open Systems Interconnection, the second layer (data link layer) of its model.
Thanks to this protocol, the locations of neighboring devices of a device on the network are directly defined. Using CDP, you can easily see not only which device it is but also the device name (device id), open interfaces, ip addresses on the ports of the device, the functional capacities of the devices and the platforms of the devices, the operating system version used on the device. For this to happen, the devices must have the CDP turned on, which is on by default. If desired, this feature can be turned off later by the network administrator. This shutdown process can be applied only to certain ports or to all ports of the device. There are two versions: CDP, and CDP v2.
In version 2, the amount of information we can get from neighboring devices also increases. Examples are VLAN, Virtual Local Area Network information, VTP, VLAN Trunking Protocol namespaces, Full-Half Duplex study information.
The working principle of this protocol is as follows; Each device, whose CDP is not turned off, broadcasts its information as multicast in its network.
In this way, other neighboring devices also access this information. However, Cisco devices do not write this information in the table used in dynamic routing protocols. The tables they use for the information they obtain from the routing protocols are different.
Cisco devices do not need this information from Cisco Discovery Protocol. This protocol is generally useful for people who manage the network. The network administrator uses which devices are neighboring to the network and the information of neighboring devices.
This helps the network administrator when managing the network. Especially in small networks, effective use of CDP by the network administrator enables managing the network without the need for dynamic routing protocols. Since the network topology will be known, the routers can be communicated with the fixed routing process to be performed on the router.
Package sizes in which Discovery Protocol information is sent between devices vary, as there may be different types of devices and device information may differ. Therefore, these packages do not have a standard size.
In general terms, packages used in Discovery Protocol consist of 4 parts. The first part of the package contains the name of the version of the CDP used on the device. The size of this partition is fixed and is 1 byte (8 bit). The second part shows the lifetime of the package called time-to-live, that is, the time it takes to roam without being destroyed in the network. The size of this part is 1 byte (8 bit). Then there is the Checksum section containing the IP addresses. After this section, which consists of a 2-byte area, the rest of the package contains Cisco Discovery Protocol information from the device.
The package size varies depending on whether the size of this information is more or less. For example, there may be many devices adjacent to a device on the network, or this number may be too small. This changes the packet size sent by each device.
These packets sent as multicast are repeated every 60 seconds. However, if there is no news from the same device for 180 minutes, that is 3 times the periodic packet delivery time, this device is deleted from the table, indicating that these two devices are no longer related to the neighborhood.
The main commands are as follows:
- show cdp neighbors: Shows Cisco devices neighboring the device on which this command is executed.
- show cdp neighbors detail: This command provides a detailed view of the information received.
- show cdp traffic: Shows general traffic information (total packet input-output, checksum, and encapsulation errors).
- clear cdp table: Deletes the table containing the previously obtained CDP information.
What is Packet Tracer?
What is VLAN?
Router Boot Process
Spanning Tree Protocol (STP)
What is ARP?