Discovery Protocols

Discovery Protocols

May 28, 2013 1 By Eric Shanks

discoveryIf you find yourself in an unfamiliar network and want to understand how the networks are connected, it would certainly be nice to be able to tell what is connected to each other.  Luckily there are a couple of protocols that are responsible for just that.

Cisco Discovery Protocol (CDP)

As you can probably guess from the name, the Cisco Discovery Protocol is a proprietary protocol from Cisco Systems.

How does it work?  Every 60 seconds (by default) the Cisco device will send an announcement to the multicast address 01-00-0c-cc-cc-cc on every interface.  The information in this announcement may contain any configured IP Addresses, the OS version, Hostname of the device, and the port name that the announcement came from.  It may also send some vlan trunking protocol (VTP) information as well because Cisco uses CDP in setting up VTP.

Any devices that can understand CDP will then store this information for up to 180 seconds (by default) so that they can then determine what device is directly connected to them and what ports they’re connected to.

To determine this information on a Cisco switch you can run “Show CDP Neighbors”

showcdpneigh

If you want to show your CDP Settings you may run “Show CDP”

showcdp

 

Link Layer Discovery Protocol (LLDP)

Link Layer Discovery Protocol (LLDP) is very similar to CDP but is formalized in the IEEE 802.1AB standard.  Since LLDP is a formalized standard, it is used by a variety of vendors including Cisco.

How does it work?  LLDP works in a very similar fashion to CDP but used more than one multicast address.  These frames are not able to be forwarded by a router whereas CDP can be used in a layer 3 network.  In fact CDP is used by Cisco to do some routing advertisements.

LLDP does advertise the hostname, management IP Address, port name and description just as CDP does.

Neighbor Discovery Protocol (NDP)

If you haven’t heard about Neighbor Discovery Protocol (NDP) yet it’s probably because you haven’t had to delve into the depths of IPv6 yet.

NDP is used on more than just switches and routers.  Any computers that have the IPv6 network stack on them should be doing some sort of NDP.  This discovery protocol is used to not only discover the neighboring devices, but also the networks they’re on, path selection, DNS Server addresses, Gateways and IP address duplicate prevention!  This is a pretty robust protocol that combine’s IPv4’s ARP and ICMP requests.

I would think that this protocol might replace LLDP and CDP since it is necessary for stateless IP address auto configuration.