2、拔掉交换机的电源
3、按住Mode按钮并插上电源
4、syst灯常亮或者不亮时松开Mode按钮,提前松开交换机会正常启动,需从回第二步(刚开始syst灯处于闪动状态)
进入配置部分:
switch:
Boot Sector Filesystem (bs) installed, fsid: 2
Base ethernet MAC Address: @@:@@:@@:@@:@@:@@
Xmodem file system is available.
The password-recovery mechanism is enabled.
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 /-------初始化flash文件系统
boot /-------启动设备进入正常模式
switch:
switch: flash_init
Initializing Flash...
flashfs[0]: 527 files, 19 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 32514048
flashfs[0]: Bytes used: 10415104
flashfs[0]: Bytes available: 22098944
flashfs[0]: flashfs fsck took 10 seconds.
...done Initializing Flash.
switch: dir flash: /---------查看确认配置文件文件名
Directory of flash:/
2 -rwx 1921
3 -rwx 2072
5 -rwx 1730
7 drwx 192
22098944 bytes available (10415104 bytes used)
switch: rename flash:config.text flash:oldconfig.text /------重命名配置文件
switch: boot
Loading "flash:c2960-lanbasek9-mz.122-44.SE6/c2960-lanbasek9-mz.122-44.SE6.bin".
..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
File "flash:c2960-lanbasek9-mz.122-44.SE6/c2960-lanbasek9-mz.122-44.SE6.bin" unc
ompressed and installed, entry point: 0x3000
executing...
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(44)SE6, REL
EASE SOFTWARE (fc1)
Copyright (c) 1986-2009 by Cisco Systems, Inc.
Compiled Mon 09-Mar-09 18:10 by gereddy
Image text-base: 0x00003000, data-base: 0x01100000
Initializing flashfs...
flashfs[1]: 527 files, 19 directories
flashfs[1]: 0 orphaned files, 0 orphaned directories
flashfs[1]: Total bytes: 32514048
flashfs[1]: Bytes used: 10415104
flashfs[1]: Bytes available: 22098944
flashfs[1]: flashfs fsck took 2 seconds.
flashfs[1]: Initialization complete....done Initializing flashfs.
Checking for Bootloader upgrade.. not needed
POST: CPU MIC register Tests : Begin
POST: CPU MIC register Tests : End, Status Passed
POST: PortASIC Memory Tests : Begin
POST: PortASIC Memory Tests : End, Status Passed
POST: CPU MIC interface Loopback Tests : Begin
POST: CPU MIC interface Loopback Tests : End, Status Passed
POST: PortASIC RingLoopback Tests : Begin
POST: PortASIC RingLoopback Tests : End, Status Passed
POST: PortASIC CAM Subsystem Tests : Begin
POST: PortASIC CAM Subsystem Tests : End, Status Passed
POST: PortASIC Port Loopback Tests : Begin
POST: PortASIC Port Loopback Tests : End, Status Passed
Waiting for Port download...Complete
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
If you require further assistance please contact us by sending email to
export@cisco.com.
cisco WS-C2960G-24TC-L (PowerPC405) processor (revision F0) with 61440K/4088K by
tes of memory.
Processor board ID FOC1328W1J7
Last reset from power-on
1 Virtual Ethernet interface
24 Gigabit Ethernet interfaces
The password-recovery mechanism is enabled.
64K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address : @@:@@:@@:@@:@@:@@
Motherboard assembly number : XX-XXXXX-XX
Power supply part number : XX-XXXX-XX
Motherboard serial number : FOC13282KR9
Power supply serial number : DCA1326923M
Model revision number : F0
Motherboard revision number : A0
Model number : WS-C2960G-24TC-L
System serial number : FOC1328W1J7
Top Assembly Part Number : 800-26673-04
Top Assembly Revision Number : C0
Version ID : V04
CLEI Code Number : COMFX00BRA
Hardware Board Revision Number : 0x01
Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 24 WS-C2960G-24TC-L 12.2(44)SE6 C2960-LANBASEK9-M
Press RETURN to get started!
--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]: no
/-------由于默认的配置文件config.text被修改了,所以交换机无法出现配置的对话向导,选择no绕过password直接进入交换机正常模式下
Switch>enable /------无需密码直接进入特权模式
Switch#rename flash:oldconfig.text flash:config.text /------恢复交换机的配置文件
Destination filename [config.text]?
Switch#copy flash:config.text system:running-config /------保存配置到NVRAM内核中
Destination filename [running-config]?
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
*Mar 1 00:03:34.966: %SSH-5-ENABLED: SSH 1.99 has been enabled
1730 bytes copied in 4.605 secs (376 bytes/sec)
Switch#
*Mar 1 00:03:37.088: %PKI-6-AUTOSAVE: Running configuration saved to NVRAM
Switch#config /------同样的进入特权模式也无需密码
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
------------接下来我们可以直接删掉原来的密码了-----------------
-------------当然也可以直接修改密码---------------
Switch(config)#no enable password /------删掉特权模式的旧密码
Switch(config)#no enable secret /------删掉安全密码
Switch(config)#exit
Switch#
*Mar 1 00:05:16.451: %SYS-5-CONFIG_I: Configured from console by console
Switch#copy running-config startup-config /------保存当前配置
Destination filename [startup-config]?
Building configuration...
[OK]
------------破密工作已经结束接下来是设置密码-----------------
Switch(config)#line console 0
Switch(config-line)#password 123456
Switch(config)#login on-success
Switch(config)#enable password 123456
Switch(config)#line vty 0 4
Switch(config-line)#password 123456
Switch(config-line)#exit
Switch(config)#login on-success
Switch(config)#exit
Switch#
*Mar 1 00:09:20.031: %SYS-5-CONFIG_I: Configured from console by console
Switch#copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Switch#exit
Switch con0 is now available
Press RETURN to get started.
ps:这种修改密码的方法不会对配置文件做修改,特别适用于一个已经运行的大型网络中的交换机