Cisco Discovery Protocol (CDP)

Cisco Discovery Protocol (CDP) is a proprietary protocol designed by Cisco to help administrators collect information about both locally attached and remote devices. By using CDP, you can gather hardware and protocol information about neighbor devices, which is useful info for troubleshooting the network.CDP messages are generated every 60 seconds as multicast messages on each of its active interfaces.

The information shared in a CDP packet about a Cisco device includes the following:

  • Name of the device configured with the hostname command
  • IOS software version
  • Hardware capabilities, such as routing, switching, and/or bridging
  • Hardware platform, such as 2600, 2950, or 1900
  • The layer-3 address(es) of the device
  • The interface the CDP update was generated on
CDP allows devices to share basic configuration information without even configuring any protocol specific information and is enabled by default on all interfaces. CDP is a Datalink Protocol occurring at Layer 2 of the OSI model. CDP is not routable and can only go over to directly connected devices.
CDP is enabled, by default, on all Cisco devices. CDP updates are generated as multicasts every 60 seconds with a hold-down period of 180 seconds for a missing neighbor.

#cdp run
 This command enables cdp globally
#no cdp run
 turns off CDP for entire router (global config)
#no cdp enable
 turns off CDP on specific interface
#sh cdp neighbor
 shows directly connected neighbors
#sh cdp int
 shows which interfaces are running CDP
#sh cdp int eth 0/0
 show CDP info for specific interface
#sh cdp entry <cdp neighbor here>
 shows CDP neighbor detail
#cdp timer 120
 change how often CDP info is sent (default cdp timer is 60)
#cdp holdtime 240
 how long to wait before removing a CDP neighbor (default CDP holdtime is 180)
#sh cdp run
 shows if CDP turned on

1 comment:

  1. Here is a sample output of "show cdp neighbor" command

    ======================

    Router#show cdp neighbors
    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
    lab-7206 Eth 0 157 R 7206VXR Fas 0/0/0
    lab-as5300-1 Eth 0 163 R AS5300 Fas 0
    lab-as5300-2 Eth 0 159 R AS5300 Eth 0
    lab-as5300-3 Eth 0 122 R AS5300 Eth 0
    lab-as5300-4 Eth 0 132 R AS5300 Fas 0/0
    lab-3621 Eth 0 140 R S 3631-telcoFas 0/0
    008024 2758E0 Eth 0 132 T CAT3000 1/2

    ======================

    Source:http://www.cisco.com/c/en/us/td/docs/ios/12_2/configfun/command/reference/ffun_r/frf015.html#wp1019534


    -Vivek

    ReplyDelete