Cisco CDP协议
:IT学习乐园
:Builder
:20241121
:1K+

Cisco CDP是 Cisco公司私有的协议。CDP思科发现协议。Cisco discovery protocol. Cisco IOS 10.3 以后的版本才有此协议。CDP是二层协议.CDP的默认更新时间为60秒,保持时间为180秒.

网络拓朴如下:

Router1 S0/0 <----> Router2 S0/0
Router1 F1/0 <----> Switch1 F0/0
Router2 F1/0 <----> Switch2 F0/0 

 

Router1配置如下:

 R1#show running-config
Building configuration...

Current configuration : 1295 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$mceS$BOoZJ5Pp/7QwSE6GJgnIq/
enable password 7 030752180500
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef   
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
username builder privilege 10 password 7 1415070200002F39
!
!
!
!
!        
!
interface Serial0/0
 bandwidth 64
 ip address 192.168.1.1 255.255.255.0
 serial restart-delay 0
 clock rate 64000
 no dce-terminal-timing-enable
!
interface Serial0/1
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial0/2
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial0/3
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface FastEthernet1/0
 ip address 192.168.2.1 255.255.255.0
 duplex auto
 speed auto
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!        
!
!
!
banner motd ^C Welcome to connect to Router1! ^C
privilege exec level 10 show
!
line con 0
 exec-timeout 0 0
 password 7 030752180500
 logging synchronous
 login
line aux 0
line vty 0 4
 exec-timeout 0 0
 password 7 045802150C2E
 login

 

Router2的配置如下:

 

 R2#show running-config
Building configuration...

Current configuration : 1122 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$rfd5$/0v212MLcNsfWPmQNceVi0
enable password 7 05080F1C2243
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
!
!
ip cef   
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!        
interface Serial0/0
 ip address 192.168.1.2 255.255.255.0
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial0/1
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial0/2
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!
interface Serial0/3
 no ip address
 shutdown
 serial restart-delay 0
 no dce-terminal-timing-enable
!        
interface FastEthernet1/0
 ip address 192.168.3.1 255.255.255.0
 duplex auto
 speed auto
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!        
!
line con 0
 exec-timeout 0 0
 password 7 0822455D0A16
 logging synchronous
line aux 0
line vty 0 4
 exec-timeout 0 0
 password 7 01100F175804
 login

 

Switch1配置如下:

 

SW1#show running-config
Building configuration...

Current configuration : 1134 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname SW1
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$WfhL$sQH6sKkChGMoLeUHRsHIE1
enable password 7 14141B180F0B
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
no ip routing
!
!        
no ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!        
!
interface FastEthernet0/0
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!        
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface Vlan1
 no ip address
 no ip route-cache
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 password 7 1511021F0725
 logging synchronous
line aux 0
line vty 0 4
 exec-timeout 0 0
 password 7 110A1016141D
 login

 

Switch2配置如下:

SW2#show running-config
Building configuration...

Current configuration : 1134 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname SW2
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$iG2H$s2fYXaoQKd.M9yX36qdom1
enable password 7 121A0C041104
!
no aaa new-model
!
resource policy
!
memory-size iomem 5
no ip routing
!
!        
no ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!        
!
interface FastEthernet0/0
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!        
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface Vlan1
 no ip address
 no ip route-cache
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 password 7 01100F175804
 logging synchronous
line aux 0
line vty 0 4
 exec-timeout 0 0
 password 7 121A0C041104
 login

 

 

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

获取CDP更新定时器和抑制时间(保持时间)信息

R1# show cdp
Global CDP information:
        Sending CDP packets every 60 seconds           %每60秒发送一次更新包
        Sending a holdtime value of 180     seconds  %保持时间为180秒
        Sending CDPv2 advertisements is  enabled        %以版本2广播方式发送
R1#

 

 

-------------- 修改更新定时器和保持时间。

R1#
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#cdp ?
  advertise-v2      CDP sends version-2 advertisements
  holdtime          Specify the holdtime (in sec) to be sent in packets
  log               Log messages generated by CDP
  run               Enable CDP
  source-interface  Insert the interface's IP in all CDP packets
  timer             Specify rate (in sec) at which CDP packets are sent

R1(config)#cdp timer ?
  <5-254>  Rate at which CDP packets are sent (in  sec)

R1(config)# cdp timer 90
R1(config)#cdp holdtime ?
  <10-255>  Length  of time  (in sec) that receiver must keep this packet

R1(config)# cdp holdtime 240
R1(config)#do show cdp
Global CDP information:
        Sending CDP packets every 90 seconds
        Sending a holdtime value of 240 seconds
        Sending CDPv2 advertisements is  enabled
R1(config)#

 

 

显示邻居信息(CDP协议只能显示直接相连的邻居信息)
-------------------

R1#show cdp ?
  entry      Information for specific neighbor entry
  interface  CDP interface status and configuration
  neighbors  CDP neighbor entries
  traffic    CDP statistics
  |          Output modifiers
  <cr>

R1#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
SW1              Fas 1/0            126         S I       3640      Fas 0/0
R2               Ser 0/0            149        R S I      3640      Ser 0/0
R1#

 

--Device ID: 直连设备的主机名
--Local interface :要接收CDP分组的端口或接口(直接控制的本地设备)
--Holdtime :如果没有接收到其他CDP分组,路由器在丢弃接收到的信息之前将要保存的时间。
--Capability :邻居设备的类型,如路由器,交换机或中继器。
--Platform :CISCO设备类型在上面的输出中cisco 3640是直连在路由器R1上的设备。
--Port ID :与路由器R1直接相连的设备在发送更新时所用的接口

-------------

R1#show cdp neighbors ?
  Async              Async interface
  BVI                Bridge-Group Virtual Interface
  CDMA-Ix            CDMA Ix interface
  CTunnel            CTunnel interface
  Dialer             Dialer interface
  FastEthernet       FastEthernet IEEE 802.3
  Lex                Lex interface
  MFR                Multilink Frame Relay bundle interface
  Multilink          Multilink-group interface
  Serial             Serial
  Tunnel             Tunnel interface
  Vif                PGM Multicast Host interface
  Virtual-PPP        Virtual PPP interface
  Virtual-Template   Virtual Template interface
  Virtual-TokenRing  Virtual TokenRing
  detail             Show detailed information
  |                  Output modifiers
  <cr>

 

R1#show cdp neighbors detail
-------------------------
Device ID: SW1
Entry address(es):
Platform: Cisco 3640,  Capabilities: Switch IGMP
Interface: FastEthernet1/0,  Port ID (outgoing port): FastEthernet0/0
Holdtime : 136 sec

Version :
Cisco IOS Software, 3600 Software (C3640-JK9O3S-M), Version 12.4(7a), RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Mon 24-Apr-06 23:37 by ssearch

advertisement version: 2
VTP Management Domain: ''
Duplex: full

-------------------------
Device ID: R2
Entry address(es):
  IP address: 192.168.1.2
Platform: Cisco 3640,  Capabilities: Router Switch IGMP
Interface: Serial0/0,  Port ID (outgoing port): Serial0/0
Holdtime : 157 sec

Version :
Cisco IOS Software, 3600 Software (C3640-JK9O3S-M), Version 12.4(7a), RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Mon 24-Apr-06 23:37 by ssearch

advertisement version: 2
VTP Management Domain: '

 

--------------------------

Show cdp entry *命令与show cdp neighbor details命令所显示相同的信息。


R1#show cdp entry ?
  *     all CDP neighbor entries
  WORD  Name of CDP neighbor entry

R1#show cdp entry *
-------------------------
Device ID: SW1
Entry address(es):
Platform: Cisco 3640,  Capabilities: Switch IGMP
Interface: FastEthernet1/0,  Port ID (outgoing port): FastEthernet0/0
Holdtime : 121 sec

Version :
Cisco IOS Software, 3600 Software (C3640-JK9O3S-M), Version 12.4(7a), RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Mon 24-Apr-06 23:37 by ssearch

advertisement version: 2
VTP Management Domain: ''
Duplex: full

-------------------------
Device ID: R2
Entry address(es):
  IP address: 192.168.1.2
Platform: Cisco 3640,  Capabilities: Router Switch IGMP
Interface: Serial0/0,  Port ID (outgoing port): Serial0/0
Holdtime : 142 sec

Version :
Cisco IOS Software, 3600 Software (C3640-JK9O3S-M), Version 12.4(7a), RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Mon 24-Apr-06 23:37 by ssearch

advertisement version: 2
VTP Management Domain: ''

R1#

 

---只显示R2的信息,可用如下命令


R1#show cdp entry ?
  *     all CDP neighbor entries
  WORD  Name of CDP neighbor entry

R1#show cdp entry R2

-------------------------
Device ID: R2
Entry address(es):
  IP address: 192.168.1.2
Platform: Cisco 3640,  Capabilities: Router Switch IGMP
Interface: Serial0/0,  Port ID (outgoing port): Serial0/0
Holdtime : 142 sec

Version :
Cisco IOS Software, 3600 Software (C3640-JK9O3S-M), Version 12.4(7a), RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Mon 24-Apr-06 23:37 by ssearch

advertisement version: 2
VTP Management Domain: ''

R1#

 

-----------------------------------

显示CDP统计信息

R2#show cdp ?
  entry      Information for specific neighbor entry
  interface  CDP interface status and configuration
  neighbors  CDP neighbor entries
  traffic    CDP statistics
  |          Output modifiers
  <cr>

R2#show cdp traffic
CDP counters :
        Total packets output: 120, Input: 110
        Hdr syntax: 0, Chksum error: 0, Encaps failed: 0
        No memory: 0, Invalid packet: 0, Fragmented: 0
        CDP version 1 advertisements output: 0, Input: 0
        CDP version 2 advertisements output: 120, Input: 110
R2#

清除CDP统计信息 clear cdp counters

R2#clear cdp ?
  counters  Clear CDP counters
  table     Clear cdp table

R2#clear cdp counter
R2#show cdp traffic
CDP counters :
        Total packets output: 0, Input: 0
        Hdr syntax: 0, Chksum error: 0, Encaps failed: 0
        No memory: 0, Invalid packet: 0, Fragmented: 0
        CDP version 1 advertisements output: 0, Input: 0
        CDP version 2 advertisements output: 0, Input: 0
R2#

清除CDP邻居表

R2#
R2#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
SW2              Fas 1/0            163         S I       3640      Fas 0/0
R1               Ser 0/0            180        R S I      3640      Ser 0/0
R2#clear cdp tab
R2#clear cdp table
R2#show cdp ne
R2#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
R2#

-------------------

显示CDP接口信息

R1#show cdp interface
Serial0/0 is up, line protocol is up
  Encapsulation HDLC
  Sending CDP packets every 90 seconds
  Holdtime is 240 seconds
Serial0/1 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 90 seconds
  Holdtime is 240 seconds
Serial0/2 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 90 seconds
  Holdtime is 240 seconds
Serial0/3 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 90 seconds
  Holdtime is 240 seconds
FastEthernet1/0 is up, line protocol is up
  Encapsulation ARPA
  Sending CDP packets every 90 seconds
  Holdtime is 240 seconds
R1#

R2#show cdp interface
Serial0/0 is up, line protocol is up
  Encapsulation HDLC
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
Serial0/1 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
Serial0/2 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
Serial0/3 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet1/0 is up, line protocol is up
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
R2#

 R2#show cdp interface
Serial0/0 is up, line protocol is up
  Encapsulation HDLC
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
Serial0/1 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
Serial0/2 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
Serial0/3 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet1/0 is up, line protocol is up
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
R2#

 SW1#show cdp interface
FastEthernet0/0 is up, line protocol is up
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/1 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/2 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/3 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/4 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/5 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/6 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/7 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/8 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/9 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/10 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/11 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/12 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/13 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/14 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
FastEthernet0/15 is up, line protocol is down
  Encapsulation ARPA
  Sending CDP packets every 60 seconds
  Holdtime is 180 seconds
SW1#
SW1#

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

禁用和开启CDP,CDP默认状态是开启的。

在端口禁用CDP。 no cdp enable

R1#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
Serial0/0                  192.168.1.1     YES manual up                    up     
Serial0/1                  unassigned      YES NVRAM  administratively down down   
Serial0/2                  unassigned      YES NVRAM  administratively down down   
Serial0/3                  unassigned      YES NVRAM  administratively down down   
FastEthernet1/0            192.168.2.1     YES manual up                    up     
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface s0/0
R1(config-if)#no cdp ?
  enable  Enable CDP on interface
  log     Log messages generated by CDP

R1(config-if)#no cdp enable
R1(config-if)#^Z
R1#

验证(未发现Serial0/0接口)

R1#show cdp interface
Serial0/1 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 90 seconds
  Holdtime is 240 seconds
Serial0/2 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 90 seconds
  Holdtime is 240 seconds
Serial0/3 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 90 seconds
  Holdtime is 240 seconds
FastEthernet1/0 is up, line protocol is up
  Encapsulation ARPA
  Sending CDP packets every 90 seconds
  Holdtime is 240 seconds
R1#

------------------

R2#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
SW2              Fas 1/0            145         S I       3640      Fas 0/0
R2#

-----------------

R1#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
SW1              Fas 1/0            153         S I       3640      Fas 0/0
R1#

在接口上开启CDP cdp enable

R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface serial 0/0
R1(config-if)#cdp ? 
  enable  Enable CDP on interface
  log     Log messages generated by CDP

R1(config-if)#cdp enable
R1(config-if)#^Z
R1#
*Mar  1 03:31:51.263: %SYS-5-CONFIG_I: Configured from console by console

验证
R1#show cdp interface

Serial0/0 is up, line protocol is up
  Encapsulation HDLC
  Sending CDP packets every 90 seconds
  Holdtime is 240 seconds
Serial0/1 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 90 seconds
  Holdtime is 240 seconds
Serial0/2 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 90 seconds
  Holdtime is 240 seconds
Serial0/3 is administratively down, line protocol is down
  Encapsulation HDLC
  Sending CDP packets every 90 seconds
  Holdtime is 240 seconds
FastEthernet1/0 is up, line protocol is up
  Encapsulation ARPA
  Sending CDP packets every 90 seconds
  Holdtime is 240 seconds
R1#

------------

关闭整个设备上的CDP no cdp run

R1(config)#cdp ?
  advertise-v2      CDP sends version-2 advertisements
  holdtime          Specify the holdtime (in sec) to be sent in packets
  log               Log messages generated by CDP
  run               Enable CDP
  source-interface  Insert the interface's IP in all CDP packets
  timer             Specify rate (in sec) at which CDP packets are sent

R1(config)#no cdp run
R1(config)#^Z
R1#
*Mar  1 04:10:20.438: %SYS-5-CONFIG_I: Configured from console by console
R1#show cdp interface
% CDP is not enabled
R1#

如果整个设备上禁用CDP协议,不能在接口上开启CDP协议

R1#show cdp interface
% CDP is not enabled
R1#show cdp ne
R1#show cdp neighbors
% CDP is not enabled
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#
R1(config)#
R1(config)#interface serial0/0
R1(config-if)#cdp enable

% Cannot enable CDP on this interface, since CDP is not running
R1(config-if)#
R1(config-if)#

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

CDP的调试

SW1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
SW1(config)#no cdp run
SW1(config)#^Z
SW1#


R1#debug cdp packets
CDP packet info debugging is on
R1#
*Mar  1 04:28:36.750: CDP-PA: Packet received from R2 on interface Serial0/0
*Mar  1 04:28:36.750: **Entry  found in cache**

R1#
*Mar  1 04:29:17.718: CDP-PA: version 2 packet sent out on Serial0/0
*Mar  1 04:29:17.726: CDP-PA: version 2 packet sent out on FastEthernet1/0

R1#
*Mar  1 04:29:36.750: CDP-PA: Packet received from R2 on interface Serial0/0
*Mar  1 04:29:36.750: **Entry  found in cache**

R1#
*Mar  1 04:30:36.766: CDP-PA: Packet received from R2 on interface Serial0/0
*Mar  1 04:30:36.766: **Entry  found in cache**

R1#

R1#no debug cdp pa
R1#no debug cdp packets
CDP packet info debugging is off
R1#

CDP事件调试

R1#debug cdp events
CDP events debugging is on
R1#
*Mar  1 04:35:36.766: CDP-EV: Lookup for ip phone with idb= Serial0/0 ip= 192.168.1.2 mac= 0000.0000.0000 platform= Cisco 3640
R1#
*Mar  1 04:36:36.742: CDP-EV: Lookup for ip phone with idb= Serial0/0 ip= 192.168.1.2 mac= 0000.0000.0000 platform= Cisco 3640
R1#undebug all
All possible debugging has been turned off
R1#




开发者免费试用
开发者免费试用

9:30开抢,每天限量100份.个人认证新用户绑定邮箱后...

立刻前往...
注册认证上云抽好礼
注册认证上云抽好礼

汇聚全站年度销量TOP云产品,每天上午9点限量秒杀,优惠...

立刻前往...
华为企业应用专场
华为企业应用专场

企业建站买1年送2年,商标注册270元起,企业邮箱400...

立刻前往...
企业上云钜惠
企业上云钜惠

多款刚需产品,满足企业通用场景需求,云服务器2.5折起...

立刻前往...