第三種、XMODEM的用法升級方法:

使用Xmodem恢復IOS

使用Xmodem和TFTP的主要區别就在於傳輸的途徑不一樣,TFTP的IOS傳輸必须經過網路線,而Xmodem則是通過console來傳輸的,所 以使用 Xmodem恢復IOS就不必進行PC機和路由器的網路線連接,也不需要IP地址方面的設置,省了不少事。但是Xmodem是通過 console來進行傳輸的,一般和cisco路由器相連的console波特率是9600,就是9.6k/s,速度很慢傳輸一個幾 MB大小的文件需要比較長的時間,需要耐心的等待。幸好,還可以在路由器上更改波特率,最大是115200,即115.2K/S,所以先進行默認波特率的 修改,可以用confreg命令来修改,如下:
rommon 2 > 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-C3600

do you wish to change the configuration? y/n [n]: y

enable "diagnostic mode"? y/n [n]: !--- pressing "Enter" accepts the
!--- default (value between the brackets)
enable "use net in IP bcast address"? y/n [n]:
disable "load rom after netboot fails"? y/n [n]:
enable "use all zero broadcast"? y/n [n]:
enable "break/abort has effect"? y/n [n]:
enable "ignore system config info"? y/n [n]:
change console baud rate? y/n [n]: y
enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400
4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [7]: 7
change the boot characteristics? y/n [n]:y

enter to boot:
0 = ROM Monitor
1 = the boot helper image
2-15 = boot system
[0]: 0

Configuration Summary
enabled are:
load rom after netboot fails
console baud: 115200
boot: the ROM Monitor
do you wish to change the configuration? y/n [n]: n

改完了,你需要重啟一下,後配置生效,注意,你的調試機器上的超级终端的連接波特 率也要改為115200,不然你重起后你可能看見的就是一堆亂碼#^¥&%×^×^。

接下就是用xmodem命令來做了,舉個例子:

1. 來執行xmodem命令:rommon 1 > xmodem -c 1600-nsy-mz_112-15a_P
c1600-nsy- mz_112-15a_P是我们打算在路由器中保存的文件名,你可以起自己想要的名字,不過最好是按原文件的名字來。
2.等待ROMmon 提示信息,類似下面:
Ready to receive file c1600-nsy-mz_112-15a_P ...CC
3.ok, 可以進行文件傳輸了,在超级终端界面,點選 "轉送",選擇傳送檔案,上面選擇你要傳送到路由器内的新的IOS,下面選擇Xmodem協議。然後點擊發送,就可以了。
4.接下来就是文件傳輸 的界面了,耐心些等待吧......
5.當顯示:Download Complete!信息时,就基本上好了,不過做為列行的檢查還是必要的,用命令:dir flash: 看看文件是不是已經正確無誤的傳過去了。
rommon 1 > dir flash:
File size Checksum File name
2179331 bytes (0x214103) 0x7b95 c1600-nsy-mz_112-15a_p
6.使用rommon 1 > reset或者rommon 1 > boot flash:c1600-nsy-mz_112-15a_P

重啟路由器,如果已经 進入正常的界面了,那就恭喜你了,IOS恢復就成功了,你可以檢查一些看看:show version;show flash等。但是别忘了,剛才你把默認的CONSOLE波特率9600改為115200了,現在要做就是改回来。

Router> en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#conf t
Router(config)#config-register 0x2102
Router(config)#line con 0
Router(config-line)# speed 9600 --------- Change the speed of the
console port to 9600

Then go to Hyperterminal and change baud rate to 9600 in your terminal.

Router(config-line)#ctrl z
Router #write mem
Router #reload

全站熱搜
創作者介紹
創作者 neil 的頭像
neil

科技瘋不落

neil 發表在 痞客邦 留言(0) 人氣()