©1999,CiscoSystems,Inc.5-1第五章管理网络环境©1999,CiscoSystems,Inc.—5-2本章目标通过本章的学习,您应该掌握以下内容:•获取直接相邻设备的信息•获取远程设备的信息•创建一个简单的网络框图并验证该网络•清楚配置文件和IOS映象文件被加载的位置©1999,CiscoSystems,Inc.—5-3CDP协议CiscoDiscoveryProtocol•是一个提供关于直接相连的交换机、路由器和其它Cisco设备的综合信息的专有工具•CDP能够发现直接相邻的设备而不管这些设备所运行的是什么协议栈•物理介质必须能够支持SubnetworkAccessProtocol(SNAP)上层地址Cisco专有的链路层协议介质必须能够支持SNAPTCP/IPNovellIPXCDP能发现并显示关于直接相连的Cisco设备的信息ATMOthersLANs帧中继AppleTalkOthers©1999,CiscoSystems,Inc.—5-4CDP运行在使用10.3或更新版CiscoIOS的路由器以及Cisco交换机和集线器上能获取的信息包括:•设备名•对应各协议的地址•端口名•角色特征•平台CDPshowcdpCDPCDP用CDP发现直接相邻的设备©1999,CiscoSystems,Inc.—5-5使用CDP交换机B路由器A路由器B交换机A10.3.3.210.3.3.110.1.1.110.1.1.210.2.2.110.2.2.2S0S1RouterA#shcdp?entryInformationforspecificneighborentryinterfaceCDPinterfacestatusandconfigurationneighborsCDPneighborentriestrafficCDPstatisticscrRouterA(config)#nocdprunRouterA(config)#interfaceserial0RouterA(config-if)#nocdpenable©1999,CiscoSystems,Inc.—5-6交换机A同时也显示其Mac地址使用showcdpneighbor命令RouterA#shcdpneighborsCapabilityCodes:R-Router,T-TransBridge,B-SourceRouteBridgeS-Switch,H-Host,I-IGMP,r-RepeaterDeviceIDLocalIntrfceHoldtmeCapabilityPlatformPortIDRouterBSer0148R2522Ser1SwitchA0050BD855780Eth0167TS1900210.3.3.210.3.3.110.1.1.110.1.1.210.2.2.110.2.2.2S0S1交换机B路由器A路由器B交换机A©1999,CiscoSystems,Inc.—5-7使用showcdpentry命令RouterA#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:18byphanguye10.3.3.210.3.3.110.1.1.110.1.1.210.2.2.110.2.2.2S0S1交换机B路由器A路由器B交换机A©1999,CiscoSystems,Inc.—5-8其它CDP命令RouterA#shcdptrafficCDPcounters:Packetsoutput:56,Input:38Hdrsyntax:0,Chksumerror:0,Encapsfailed:3Nomemory:0,Invalidpacket:0,Fragmented:0RouterA#shcdpinterfaceBRI0isadministrativelydown,lineprotocolisdownEncapsulationHDLCSendingCDPpacketsevery60secondsHoldtimeis180seconds10.3.3.210.3.3.110.1.1.110.1.1.210.2.2.110.2.2.2S0S1交换机B路由器A路由器B交换机A©1999,CiscoSystems,Inc.—5-9用Telnet连接到远端设备远端设备10.3.3.210.3.3.110.1.1.110.1.1.210.2.2.110.2.2.2S0S1RouterA#telnet10.2.2.2Trying10.2.2.2...Open-------------------------------------------------Catalyst1900ManagementConsoleCopyright(c)CiscoSystems,Inc.1993-1998Allrightsreserved.EnterpriseEditionSoftwareEthernetAddress:00-90-86-73-33-40PCANumber:73-2239-06PCASerialNumber:FAA02359H8KModelNumber:WS-C1924-ENSystemSerialNumber:FAA0237X0FQ..SwitchB交换机B路由器A路由器B交换机A©1999,CiscoSystems,Inc.—5-10查看Telnet连接10.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交换机B路由器A路由器B交换机A©1999,CiscoSystems,Inc.—5-11挂起一个Telnet会话10.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#交换机B路由器A路由器B交换机A©1999,CiscoSystems,Inc.—5-12RouterA#disconnectClosingconnectionto10.3.3.2[confirm]RouterA#clearline11[confirm][OK]关闭一个Telnet会话关闭由远端设备建立的会话关闭由自己建立的当前会话10.3.3.210.3.3.110.1.1.110.1.1.210.2.2.110.2.2.2S0S1交换机B路由器A路由器B交换机A©1999,CiscoSystems,Inc.—5-13使用ping和trace命令测试对远端设备的连接性和路径Router##ping10.1.1.10Typeescapesequencetoabort.Sending5,100-byteICMPEchosto10.1.1.10,timeoutis2seconds:!!!!!Successrateis100percent(5/5),round-tripmin/avg/max=4/4/4msRouter#trace10.1.1.10Typeescapesequencetoabort.Tracingtherouteto10.1.1.10110.1.1.104msec4msec4msecRouter#©1999,CiscoSystems,Inc.—5-14路由器加电/启动顺序•加电自检(POST)•加载并运行启动引导微代码•寻找IOS映象文件•加载IOS映象文件•寻找配置文件•加载配置文件•正常运行©1999,CiscoSystems,Inc.—5-15路由器内部组件RAM配置寄存器ROMFlashNVRAM端口©1999,CiscoSystems,Inc.—5-16ROM功能ROM存放完成基本功能的微代码BootstrapMiniIOSROMmonitorPOSTshowversion控制台©1999,CiscoSystems,Inc.—5-17寻找IOS映象文件Flashshowversionshowstartup-configIOS搜索顺序:1.检查配置寄存器2.解析NVRAM中的配置文件3.缺省是使用Flash中的第一个文件4.尝试从网络启动5.RXBOOT6.ROMMON控制台配置寄存器NVRAM©1999,CiscoSystems,Inc.—5-18路由器启动流程图UseIOSfromFlashAttempttogetIOSfromnetworkUseIOSinROM(RXBootmode)Checkstart-upconfigBootfield=00x0Bootfield=10x1Bootsystemcommands?Configregbit13=1?5failures?ValidIOSinFlash?DowhattheysayRunROMMonitorSTARTYesYesNoNoYesNoNoYesYesNoNoYesSuccess?NoYesUsefilefromNetworkLoadIOSValidconfig?Configregbit6=1?YesNoYesSETUPDIALOGNORMALSTARTUPCOMPLETENo©1999,CiscoSystems,Inc.—5-19确认当前的配置寄存器值wg_ro_a#showversionCiscoInternetworkOperatingSystemSoftwareIOS(tm)2500Software(C2500-JS-L),Version12.0(3),RELEASESOFTWARE(fc1)Copyright(c)1986-1999byciscoSystems,Inc.CompiledMon08-Feb-9918:18byphanguyeImagetext-base:0x03050C84,data-base:0x00001