background image
370
Chapter 7
Managing a Cisco Internetwork
Router(config)#cdp holdtime 240
Router(config)#^Z
You can turn off CDP completely with the no cdp run command from
global configuration mode of a router. To turn CDP off or on in a router
interface, use the no cdp enable and cdp enable commands, which are
discussed in more detail in the "Gathering Port and Interface Information"
section a bit later in this chapter.
Gathering Neighbor Information
The show cdp neighbor command (sh cdp nei for short) shows informa-
tion about directly connected devices. It is important to remember that CDP
packets are not passed through a Cisco switch, and you only see what is
directly attached. On a router connected to a switch, you will not see the
other devices connected to the switch.
The following output shows the show cdp neighbor command used on a
2509 router.
Todd2509#sh cdp nei
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
1900Switch Eth 0 238 T S 1900 2
2500B Ser 0 138 R 2500 Ser 0
Todd2509#
Connected directly to the 2509 router are a switch with a hostname of
1900Switch and a 2500 router with a hostname of 2500B. Notice that no
devices connected to the 1900Switch and the 2500B router show in the CDP
table on the 2509 router. You can only see directly connected devices.
Table 7.5 summarizes the information displayed by the show cdp
neighbor
command for each device.
T A B L E 7 . 5
Output of the Show CDP Neighbor Command
Field
Description
Device ID
The hostname of the device directly connected.
Local Interface
The port or interface on which you are receiving
the CDP packet.
Copyright ©2002 SYBEX, Inc., Alameda, CA
www.sybex.com