熟練使用cisco rommon維護路由器 上篇
路由器的口令恢復
為了防止別人知道路由器的口令(特別是特權口令),威脅本地網(wǎng)絡安全,故,許多管理員將口令設得特別復雜。但由于路由器的配置完成后,我們就很少在去操作路由器,這樣過了一段時間后,我們再因為某種需要需對路由器進行配置時,就可能因忘記口令而無法進行。
這時候,我們只需要一臺PC機(OS為windows系列),console電纜一條及相應的接口轉換器,還有就是我們在路由器的旁邊。然后按照下面的操作,就可以輕松搞定。
1. 設置PC機的超級終端,使我們能夠使用路由器的console口直接對路由器進行操作。注:因其過程非常簡單,筆者為節(jié)省篇幅,將其省略。
2. 啟動路由器,并在前60秒內按下break或ctrl+break鍵,進入路由器的ROM Monitor模式。
3. 下面以初學者最常接觸到的cisco 2600系列路由器為例,做一簡要描述。
- System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
- Copyright (c) 1999 by cisco Systems, Inc.
- TAC:Home:SW:IOS:Specials for info
- C2600 platform with 32768 Kbytes of main memory
- (該路由器為2600系列路由器)
- (按下ctrl+break鍵,進入ROM Monitor模式)
- rommon 1 >? 注:我們可以使用?或help命令查看該模式下可以使用的命令。
- alias set and display aliases command
- boot boot up an external process
- break set/show/clear the breakpoint
- confreg configuration register utility
- cont continue executing a downloaded image
- ……(省略多行)
- reset system reset
- set display the monitor variables
- stack produce a stack trace
- sync write monitor environment to NVRAM
- sysret print out info from last system return
- tftpdnld tftp image download
- unalias unset an alias
- unset unset a monitor variable
- xmodem x/ymodem image download
#p#
- rommon 2 > confreg 0x2142
- 注:使用該命令修改路由器的配置寄存器的值,使路由器在下次重起時不要加載啟動配置,從而跳過用戶口令及特權口令的驗證,進入特權模式。
- You must reset or power cycle for new config to take effect
- rommon 3 > reset 注:使用該命令重新啟動路由器
- System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
- Copyright (c) 1999 by cisco Systems, Inc.
- TAC:Home:SW:IOS:Specials for info
- C2600 platform with 32768 Kbytes of main memory
- program load complete, entry point: 0x80008000, size: 0x487758
- Self decompressing the image : ##############(以下啟動過程省略)
- --- System Configuration Dialog ---
- Would you like to enter the initial configuration dialog? [yes/no]: n 注:選擇no直接進入CLI模式
- Press RETURN to get started! (按回車鍵)
- Router>en
- Router# 注:此時使用show version命令查看配置寄存器的值為0x2142.
- Router#copy star run 注:使用該命令加載啟動配置,然后設置新口令。若沒有該步操作,會導致在下次重起后,新口令設置失敗。
- Router#conf t
- Router(config)#config-register 0x2102 注:路由器下次重起后將加載啟動配置,需使用新口令進行驗證
- Router(config)#end
- Router#copy run star 注:保存運行配置到啟動配置
- Destination filename [startup-config]?
- Building configuration...
- [OK]
提示:cisco2500、2000、3000、4000和7000系列路由器的口令恢復與上述操作基本相同,其主要差別為修改配置寄存器的命令為“o/r 0x2142”,以及重起命令為“i”,其它系列的路由器與2600系列基本一致。
路由器的口令恢復的過程就為大家介紹完了,希望大家已經(jīng)理解并掌握,我們會在以后的文章中為大家介紹:熟練使用cisco rommon維護路由器 下篇
【編輯推薦】