Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

What is Cisco Discovery Protocol (CDP)?

  • Last Updated : 03 Nov, 2021

Usually, most networks have several routers or switches, and to make management of networks easy, net maps or network maps are used that tells us what type of devices are present in the network and how all the devices are connected with each other, the IP addresses they are using and the information about which VLAN they belong to. The CDP is a proprietary layer 2 cisco network protocol. It is a network discovery tool and is enabled by default; it runs on cisco devices and helps in discovering cisco devices connected to the network. The CDP helps in efficiently inspecting devices without actually physically inspecting them. CDP allows a user to use some show commands that allow them to view the information of connected devices, such as the information about local ports, remote ports, hostname, device platform, etc.  

The CDP messages that are received from an adjacent cisco device aren’t redirected to any other devices by default i.e., CDP is just forwarded to directly connected Cisco devices. All devices supporting the CDP stores all the messages received from their adjoining devices in a tabular format that may be viewed by using the show cdp neighbors command.

These CDP messages are transmitted every 60 seconds on all the SNAP (Subnetwork Access Protocol) headers compatible interfaces. As SNAP is not supported by all the data link layer media types, the ones that support are Token ring, Ethernet, PPP (Point-to-Point Protocol), FDDI (Fiber Distributed Data Interface), Frame Relay, ATM (Asynchronous Transfer Mode), HDLC (High-Level Data Link Control). Cisco devices also send these CDP messages to a multicast destination address (01:00:0C:CC:CC:CC).

Network Map

Example of show cdp neighbors:

In the network map above we have three routers. So, let’s see how CDP could be used to build a network map like the one shown in the image.

  • Show cdp neighbor command for Router 1.
Router1# show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
                  D - Remote, C - CVTA, M - Two-port Mac Relay
                  
                  
Device ID             Local Intrfce      Holdtme            Capability           Platform             Port ID  
Router 2              Ser0/0             172                  R S I                 2500                  Ser0/0
  • Show cdp neighbor command for Router 2.
Router2# show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
                  D - Remote, C - CVTA, M - Two-port Mac Relay
                  
                  
Device ID             Local Intrfce      Holdtme            Capability           Platform             Port ID  
Router 1              Ser0/0             143                R S I                2500                 Ser0/0
Router 3              Fa1/0              158                R S I                2500                 Fa1/0
  • Show cdp neighbor command for Router 3.
Router3# show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
                  D - Remote, C - CVTA, M - Two-port Mac Relay
                  
                  
Device ID             Local Intrfce      Holdtme            Capability           Platform             Port ID  
Router 2              Fa1/0              141                R S I                2500                 Fa1/0

Information in CDP message:

  • It contains the version of IOS software.
  • It contains information about the IP addresses of the device.
  • The name of the devices.
  • The information about hardware platform.
  • It contains the hardware capabilities., and
  • The information about the interface that generated the CDP message.

Benefits of CDP:

  • It allows the use of RTP (Real-Time Transport Protocol) and different network-layer protocols to locate devices and tells how they are configured.
  • It assists in troubleshooting TLV (Type Length Value) fields.
  • It can be used as a diagnostic tool to help in troubleshooting device and network-related issues.
  • It enables the detection of the IP address of a wrongly configured switch/router on the other side of a WAN-link.  
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!