要求:1.掌握 cisco 路由器密码恢复
拓扑:
配置:
1.在路由重启时,按下ctrl+break键,进入rommon模式
System Bootstrap, Version 12.2(7r) [cmong 7r], RELEASE SOFTWARE (fc1)
Copyright (c) 2002 by cisco Systems, Inc.
C2600 platform with 131072 Kbytes of main memory
PC = 0xfff0ac3c, Vector = 0x500, SP = 0x8000438c
monitor: command "boot" aborted due to user interrupt
rommon 1 >
2. 在rommon模式下,修改寄存值为0x2142
rommon 1 > confreg 0x2142
3.重启路由器,使修改后的寄存值生效
rommon 2 > reset
4.进入路由器的手工配置模式
Would you like to enter the initial configuration dialog? [yes/no]: no
Router>enable
Router#
5.将NVRAM中的startup-config文件copy至running-config中
Router#copy startup-config running-config
Destination filename [running-config]?
988 bytes copied in 2.600 secs (380 bytes/sec)
device-RT1#
6.进入全局模式,修改用户模式进入特权模式的密码
device-RT1#configure terminal
device-RT1(config)#enable password cisco
7.将寄存值还原成0x2102
device-RT1(config)#config-register 0x2102
8.保存配置文件
device-RT1#copy running-config startup-config
注:2500系列路由器的寄存值修改命令为 o/r 0x2142 ,重启命令为 i 。
cisco交换机的密码恢复
要求:1.掌握 cisco 交换机密码恢复
拓扑:
配置:
1.重启交换机,按下交换机上的 MODE键,进入boot模式(10-15s)。
The system has been interrupted prior to initializing the
flash filesystem.
The following commands will initialize
the flash filesystem, and finish loading the operating
system software:
flash_init
load_helper
boot
switch:
2.键入 flash_init命令,初始化 flash
switch: flash_init
3.输入 load_helper 命令,执行 dir flash
switch: load_helper
switch: dir flash:
Directory of flash:/
2
-rwx
109
<date>
info
3
-rwx
3110758
<date>
c2950-i6q4l2-mz.121-22.EA6.bin
4
drwx
4160
<date>
html
373
-rwx
109
<date>
info.ver
374
-rwx
335466
<date>
c2950-hdiag-mz.121-9.EA1
376
-rwx
856
<date>
vlan.dat
377
-rwx
5
<date>
private-config.text
378
-rwx
309
<date>
env_vars
379
-rwx
1106
<date>
config.text
4.修改 flash 中的config.text文件
switch: rename flash:config.text flash:config.old
5.重启交换机
switch: boot
进入交换机的配置模式,进入交换机的特权模式
6.恢复原配置文件
Switch#rename flash:config.old flash:config.text
7.调用原配置文件,恢复原交换机配置
Switch#copy flash:config.text system:running-config
8.进入全局模式修改用户模式进入特权模式的密码
Switch#configure terminal
Switch(config)#enable password cisco
9.保存配置文件
Switch#write memory
完成。