Enabling and Disabling Cisco Discovery Protocol (CDP)

For a variety of reasons Cisco Discovery Protocol (CDP) may need to be enabled or disabled on portions of your network. CDP, when fully enabled, essentially allows you to identify Cisco devices on your network and see how they are connected.

Enabling CDP

Even though CDP is enabled by default on your Cisco devices, you might inherit a network where the previous administrator had disabled CDP because he disliked three letter protocols (or for some other equally valid reason).

If you find that CDP is not running on your device, you can enable CDP using the cdp run command as follows:

Switch1>enable
Switch1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch1(config)#cdp ?
  advertise-v2  CDP sends version-2 advertisements
  holdtime      Specify the holdtime (in sec) to be sent in packets
  run           Enable CDP
  timer         Specify the rate at which CDP packets are sent       (in sec)
Switch1(config)#cdp run
Switch1(config)#end

Disabling CDP

After CDP is running on your device, by default, CDP is enabled on all interfaces of the device. At times, you may want to disable CDP — for example, on the external interface of the Internet router connected to your ISP because the ISP does not need the details about the internal network configuration.

Using this method only disables CDP on a specific interface where you choose not to transmit CDP data, but leaves it enabled on the device, so you are still able to receive CDP data. To disable CDP on an interface, use Interface Configuration mode, as shown here:

Switch1>enable
Switch1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch1(config)#interface fastEthernet 0/1
Switch1(config-if)#no cdp enable
Switch1(config)#end
blog comments powered by Disqus
Advertisement

Inside Dummies.com