1、Cisco Catalyst 交换机密码恢复策略如果交换机的 login 密码忘记了,别急别急,只要你有 PC,有类似超级终端 (Hyper Terminal)这样是终端程序,连接到交换机的 console 口,那么密码的恢复就 N 简单了.1.对于 Catalyst 2900/3500XL 系列来说:拔下交换机的电源线,然后按住交换机的 Mode 按钮,再重新插上交换机的电源线.直到端口 Port 1x 的 LED熄灭之后释放 Mode 按钮.就这么简单,别告诉我你不知道 Mode 按钮在哪啊-_-#2.对于 Catalyst 2940/2950L 系列来说 :拔下交换机的电源线,然后按住交
2、换机的 Mode 按钮,再重新插上交换机的电源线.直到 STAT 的 LED 熄灭之后释放 Mode 按钮.3.对于 Catalyst 2955 系列来说:Catalyst 2955 没有没有外部的 Mode 按钮,因此就不能使用之前的那种方法来进行密码恢复 .在交换机启动时,对于 Windows 系列的 PC,按下 Ctrl+Break 键;对于 UNIX 系列的工作站,按下 Ctrl+C.如下:C2955 Boot Loader (C2955HBOOTM) Version 12.1(0.0.514), CISCO DEVELOPMENT TESTVERSIONCompiled Fri 13
3、Dec02 17:38 by madisonWSC2955T12 starting.Base ethernet MAC Address: 00:0b:be:b6:ee:00Xmodem file system is available.Initializing Flash.flashfs0: 19 files, 2 directoriesflashfs0: 0 orphaned files, 0 orphaned directoriesflashfs0: Total bytes: 7741440flashfs0: Bytes used: 4510720flashfs0: Bytes avail
4、able: 3230720flashfs0: flashfs fsck took 7 seconds.done initializing flash.Boot Sector Filesystem (bs:) installed, fsid: 3Parameter Block Filesystem (pb:) installed, fsid: 4/-接下来交换机会在 15 秒内自动启动 ,等出现该信息之后,按下 Ctrl+Break 键或 Ctrl+C 键-/The system has been interrupted prior to initializing the flash file
5、system to finishloading the operating system software:flash_initload_helperbootswitch:接下来输入 flash_init 命令:switch:flash_initInitializing Flash.flashfs0: 143 files, 4 directoriesflashfs0: 0 orphaned files, 0 orphaned directoriesflashfs0: Total bytes: 3612672flashfs0: Bytes used: 2729472flashfs0: Bytes
6、 available: 883200flashfs0: flashfs fsck took 86 secondsdone Initializing Flash.Boot Sector Filesystem (bs:) installed, fsid: 3Parameter Block Filesystem (pb:) installed, fsid: 4switch:接着输入 load_helper 命令:switch:load_helperswitch:再输入 dir flash:命令显示交换机的文件系统:switch:dir flash:Directory of flash:/2 rwx
7、1803357 c3500xlc3h2smz.1205.WC7.bin4 rwx 1131 config.text5 rwx 109 info6 rwx 389 env_vars7 drwx 640 html18 rwx 109 info.ver403968 bytes available (3208704 bytes used)switch:把配置文件重命名:switch:rename flash:config.text flash:config.oldswitch:输入 boot 命令启动交换机:switch:bootLoading “flash:c3500xlc3h2smz.1205.W
8、C7.bin“.#File “flash:c3500xlc3h2smz.1205.WC7.bin“ uncompressed and installed, entry point: 0x3000executing.(略)不进入 setup 模式: System Configuration Dialog At any point you may enter a question mark ? for help.Use ctrlc to abort configuration dialog at any prompt.Default settings are in square brackets
9、.Continue with configuration dialog? yes/no: n进入特权模式,恢复原始的配置文件:Switch#rename flash:config.old flash:config.textDestination filename config.textSwitch#把配置文件保存在内存里:Switch#copy flash:config.text system:runningconfigDestination filename runningconfig?1131 bytes copied in 0.760 secsSwitch#进入全局配置模式,取消密码设置
10、:Switch(config)#no enable secret保存配置:Switch#write memoryBuilding configuration.OKSwitch#4.对于 Catalyst 3550/3750 系列来说:1.通过带有支持 Xmodem 协议的超级终端程序的 PC 连接到交换机的 console 口,把波特率设置为 9600.2.拔掉交换机的电源.3.按下交换机上的 Mode 按钮,与此同时,重新插上交换机的电源线. 当交换机端口 1X 上的 LED 熄灭后可以松开 Mode 按钮 1 到 2 秒.之后将显示一些指示信息 :The system has been i
11、nterrupted prior to initializing the flash file system. The followingcommands will initialize the flash file system, and finish loading the operating systemsoftware:flash_initload_helperbootswitch#4.初始化 flash 文件系统:switch#flash_init5.加载帮助文件:switch#load_helper6.显示闪存里的内容:switch#dir flash:7.重命名配置文件:swit
12、ch#rename flash:config.text flash:config.text.old8.启动系统,并且如果提示进入 setup 模式,输入 N:switch#bootContinue with the configuration dialog? yes/no: N9.进入特权模式,把配置文件名恢复为原始文件名:Switch#rename flash:config.text.old flash:config.text10.把配置文件写进内存:Switch#copy flash:config.text system:running-configSource filename config.text?Destination filename running-config?11.进入全局配置模式更改密码:Switch(config)#enable secret password12.退出,并保存到 startup-config 文件里:Switch(config)#copy running-config startup-config