Cisco路由器組態暫存器,數值預設0x2102,另一常數值0x2142
通常用於密碼修復程序。
使用0x2142數值,在開機過程中會略過NVRAM中的Startup-config,
因此不須密碼即可進入路由器的特權模式
進入修改步驟
1.
打開電源開機,接著按下鍵盤的 Ctrl + Break 中斷 Router 開機程序,進入 ROM 模式 rommon 1>
2.
將組態暫存器的值由預設的 0x2102 變更為 0x2142
monitor: command "boot" aborted due to user interrupt
rommon 1 > confreg 0x2142
3.
You must reset or power cycle for new config to take effect
rommon 2 > reset
使用 reset 指令重新載入 IOS,重載的IOS會因0x2142 的值而忽略 NVRAM 設定檔
4.
使用 enable 進入特權模式。因為已經略過原本的 Startup-config 所以原本的密碼也沒作用,
進入特權模式也就不會問密碼了。
5.
如要恢復之前此 Router 的設定項目,將 NVRAM 中 startup-config 複製到 RAM的 running-
config
Router#copy startup-config running-config Destination filename [running-config]?
4226 bytes copied in 3.125 secs (1408 bytes/sec)
2650#
6.
變更密碼
2650(config)#line console 0 2650(config-line)#password xxxxxx
2650(config)#line vty 0 4 2650(config-line)#password cisco
2650(config)#enable secret xxxxxx
7.
密碼變更完成,復原組態暫存器之值。此變更暫存器之值因為跟第2步驟處於不同模式,所
以指令也不同
2650(config)#config-register 0x2102
8.
剛剛密碼變更的動作只作用在 running config,直接重開機就沒作用,所以必須將搭配原設定
新設密碼的 running config 寫回 startup config,指令為
2650#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
或者
2650#wr
Building configuration...
[OK]
9. 重新載入 Router
reload
沒有留言:
張貼留言