![]() |
VOOZH | about |
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).
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.
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
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
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:
Benefits of CDP: