關於思科路由器密碼恢復

關於思科路由器密碼忘記了如何恢復?

通常工作中爲了安全起見我們都會爲路由器設置相應的密碼,但是隨着企業規模的增大,網絡運維人員的增多,路由器的增多,在對路由器管理的同時都會設置一組密碼供用戶使用,但是久而久之因爲種種原因使密碼丟失或者忘記。。。

下面介紹一種恢復密碼和配置的方法:

首先進入思科路由器配置設置界面
Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>enable
Router#conf
Router#configure t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#enable password 123(配置的密碼)
Router(config)#
Router(config)#hostname r2(給設備修改的名字)
r2(config)#
r2(config)#
r2(config)#wr

r2(config)#exit
完成上述就對路由器進行重新加電的操作

r2 con0 is now available

Press RETURN to get started.

########################
在上述加載啓動的時候同時按ctrl+break按鍵,進行如下操作:
monitor: command "boot" aborted due to user interrupt
rommon 1 > confreg 0x2142(此處爲修改寄存器的比特值,正常的爲2102修改後系統再次啓動會繞過加載文件)
rommon 2 > reset(修改完成後重啓)

Router>enable
Router#copy startup-config running-config(這裏是將之前的配置文件拷貝過來直接覆蓋)
Destination filename [running-config]?

569 bytes copied in 0.416 secs (1367 bytes/sec)
r2#
%SYS-5-CONFIG_I: Configured from console by console

r2#
r2#confi
r2#configure t
Enter configuration commands, one per line. End with CNTL/Z.
r2(config)#enable password 456(修改密碼)
r2(config)#exit
r2#
%SYS-5-CONFIG_I: Configured from console by console
r2#
r2#confi
r2#configure t
r2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
r2(config)#config-register 0x2102(重新設置回之前的寄存器內的信息)
r2(config)#exit
r2#
%SYS-5-CONFIG_I: Configured from console by console

r2#wr
Building configuration...
[OK]
r2#

通過以上操作可以找回丟失的密碼和以前的配置

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章