當 Cisco 路由器/交換機無法正常啟動、IOS 損毀或需災難恢復時,ROMMON 模式下的 Xmodem 協議是最後手段。本文詳細記錄從 Console 線連線、傳輸參數調整、高速傳輸優化到最終驗證的完整流程,以 Cisco 2600 系列為例。
c2600-i-mz.122-11.bin)開機時於倒數計時內按 Ctrl+Break 或 Ctrl+C 中斷啟動,進入 rommon > 提示符。
rommon 2 > xmodem -c c2600-i-mz.122-11.bin
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 ...
-c 參數啟用 CRC-16 校驗,提高傳輸可靠性。
於終端軟體選單:傳送 → 傳送檔案 → 協議選 Xmodem → 選擇 IOS 檔案 → 開始。等待進度條跑完(9600 bps 下 16MB 約需 40-60 分鐘)。
Erasing flash at 0x607c0000
program flash location 0x605b0000
Download Complete!
program load complete, entry point: 0x80008000, size: 0x5b85e0
Self decompressing the image : ################################################# [OK]
...
Router>
出現 Router> 表示啟動成功,執行 show version 確認 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
enable "diagnostic mode"? y/n [n]: n
enable "use net in IP bcast address"? y/n [n]: n
disable "load rom after netboot fails"? y/n [n]: n
enable "use all zero broadcast"? y/n [n]: n
enable "break/abort has effect"? y/n [n]: n
enable "ignore system config info"? y/n [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 [0]: 7
change the boot characteristics? y/n [n]: n
Configuration Summary
...
console baud: 115200
...
You must reset or power cycle for new config to take effect
rommon 2 > reset
rommon 1 > xmodem -c c2600-i-mz.122-11.bin
...(同標準流程,但速度提升 12 倍)
copy running-config tftp://server/config.bak 備份啟動配置若裝置支援且網路可達,ROMMON 下亦可用 tftpdnld 透過網路下載 IOS,速度更快且不佔用 Console 埠。但 Xmodem 為最通用、零依賴的底層恢復手段,值得熟練掌握。