2007/5/22

Rommon mode - Cisco 系統異常

一般Cisco Router出廠預設 configuration register 是 0x2102.
(在正常開機下設定方式 (config)#config-register 0x2102)
0x2102 代表 1. 忽略Break 2. Boot到Rommon mode如果正常開機失敗 3. Console baud rate 預設成 9600速度。
其他代號設定可參考下列網站
http://www.cisco.com/en/US/products/hw/routers/ps133/products_tech_note09186a008022493f.shtml

如果你不幸Router Flash壞了或是系統異常,那你就會像我一樣boot到Rommon mode

如何恢復系統或跳出 Rommon 模式

1. 檢查 Config register設定是否為 0x2102 或是其他正常設定值

打入下列指令
rommon> confreg

Configuration Summary
enabled are: load rom after netboot fails
console baud: 9600
boot: the ROM Monitor

do you wish to change the configuration? y/n [n]:
如果你顯示出上面紅字的部份,則不管你重開幾次都還是會回到 Rommon mode下


這時系統會問你要不要修改Boot模式,按y
do you wish to change the configuration? y/n [n]: y
enable "diagnostic mode"? y/n [n]:
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]:
change the boot characteristics? y/n [n]: y
接下來的問題直接按Enter(預設為 no), 直到上述問題時按 y 進入修改
enter to boot:
0 = ROM Monitor
1 = the boot helper image
2-15 = boot system [0]: 2
選 2, 從系統中boot

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
這時你會看到Boot預設狀況改變了,會有類似上述紅字顯示的部份。

最後打上 reset 指令
rommon> reset
重新開機就會回恢正常



2. 如果你的開機Boot設定值為正常,通常就是Cisco Router在開機時找不到有效的Cisco IOS software image

2.1 檢查flash中的開機程式, 打入
rommon 1> dev flash:
File size Checksum File name
5358032 bytes (0x51c1d0) 0x7b16
c2600-i-mz.122-10b.bin
rommon 2 >

上述表示可找到 flash記憶體中存放的開機程式

可用下列方式啟動


rommon > boot flash:c2600-i-mz.122-10b.bin
會出現下列開機訊息,通常會比正常開機時間來的久一點
program load complete, entry point: 0x80008000, size: 0x51c0dcSelf decompressing the image : ###########################################################




2.2. 如果不幸檢查flash中的開機程式, 打入
rommon 1> dev flash:
出現 "bad device name" 訊息, 表示Flash中的程式找不到

這時可以利用TFTP把程式下載到Cisco Router上
首先要在 rommon 下設定TFTP及本機IP參數, 直接在 rommon > 下打入
例如
打入本機IP
rommon 16 > IP_ADDRESS=171.68.171.0
打入本機 subnet
rommon 17 > IP_SUBNET_MASK=255.255.254.0
打入Gateway
rommon 18 > DEFAULT_GATEWAY=171.68.170.3
打入 TFTP Server IP
rommon 19 > TFTP_SERVER=171.69.1.129
打入 IOS image 檔名及位置
rommon 20 > TFTP_FILE=c2600-is-mz.113-2.0.3.Q

輸入完後打入rommom> set確認設定值
如果沒有問題,下 tftpdnld 或是 dnld 指令
rommon > tftpdnld


IP_ADDRESS: 171.68.171.0
IP_SUBNET_MASK: 255.255.254.0
DEFAULT_GATEWAY: 171.68.170.3 T
FTP_SERVER: 171.69.1.129
TFTP_FILE: c2600-is-mz.113-2.0.3.Q
Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash will be lost!
Do you wish to continue? y/n: [n]: y
按示 y 後開始 upload 新 IOS 到Cisco Router
Receiving c2600-is-mz.113-2.0.3.Q from 171.69.1.129 !!!!!.!!!!!!!!!!!!!!!!!!!.!! File reception completed. Copying file c2600-is-mz.113-2.0.3.Q to flash. Erasing flash at 0x607c0000 program flash location 0x60440000
rommon 22 >
下載成功 :)



2.3 如果你在Rommon mode 曾出現下列訊息
"Device does not contain a valid magic number"
:( 你可能要重插你的Flash Card 或是 更換,因為應該是壞了








什麼是Rommon mode

沒有留言: