本文档介绍传统Cisco Catalyst第2层和第3层固定配置交换机的口令恢复过程。
本文档没有任何特定的要求。
本文档基于2900XL/3500XL、2940、2950/2955、2960、2970、3550、3560和3750系列交换机。
注意:本文档保留为前面列出的旧Cisco Catalyst交换机系列的密码恢复参考。它不包括当前的Cisco Catalyst平台。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
本文档介绍Cisco Catalyst第2层固定配置交换机2900XL/3500XL、2940、2950/2955、2960和2970系列以及Cisco Catalyst第3层固定配置交换机3550、3560和3750系列的口令恢复过程。
要恢复密码,请执行以下操作:
1.将终端或带有终端仿真(例如,超级终端)的PC连接到交换机的控制台端口。
使用以下终端设置:
Bits per second (baud):9600
数据位:8
奇偶校验:无
停止位:1
流量控制:Xon/Xoff
1.拔下电源线。
2.为交换机供电并将其连接到交换机:提示:
对于系列交换机2900XL、3500XL、2940、2950、2960、2970、3550、3560和3750,请完成以下步骤:
3.将电源线重新连接到交换机时,按住前面板左侧的模式按钮。
| Catalyst 交换机系列 |
LED 行为和模式按钮释放操作 |
|---|---|
| 2900XL、3500XL 和 3550 |
当Port1X上的LED熄灭时,松开Mode按钮。 |
| 2940、2950 |
在大约 5 秒之后当状态 (STAT) LED 熄灭时,释放模式按钮。释放模式按钮之后,SYST LED 闪烁琥珀色。 |
| 2960、2970 |
当 SYST LED 先闪烁琥珀色然后转为稳定的绿色时,释放模式按钮。释放模式按钮之后,SYST LED 闪烁绿色。 |
| 3560 和 3750 |
在大约 15 秒之后当 SYST LED 转为稳定的绿色时,释放模式按钮。释放模式按钮之后,SYST LED 闪烁绿色。 |
Catalyst 3524XL
Catalyst 3524XL
Catalyst 2950-24
Catalyst 2950-24
只适用于 2955 系列交换机:
Catalyst 2955系列交换机不使用外部模式按钮进行密码恢复。相反,交换机启动加载器使用中断键检测来停止自动启动序列以进行密码恢复。中断序列由使用的终端应用程序和操作系统决定。在Windows 2000上运行的超术语使用Ctrl + Break。在运行UNIX的工作站上,Ctrl-C是break键。下一个示例使用Hyperterm闯入交换机: 模式。
C2955 Boot Loader (C2955-HBOOT-M) Version 12.1(0.0.514), CISCO DEVELOPMENT TEST VERSION Compiled Fri 13-Dec-02 17:38 by madison WS-C2955T-12 starting... Base ethernet MAC Address: 00:0b:be:b6:ee:00 Xmodem file system is available. Initializing Flash... flashfs[0]: 19 files, 2 directories flashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 7741440 flashfs[0]: Bytes used: 4510720 flashfs[0]: Bytes available: 3230720 flashfs[0]: flashfs fsck took 7 seconds. ...done initializing flash. Boot Sector Filesystem (bs:) installed, fsid: 3 Parameter Block Filesystem (pb:) installed, fsid: 4 *** The system will autoboot in 15 seconds *** Send break character to prevent autobooting. !--- Wait until you see this message before !--- you issue the break sequence.
!--- Ctrl+Break is entered using Hyperterm. The system has been interrupted prior to initializing the flash file system to finish loading the operating system software: flash_init load_helper boot switch:
4.运行flash_init命令。
switch: flash_init Initializing Flash... flashfs[0]: 143 files, 4 directories flashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 3612672 flashfs[0]: Bytes used: 2729472 flashfs[0]: Bytes available: 883200 flashfs[0]: flashfs fsck took 86 seconds ....done Initializing Flash. Boot Sector Filesystem (bs:) installed, fsid: 3 Parameter Block Filesystem (pb:) installed, fsid: 4 switch: !--- This output is from a 2900XL switch. Output from
!--- other switches will vary slightly.
5.运行load_helper命令。
switch: load_helper switch:
6.运行dir flash:命令。
此时将显示交换机文件系统:
switch: dir flash: Directory of flash:/ 2 -rwx 1803357 <date> c3500xl-c3h2s-mz.120-5.WC7.bin !--- This is the current version of software. 4 -rwx 1131 <date> config.text !--- This is the configuration file. 5 -rwx 109 <date> info 6 -rwx 389 <date> env_vars 7 drwx 640 <date> html 18 -rwx 109 <date> info.ver 403968 bytes available (3208704 bytes used) switch: !--- This output is from a 3500XL switch. Output from
!--- other switches will vary slightly.
7.输入rename flash:config.text flash:config.old重命名配置文件。
switch: rename flash:config.text flash:config.old switch: !--- The config.text file contains the password
!--- definition.
8.运行boot命令以引导系统。
switch: boot Loading "flash:c3500xl-c3h2s-mz.120-5.WC7.bin"...############################### ################################################################################ ###################################################################### File "flash:c3500xl-c3h2s-mz.120-5.WC7.bin" uncompressed and installed, entry po int: 0x3000 executing... !--- Output suppressed.
!--- This output is from a 3500XL switch. Output from other switches
!--- will vary slightly.
9.在提示符处输入“n”以中止初始配置对话框。
--- System Configuration Dialog --- At any point you can enter a question mark '?' for help. Use ctrl-c to abort configuration dialog at any prompt. Default settings are in square brackets '[]'. Continue with configuration dialog? [yes/no]: n !--- Type "n" for no. Press RETURN to get started. !--- Press Return or Enter. Switch> !--- The Switch> prompt is displayed.
10.在交换机提示符下,键入 en进入启用模式。
Switch>en Switch#
11.键入rename flash:config.old flash:config.text将配置文件重命名为其原始名称。
Switch#rename flash:config.old flash:config.text Destination filename [config.text] !--- Press Return or Enter. Switch#
12.将配置文件复制到内存中。
Switch#copy flash:config.text system:running-config Destination filename [running-config]? !--- Press Return or Enter. 1131 bytes copied in 0.760 secs Sw1#
此时会重新加载配置文件。
13.覆盖您不知道的当前密码。选择一个至少具有一个大写字母、一个数字和一个特殊字符的强口令。
Sw1#configure terminal !--- To overwrite existing secret password Sw1(config)#enable secret!--- To overwrite existing enable password Sw1(config)#enable password !--- To overwrite existing vty password Sw1(config)#line vty 0 15 Sw1(config-line)#password Sw1(config-line)#login !--- To overwrite existing console password Sw1(config-line)#line con 0 Sw1(config-line)#password
14.使用write memory命令将运行配置写入配置文件。
Sw1#write memory Building configuration... [OK] Sw1#
| 版本 | 发布日期 | 备注 |
|---|---|---|
2.0 |
08-Oct-2026
|
为了便于阅读,更新了拼写、语法,插入了水平线段,这是重写。 |
1.0 |
04-May-2014
|
初始版本 |