How to Reset a Cisco Network Switch

This guide will inform you on how to reset a Cisco Network switch by first entering ROM mode to reset the password, and then by changing the settings on the switch back to their defaults.

Resetting a Cisco Network Switch

Needed Items

Getting Started

  1. Start by plugging a blue console cable into the back of the switch (RJ45), and the other end (serial) into the back of the computer. If you are working off of a laptop, you will need a Serial to USB connector as mentioned above.
  2. Open the PuTTY software and select the ‘Serial’ radio button. If you not using the Serial to USB adapter ensure the text inside the Serial Line text box says COM1. If you are using the adapter, the text should be COM3.
  3. Once you have the above settings confirmed within PuTTY, press the Open You will not see any text within this dialog box until the next step.
  4. On the front of the Cisco network switch, press and hold the Mode button without letting go, and then plug the power cable into the back of the switch. Continue holding the button until you see text appear in the PuTTY dialog box, you may release the button after.

Clearing the data

  1. In ROM mode there are a limited number of commands we can use, but we still have access to the delete command which we will use to delete old configuration files on the switch. Start by initiating the flash (storage) by typing flash_init and hit Enter.
  2. Now you need to list the files on the switch, which you can do by typing in dir flash: and then pressing Enter.
    + Note: Don’t forget to type the colon in ‘dir flash:’
  3. You should see a list of files come up; we will want to delete all of the files here except multiple-fs and the firmware, which should look something like c3750-ipbasek9-mz.122-55.SE10. We can start by deleting the file dat by typing the command del flash:vlan.dat, and then pressing Enter. Retype this command replacing vlan.dat with all of the other files (e.g. config.text) other than the two files mentioned above.
  4. Once you are finished deleting all of the files, if you enter the dir flash: command you should see two remaining files. You can now type boot and press Enter in order to boot the switch into its regular firmware. This process may take a few minutes.

Setting to default values

  1. The switch should now be fully booted and will display a prompt asking to enter the initial configuration dialog. Type out no and hit Enter.
  2. You should now see Switch> appear on the left side, which indicates being in the regular switch mode. Now type the letters en and press Enter, you should now see Switch# appear on the left side. This will put you into Privilege Exec mode allowing you to do commands that require elevated privileges.
    + Note: If you are prompted for a username and password, you may have to repeat the sections ‘Getting Started’ and ‘Clearing the Data’.
  3. Since switches can be stacked into multi-switch configurations, we need to check what ‘number’ the switch is set to. Enter the command show switch and take a look at the output underneath ‘Switch#’. If you see any number other than ‘2’, you must change the switch number to ‘1’. Note: If the number under ‘Switch#’ is set to ‘1’, you may SKIP to Step 8.
  4. First, enter the command conf t to enter the switch configuration exec mode. Your terminal in PuTTY should now display Switch(config) on the left.
  5. Now, enter the following command, with ‘SWITCH_NUM’ being the number listed from the show switch command:
    switch SWITCH_NUM renumber 1 – It may display a prompt about the configuration remaining as provisioned; you may confirm this as we will fix it in the next step. Now type exit and press Enter to exit the configuration mode.
  6. Enter the command reload to reboot and make the changes on the switch. Once it is booted again we will want to type the command show switch again, where you should see two items listed: Switch 1 and Switch 2. Since we no longer need Switch 2 to appear in the stack as we can see by the Provisioned label, we need to remove it. This can be done by re-entering configuration mode.
  7. Type conf t to re-enter configuration exec mode, and now type the command no switch SWITCH_NUM provision in order to remove the provisioned switch, where ‘SWITCH_NUM’ is the number of the switch you want to remove (in this case it is ‘2’).
  8. The last thing we will focus on is setting the priority of the switch to a default of ‘15’. Type the command switch 1 priority 15 and hit enter. Type exit and press Enter to exit configuration exec mode.
  9. Now type the command copy run st to move the changes you made into startup config. Use the command show switch to confirm that the provisioned switch is now removed and that the priority of it is set to ‘15’.
  10. The switch is now back to its default values and is ready to be configured.
Share on Facebook
Tweet about this on Twitter
Email this to someone

Feel free to share!