Network technologies and trends

Jan 20 2010   7:29AM GMT

Disable Cisco Discovery Protocol on unused interfaces

Yasir Irfan Yasir Irfan Profile: Yasir Irfan

We all know how important a Cisco Discovery Protocol (CDP) to troubleshoot the network, but sometimes this may leads to a problem. These days lot of free CDP discovery utilities is available. Anyone can download the CDP utility and start gathering info about your network. It’s always recommended to disable the Cisco Discovery Protocol (CDP) on all the interfaces in your Cisco devices. The only interfaces need to use the Cisco Discovery Protocol (CDP) are the ones which are connected to your Cisco Routers and Cisco Switches. Cisco Discovery Protocol (CDP) can be disabled by using “no cdp enable” command in the entire interface you need.

In my access Switch the CDP is enabled in all interfaces, you can determine this by using a command “show cdp interfaces” you can see CDP is enabled in  all the interfaces.

ITKE-AS01#sho cdp interfaces

FastEthernet0/1 is down, line protocol is down

  Encapsulation ARPA

  Sending CDP packets every 60 seconds

  Holdtime is 180 seconds

FastEthernet0/2 is down, line protocol is down

  Encapsulation ARPA

  Sending CDP packets every 60 seconds

  Holdtime is 180 seconds

FastEthernet0/3 is up, line protocol is up

  Encapsulation ARPA

  Sending CDP packets every 60 seconds

  Holdtime is 180 seconds

FastEthernet0/4 is down, line protocol is down

  Encapsulation ARPA

  Sending CDP packets every 60 seconds

  Holdtime is 180 seconds

 

 

FastEthernet0/12 is down, line protocol is down

FastEthernet0/24 is up, line protocol is up

  Encapsulation ARPA

  Sending CDP packets every 60 seconds

  Holdtime is 180 seconds

ITKE-AS01#

 

 

Let’s see to which interface the router is connected

ITKE-AS01#show cdp neighbors

Capability Codes: R – Router, T – Trans Bridge, B – Source Route Bridge

                  S – Switch, H – Host, I – IGMP, r – Repeater, P – Phone,

                  D – Remote, C – CVTA, M – Two-port Mac Relay

 

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID

MOHMPLS          Fas0/24          176            R       2620XM    Fas 0/0

ITKE-AS01#

 

Let’s disable the CDP in all the interfaces expect fast Ethernet 0/24

 

ITKE-AS01#configure t

ITKE-AS01(config)#interface range fastEthernet 0/1 -23

ITKE-AS01 (config-if-range)#no cdp enable

 

In the above example I have disabled CDP in all interfaces except the one connected to the router.

 

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: