This document outlines the procedure required to reset a Cisco switch and a Cisco router to their initial, pristine state. This document assumes you still know the "enable secret" (or password) that gives you administrative access to the device.
Note that the precise details of how to do this may vary between specific device models. However, most Cisco devices behave very similarly.
Connect a terminal emulator program to the console port on the device
Execute the enable command to switch to privileged mode:
Switch> enable Switch#
Execute the show flash: command to display the contents of non-volatile storage:
Switch# show flash: 2 -rwx 1919 Mar 1 1993 00:06:33 +00:00 private-config.text 3 -rwx 1632 Mar 1 1993 00:06:33 +00:00 config.text 4 -rwx 13336 Mar 1 1993 00:06:33 +00:00 multiple-fs 5 -rwx 11607161 Mar 1 1993 02:37:06 +00:00 c2960-lanbasek9-mz.150-2.SE.bin 6 -rwx 616 Mar 1 1993 00:07:13 +00:00 vlan.dat
The precise content of your device's flash is likely to be different. However, you are looking for the file vlan.dat. This file contains VLAN configuration information.
Erase the vlan.dat file, if it exists:
Switch# delete vlan.dat
You will be prompted to confirm the file name. If you typed it wrong, you can enter the correct name at that point, otherwise just press the Enter key to accept the default. Part of resetting the switch is to remove any existing VLAN definitions.
Erase the startup configuration:
Switch# erase startup-config
You will be prompted to confirm this action. This removes all customized configuration done on the device and returns it to its initial state.
Reboot (reload) the device:
Switch# reload
This causes the device to reboot into its new (initial) configuration. Note that the reboot can take some time, and you might need to press the Enter key to get a prompt. The switch has now been reset.
Last Revised: 2023-05-25
© Copyright 2023 by Peter Chapin <peter.chapin@vermontstate.edu>