When you move into a new apartment complex, what's one of the first things you generally do after unpacking all the boxes? Meet your neighbors, of course. If you're not familiar with the area, people who have been living in the building for years are likely to be your best sources for information on where to go, what to do, and what to avoid.
Networks are a lot like apartment complexes. When a new device moves in, it needs to know all about its neighbors, the neighbors are equally eager to know all about it -- and the building manager needs to know about everybody.
Typically, devices introduce themselves by announcing their MAC-layer hardware address and IP network address. While MAC and IP addresses are critical bits of information, they don't provide much in the way of a neighborhood map. Is there a better way for devices to learn who their neighbors are, and for the manager to know who's moving in and out of the building?
There is if you're using Cisco hardware in your network. Cisco makes it easy for you by quietly building a feature called Ci sco Discovery Protocol into IOS releases 10.3 and up.
According to Cisco's Website, CDP is:
"... a media- and protocol-independent protocol that runs on all Cisco-manufactured
equipment including routers, bridges, access servers, and switches. With CDP,
network-management applications can learn the device type and the SNMP agent address of
neighboring devices. This enables applications to send SNMP queries to neighboring
That's a long-winded way of saying that when a CDP-enabled device is placed on the network, it multicasts a Subnetwork Access Protocol packet advertising at least one address at which it can receive Simple Network Management Protocol messages, as well as information about how long the device should retain previously received CDP data.
What does all this mean for a network manager?
CDP's primary function is to make discovering the network topology easier for a network-management application such as Hewlett-Packard's OpenView. By polling CDP-enabled devices, the network management application can build a topology map without breaking a sweat.
What if you don't have Cisco equipment, or if you have other vendors' devices on the network? Then your SNMP console has to poll routers for Address Resolution Protocol (ARP) caches and infer a network topology from that information. If you've ever turned a network management application loose in autodiscover mode, you know how confused it can get. I've seen some autogenerated network maps that bore absolutely no resemblance to reality.
CDP makes a very good network citizen. It isn't chatty -- it takes up very little network bandwidth. It's always there when you need it -- it's on by default. And it won't throw wild parties at 3:00 a.m. That's more than you can say for a lot of neighbors.