搜索
写经验 领红包
 > 情感

交换机的密码忘了怎么弄(交换机密码忘了怎么恢复出厂设置)

导语:交换机密码忘记了,怎么办,密码恢复一分钟了解下

交换机的密码忘了怎么弄(交换机密码忘了怎么恢复出厂设置)

一、目标

1、掌握交换机的密码恢复原理(cisco交换机为例)

2、区分交换机和路由器密码恢复的不同

二、步骤

1、设置交换机加密并保存配置

Switch>en

Switchenable password 123

Switch(config)password 123

Switch(config-line)end

注:进入线路中控制台。设置控制台密码。

2.保存配置

Switchreload

注:保存配置,重启交换机。这次软重启,也可以拔掉交换机电源,然后再接上电源。

当交换机重起时,按住交换机前面板的Mode键不放,显示以下的信息。

3.修改启动文件名

Base ethernet MAC Address: 00:0c:30:51:56:00

Xmodem file system is ava

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: flash_init-------------------初始化flash。

Initializing Flash...

省略…

Parameter Block Filesystem (pb:) installed, fsid: 4

switch: load_helper

4.查看配置文件

switch: dir flash:-------------显示flash中的文件。

Directory of flash:/

2 -rwx 1193 <date> config.text

3 –rwx 2958970 <date> c2950-i6q4l2-mz.121-14.EA1a.bin

4 drwx 2304 <date> html

79 -rwx 5 <date> private-config.text

2482688 bytes avai (5258752 bytes used)

注:config.text是交换机的启动配置文件,和路由器的startup-config类似。

5.修改配置文件名

switch: rename flash:config.text flash:config.old

注:将启动配置文件改名,这样交换机启动时就读不到config.text了,从而没有了密码。

6.重启交换机

switch: boot--------------引导系统,这时不再按住Mode键了。

Loading ...

7.修改密码

Switch>en

Switchrename flash:config.old flash:config.text

注:将启动的文件名改回到正常的文件名。

Switchconf t

Switch(config)line con 0

Switch(config-line)no login----------------不要求密码验证。

Switch(config-line)copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

注:将密码删除后的配置文件保存。

Switch

注:很明显没要求密码验证。密码已被删除。

本文内容由小琪整理编辑!