CCNA 200-301

CCNP Enterprise

CCNP Security

CCIE Enterprise Lab

CCIE Security Lab

CCNP Service Provider

CCNP Data Center

CCNP Collaboration

CCIE DC Lab

Factory resetting a Cisco router restores the appliance to its original factory state by removing custom configurations, user credentials, routing protocols, and interface settings. Network engineers and administrators typically initiate this process when preparing hardware for decommissioning, clearing lab topologies, deploying pre-owned devices, or recovering access after administrative credentials have been lost. Because Cisco routers rely on a dual-memory architecture consisting of volatile Dynamic RAM (DRAM) and Non-Volatile RAM (NVRAM), a successful factory reset requires purging the non-volatile startup configuration and ensuring the device boots cleanly.

Depending on your access level and hardware model, restoring factory defaults can be accomplished via the Cisco IOS command-line interface (CLI), low-level ROM Monitor (ROMMON) mode, or a physical hardware reset button on small business units. This guide provides step-by-step procedures, technical specifications, troubleshooting workflows, and a sanitization cheat sheet for enterprise and small business Cisco routing platforms.


Cisco Enterprise Standards and Technical Architecture

According to Cisco Technical Assistance Center (TAC) documentation, factory resetting an enterprise-grade router requires an understanding of how Cisco IOS handles memory storage and system initialization.

Memory Hierarchy Definitions

  • DRAM (Dynamic RAM): Houses the active running-config and real-time operational tables (routing, ARP, NAT). Changes made in configuration mode execute immediately in DRAM.
  • NVRAM (Non-Volatile RAM): Houses the startup-config and the software configuration register. NVRAM maintains its data across power cycles.
  • Flash Memory / Bootflash: Non-volatile storage hosting Cisco IOS software binary images, cryptographic assets, system logs, and licensing packages. Erasing NVRAM does not remove the Cisco IOS image stored in Flash.
  • ROMMON (ROM Monitor): Firmware bootstrap software that initializes the hardware and determines how Cisco IOS boots based on the 16-bit software configuration register.
+-----------------------------------------------------------+
|                        Cisco Router                       |
|                                                           |
|  +--------------------+          +---------------------+  |
|  |     NVRAM          |          |      Flash /        |  |
|  |                    |          |     Bootflash       |  |
|  |  - startup-config  |          |  - Cisco IOS image  |  |
|  |  - config-register |          |  - Licenses, logs   |  |
|  +---------+----------+          +----------+----------+  |
|            |                                |             |
|            | (Loaded on Boot)               | (Executes)  |
|            v                                v             |
|  +-----------------------------------------------------+  |
|  |                      DRAM                           |  |
|  |                                                     |  |
|  |               - running-config                      |  |
|  |               - Active Routing / ARP                |  |
|  +-----------------------------------------------------+  |
+-----------------------------------------------------------+

Standard Factory Default Baseline

Restoring an enterprise router (such as the Cisco ISR 1000, 4000, or Catalyst 8000 series) to factory defaults involves zeroing the startup-config stored in NVRAM and resetting the configuration register to 0x2102. When the router boots with an empty NVRAM and register 0x2102, Cisco IOS cannot find a startup script and triggers the System Configuration Dialog (Would you like to enter the initial configuration dialog? [yes/no]:).

Cisco TAC standards dictate that factory resets preserve underlying operational licenses (such as Smart Licensing reservations or legacy PAK-activated features) and valid operating system images in Flash, unless a complete cryptographic sanitization (NIST SP 800-88 compliance) is explicitly executed.


Resetting via Cisco IOS CLI with Administrative Access

When administrative access via Telnet, SSH, or an authenticated local console cable is available, the CLI offers the standard method for clearing NVRAM and rebooting into factory defaults.

Step 1: Establish Privileged EXEC Mode

Access the terminal and escalate your privilege level:

Router> enable
Password: *********
Router#

Step 2: (Optional) Back Up Existing Configurations

If you must preserve data for audit trails or migration, export the running configuration to an external TFTP/FTP server or local Flash:

Router# copy running-config tftp:
Address or name of remote host []? 192.168.1.50
Destination filename [router-confg]? backup-config.cfg

Step 3: Erase the Startup Configuration

Issue the write erase or erase startup-config command to purge the contents of NVRAM:

Router# write erase
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete

Note: Both write erase and erase startup-config execute the identical internal procedure on modern Cisco IOS and IOS-XE platforms.

Step 4: Clear Switchport and Cryptographic Artifacts

On modular routers equipped with integrated EtherSwitch modules (such as Cisco 800, 1900, or ISR 4000 series with NIM-ES2 modules), VLAN database definitions reside in Flash rather than NVRAM:

Router# delete flash:vlan.dat
Delete filename [vlan.dat]? 
Delete flash:/vlan.dat? [confirm]

Step 5: Reload Without Saving

Reboot the router using the reload command. When Cisco IOS prompts to save the modified running configuration, enter no. Entering yes writes the active configuration from DRAM back into NVRAM, immediately overriding the erase command.

Router# reload
System configuration has been modified. Save? [yes/no]: no
Proceed with reload? [confirm]

Step 6: Verify Factory Default Prompt

Upon rebooting, confirm that the router prompts for initial setup:

         --- System Configuration Dialog ---

Would you like to enter the initial configuration dialog? [yes/no]: 

Type no to access the default unconfigured command line (Router>).


Resetting Without a Password via ROMMON Mode

If administrative credentials are forgotten, corrupted, or unavailable, you must bypass the startup configuration by modifying the software configuration register in ROMMON mode via a physical console connection.

Step 1: Connect to the Physical Console Port

Connect an RJ-45-to-DB9 rollover cable or a standard USB console cable between your management workstation and the router’s physical CONSOLE port. Configure your terminal emulator (e.g., PuTTY, Tera Term, SecureCRT) to the standard Cisco serial settings:
* Baud Rate: 9600 bps
* Data Bits: 8
* Parity: None
* Stop Bits: 1
* Flow Control: None

Step 2: Send the Break Sequence

Power-cycle the router (turn the physical power switch off and on, or unplug the power cable). Within the first 60 seconds of hardware initialization, send the serial Break sequence from your terminal emulator:
* PuTTY: Right-click the title bar $\rightarrow$ Special Command $\rightarrow$ Break (or press Ctrl + Break).
* Tera Term: Press Alt + B.
* macOS / Linux (screen / minicom): Press Ctrl + A, then F (or Ctrl + \).

The router halts normal boot execution and displays the ROMMON command prompt:

System Bootstrap, Version 15.4(3r)S, RELEASE SOFTWARE
Copyright (c) 2015 by cisco Systems, Inc.

rommon 1 >

Step 3: Change the Configuration Register to Bypass NVRAM

Instruct the bootstrap loader to ignore the NVRAM configuration during boot by setting the register to 0x2142:

rommon 1 > confreg 0x2142
You must reset or power cycle for new config to take effect.
rommon 2 > reset

(On older legacy models, the command is o/r 0x2142 followed by i or boot.)

Step 4: Boot to Default Prompt and Erase Configuration

The router boots without loading the existing startup-config. When prompted:

Would you like to enter the initial configuration dialog? [yes/no]: no
Router> enable
Router# write erase
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete

Step 5: Reset the Configuration Register to Normal

To ensure the router loads its new configuration on subsequent reboots, you must change the register back to 0x2102:

Router# configure terminal
Router(config)# config-register 0x2102
Router(config)# end
Router# write memory
[OK]

Step 6: Reload into Factory State

Execute reload to confirm the router initializes cleanly under the default register:

Router# reload
Proceed with reload? [confirm]

Configuration Register Settings (0x2102 vs. 0x2142)

The software configuration register is a 16-bit value stored in NVRAM that directly controls how the processor initializes, where it loads the Cisco IOS software from, and whether it parses the startup configuration.

What is the functional difference between 0x2102 and 0x2142?

  • 0x2102 (Standard Operational Value): The default enterprise setting. Bit 6 is set to 0, instructing the bootloader to read and execute the startup-config stored in NVRAM. Bits 0–3 (boot field) are set to 0x2, telling the router to load the first valid Cisco IOS image located in Flash.
  • 0x2142 (Password Recovery / Bypass Value): Bit 6 is toggled to 1 (representing 0x0040 in hex). This tells the bootstrap program to completely ignore NVRAM during startup, simulating a blank configuration regardless of what is stored in memory.

Why does my Cisco router keep its old configuration after running write erase?

This condition occurs for one of two common reasons:
1. Accidental Configuration Overwrite: When issuing the reload command, Cisco IOS prompts: System configuration has been modified. Save? [yes/no]:. If the administrator enters yes, the current running-config in DRAM is written right back to NVRAM, replacing the wiped file.
2. AutoInstall / DHCP Boot Options: If connected to a live network with active DHCP servers delivering TFTP boot paths (DHCP Option 67), an unconfigured Cisco router automatically attempts to download a network configuration file across the wire via Cisco AutoInstall.

Why does the router lose configuration changes after every reboot?

If you can configure interfaces and save settings using write memory, but find the router completely unconfigured after every power cycle, the configuration register is still set to 0x2142. Because NVRAM is bypassed on every boot, changes written to NVRAM are never loaded into DRAM.

To verify your active and upcoming register settings, execute:

Router# show version | include register
Configuration register is 0x2142 (will be 0x2102 at next reload)

If the register is not scheduled to change, update it:

Router# configure terminal
Router(config)# config-register 0x2102
Router(config)# end
Router# write memory

Physical Reset Button on Small Business and RV Series Routers

Unlike enterprise modular routers, Cisco Small Business routers (including the RV Series such as the RV160, RV260, and RV340) and select compact integrated services platforms feature an external hardware pinhole reset button.

       Cisco RV Series Front/Rear Panel
+-----------------------------------------------------+
|  [POWER]  [DIAG]  [LAN 1-4]  [WAN]                  |
|                                                     |
|                                        (o) RESET    |
|                                     [Pinhole Button]|
+-----------------------------------------------------+

Step 1: Locate the Reset Pinhole

Locate the recessed button labeled RESET on the back or side chassis of the unit. Prepare an unfolded paperclip or a specialized SIM-ejector tool.

Step 2: Understand Press Durations

Cisco Small Business firmware differentiates between a simple hardware reboot and a destructive factory wipe based on timer thresholds:
* Short Press (1 to 5 seconds): Soft reboot. Restarts the operating system without modifying saved configuration profiles or IP schemes.
* Sustained Hold (10 to 15 seconds): Standard factory reset. Clears all operational parameters, restores default administration credentials, and resets LAN subnets.
* Extended 30-Second Hold (Specific RV Legacy Models): Hardware NVRAM scrub. Used when firmware becomes unresponsive.

Step 3: Execute the Hardware Reset Sequence

  1. Ensure the router is connected to power and completely booted (the Power LED is solid green).
  2. Insert the paperclip into the pinhole until you feel the internal switch depress.
  3. Hold the switch continuously for 10 to 15 seconds.
  4. Observe the system LEDs: The Power or Diag LED begins blinking amber or flashes rapidly in green.
  5. Release the button immediately once the flash pattern changes.

Step 4: System Re-initialization

Allow 3 to 5 minutes for the internal flash memory to rebuild default filesystems and reload the operating kernel. Do not disconnect power while the system is re-initializing.

Step 5: Access Default Factory Networking

Once the Power LED returns to solid green, connect an Ethernet cable to LAN port 1 and access the default gateway:
* Default IP Address: 192.168.1.1
* Default Subnet Mask: 255.255.255.0
* Default Credentials: Username cisco, Password cisco (or credentials printed on the base hardware label of newer RV models)


Router Sanitization and Decommissioning Cheat Sheet

When returning hardware to a lease provider, selling assets, or moving devices outside an enterprise security perimeter, you should sanitize all persistent identifiers, keys, and cached credentials. Use this copy-pasteable CLI template to sanitize enterprise Cisco IOS and IOS-XE routers:

! ===================================================================
! CISCO IOS ROUTER FACTORY RESET & SANITIZATION TEMPLATE
! ===================================================================

! Step 1: Enter Privileged EXEC Mode
enable

! Step 2: Remove Cryptographic Keys and Certificates
configure terminal
crypto key zeroize rsa
crypto key zeroize ecdsa
crypto pki trustpoint default
 no enrollment
 exit
end

! Step 3: Zeroize / Purge Switch Database and Local Files (if present)
delete /force flash:vlan.dat
delete /force flash:multiple-fs
delete /force nvram:*

! Step 4: Ensure Boot Configuration Register is Restored to Normal
configure terminal
config-register 0x2102
no boot system
end

! Step 5: Permanently Erase NVRAM Startup Configuration
write erase

! Step 6: Reload System Without Saving Active RAM
reload
! When prompted: "System configuration has been modified. Save? [yes/no]:"
! Type: no
! When prompted: "Proceed with reload? [confirm]"
! Press: <ENTER>

Summary

Executing a factory reset on a Cisco router reliably clears operational parameters and prepares hardware for fresh provisioning. For operational devices with known credentials, running write erase and declining to save the running configuration on reload provides the cleanest and fastest reset path. In lockout situations, console access coupled with ROMMON manipulation of the software configuration register (0x2142 to bypass, followed by a restore to 0x2102) ensures complete recovery. When managing small-business platforms, the physical pinhole button accomplishes the same result without requiring terminal software. Finally, always verify the active configuration register via show version before finishing to ensure that future configurations persist across operational reboots.

Please follow and like us:
Last modified: October 31, 2026

Author

Comments

Write a Reply or Comment

Your email address will not be published.