
Cisco发现协议 Cisco Discovery Protocol Cisco.com 深圳职业技术学院计算机系网络专业 06,ShenzhenPolytechnic.All rightsreserved
© 2006, Shenzhen Polytechnic. All rights reserved. 1 Cisco发现协议 Cisco Discovery Protocol 深圳职业技术学院计算机系网络专业

教学目标(Objectives) Cisco.com 1.Cisco发现协议特征(Feature of Cisco Discovery Protocol 2.CDP命令(CDP Command) 3.开启和关闭CDP(Enable and disable CDP) 4.远程登录(telnet) 0.ShenzhenPolytechnic.Allrightsreserved
© 2006, Shenzhen Polytechnic. All rights reserved. . 2 教学目标( Objectives ) 1. Cisco发现协议特征(Feature of Cisco Discovery Protocol ) 2.CDP命令(CDP Command ) 3.开启和关闭CDP(Enable and disable CDP) 4. 远程登录(telnet )

Cisco发现协议(Cisco Discovery Protocol) AIEE Cisco.com 1.Cisco提供的专有的命令 CDP runs on all Cisco equipment 2.获得直接连接的设备的信息摘要 The primary use of CDP is to discover all Cisco devices that are directly connected to a local device. 3.运行在数据链路层 Cisco Discovery Protocol(CDP)is a Layer 2 protocol 4.Cdp版本1在10.3版本后会自动启动 CDP Version 1 is enabled by default with Cisco IOS(Release 10.3 later). 5.cdp更新周期60秒 CDP update timer is 60s 6.cdp过期周期180秒 CDP hold timer is 180s 200,Shenzhen Polytechnic.Allrights reserved
© 2006, Shenzhen Polytechnic. All rights reserved. . 3 Cisco发现协议( Cisco Discovery Protocol ) 1.Cisco提供的专有的命令 CDP runs on all Cisco equipment 2.获得直接连接的设备的信息摘要 The primary use of CDP is to discover all Cisco devices that are directly connected to a local device. 3.运行在数据链路层 Cisco Discovery Protocol (CDP) is a Layer 2 protocol 4.Cdp版本1在10.3版本后会自动启动 CDP Version 1 is enabled by default with Cisco IOS (Release 10.3 later). 5.cdp更新周期60秒 CDP update timer is 60s 6.cdp过期周期180秒 CDP hold timer is 180s

用CDP发现邻居(Discovering Neighbors with CDP) wm Cisco.com 信息摘要包括(Summary information includes): 。设备ID(Device ID) ·本地接口(Local Interface) ·保持时间(Holdtime) ·功能(Capability) DP ·平台(Platform) ·端口ID(PortID) 。VTP域名(VTP Management CDP Domain Name(CDPv2 only)) ·本征VLAN(Native VLAN(CDPv2 only)) 全双工/半双工(Full/Half-.Duplex (CDPv2only))
© 2006, Shenzhen Polytechnic. All rights reserved. . 4 信息摘要包括(Summary information includes): • 设备ID(Device ID) • 本地接口(Local Interface ) • 保持时间(Holdtime ) • 功能(Capability ) • 平台(Platform ) • 端口ID(Port ID ) • VTP域名(VTP Management Domain Name (CDPv2 only) ) • 本征VLAN(Native VLAN (CDPv2 only) ) • 全双工/半双工(Full/Half-Duplex (CDPv2 only) ) CDP show cdp CDP CDP 用CDP发现邻居(Discovering Neighbors with CDP)

Using the show cdp neighbor Command wmmm Cisco.com SwitchA RouterA RouterB SwitchB S1 SO 10.1.1.2 10.3.3.2 10.3.3.1 10.1.1.1 10.2.2.110.2.2.2 RouterA#sh cdp neighbors Capability Codes:R-Router,T-Trans Bridge,B-Source Route Bridge S-Switch,B-Host,I-IGMP,r -Repeater Device ID Local Intrfce Holdtme Capability Platform Port ID RouterB Ser 0 148 2522 Ser 1 SwitchA Eth 0 167 1900 2006,ShenzhenPolytechnic.Allrights reserved
© 2006, Shenzhen Polytechnic. All rights reserved. . 5 Using the show cdp neighbor Command RouterA#sh 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 RouterB Ser 0 148 R 2522 Ser 1 SwitchA Eth 0 167 T S 1900 2 SwitchA RouterA RouterB SwitchB 10.3.3.2 10.3.3.1 10.1.1.1 10.1.1.2 10.2.2.1 10.2.2.2 S0 S1

Using the show cdp entry Command wwm Cisco.com SwitchA RouterA RouterB SwitchB S1 $0 10.1.1.2 10.3.3.2 10.3.3.1 10.1.1.1 10.2.2.110.2.2.2 RouterA#sh cdp entry Device ID:RouterB Entry address(es): IP address:10.1.1.2 Platform:cisco 2522,Capabilities:Router Interface:Serial0 Port ID (outgoing port):Seriall Holdtime:168 sec Version: Cisco Internetwork Operating System Software IOS (tm)2500 Software (C2500-JS-L),Version 12.0(3),RELEASE SOFTWARE (fci) Copyright (c)1986-1999 by cisco Systems,Inc. Compiled Mon 08-Feb-99 18:18 by phanguye 2006,ShenznenPolytecnnic.Alrigntsreserved
© 2006, Shenzhen Polytechnic. All rights reserved. . 6 Using the show cdp entry Command RouterA#sh cdp entry * ------------------------- Device ID: RouterB Entry address(es): IP address: 10.1.1.2 Platform: cisco 2522, Capabilities: Router Interface: Serial0, Port ID (outgoing port): Serial1 Holdtime : 168 sec Version : Cisco Internetwork Operating System Software IOS (tm) 2500 Software (C2500-JS-L), Version 12.0(3), RELEASE SOFTWARE (fci) Copyright (c) 1986-1999 by cisco Systems, Inc. Compiled Mon 08-Feb-99 18:18 by phanguye SwitchA RouterA RouterB SwitchB 10.3.3.2 10.3.3.1 10.1.1.1 10.1.1.2 10.2.2.1 10.2.2.2 S0 S1

CDP其它命令(Additional CDP Commands) IWE厦 Cisco.com SwitchA RouterA S1 RouterB SwitchB 天 SO S10.1.1.2 10.3.3.2 10.3.3.1 10.1.1.1 10.2.2.110.2.2.2 RouterA#sh cdp traffic CDP counters Packets output:56,Input:38 Edr syntax:0,Chksum error:0,Encaps failed:3 No memory:0,Invalid packet:0,Fragmented:0 RouterA#sh cdp interface BRI0 is administratively down,line protocol is down Encapsulation HDLC Sending CDP packets every 60 seconds Holdtime is 180 seconds
© 2006, Shenzhen Polytechnic. All rights reserved. . 7 CDP其它命令(Additional CDP Commands) RouterA#sh cdp traffic CDP counters : Packets output: 56, Input: 38 Hdr syntax: 0, Chksum error: 0, Encaps failed: 3 No memory: 0, Invalid packet: 0, Fragmented: 0 RouterA#sh cdp interface BRI0 is administratively down, line protocol is down Encapsulation HDLC Sending CDP packets every 60 seconds Holdtime is 180 seconds SwitchA RouterA RouterB SwitchB 10.3.3.2 10.3.3.1 10.1.1.1 10.1.1.2 10.2.2.1 10.2.2.2 S0 S1

开启和关闭CDP(Enable and disable CDP) AWIE Cisco.com 1.在全局配置模式下使用(no)cdp run命令开启 或关闭所由接口的CDP功能。默认情况下,CDP被 全局开启。 The cdp run command is used to enable CDP globally on the router.By default,CDP is globally enabled. 2.在接口模式下使用(no).cdp enable命令可以 开启或关闭某个特定接口的CDP功能。 CDP could be enabled on each of the devices interfaces by using the cdp enable command. 006,Shenzhen Polytechnic.Allrightsreserved
© 2006, Shenzhen Polytechnic. All rights reserved. . 8 • 1. 在全局配置模式下使用(no)cdp run 命令开启 或关闭所由接口的CDP功能。默认情况下,CDP被 全局开启。 • The cdp run command is used to enable CDP globally on the router. By default, CDP is globally enabled. • 2.在接口模式下使用(no) cdp enable 命令可以 开启或关闭某个特定接口的CDP功能。 • CDP could be enabled on each of the devices interfaces by using the cdp enable command. 开启和关闭CDP(Enable and disable CDP)

配置周期(Configuring Timer) IIWIEE Cisco.com Router(config)#cdp timer 5 Router(config)#cdp holdtime 15 2006,Shenzhen Polytechnic.Allrights reserved
© 2006, Shenzhen Polytechnic. All rights reserved. . 9 配置周期(Configuring Timer) Router(config)#cdp timer 5 Router(config)# cdp holdtime 15

用telneti连接到远程主机 (Using Telnet to Connect to Remote Devices) 夏 Cisco.com SwitchA RouterA S1 RouterB SwitchB So S10.1.1.2 10.3.3.2 10.3.3.1 10.1.1.1 10.2.2.110.2.2.2 RouterA#telnet 10.1.1.2 ying10.1.1.2..0pen Catalyst 1900 Management Console Copyright (c)Cisco Systems,Inc. 1993-1998 All rights reserved Enterprise Edition Software Ethernet Address: 00-90-86-73-33-40 PCA Number: 73-2239-06 PCA Serial Number: FAA02359H8K Remote device Model Number: WS-C1924-EN System Serial Number: FAA0237X0FQ RouterB>
© 2006, Shenzhen Polytechnic. All rights reserved. . 10 用telnet连接到远程主机 (Using Telnet to Connect to Remote Devices) Remote device SwitchA RouterA RouterB SwitchB 10.3.3.2 10.3.3.1 10.1.1.1 10.1.1.2 10.2.2.1 10.2.2.2 S0 S1 RouterA#telnet 10.1.1.2 Trying 10.1.1.2 ... Open ------------------------------------------------- Catalyst 1900 Management Console Copyright (c) Cisco Systems, Inc. 1993-1998 All rights reserved. Enterprise Edition Software Ethernet Address: 00-90-86-73-33-40 PCA Number: 73-2239-06 PCA Serial Number: FAA02359H8K Model Number: WS-C1924-EN System Serial Number: FAA0237X0FQ . . RouterB>