REW

How To Reset A Cisco 2960 Switch?

Published Aug 29, 2025 4 min read
On this page

You can reset a Cisco 2960 switch to its factory default settings using two primary methods: via the Command-Line Interface (CLI) if you have access, or by using the physical Mode button for password recovery.

Both processes erase the configuration, including all settings and VLAN data, and require a reboot to finalize the reset.

Method 1: Using the CLI (if you have login access)

This is the quickest and simplest method if you can still log into the switch. It involves deleting the configuration files and reloading the device.

Prerequisites

  • A console, Telnet, or SSH connection to the switch.

Steps

  1. Enter privileged EXEC mode by typing enable and providing the password.
  2. Erase the startup configuration file stored in NVRAM using the command erase startup-config.
  3. Confirm the erase operation when prompted by typing y.
  4. For a complete factory reset, including all VLAN information, delete the vlan.dat file from the flash memory by executing delete flash:vlan.dat and confirming.
  5. Reload the switch to apply the changes by typing reload.
  6. When prompted to save the configuration, select "no" (n) to discard the current running configuration.
  7. After the reboot, the switch will start with its factory defaults and display the initial configuration dialog.

Method 2: Using the Mode button (for password recovery or locked switches)

This method is necessary if you do not have login credentials for the switch. It involves interrupting the normal boot process to gain access to the file system.

Prerequisites

  • A physical connection to the switch via a console cable.
  • A terminal emulation program on your computer (e.g., PuTTY, Tera Term).
  • Physical access to the switch.

Steps

  1. Connect your computer to the switch's console port with a console cable.
  2. Unplug the power cord from the switch.
  3. Press and hold the Mode button on the front of the switch.
  4. While still holding the Mode button, plug the power cord back in.
  5. Continue to hold the Mode button. On the console, you will see output indicating that the system boot process has been interrupted.
  6. Release the Mode button when the SYST LED turns solid green.
  7. At the switch: prompt, type flash_init and press Enter to initialize the flash file system.
  8. To perform a complete factory reset, delete the configuration and VLAN files:
    • del flash:config.text
    • del flash:vlan.dat
  9. Boot the switch with the boot command.
  10. The switch will reload with factory default settings and prompt you to enter the initial configuration dialog.

Analysis of the reset process

Configuration file location

When you reset a Cisco 2960 switch, it's crucial to understand where its configuration is stored.

  • Startup configuration: This file (config.text or startup-config) is stored in NVRAM. It contains the configuration that the switch loads during a normal boot sequence.
  • VLAN database: This file (vlan.dat) is stored in flash memory and contains all VLAN configuration information. Even after erasing the startup configuration, the switch can retain VLAN data unless this file is specifically deleted.

Mode button mechanics

The Mode button's behavior depends on how long it is pressed during boot.

  • Short press (3 seconds): Holding the button for a shorter period enters ROM Monitor (ROMMON) mode, which is used for password recovery.
  • Long press (10+ seconds): For some Cisco Catalyst 2960X models, holding the button for more than 10 seconds triggers an automatic factory reset without requiring console commands.
  • Disabled Mode button: It is possible to disable the automatic factory reset feature in the configuration using the no setup express command. If this command is configured, the Mode button will not initiate a reset with a long press, and you must use the CLI methods.

Impact of a reset

A factory reset is a complete wipe of all user-defined settings. After a reset, the switch will:

  • Have no passwords or enable secrets.
  • Have no IP address or default gateway.
  • Have no VLANs (except the default VLAN 1).
  • Have no user accounts or custom configurations.

The reset process does not erase the operating system (Cisco IOS) itself. The switch will reload and boot into the standard IOS, which will then prompt you to begin a new configuration.

Enjoyed this article? Share it with a friend.