Network Manage Tech Experience

Welcome to my tech home !!!
posts - 32, comments - 35, trackbacks - 0, articles - 0
  IT博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

setup express以及交换机密码恢复

Posted on 2008-06-02 20:00 chris_lee 阅读(742) 评论(9)  编辑 收藏 引用 所属分类: CISCO技术篇

 

记得在上一家公司时,出现过交换机突然重启了,配置文件也消失了,所以导致一系列问题等。后来通过查问同事找到了原因,是因为交换机的MODE键抵住了机架,导致重启。而通过按住交换机前面板的MODE键10s后交换机会将配置文件清除,然后重启,也就是说恢复到出厂状态。后来通过查找cisco文档发现有一条命令可以解决这个问题。

全局模式命令:no setup express
解释:
When Express Setup is enabled on a new (unconfigured) switch, pressing the Mode button for 3 seconds
activates Express Setup. You can access the switch through an Ethernet port by using the IP address
10.0.0.1 and then can configure the switch with the web-based Express Setup program or the CLI-based
setup program.
When you press the Mode button for 3 seconds on a configured switch, the mode LEDs start flashing. If
you press the Mode button for a total of 10 seconds, the switch configuration is deleted, and the switch
reboots. The switch can then be configured like a new switch, either through the web-based Express
Setup program or the CLI-based setup program.
......
The primary purpose of the no setup express command is to prevent someone from deleting the switch
configuration by pressing the Mode button for 10 seconds.
    ------摘自http://www.cisco.com/univercd/cc/td/doc/product/lan/cat2940/12113ay/2940cr/cli2.pdf

不过同时想到了另外一个问题:交换机做密码恢复时需要使用到这个MODE键,如果在交换机上面配置“no setup express”后,会不会导致不能进行密码恢复了呢?于是我今天针对这个问题做了一个实验,答案是使用“no setup express”命令与交换机密码恢复不冲突。

下面介绍一下交换机密码恢复过程:

1,按住MODE键(大概10s)同时启动电源,在发现SYST灯经过一段时间闪动后,突然变成黄色,然后马上就变成绿色不闪烁,这个时候松开MODE键;

2,终端上面会出现如下界面:
image

3,输入“flash_init”命令,初始化后再输入“dir flash:”命令,显示如下:
image

4,输入“rename flash:/config.text flash:/config.text.renamed”,结果如下:
image
需要注意的是:有可能当你输入上述命令后,系统会提示错误信息,重新输入就可以了。这个问题我碰到过很多次。

5,然后重启交换机,命令:boot
注意:这个模式下可以通过“help”命令来查看命令。

6,重启后进入系统,这是show run命令查看出来的是初始化配置,所以需要重命名flash:/config.text.renamed文件,命令:rename flash:config.text.renamed flash:config.text;

7,将flash:config.text拷贝到内存中,命令:copy flash:config.text system:running-config;

8,这个时候就可以修改密码了,然后保存就行了。

总结:为了解决交换机通过mode重启导致配置丢失的问题,可以在交换机上面配置"no setup express"命令,这个命令与交换机密码恢复没有冲突。

Feedback

# re: setup express以及交换机密码恢复  回复  更多评论   

2008-06-02 23:51 by zhou_921
这个命令确实可以起到这样的作用, 只是似乎用的很少哦

# re: setup express以及交换机密码恢复  回复  更多评论   

2008-06-04 20:46 by zhou_921
这个都被你发现了,确实强~~

# re: setup express以及交换机密码恢复  回复  更多评论   

2008-12-01 11:04 by 卡通服装
牛人

# re: setup express以及交换机密码恢复  回复  更多评论   

2009-01-09 14:24 by 专卖店设计
your

# re: setup express以及交换机密码恢复  回复  更多评论   

2009-02-23 10:03 by youngsun packaging machine
太强悍了

# re: setup express以及交换机密码恢复  回复  更多评论   

2009-02-23 10:04 by youngsun packaging machine
咿呀呀

# re: setup express以及交换机密码恢复  回复  更多评论   

2009-03-04 13:38 by 打包机
自动化后道包装流水线可以说是为工业带来的很大的发展,

# re: setup express以及交换机密码恢复  回复  更多评论   

2009-03-04 13:39 by 包装机械
爱莫能助

# re: setup express以及交换机密码恢复  回复  更多评论   

2009-04-14 15:55 by 包装机
被交换机整死了
只有注册用户登录后才能发表评论。