Rootop 服务器运维与web架构

Cisco WS-C3750G-48TS 交换机恢复密码

把交换机断电,按住前面板的mode键,加电。过个10秒左右松开按键(有的资料说直到sys灯不闪动为止,即常亮状态)

进入到交换机的底层模式switch:

键入 flash_init 初始化flash文件系统:
switch: flash_init


键入 dir flash 查看交换机配置文件:
switch: dir flash:    #注意是冒号结尾


键入 rename flash:config.text flash:config.old 备份交换机原始配置文件:
switch: rename flash:config.text flash:config.old


查看是否修改成功:
switch: dir flash:

键入 boot 启动交换机:
switch: boot


在启动到 Would you like to enter the initial configuration dialog? [yes/no]: no 这个地方选no

经过以上,交换机恢复到出厂设置。

恢复之前的配置信息:
先恢复之前的配置文件
Switch>enable
Switch#dir
Directory of flash:/

2 -rwx 5527 Sep 25 2014 00:28:11 +00:00 config.old
3 -rwx 27 Sep 25 2014 00:28:11 +00:00 private-config.text
4 -rwx 616 Mar 1 1993 00:02:41 +00:00 vlan.dat
5 drwx 192 Mar 1 1993 00:08:53 +00:00 c3750-ipbase-mz.122-25.SEB4

32514048 bytes total (25398784 bytes free)

Switch#rename flash:config.old flash:config.text
Destination filename [config.text]?   #直接回车
Switch#

再恢复配置文件信息到DRAM存储器:
Switch#copy flash:config.text system:running-config
Destination filename [running-config]?

5527 bytes copied in 0.637 secs (8677 bytes/sec)
Switch#

再次show run 就可以看到之前的配置信息了。
Switch#show running-config

因为恢复了之前的配置信息,要修改密码:
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#no enable secret
Switch(config)#enable secret 123
Switch(config)#exit

将配置写入nvram:
Switch#write memory

完成。

原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/3372.html

作者:Venus

服务器运维与性能优化

评论已关闭。