Fastest Way to Recover or Upgrade Cisco IOS using tftpdnld
如果IOS被损坏,例如升级IOS过程中断电等。
可以在ROM monitor commands模式下通过2种方法恢复:xmodem 或者 tftpdnld
1.xmodem
xmodem—Use this if the computer attached to your console has a terminal emulator that has xmodem capability.
第一步:
先打开超级终端,进入rommon 模式(Ctrl+Break组合键),键入confreg, 如下:
rommon 1 > confreg 回车
onfiguration 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)
enable "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 [n]: y (选择 yes)
enter rate: 0 = 9600, 1= 4800, 2 = 1200, 3 = 2400 4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [0]: 7 (选择 7,用最大的115200速率的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 default 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> xmodem -cr
Do not start the sending program yet.
invoke this applicationonly for disaster recovery.
Do you wish to continue? y/n [n]: y (选择 yes)
Ready to receive file
此时,在超级终端的菜单上的“传送”---xmodem”协议,点击“发送”即可发送文件”----选择IOS镜像文件所在地以及选择使用“然后等待10-20分钟左右就把3-6M的IOS灌进去了
!!!! 会自动引导IOS(c2600-i-mz.122-8.T10.bin),进入EN模式,show flash: ,会发现损坏的IOS版本被删除,其实只是做了一个1 5850064 c2600-i-mz.122-8.T10.bin(delected)的标志,在EN模式下,用
squeeze flash:c2600-i-mz.122-8.T10.bin物理删除它。(#######¥¥¥¥¥记住一定不要重起)
其实IOS没有倒入,是调用的配置文件。
show flash:
会发现IOS没有
(#######¥¥¥¥¥记住一定不要重起)
第二步:倒入IOS
手动把E0/1用直连线插到交换机上,笔记本的网卡也用直连线也插到交换机上
en
show run
conf t
int fa0/1
ip add 192.168.0.2 255.255.255.0
no shu
exit
exit
wr
笔记本网卡设置成192.168.0.1 255.255.255.0
在ROUTE上 ping 192.168.0.1
打开TFTP,把IOS拷贝到TFTP目录下(c2600-i-mz.122-8.T10.bin)
en
copy tftp flash:c2600-i-mz.122-8.T10.bin
完毕后
show flash
(!!!!!绝对不能重起)
看到版本c2600-i-mz.122-8.T10.bin,后面没有delected
倒入成功
conf t
config-register 0x2102
boot system flash c2600-i-mz.122-8.T10.bin
exit
exit
wr
reload
会引导到正常的操作模式下,成功
第三步:
改到9600,可要可不要
方法2:tftpdnld tftpdnld—Use this if you have a TFTP server directly connected to the Ethernet 0 port.
1、用Cisco原配的线缆连接路由器的console口与PC机的COM1,使用PC机的超级终端软件访问路由器;用一根双绞线连接路由器的eth0/0口与PC机的网卡。