Factory reset a Cisco 2960 switch
Prereqs
- a PC (BIOS/UEFI) running Linux Mint 21
- minicom terminal emulation software
- a working IOS, so if necessary first (re)install an IOS operating system
Following commands can be executed from within IOS or from within ROMMON-mode.
Erase nvram contents
Check the nvram filesystem. If you saved the running configuration to the startup configuration, a configuration file known as startup-config
will be present. It is possible that other files are there too. In ROMMON, the file is named config.text
. Notice, you cannot access nvram:
from ROMMON, but have to use the flash filesystem to get to that file (symbolic link).
If you only want to erase all configuration files, use erase startup-config
, erase nvram:
or write erase
from IOS. In ROMMON, use the delete
command on the flash filesystem.
For a clean setup, it is better to erase everything using erase /all nvram:
from IOS. You cannot do that from ROMMON.
Erase vlan.dat
The VLAN database file is saved in flash. Check if the file exists.
If necessary, delete the VLAN database.
Enable password recovery mechanism
Check if the password recovery mechanism is enabled or disabled. In this example, it is disabled.
If necessary, enable it.
Set default SDM template
Show the current SDM prefer template. For example:
If necessary, change it back to the default. We will reload/boot the switch at the end.
Verify.
Set default environment variables
Command show boot
should look something like this. Most of these variables can be set from within IOS and/or ROMMON.
Example1: only if necessary, correct the "BOOT path-list" parameter
Example2: only if necessary, correct the "BOOT manual" parameter.
Reload
Clean switch
Say hi to the wizard. Answer "no" at the prompt. Now just pull the power plug to shutdown the switch, as there is no on/off switch like on e.g. a Cisco 1941 router.