一、交换机的密码恢复
1、目的
交换机的密码恢复步骤
2、拓扑
3、步骤
CISCO 交换机的密码恢复步骤和路由器的密码恢复方法差别较大,并且不同型号的交换
机恢复方法也有所差异,以下是接入交换机的密码恢复步骤。
(1) 拨掉交换机电源,按住交换机前面板的 Mode 键不放,接上电源,你会看到如下提示:
Base ethernet MAC Address: 00:18:ba:11:f5:00
Xmodem file system is available.
The password-recovery mechanism is enabled.
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
flash_init
load_helper
boot
(2) 输入 t flash_init 命令
Initializing Flash...
flashfs[0]: 3 files, 1 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 32514048
flashfs[0]: Bytes used: 6076928
flashfs[0]: Bytes available: 26437120
flashfs[0]: flashfs fsck took 12 seconds.
...done Initializing Flash.
Boot Sector Filesystem (bs) installed, fsid: 3
Setting console baud rate to 9600...
(3) 输入load helper 命令
(4) 输入 dir flash:
Directory of flash:/
2 -rwx 6073600 c3560-ipbasek9-mz.122-25.SEB4.bin
3 -rwx 1455 config.text
5 -rwx 24 private-config.text
26437120 bytes available (6076928 bytes used)
//config.text 就是交换机的启动配置文件,和路由器的 startup-config 类似
(5) 输入 rename flash:config.text flash:config.old 命令
//以上是把启动配置文件改名,这样交换机启动时就读不到 config.text 了,从而没有了密
码。
(6) 输入 boot 命令引导系统,这时就不要再按住 mode 键了。
(7) 当出现如下提示时,输入 N:
Continue with the configuration dialog? [yes/no] : n
(8) 用 enable 命令进入 enable 状态,并将文件 config.old 改回 config.text,命令如
下:
rename flash:config.old flash:config.text
(9) 将原配置装入内存,命令如下:
Switch# copy flash:config.text system:running-config
(10) 修改密码:
S1# conf t
S1(config)# enable secret cisco
S1(config)# exit
(11) 将配置写入 nvram
S1#copy running-config start-config
以下是华为数通路由交换方向完整技术分享,欢迎对华为网络技术感兴趣的小伙伴们订阅。
【可在专栏中进行查看订阅】
华为新版HCIA数通路由交换
华为新版HCIP数通路由交换
华为新版HCIE数通路由交换