一、删除所有配置文件
write erase
erase startup-config
delete flash:vlan.dat
Switch#write erase
************************************************************************************************************
Erasing Nvram will not clear license trust code.
擦除Nvram不会清除许可证信任代码。
************************************************************************************************************
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
擦除nvram文件系统将删除所有配置文件!继续?[确认]
[OK]
Erase of nvram: complete
nvram擦除:完成
Switch#erase startup-config
************************************************************************************************************
Erasing Nvram will not clear license trust code.
擦除Nvram不会清除许可证信任代码。
************************************************************************************************************
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
擦除nvram文件系统将删除所有配置文件!继续?[确认]
[OK]
Erase of nvram: complete
nvram擦除:完成
Switch#delete flash:vlan.dat
Delete filename [vlan.dat]?
Delete flash:/vlan.dat? [confirm]
二、重启交换机并跳过初始配置
reload
Switch#reload
Reload command is being issued on Active unit, this will reload the whole stack
正在主动单元上发出重新加载命令,这将重新加载整个堆栈
Proceed with reload? [confirm]
是否继续重新加载?[确认]
Would you like to enter the initial configuration dialog? [yes/no]: no
您想进入初始配置对话框吗?[是/否]:
Would you like to terminate autoinstall? [yes]: yes
您想终止自动安装吗?[是]:
三、注意事项
这些操作会永久删除所有配置,包括IP地址、VLAN、ACL等执行前请确保已备份重要配置操作后交换机将恢复到出厂默认状态某些较新型号的思科交换机可能需要使用"erase nvram:"命令替代