【實驗環境】
Cisco catalyst 2950交換機
【實驗目的】
練習忘記交換機特權模式密碼后的恢復過程
【實驗拓撲】
無,真機環境
【實驗步驟】
1、切斷交換機電源。
2、使用Console線連接PC與交換機,打開超級終端
3、接通交換機電源,按住交換機前面板的"MODE"鍵不放,直到超級終端上顯示交換機進入"C2950 Boot Loader"模式
C2950 Boot Loader (C2950-HBOOT-M) Version 12.1(11r)EA1, RELEASE SOFTWARE (fc1)
Compiled Mon 22-Jul-02 17:18 by antonino
WS-C2950-24 starting...
Base ethernet MAC Address: 00:1b:2a:47:54:00
Xmodem file system is available.
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:
4、在提示符后輸入"flash_init"初始化FLASH
switch: flash_init
Initializing Flash...
flashfs[0]: 409 files, 5 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 7741440
flashfs[0]: Bytes used: 4886528
flashfs[0]: Bytes available: 2854912
flashfs[0]: flashfs fsck took 7 seconds.
...done initializing flash.
Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4
5、使用rename命令更名保存密碼的文件,默認的密碼保存文件為"config.text"
switch: rename flash:config.text flash:slyar.com
6、使用boot命令重新啟動交換機
switch: boot
Loading "flash:/c2950-i6q4l2-mz.121-22.EA8a.bin"...######
7、等待一段時間后,即可正常使用交換機了
Press RETURN to get started!
Switch>en
Switch#
8、進入特權模式,恢復密碼保存文件(配置信息也在里面)
Switch#rename flash:slyar.com flash:config.text
9、恢復交換機配置信息
Switch#copy flash:config.text running-config
Destination filename [running-config]?
1709 bytes copied in 1.308 secs (1307 bytes/sec)
10、修改特權模式密碼
Switch#conf t
Switch(config)#enable secret slyar
Switch(config)#end
11、保存配置信息
Switch#wr
Building configuration...
[OK]