Let’s talk a bit about network management. Perhaps not the most exciting topic, but I’m going to show you how you can use CDP (Cisco Discovery Protocol) to help you build network maps and what other information it can reveal.
Most networks have multiple switches and/or routers and to make our life easier it’s good to have a network map that shows us how everything is connected to each other, what kind of devices we have, to what VLAN they belong, and the IP addresses that we are using. CDP is a Cisco protocol that runs on all Cisco devices that helps us discover Cisco devices on the network. CDP is Cisco proprietary, runs on the data-link layer, and is enabled by default.
Let’s take a look at a network map:
Above we have 3 routers. Now if I had no idea what the network looked like we could use CDP to build the network map that you see above. Let me show you how:
R1#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater
Device ID Local Intrfce Holdtme Capability Platform Port ID
R2 Ser 0/0 167 R S I 3640 Ser 0/0
Use the show cdp neighbors
command to see all directly connected neighbors. Above you see that R1 is connected to R2 and you can also see the platform (3640 router) and the interfaces on both sides. Let me show you the other routers as well:
R2#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater
Device ID Local Intrfce Holdtme Capability Platform Port ID
R1 Ser 0/0 144 R S I 3640 Ser 0/0
R3 Fas 1/0 164 R S I 3640 Fas 1/0
R3#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater
Device ID Local Intrfce Holdtme Capability Platform Port ID
R2 Fas 1/0 135 R S I 3640 Fas 1/0
Now we have all the information we need to build a network map with the router names and interfaces. CDP can tell us even more, however…
Rene,
It’s always so good read your articles! I can understand them and make me feeling smarter Thanks!!!
Hug
Good to hear you like them Gabriel!
Hi Rene,
I work as technical support in Internet Services & Communications company and we don’t use Cisco products only, we also use other network products from different vendors like Ubiquiti, mikrotik, Exalt, etc. and we connect all these different products with each other!!
so when I use CDP to show which devices connected to cisco switch or router I noticed that information of different vendors products also appears to me!!
My question is why I show this info ? I know that CDP is Cisco proprietary so how it’s able to identify the products from other vendors???
Hi Hussein,
Some other vendors also support(ed) CDP. Some older HP procurve switches also had it.
I think Ubiquiti and Mikrotik also have some support for it. Nowadays we also use LLDP, it is similar to CDP:
https://networklessons.com/network-management/link-layer-discovery-protocol-lldp/
Rene
Rene,
Cisco ASA doesn’t seem to have CDP available. Is it maybe configured a different way?
Chris