cisco IOS 映像升级的几种方法.docx_第1页
cisco IOS 映像升级的几种方法.docx_第2页
cisco IOS 映像升级的几种方法.docx_第3页
cisco IOS 映像升级的几种方法.docx_第4页
cisco IOS 映像升级的几种方法.docx_第5页
免费预览已结束,剩余3页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

升级IOS 方法现总结归纳出 CISCO 路由器IOS 映像升级的几种方法,供广大网络爱好者或同仁参考。在介绍CISCO 路由器IOS 升级方法前,有必要对Cisco 路由器的存储器的相关知识作以简单介绍。路由器与计算机相似,它也有内存和操作系统。在Cisco 路由器中,其操作系统叫做互连网操作系统(Internetwork Operating System),常简称为IOS.路由器的存储器主要有:ROM:只读存储器包含路由器正在使用的IOS 的一份副本;RAM:IOS 将随机访问存储器分成共享和主存。主要用来存储运行中的路由器配置和与路由协议有关的IOS 数据结构;FLASH (闪存):用来存储IOS 软件映像文件,闪存是可以擦除内存,它能够用IOS 的新版本覆写,IOS 升级主要是闪存中的IOS 映像文件进行更换。NVRAM:非易失性随机访问存储器,用来存储系统的配置文件。IOS 升级方法一在对能够正常启动的 CISCO 路由器的IOS 进行升级时,比较简单。具体步骤如下:1、寻找一种TFTP 服务器软件(有CISCO 公司的TFTPServer 或3COM 公司的3Cserver 等,在升级较大IOS 映象文件时,建议用3Cserver),安装在一台计算机上,将要升级的IOS 映象文件拷贝到相关的目录中(例:D:),并运行TFTP 服务器软件,通过菜单设置Root 目录为拷贝IOS 映象文件所在目录(如D:)。假设该计算机的IP 地址为;2、连接路由器的console 口与PC 机的COM1,使用PC 的超级终端软件访问路由器,将路由器的地址设为2(与计算机的IP 地址同网段即可)。建议在进行IOS 升级前将原有IOS 文件备份下来,防止待升级的IOS 文件存在问题不可用;QUOTE:Router# dir flash: (查看目前IOS 映象文件名,也可用Router#Show version)Directory of flash:/1 -rw- 5998292 C2600-I-MZ.122-11.BIN8388608 bytes total (2390252 bytes free)Router#copy flash tftp (备份IOS 文件)Source filename ?c2600-i-mz.122-11.binAddress or name of remote host ? (TFTP 服务器地址)Destination filename c2600-i-mz.122-11.bin?!5998292 bytes copied in 324.071 secs (18509 bytes/sec)Router# 3、对路由器进行IOS 升级;QUOTE:Router#copy tftp flashAddress or name of remote host ? (TFTP 服务器地址)Source filename ? c2600-i-mz.122-11.bin (需升级的新IOS 映象文件名)Destination filename c2600-i-mz.122-11.bin?Do you want to over write? confirmAccessing t/c2600-i-mz.122-11.binErase flash: before copying? confirmErasing the flash filesystem will remove all files! Continue? confirmErasing device eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee erasedeeErase of flash: completeLoading c2600-i-mz.122-11.bin from (via Ethernet0/0): !OK - 5998292 bytesVerifying checksum OK (0xA0C0)5998292 bytes copied in 318.282 secs (18846 bytes/sec)Router# IOS 升级方法二由于升级失败后或者路由器的 config-register 寄存器值为0x2101 时,开启路由器时、或者在开启(某些型号)Cisco 路由器的电源开关后30 秒内按下Ctrl+break 键,中断路由器的正常启动,路由器都会进入rom 监视模式,即Router(boot),在这种情形下,对路由器的IOS进行升级,也比较简单。首先进入特权模式下,即QUOTE:Router(boot)enRouter(boot)#其他升级步骤同方法一,即:执行copy tftp flash 命令,对IOS 进行升级。升级完成后,不要忘了修改config-register 寄存器值为0x2102(恢复正常值)。QUOTE:Router(boot)# tRouter(boot)( config)# config-register 0x2102Router(boot)( config)#exitRouter(boot)#wrRouter(boot)#reload 重启即可。IOS 升级方法三由于不小心使用了命令 erase flash 或升级失败后或在开启(某些型号)Cisco 路由器的电源开关后30 秒内按下Ctrl+break 键,中断路由器的正常启动,路由器都会进入rom 监视模式,即 rommon 1,在这种情形下,对路由器的IOS 进行升级,情况要稍微复杂一点。在rommon1状态下,可键?请求帮助。(1 为命令行序号,每执行1 条命令自动加1)QUOTE:rommon 1 ?alias set and display aliases commandboot boot up an external processbreak set/show/clear the breakpointconfreg configuration register utilitycont continue executing a downloaded imagecontext display the context of a loaded imagecookie display contents of cookie PROM in hexdev list the device tabledir list files in file systemdis display instruction streamdnld serial download a program moduleframe print out a selected stack framehelp monitor builtin command helphistory monitor command historymeminfo main memory informationrepeat repeat a monitor commandreset system resetset display the monitor variablesstack produce a stack tracesync write monitor environment to NVRAMsysret print out info from last system returntftpdnld tftp image downloadunalias unset an aliasunset unset a monitor variablexmodem x/ymodem image downloadrommon 2 在rommon 1状态下有两种升级IOS 方法。(一)、通过Xmodem 命令(注:Xmodem 与实际的modem 没有任何联系只是一个传输协议数据是通过终端的串口和路由器的Console 口灌进去的)升级IOS,具体步骤如下:1、用Cisco 原配的线缆连接路由器的console 口与PC 机的COM1,使用PC 机的超级终端软件访问路由器,这时不需要对PC 和路由器配置任何地址。2、在这个模式下,输入Xmodem 命令,即:QUOTE:rommon 2 xmodem -c c2600-i-mz.122-11.bin(-c 是带校验,c2600-i-mz.122-11.bin 为存放在PC 机上的IOS 映像文件)WARNING: All existing data in bootflash will be lost!Invoke this application only for disaster recovery.Do you wish to continue? y/n n: y Ready to receive file c2600-i-mz.122-11.bin (此时在超级终端的传送栏目= 选择发送文件选项 = 再选择Xmodem 并指明IOS 映像文件所在的路径,按发送即开始上传IOS,等待时间很长,视IOS 的大小和传输速度。)QUOTE:Erasing flash at 0x607c0000program flash location 0x605b0000Download Complete!传完以后,对整个系统初始化 显示如下:QUOTE:program load complete, entry point: 0x80008000, size: 0x5b85e0Self decompressing the image :OKSmart Init is disabled. IOMEM set to: 10Using iomem percentage: 10Restricted Rights LegendUse, duplication, or disclosure by the Government issubject to restrictions as set forth in subparagraph(c) of the Commercial Computer Software - RestrictedRights clause at FAR sec. 52.227-19 and subparagraph(c) (1) (ii) of the Rights in Technical Data and ComputerSoftware clause at DFARS sec. 252.227-7013.cisco Systems, Inc.170 West Tasman DriveSan Jose, California 95134-1706Cisco Internetwork Operating System SoftwareIOS (tm) C2600 Software (C2600-I-M), Version 12.2(11)T9, RELEASE SOFTWARE(fc1)TAC Support: /tacCopyright (c) 1986-2003 by cisco Systems, Inc.Compiled Mon 23-Jun-03 15:42 by cmongImage text-base: 0x80008cisco 2610 (MPC860) processor (revision 0x203) with 22528K/2048K bytes of memoryProcessor board ID JAD03483395 (1128032249)M860 processor: part number 0, mask 49Bridging software.X.25 software, Version Ethernet/IEEE 802.3 interface(s)2 Serial(sync/async) network interface(s)32K bytes of non-volatile configuration memory.8192K bytes of processor board System flash (Read/Write)Press RETURN to get started!*Mar 1 00:00:05.652: %PA-2-UNDEFPA: Undefined Port Adaptor type 100 in bay 1*Mar 1 00:00:07.996: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up*Mar 1 00:00:07.996: %LINK-3-UPDOWN: Interface Serial0/0, changed state to down*Mar 1 00:00:07.996: %LINK-3-UPDOWN: Interface Serial0/1, changed state to down*Mar 1 00:00:09.142: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0,changed state to up*Mar 1 00:00:09.142: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0,changed state to down*Mar 1 00:00:09.142: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1,changed state to down*Mar 1 00:00:09.458: %SYS-5-CONFIG_I: Configured from memory by console*Mar 1 00:00:11.245: %LINK-5-CHANGED: Interface Serial0/1, changed state toadministratively down*Mar 1 00:00:12.275: %SYS-5-RESTART: System restarted Cisco InternetworkOperating System SoftwareIOS (tm) C2600 Software (C2600-I-M), Version 12.2(11)T9, RELEASE SOFTWARE(fc1)TAC Support: /tacCopyright (c) 1986-2003 by cisco Systems, Inc.Compiled Mon 23-Jun-03 15:42 by cmong*Mar 1 00:00:12.279: %SNMP-5-COLDSTART: SNMP agent on host NE16 is undergoinga cold startRouter采用这种方法时,由于使用console 口来传送,速率为9600bps,需要时间较长。因此可修改console 口速率利用xmodem 命令实现快速升级IOS.具体方法如下:QUOTE:rommon 1 confreg 回车Configuration Summaryenabled are:load rom after netboot failsconsole baud: 9600boot: image specified by the boot system commandsor default to: cisco2-C2600do you wish to change the configuration? y/n n: y (选择 yes)enable diagnostic mode? y/n n: n (选择 no)enable use net in IP bcast address? y/n n: n (选择 no)09C, data-base: 0x80A68B48disable load rom after netboot fails? y/n n: n (选择 no)enable use all zero broadcast? y/n n: n (选择 no)enable break/abort has effect? y/n n: n (选择 no)enable ignore system config info? y/n n: n (选择 no)change console baud rate? y/n n: y (选择 yes)enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 24004 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 0: 7 (选择 7,用最大的11520速率的xmodem 传输)change the boot characteristics? y/n n: n (选择 no)Configuration Summaryenabled are:load rom after netboot failsconsole baud: 115200boot: image specified by the boot system commandsor default to: cisco2-C2600do you wish to change the configuration? y/n n: n (选择 no)You must reset or power cycle for new config to take effectrommon 2 reset 回车注意:在按reset 键前,需要修改串口速度(我的电脑端口属性串口速度调为115200),然后再修改超级终端里设置速率为115200,记住,一定要这么做,否则会出现乱码! 然后关闭这个超级终端,重新建立一个超级终端连接,重新启动系统后,出现QUOTE:rommon 1 提示符然后,输入QUOTE:rommon 1 xmodem -rDo not start the sending program yetInvoke this application only for disaster recovery.Do you wish to continue? y/n n: y (选择 yes)Ready to receive file 此时,在超级终端的菜单上的“传送”“发送文件”选择IOS 映像文件所在地以及选择使用“xmodem”协议,点击“发送”即可。等待10-20 分钟左右就可升级完3-6M 的IOS 文件!待升级完成后,请记住修改回计算机串口与超级终端、路由器confreg 下的xmodem等传输速率为9600bps.方法如下:QUOTE:Routeren 进入新IOS 的特权模式Router#reload 重启系统Proceed with reload? confirm 回车00:01:04: %SYS-5-RELOAD: Reload requestedSystem Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)Copyright (c) 1999 by cisco Systems, Inc.TAC:Home:SW:IOS:Specials for infoPC = 0xfff0a530, Vector = 0x500, SP = 0x680127b0C2600 platform with 24576 Kbytes of main memoryPC = 0xfff0a530, Vector = 0x500, SP = 0x80004684monitor: command boot aborted due to user interrupt30 秒内按ctrl+break 键rommon 1 confreg ( 输入“confreg”命令)Configuration Summaryenabled are:load rom after netboot failsconsole baud: 115200boot: image specified by the boot system commandsor default to: cisco2-C2600do you wish to change the configuration? y/n n: y (选择 yes)enable diagnostic mode? y/n n: n (选择 no)enable use nn IP bcast address? y/n n: n (选择 no)disable load rom after netboot fails? y/n n: n (选择 no)enable use all zero broadcast? y/n n: n (选择 no)enable break/abort has effect? y/n n: n (选择 no)enable ignore system config info? y/n n: n (选择 no)change console baud rate? y/n n: y (选择 yes)enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 24004 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 7: 0 (选择 0,改回用标准速率速率9600 的xmodem 传输)change the boot characteristics? y/n n: n (选择 no)Configuration Summaryenabled are:load rom after netboot failsconsole baud: 9600boot: image specified by the boot system commandsor default to: cisco2-C2600do you wish to change the configuration? y/n n: n You must reset or power cycle for newconfig to take effectrommon 2 此时手工改回计算机串口与超级终端2 者传输速率为9600然后敲入QUOTE:rommon 2 reset 最好关掉电源后,重新启动。利用xmodem 命令实现路由器IOS升级速度较慢,往往等上很长时间,为了快速升级,可以采用下列方法。(二)通过 tftpdnld 命令升级IOS,具体步骤如下:1、用Cisco 原配的线缆连接路由器的console 口与PC 机的COM1,使用PC 机的超级终端软件访问路由器;用一根双绞线连接路由器的eth0/0 口与PC 机的网卡。2、将路由器的eth0/0 口IP 地址设为2;PC 机的IP 地址设为.将要升级的IOS 映象文件拷贝到相关的目录中,并运行TFTP 服务器软件,通过菜单设置Root 目录为拷贝IOS 映象文件所在目录。3、通过set 命令查看配置参数QUOTE:rommon 2 setPS1=rommon ! BOOT=BSI=0RET_2_RTS=?=0 4、在 rommon 状态下输入:(注意大小写)QUOTE:rommon 3 IP_ADDRESS (路由器的ip 地址)rommon 4 IP_SUBNET_MASK (路由器的掩码)rommon 5 DEFAULT_GATEWAY2 (缺省网关,是pc 机的ip 地址)rommon 6 TFT

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论