Home > Articles

  • Print
  • + Share This

The Cisco Discovery Protocol

The Cisco IOS contains a proprietary protocol, Cisco Discovery Protocol (CDP), which enables you to access information related to neighboring routers. CDP uses Data Link broadcasts to discover neighboring Cisco routers that are also running CDP (CDP is turned on automatically on routers running IOS 10.3 or later). CDP is platform-independent, so it will accumulate information about neighbor routers no matter which network protocol stack they might be running (such as TCP/IP, IPX/SPX, and so on).

To view the CDP interfaces on the router, use the command show cdp interface (see the following figure). This command provides the CDP information for all enabled interfaces on the router. To view CDP stats on one interface, such as Serial 0, use the show cdp interface s0 command.

Figure 3.11

Two pieces of information shown in the results of the show cdp interface command warrant further discussion: the CDP packet send interval and the CDP holdtime. Notice that CDP packets are sent by CDP-enabled interfaces every 60 seconds. This means that they are broadcasting information to their CDP neighbors every minute.

The holdtime refers to the amount of time a router should hold the CDP information it has received from a neighboring router. If a router does not receive an update message from a neighbor within 3 minutes (180 seconds), it must discard the old CDP information it holds.

If the show cdp interface command provides no results or does not provide information for a particular interface, CDP is not enabled. CDP can be disabled globally or on an interface-by-interface basis. To disable CDP globally, enter the configuration mode and then type no cdp run. This shuts it off on all interfaces. For a particular interface, enter the configuration mode and specify the interface you want to disable; then use the command no cdp enable. The global command for turning on CDP is cdp run.

After you have viewed the status of CDP on your various interfaces, you can use CDP to take a look at platform and protocol information on a neighboring router or routers. At the user or privileged prompt, type show cdp neighbors, and then press Enter (see the next figure).

Figure 3.12

Table 3.3 describes the information show in the figure.

Table 3.3 The show Command in the User Mode

Parameter

Means

Information from the Figure

Device ID

The neighbor or neighbors' hostname(s)

sweetpea

Local Interface

The interface on the local router that provides the connection to the neighbor

Ser 0

Capacity

Whether the router is configured to serve multiple functions such as routing (R), bridging (B), and switching (S)

R T (this router is configured to route and bridge)

Platform

The type of Cisco

2516 (the neighbor is router a 2516 router)

Port ID

The interface used on the neighbor to connect to your local router

Serial 0


Obviously, if you have a router connected to many different neighbors via its various interface ports, the number of neighbors shown using the show cdp neighbor command would provide information on several routers.

If you want to see more details concerning your CDP neighbors, you can use the show cdp neighbor detail command, which you can enter at the user or privileged prompt. This command provides the IP address of the neighbor's interface and the version of the IOS the neighbor is running.

To view CDP statistics related to one CDP neighbor, use the show cdp entry [router name] command, in which you specify the router name of the neighbor.

 

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.