Friday, November 26, 2010

Using Cisco Discovery Protocol (CDP) on Cisco Router

Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config) #cdp run <-- enables CDP, enabled by default
Router(config) #interface Serial0/0
Router(config-if) #cdp enable
Router(config-if) #exit
Router(config) #interface FastEthernet0/0
Router(config-if) #no cdp enable
Router(config-if) #exit
Router(config) #interface FastEthernet1/0
Router(config-if) #cdp enable
Router(config-if) #end
Router#

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
Router2 Ser 0/0 179 R 2621 Ser 0/1
Switch1 Fas 1/0 152 T S WS-C2924 2/2
Router#


Router#show cdp neighbors detail
------------------------
Device ID: Router2
Entry address(es) :
IP address: 10.10.10.3
Platform: cisco 2621, Capabilities: Router
Interface: Serial0/0, Port ID (outgoing port) : Serial0/1
Holdtime : 136 sec

Version :
Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-IK9O3S-M) , Version 12. 2(13) , RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Tue 19-Nov-02 22: 27 by pwade
advertisement version: 2

Device ID: Switch1
Entry address(es) :
IP address: 192.168.1.4
Platform: WS-C2924, Capabilities: Trans-Bridge Switch
Interface: FastEthernet1/0, Port ID (outgoing port) : FastEthernet0/12
Holdtime : 116 sec

Version :
Cisco Internetwork Operating System Software
IOS (tm) C2900XL Software (C2900XL-C3H2S-M) , Version 12. 0(5) WC3b, RELEASE SOFTWARE
(fc1)
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Fri 15-Feb-02 10: 14 by antonino
advertisement version: 2
Duplex: full
Router#


Router#show cdp
Global CDP information:
Sending CDP packets every 60 seconds
Sending a holdtime value of 180 seconds
Sending CDPv2 advertisements is enabled
Router#


Router(config) #cdp timer 30 <-- CDP advertisement sent every 30 secs
Router(config) #cdp holdtime 240 <-- how long router waits to hear from neighbor before flushing entry

No comments:

Post a Comment