您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 冶金工业 > 【网络管理】网络管理-第一章+路由器配置和文件管理
第一章路由器配置和文件管理1.1.通过TFTP来配置路由器提问使用TFTP来加载路由器的配置文件回答Router1#copyt[running-config]?enterAccessingt(viaFastEthernet0/0.1):![OK-24bytes]24bytescopiedin0.192secs(125bytes/sec)Router1#注释IOS12.0版本以前使用的configurenetwork命令,另外拷贝至路由器的配置文件应该以End结尾,否则会出现下面的错误提示信息:%PARSER-4-BADCFG:Unexpectedendofconfigurationfile.1.2.保存路由器配置到服务器提问保存路由器当前配置文件到TFTP服务器作为备份回答Freebsd%touch/tftpboot/router1-confgFreebsd%chmod666/tftpboot/router1-confgFreebsd%telnetRouter1Trying172.25.1.5...ConnectedtoRouter1.Escapecharacteris'^]'.UserAccessVerificationPassword:vtypasswordRouter1enablePassword:enablepasswordRouter1#copyrunning-configt[172.25.1.1]?enterDestinationfilename[router1-confg]?enter!!!9640bytescopiedin3.956secs(2437bytes/sec)Router1#注释确保TFTP服务器上的目录和文件可写1.3.使用远端配置文件启动路由器提问使用另外的配置文件来启动路由器回答Router1#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Router1(config)#serviceconfigRouter1(config)#bootnetworktftpNetwork-auto172.25.1.1Router1(config)#boothosttftpRouter8-auto172.25.1.1Router1(config)#endRouter1#注释serviceconfig缺省是关闭的,如果打开缺省会去查找的文件名为network-config,cisconet.cfg,router1-confg,router1.cfg等1.4.保存大于NVRAM大小的配置文件提问配置文件过大,超过了可用的NVRAM大小回答Router1#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Router1(config)#servicecompress-configRouter1(config)#endRouter1#注释可以使用showstartup-config来验证Router1#showstartup-configUsing5068outof29688bytes,uncompressedsize=9969bytesUncompressedconfigurationfrom5068bytesto9969bytes1.5.清除启动配置文件提问清除配置文件恢复到出厂设置回答Router1#erasenvram:(erasestartup-config)Erasingthenvramfilesystemwillremoveallfiles!Continue?[confirm]enter[OK]Eraseofnvram:completeRouter1#reloadSystemconfigurationhasbeenmodified.Save?[yes/no]:noProceedwithreload?[confirm]enter注释无1.6.加载新的IOS镜像提问升级当前的IOS回答Router1#copyt:Destinationfilename[c2600-ik9o3s-mz.122-12a.bin]?enterAccessingt:beforecopying?[confirm]enterErasingtheflashfilesystemwillremoveallfiles!Continue?[confirm]enterErasingdevice...eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...erasedEraseofflash:completeLoadingc2600-ik9o3s-mz.122-12a.binfrom172.25.1.1(viaFastEthernet0/0.1):!!!!!!!!!!!!!![OK-11135588bytes]Verifyingchecksum...OK(0xE643)11135588bytescopiedin82.236secs(135410bytes/sec)Router1#reloadProceedwithreload?[confirm]enter注释无1.7.以另一个IOS镜像文件启动提问使用其它的IOS镜像启动回答Router1#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Router1(config)#bootsystemflash:c3620-jk9o3s-mz.122-7a.binRouter1(config)#bootsystemflash:c3620-jos56i-l.120-11.binRouter1(config)#bootsystemslot0:c3620-ik9s-mz.122-13.binRouter1(config)#bootsystemromRouter1(config)#end注释bootsystem命令的顺序非常重要,如果使用新的IOS,建议先进行nobootsystem的操作。从IOS12.3(4)T后思科引入了bootmarkers的概念,所有的bootsystme命令都会放在bootmarkers之间,比如:Router1#showrunning-config|include^bootboot-start-markerbootsystemslot0:c3745-ipbasek9-mz.124-6.T.binbootsystemslot0:c3745-ipbasek9-mz.124-7.binbootsystemflash:boot-end-markerRouter1#1.8.通过网络启动提问IOS太大本地Flash无法保存,使用保存在网络上的IOS启动回答Router1#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Router1(config)#bootsystemtftpc2500-io-l.122-7a.bin172.25.1.1Router1(config)#bootsystemflashRouter1(config)#endRouter1#注释无1.9.拷贝IOS镜像文件到服务器提问保存一份IOS到TFTP服务器作为备份回答Freebsd%touch/tftpboot/c2600-ik9o3s-mz.122-12a.binFreebsd%chmod666/tftpboot/c2600-ik9o3s-mz.122-12a.binFreebsd%telnetRouter1Trying172.25.1.5...ConnectedtoRouter1.Escapecharacteris'^]'.UserAccessVerificationPassword:vtypasswordRouter1enablePassword:enablepasswordRouter1#copyflash:c2600-ik9o3s-mz.122-12a.bintftpAddressornameofremotehost[]?172.25.1.1Destinationfilename[c2600-ik9o3s-mz.122-12a.bin]?enter!!!!!!11135588bytescopiedin52.588secs(211752bytes/sec)Router1#注释1.10.通过控制台口拷贝IOS镜像文件提问通过控制台口和AUX端口来加载IOS回答Router1#copyxmodem:slot1:****WARNING****x/ymodemisaslowtransferprotocollimitedtothecurrentspeedsettingsoftheauxiliary/consoleports.Theuseoftheauxilaryportforthisdownloadisstronglyrecommended.Duringthecourseofthedownloadnoexecinput/outputwillbeavailable.----*******----Proceed?[confirm]enterDestinationfilename[]?c3620-ik9s-mz.122-12a.binEraseslot1:beforecopying?[confirm]enterUsecrcblockchecksumming?[confirm]enterMaxRetryCount[10]:enterPerformimagevalidationchecks?[confirm]enterXmodemdownloadusingcrcchecksummingwithimagevalidationContinue?[confirm]enterReadytoreceivefile...........CCstartxmodemfiletransferhere4294967295bytescopiedin1450.848secs(1271445669961bytes/sec)Router1#注释思科建议使用AUX口进行此步骤,因为AUX口支持硬件流控。为了提高拷贝速度,建议提前使用下述命令来设置端口速度Router1#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Router1(config)#lineaux0Router1(config-line)#speed115200Router1(config-line)#endRouter1#1.11.删除Flash中的文件提问删除Flash中的文件回答Router1#eraseslot1:Erasingtheslot1filesystemwillremoveallfiles!Continue?[confirm]en
本文标题:【网络管理】网络管理-第一章+路由器配置和文件管理
链接地址:https://www.777doc.com/doc-317195 .html