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…
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???
Rene,
Cisco ASA doesn’t seem to have CDP available. Is it maybe configured a different way?
Chris
Hello @ReneMolenaar ,
I work with Cisco ASRs devices running cisco XR OS, and they don’t have CDP enabled by default. You have to enable it globally with
cdp run
command and that’s not enough to make it work. You still have to enable it per interface as well withcdp enable
command.Regards.
@chrismchavez,
ASAs don’t have CDP feature and it make sense since they are firewall devices.
but there is a trick way to do this, I will lab it and show you the commands.
Hello David
You can use CDP to to find information about any directly connected Cisco device, even if they are connected via a routed port or a Layer 2 port. So yes, you can have a switch connected to a router and CDP will show you information about that device, assuming CDP is correctly configured.
Even if you have multiple devices in a network and they are not directly connected to each other, if they are on the same VLAN (like a management VLAN for example) you will see them in the show CDP neighbor output. This is because they are considered directly conn
... Continue reading in our forum