第04讲-CDP协议

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

©2006,ShenzhenPolytechnic.Allrightsreserved.1Cisco发现协议CiscoDiscoveryProtocol深圳职业技术学院计算机系网络专业©2006,ShenzhenPolytechnic.Allrightsreserved..2教学目标(Objectives)1.Cisco发现协议特征(FeatureofCiscoDiscoveryProtocol)2.CDP命令(CDPCommand)3.开启和关闭CDP(EnableanddisableCDP)4.远程登录(telnet)©2006,ShenzhenPolytechnic.Allrightsreserved..3Cisco发现协议(CiscoDiscoveryProtocol)1.Cisco提供的专有的命令CDPrunsonallCiscoequipment2.获得直接连接的设备的信息摘要TheprimaryuseofCDPistodiscoverallCiscodevicesthataredirectlyconnectedtoalocaldevice.3.运行在数据链路层CiscoDiscoveryProtocol(CDP)isaLayer2protocol4.Cdp版本1在10.3版本后会自动启动CDPVersion1isenabledbydefaultwithCiscoIOS(Release10.3later).5.cdp更新周期60秒CDPupdatetimeris60s6.cdp过期周期180秒CDPholdtimeris180s©2006,ShenzhenPolytechnic.Allrightsreserved..4信息摘要包括(Summaryinformationincludes):•设备ID(DeviceID)•本地接口(LocalInterface)•保持时间(Holdtime)•功能(Capability)•平台(Platform)•端口ID(PortID)•VTP域名(VTPManagementDomainName(CDPv2only))•本征VLAN(NativeVLAN(CDPv2only))•全双工/半双工(Full/Half-Duplex(CDPv2only))CDPshowcdpCDPCDP用CDP发现邻居(DiscoveringNeighborswithCDP)©2006,ShenzhenPolytechnic.Allrightsreserved..5UsingtheshowcdpneighborCommandRouterA#shcdpneighborsCapabilityCodes:R-Router,T-TransBridge,B-SourceRouteBridgeS-Switch,H-Host,I-IGMP,r-RepeaterDeviceIDLocalIntrfceHoldtmeCapabilityPlatformPortIDRouterBSer0148R2522Ser1SwitchAEth0167TS19002SwitchBRouterARouterBSwitchA10.3.3.210.3.3.110.1.1.110.1.1.210.2.2.110.2.2.2S0S1©2006,ShenzhenPolytechnic.Allrightsreserved..6UsingtheshowcdpentryCommandRouterA#shcdpentry*-------------------------DeviceID:RouterBEntryaddress(es):IPaddress:10.1.1.2Platform:cisco2522,Capabilities:RouterInterface:Serial0,PortID(outgoingport):Serial1Holdtime:168secVersion:CiscoInternetworkOperatingSystemSoftwareIOS(tm)2500Software(C2500-JS-L),Version12.0(3),RELEASESOFTWARE(fci)Copyright(c)1986-1999byciscoSystems,Inc.CompiledMon08-Feb-9918:18byphanguyeSwitchBRouterARouterBSwitchA10.3.3.210.3.3.110.1.1.110.1.1.210.2.2.110.2.2.2S0S1©2006,ShenzhenPolytechnic.Allrightsreserved..7CDP其它命令(AdditionalCDPCommands)RouterA#shcdptrafficCDPcounters:Packetsoutput:56,Input:38Hdrsyntax:0,Chksumerror:0,Encapsfailed:3Nomemory:0,Invalidpacket:0,Fragmented:0RouterA#shcdpinterfaceBRI0isadministrativelydown,lineprotocolisdownEncapsulationHDLCSendingCDPpacketsevery60secondsHoldtimeis180secondsSwitchBRouterARouterBSwitchA10.3.3.210.3.3.110.1.1.110.1.1.210.2.2.110.2.2.2S0S1©2006,ShenzhenPolytechnic.Allrightsreserved..8•1.在全局配置模式下使用(no)cdprun命令开启或关闭所由接口的CDP功能。默认情况下,CDP被全局开启。•ThecdpruncommandisusedtoenableCDPgloballyontherouter.Bydefault,CDPisgloballyenabled.•2.在接口模式下使用(no)cdpenable命令可以开启或关闭某个特定接口的CDP功能。•CDPcouldbeenabledoneachofthedevicesinterfacesbyusingthecdpenablecommand.开启和关闭CDP(EnableanddisableCDP)©2006,ShenzhenPolytechnic.Allrightsreserved..9配置周期(ConfiguringTimer)Router(config)#cdptimer5Router(config)#cdpholdtime15©2006,ShenzhenPolytechnic.Allrightsreserved..10用telnet连接到远程主机(UsingTelnettoConnecttoRemoteDevices)RemotedeviceSwitchBRouterARouterBSwitchA10.3.3.210.3.3.110.1.1.110.1.1.210.2.2.110.2.2.2S0S1RouterA#telnet10.1.1.2Trying10.1.1.2...Open-------------------------------------------------Catalyst1900ManagementConsoleCopyright(c)CiscoSystems,Inc.1993-1998Allrightsreserved.EnterpriseEditionSoftwareEthernetAddress:00-90-86-73-33-40PCANumber:73-2239-06PCASerialNumber:FAA02359H8KModelNumber:WS-C1924-ENSystemSerialNumber:FAA0237X0FQ..RouterB©2006,ShenzhenPolytechnic.Allrightsreserved..11查看telnet连接(ViewingTelnetConnections)SwitchBRouterARouterBSwitchA10.3.3.210.3.3.110.1.1.110.1.1.210.2.2.110.2.2.2S0S1RouterA#shsessionConnHostAddressByteIdleConnName110.1.1.210.1.1.20110.1.1.2*210.3.3.210.3.3.20010.3.3.2RouterA#shuserLineUserHost(s)IdleLocation*0con010.1.1.2310.3.3.2211vty0idle110.1.1.2©2006,ShenzhenPolytechnic.Allrightsreserved..12挂起telnet会话(SuspendingaTelnetSession)SwitchBRouterARouterBSwitchA10.3.3.210.3.3.110.1.1.110.1.1.210.2.2.110.2.2.2S0S1RouterB#Ctrl-Shift-6xRouterA#shsessionConnHostAddressByteIdleConnName110.1.1.210.1.1.20110.1.1.2RouterA#resume1RouterB#©2006,ShenzhenPolytechnic.Allrightsreserved..13RouterA#disconnectClosingconnectionto10.3.3.2[confirm]RouterA#clearline11[confirm][OK]关闭telnet会话(ClosingaTelnetSession)ClosingasessionopenedbyaremotedeviceClosingthecurrentsessionopenedbyyouSwitchBRouterARouterBSwitchA10.3.3.210.3.3.110.1.1.110.1.1.210.2.2.110.2.2.2S0S1©2006,ShenzhenPolytechnic.Allrightsreserved.14使用CDP协议复原网络拓扑实验报告©2006,ShenzhenPolytechnic.Allrightsreserved..15要求1.四个人一组2.配置hostname3.每人把自己的路由器接口全部打开,注意在DCE端配置时钟。4.用showcdpneighbor命令查找自己的路由器通过什么接口和其他设备的什么接口进行连接。5.提交实验报告(步骤以及最终的网络拓扑、设备的类型)(做为平时成绩)©2006,ShenzhenPolytechnic.Allrightsreserved..16提示1hostnameRXXXintf0/0•noshut•不需要IP地址ints0/0•noshut•clockrate128000•不需要IP地址showcdpneighborcdp只能看到直连的设备如何查看本地的接口和对方的接口©2006,ShenzhenPolytechnic.Allrightsreserved..17提示2showcdpneihborcdp只能看到直连的设备如何查看本地的接口和对方的接口©2006,ShenzhenPolytechnic.Allrightsreserved..18思考题(Questions)1.CDP有哪些特征?2.CDP的功能是什么?3.用CDP可以看到邻居的哪些信息?4.用什么命令可以在接口下控制CDP的启动?5.哪个符号是我们获得帮助时最常用的?6.telnet默认支持几个用户同时登录?

1 / 18
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功