In our last blog discussion, I’ve been building on an important point involving Mac Address Tables, Arp Caches and Routing tables. This is to show traffic flow and forwarding decisions that intermediate network will have to make. However, to it may also be necessary to discover what devices can be found in a given transit path. In the best scenario, Network Engineers would have made a network diagram and would have also maintained it when new devices are added.
Also networking tools such as Cisco Works or HP Openview can use Simple Network Management Protocol (SNMP) to find and discover devices and their current layout. Cisco Discover Protocol (CDP) is another protocol that is useful for making a layout of the network devices and it is an essential tool for a CCNA technician.
To begin, CDP is a Layer 2 Multicast protocol that is used primarily by Cisco devices. Routers, switches, Cisco Unified Call Managers and IP phones are examples of devices that uses CDP to learn which devices are directly connect to it. These packets are transmitted in the multicast group of 0100.CCCC.CCCC. The example below displays the Multicast Group’s address.

If a device such as a switch that isn’t a Cisco switch receives this, then it will flood the frame out of all its interfaces. Otherwise it will be terminated on that switch. There are several commands show commands for CDP and a few commands that can be used for configuration. This next example shows the basic options that can be used to learn about CDP information (we will cover all these option in this discussion).

Secondly, CDP is enabled by default with the command cdp run. This command is configured from global configuration mode, however the command, cdp enable can be used to enable or disable CDP per interface. Using no with either command will disable CDP for the entire device or interface (respectively).

The example above displays that CDP is disable for SW10. The example below displays CDP being disabled on an interface.

Third, CDP is sent periodically every 60 seconds and have a hold down time of 180 seconds. To view these timers you can view this with the command, show cdp interface<interface type>. In the example below we can see that CDP is configured on an interface and displays its default timers.

To can change these defaults use the global configuration commands cdp timer and cdp holdtime.

As shown in the example 6, the timers can be adjusted if necessary.
Fourth, with CDP packets begin transmitted and received on its interfaces, to display directly connected neighbors, the show cdp neighbor command will display the CDP neighbor table.

The DEVICE ID is the host name of the device that SW10 is directly connected to. Local Intrfce displays the local interface connecting to the found device and Port ID is local port on the remote device. Every Cisco Device has a capability code associated to it based on if it can perform the given function. For example, R1 can perform the function of a router, switch (bridging functions or with a switch module) and IGMP capabilities. Also if a CDP packet isn’t received from a neighbor before the holdtime expires, then the entry is purged from the table. The platform of the device is also displayed.
This concludes part one of our discussion on CDP. In part two we will get deeper in its usage and when it should be used.
Author: Jason Wyatte









0 Responses to “Understanding Cisco Discovery Protocol: Part 1”