登录站点

用户名

密码

Disable Cisco Discovery Protocol on unused interfaces

热9已有 74 次阅读  2010-01-31 20:07   标签:  Discovery  Cisco  Protocol  Disable  interfaces 

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.

 

分享 举报

发表评论 评论 (10 个评论)

涂鸦板