1、断电,按住交换机正面的MODE键,再通电开机,按住MODE键约15秒左右,直接到SYS灯不再闪烁变绿;
2、在CLI里出现switch:提示字符后,输入flash_init 命令;
3、等待引导程序加载完成后,可以输入dir flash 命令查看现有FLAHS下的配置文件;
4、重命名原有配置文件config.txt(重要的是让flash目录下没有config.txt名称的文件)
5、重启交换机,让IOS正常加载,(因为加载过程中,没发现config.txt,所以会初始化,这时候你就可以正常操作了)
6、记得FLASH里原配置文件还是存在的,只是改了名字,当你已经enable进入特权模式下了,就可以重新加载该文件,恢复原有配置,且可以修改enable 密码
输入?号,或者help,看看有什么命令可以使用?
查了下官方文档,直接dir flash:就行
Step 1 | Unplug the power cord. | ||
Step 2 | Reconnect the power cord to the switch, then press and hold the Mode button for three to four seconds and release it. The switch power-cycles and displays the switch: prompt. | ||
Step 3 | Run the dir flash: command. The switch file system is displayed. | ||
Step 4 | Enter rename flash:config.text flash:config.old to rename the configuration file. | ||
Step 5 | Run the boot command to boot the system. | ||
Step 6 | Enter n at the prompt and press Enter to abort the initial configuration dialog box. | ||
Step 7 | In the switch prompt, type en to enter the enable mode. | ||
Step 8 | Enter rename flash:config.old flash:config.text to rename the configuration file with its original name. | ||
Step 9 | Run the copy command to copy the configuration file into memory. The configuration file reloads. | ||
Step 10 | Overwrite the current passwords and enter a strong password with atleast one capital letter, one number, and one special character.
| ||
Step 11 | Enter the write memory command to write the running configuration to the configuration file. |