《51CTO下载-Rommon模式下上传IOS方法.pdf》由会员分享,可在线阅读,更多相关《51CTO下载-Rommon模式下上传IOS方法.pdf(8页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、Rommon 下上传 IOS 步骤 当设备 IOS 丢失或不小心把唯一的 IOS 删除时,可以在 rommon 模式下,把 IOS 上传到设备中,根据设备的不同,可分为两种情况:情况 1:现在的新设备带有 MGT 管理接口 出处:出处:http:/ 适用范围适用范围:cisco4500/4000 系列 ios 版本恢复(我们是在 4948 上做的如下配置,ios得以恢复,推理带有 MGT 的新设备可以做如下尝试)进入正题进入正题 1、设备加电,按下“control”+“C”,然后进入 rommon 模式下。rommon 1 set PS1=rommon!RommonBuild=5 Config
2、Reg=0 x2102 BOOT=bootflash:cat4000-is-mz.121-11b.EW,1 SkipDiags=0 BSI=0 RET_2_RTS=13:36:46 UTC Tue Aug 15 2000 RET_2_RUTC=966346606 BootStatus=Failure BootedFileName=bootflash:cat4000-is-mz.121-11b.EW RommonVer=12.1(11br)EW 2、以上参数中,BOOT 参数中 IOS 文件已经不存在了,所以要重设参数:rommon 2 unset boot 3、这时用双绞线把你的 PC 和设备
3、连接起来,设备一端插在 MGT 管理接口,将 PC 的 IP地址配置为 10.1.1.1 rommon 3 set interface fa1 10.1.1.11 255.255.255.0 rommon 4 set ip route default 10.1.1.254(如果 PC 跟设备不是直连的情况下使用,作用是让设备与 TFTP 服务器能够通信)4、查看 ip 地址设置:rommon 5 set PS1=rommon!Fa1Enable=1 RommonVer=12.2(31r)SGA2 BOOT=EnableAutoConfig=1 ConsecPostPassedCnt=4 RET
4、_2_RTS=02:17:34 UTC Wed Oct 28 2009 RET_2_RCALTS=1256696254 ConfigReg=0 xc441 IP_ADDRESS=10.10.10.11 IP_SUBNET_MASK=255.255.255.0 DEFAULT_GATEWAY=10.10.10.255 TFTP_FILE=cat4500-entservices-mz.122-52.SG.bin TFTP_SERVER=10.10.10.1 IpAddr=10.10.10.11 Netmask=255.255.255.0 Broadcast=10.10.10.255 5、确认配置正
5、确后,测试设备到 TFTP 服务器的连通性 rommon 6 ping 10.1.1.1 Host 10.1.1.1 is alive 6、网络连通性测试没有问题后,开始从 tftp 服务器启动 IOS:rommon 7 boot tftp:/10.10.10.1/cat4500-entservices-mz.122-52.SG.bin Tftp Session details are.Filename :/cat4500-entservices-mz.122-52.SG.bin IP Address :10.10.10.11 Loading from TftpServer:10.10.10.
6、1 Received data packet#33321 Loaded 17060272 bytes successfully.Rommon reg:0 xE2004180#k2diags version 5.2_d prod:WS-C4948 part:73-9130-11 serial:FOX1318GC8W Power-on-self-test for Module 1:WS-C4948 Port/Test Status:(.=Pass,F=Fail,U=Untested)Cpu Subsystem Tests.seeprom:.temperature_sensor:.Port Traf
7、fic:L2 Asic Loopback.0:.1:.2:.3:.4:.5:.6:.7:.8:.9:.10:.11:.12:.13:.14:.15:.16:.17:.18:.19:.20:.21:.22:.23:.24:.25:.26:.27:.28:.29:.30:.31:.32:.33:.34:.35:.36:.37:.38:.39:.40:.41:.42:.43:.44:.45:.46:.47:.Port Traffic:L3 Asic Loopback.0:.1:.2:.3:.4:.5:.6:.7:.8:.9:.10:.11:.12:.13:.14:.15:.16:.17:.18:.1
8、9:.20:.21:.22:.23:.24:.25:.26:.27:.28:.29:.30:.31:.32:.33:.34:.35:.36:.37:.38:.39:.40:.41:.42:.43:.44:.45:.46:.47:.Switch Subsystem Memory.1:.2:.3:.4:.5:.6:.7:.8:.9:.10:.11:.12:.13:.14:.15:.16:.17:.18:.19:.20:.21:.22:.23:.24:.25:.26:.27:.28:.29:.30:.31:.32:.33:.34:.35:.36:.37:.38:.39:.40:.41:.42:.43
9、:.44:.45:.46:.47:.48:.49:.50:.51:.52:.53:.54:.55:.Module 1 Passed Exiting to ios.Rommon reg:0 xE2000180#Restricted Rights Legend Use,duplication,or disclosure by the Government is subject to restrictions as set forth in subparagraph(c)of the Commercial Computer Software-Restricted Rights clause at F
10、AR sec.52.227-19 and subparagraph(c)(1)(ii)of the Rights in Technical Data and Computer Software clause at DFARS sec.252.227-7013.cisco Systems,Inc.170 West Tasman Drive San Jose,California 95134-1706 Cisco IOS Software,Catalyst 4500 L3 Switch Software(cat4500-ENTSERVICES-M),Version 12.2(52)SG,RELEA
11、SE SOFTWARE(fc1)Technical Support:http:/ Copyright(c)1986-2009 by Cisco Systems,Inc.Compiled Tue 12-May-09 17:58 by prod_rel_team Image text-base:0 x10000000,data-base:0 x11F07228 cisco WS-C4948(MPC8245)processor(revision 0)with 262144K bytes of memory.Processor board ID FOX1318GC8W MPC8245 CPU at 2
12、66Mhz,Fixed Module Last reset from PowerUp 1 Virtual Ethernet interface 48 Gigabit Ethernet interfaces 511K bytes of non-volatile configuration memory.Press RETURN to get started!*Mar 1 00:00:01.815:%C4K_IOSSYS-3-BLANKSTARTUPCONFIG:Blank or invalid startup-config,booting up with defaults*Oct 28 03:0
13、5:50.567:%C4K_IOSMODPORTMAN-4-POWERSUPPLYBAD:Power supply 1 has failed or been turned off*Oct 28 03:05:59.443:%SPANTREE-5-EXTENDED_SYSID:Extended SysId enabled for type vlan*Oct 28 03:06:01.359:%SYS-6-STARTUP_CONFIG_IGNORED:System startup configuration is ignored based on the configuration register
14、setting.*Oct 28 03:06:01.895:%SYS-5-RESTART:System restarted-Cisco IOS Software,Catalyst 4500 L3 Switch Software(cat4500-ENTSERVICES-M),Version 12.2(52)SG,RELEASE SOFTWARE(fc1)Technical Support:http:/ Copyright(c)1986-2009 by Cisco Systems,Inc.Compiled Tue 12-May-09 17:58 by prod_rel_team*Oct 28 03:
15、06:01.907:%C4K_IOSMODPORTMAN-6-MODULEONLINE:Module 1(WS-C4948 S/N:FOX1318GC8W Hw:1.7)is online Switch 7、设备启动完毕,可进入正常 IOS 上传过程(从这一步就没有特别之处了,和平常上传从这一步就没有特别之处了,和平常上传 iosios步骤一直)步骤一直)SwitchenSwitchen Switch#Switch#dirSwitch#dir Directory of bootflash:/No files in directory 60817408 bytes total(12062968
16、bytes free)Switch#format bootflash:Switch#format bootflash:Format operation may take a while.Continue?confirm Format operation will destroy all data in bootflash:.Continue?confirm Format of bootflash complete Switch#Switch#conf tSwitch#conf t Enter configuration commands,one per line.End with CNTL/Z
17、.Switch(config)#int g1/1 Switch(configSwitch(config-if)#no swiif)#no swi S Switch(configwitch(config-if)#ip addr 10.10.10.2 255.255.255.0if)#ip addr 10.10.10.2 255.255.255.0 Switch(config-if)#end Switch#*Oct 28 03:10:27.715:%SYS-5-CONFIG_I:Configured from console by consol Switch#ping 10.10.10.1 Typ
18、e escape sequence to abort.Sending 5,100-byte ICMP Echos to 10.10.10.1,timeout is 2 seconds:.!Success rate is 80 percent(4/5),round-trip min/avg/max=1/1/1 ms Switch#copy tftp bootflash:Switch#copy tftp bootflash:Address or name of remote host?10.10.10.1Address or name of remote host?10.10.10.1 Sourc
19、e filename?cat4500Source filename?cat4500-entservicesentservices-mz.122mz.122-52.SG.bin52.SG.bin Destination filename cat4500Destination filename cat4500-entservicesentservices-mz.122mz.122-52.SG.bin?52.SG.bin?Accessing tftp:/10.10.10.1/cat4500-entservices-mz.122-52.SG.bin.Loading cat4500-entservice
20、s-mz.122-52.SG.bin from 10.10.10.1(via GigabitEthernet1/1):!OK-17060272 bytes CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
21、CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 1
22、7060272 bytes copied in 81.644 secs(208959 bytes/sec)情况 2:设备没有 MGT 管理接口,但支持 XMODEM 协议 出处出处:http:/ 此文档此文档适用的适用的设备为设备为没有没有 MGTMGT 接口接口但支持但支持 XmodemXmodem 协议协议的低端路由器和交换机,例如的低端路由器和交换机,例如CiscoCisco 的的 2626 系列路由器和系列路由器和 2929、3535 系列交换系列交换机机.通过 Xmodem 命令(注:Xmodem 与实际的 modem 没有任何联系 只是一个传输协议 数据是通过终端的串口和路由器的
23、Console 口灌进去的)升级 IOS,具体步骤如下:1、用 Cisco 原配的线缆连接路由器的 console 口与 PC 机的 COM1,使用 PC 机的超级终端软件访问路由器,这时不需要对 PC 和路由器配置任何地址。2、在这个模式下,输入 Xmodem 命令,即:rommon 1 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 applica
24、tion 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 的大小和传输速度。)Erasing flash at 0 x607c0000 program flash location 0 x605b0000 Download Complete!采用这种方法时,由于使用 console 口来传送
25、,速率为 9600bps,需要时间较长。因此可修改 console 口速率利用 xmodem 命令实现快速升级 IOS。具体方法如下:rommon 1 confreg 回车 Configuration Summary enabled are:load rom after netboot fails console baud:9600 boot:image specified by the boot system commands or default to:cisco2-C2600 do you wish to change the configuration?y/n n:y(选择 yes)e
26、nable diagnostic mode?y/n n:n(选择 no)enable use net in 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
27、n:y(选择 yes)enter rate:0=9600,1=4800,2=1200,3=2400 4=19200,5=38400,6=57600,7=115200 0:7(选择 7,用最大的 11520 速率的 xmodem 传输)change the boot characteristics?y/n n:n(选择 no)Configuration Summary enabled are:load rom after netboot fails console baud:115200 boot:image specified by the boot system commands or de
28、fault to:cisco2-C2600 do you wish to change the configuration?y/n n:n(选择 no)You must reset or power cycle for new config to take effect rommon 2 reset 回车 注意:在按 reset 键前,需要修改串口速度(我的电脑-端口属性-串口速度调为115200),然后再修改超级终端里设置速率为 115200,记住,一定要这么做,否则会出现乱码!然后关闭这个超级终端,重新建立一个超级终端连接,重新启动系统后,出现 rommon 1 然后,输入 rommon
29、1 xmodem-r Do not start the sending program yet.Invoke 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 下的 xmo
30、dem 等传输速率为 9600bps。方法如下:Routeren 进入新 IOS 的特权模式 Router#reload 重启系统 Proceed with reload?confirm 回车 00:01:04:%SYS-5-RELOAD:Reload requested System Bootstrap,Version 11.3(2)XA4,RELEASE SOFTWARE(fc1)Copyright(c)1999 by cisco Systems,Inc.TAC:Home:SW:IOS:Specials for info PC=0 xfff0a530,Vector=0 x500,SP=0
31、x680127b0 C2600 platform with 24576 Kbytes of main memory PC=0 xfff0a530,Vector=0 x500,SP=0 x80004684 monitor:command boot aborted due to user interrupt 30 秒内按 ctrl+break 键 rommon 1 confreg(输入“confreg”命令)Configuration Summary enabled are:load rom after netboot fails console baud:115200 boot:image sp
32、ecified by the boot system commands or default to:cisco2-C2600 do 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)enabl
33、e 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=2400 4=19200,5=38400,6=57600,7=115200 7:0(选择 0,改回用标准速率速率 9600 的 xmodem 传输)change the boot characteristics?y/n n:n(选择 no)Configuration Summar
34、y enabled are:load rom after netboot fails console baud:9600 boot:image specified by the boot system commands or default to:cisco2-C2600 do you wish to change the configuration?y/n n:n You must reset or power cycle for new config to take effect rommon 2 此时手工改回计算机串口与超级终端 2 者传输速率为 9600 然后敲入 rommon 2 reset 最好关掉电源后,重新启动。然后正常操作设备即可