Configuring a Cisco Catalyst or Nexus switch involves modifying live network parameters—from assigning VLANs and setting trunk ports to defining access control lists. However, executing commands in configuration mode does not permanently commit them. Until you explicitly save those modifications, they reside solely in temporary memory and will vanish immediately following an unexpected power loss, hardware reboot, or crash.
Understanding how to save switch configurations, how memory tiers function, and how to automate configuration backups ensures that network uptime and operational consistency remain protected.
Table of Contents
Understanding Switch Memory: Running-Config vs. Startup-Config
To understand why saving is necessary on Cisco IOS and IOS-XE devices, you must distinguish between the two primary memory architectures where configurations live:
+-----------------------------------------------------------------+
| VOLATILE RAM |
| Holds: running-config |
| - Applied immediately via 'configure terminal' |
| - Governs current switch behavior |
| - Erased instantly on reload or power outage |
+-----------------------------------------------------------------+
|
[ SAVE / COMMIT ACTION ]
v
+-----------------------------------------------------------------+
| NON-VOLATILE NVRAM |
| Holds: startup-config |
| - Persists across power cycles and reboots |
| - Read into RAM during the initial boot sequence |
+-----------------------------------------------------------------+
Volatile RAM and the Running-Config
- Location: Random Access Memory (RAM).
- Role: Stores the
running-config, representing the active state of the switch. - Behavior: Every CLI command entered in
configure terminalimmediately alters therunning-config. Because RAM requires continuous electrical power to preserve data, all unsaved changes are lost if the switch reboots.
Non-Volatile NVRAM and the Startup-Config
- Location: Non-Volatile Random Access Memory (NVRAM).
- Role: Stores the
startup-config, which serves as the permanent configuration file loaded into RAM when the device boots. - Behavior: NVRAM does not depend on power to retain data. Saving a configuration simply means copying the current
running-configfrom RAM into NVRAM as the newstartup-config.
How to Save Cisco Switch Configuration via CLI: Step-by-Step
Saving active settings requires elevated CLI privileges. Follow these steps to commit your running configuration to NVRAM.
Step 1: Enter Privileged EXEC Mode
Access the privileged EXEC mode from user EXEC mode. If configured, you will be prompted for an enable password or secret.
Switch> enable
Switch#
The prompt switches from > to #, indicating privileged mode.
Step 2: Commit Changes with copy running-config startup-config
Execute the standard Cisco command:
Switch# copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
Switch#
When prompted for the Destination filename [startup-config]?, press Enter to accept the default file destination. Once [OK] appears, the configuration is written to NVRAM.
Step 3: Alternative Shortcut (write memory)
You can also use the traditional shorthand command:
Switch# write memory
Building configuration...
[OK]
Switch#
Or simply:
Switch# wr
This performs the identical action without prompting to confirm the destination filename.
Step 4: Verify the Saved Configuration
To confirm that your changes are written to persistent storage, inspect the file stored in NVRAM:
Switch# show startup-config
Compare this output with show running-config to verify parity between live operations and persistent storage.
Comparison: copy running-config startup-config vs. write memory
Network engineers frequently debate whether to use the full copy syntax or the legacy write shortcut. The following table highlights the functional and operational differences between both methods.
| Evaluation Criteria | copy running-config startup-config (copy run start) | write memory (wr) |
|---|---|---|
| Command Syntax | Universal Cisco file copy model (copy source destination) | Legacy standalone command |
| Confirmation Prompt | Prompts for destination file name ([startup-config]?) | Executes immediately without prompts |
| IOS / IOS-XE Support | Fully supported across all versions | Supported across all standard Catalyst IOS/IOS-XE platforms |
| NX-OS Compatibility | Supported natively | Requires CLI alias (cli alias name wr copy run start) |
| Scripting & Automation | Requires carriage return handling in expect/push scripts | Highly script-friendly due to non-interactive execution |
| Cisco Exam Standards | Primary standard evaluated in CCNA/CCNP exams | Often accepted in simulation, but non-canonical in official theory |
| Target Flexibility | Can copy to remote targets (tftp:, ftp:, flash:) | Hardcoded to copy running-config to NVRAM only |
| Deprecation Status | Modern, officially maintained syntax standard | Marked legacy in standard Cisco references, yet maintained for usability |
Automated Backups: Cisco IOS Archive and Remote Offloading
Saving to NVRAM protects your configuration against reboots, but it does not protect against physical switch failure or chassis replacement. Using the native Cisco IOS archive feature allows you to automatically save date-stamped backup files locally and offload them to an external TFTP, FTP, or SCP server whenever an administrator executes a save command.
Configuration Template
! Enter global configuration mode
configure terminal
! Enter the archive configuration submode
archive
! Specify the storage destination path (TFTP, FTP, or Flash)
! Use $h for hostname and $t for timestamp variables
path tftp://192.168.10.50/backups/$h-config-
! Automatically trigger an archive upload whenever 'write memory' or 'copy run start' is run
write-memory
! Automatically archive the configuration on a recurring schedule (value in minutes: 1440 = 24 hours)
time-period 1440
! Retain a maximum number of local archive files (1-14)
maximum 14
exit
Manual Trigger and Verification
To manually generate an archive file without modifying the schedule:
Switch# archive config
To display existing archived copies:
Switch# show archive
The maximum archive configurations allowed is 14.
The next archive file will be named tftp://192.168.10.50/backups/Switch-config--1
Archive # Name
1 tftp://192.168.10.50/backups/Switch-config--Nov-03-2026-00-15-0
2 tftp://192.168.10.50/backups/Switch-config--Nov-03-2026-08-30-1 <- Most Recent
Troubleshooting: Switch Loses Configuration After Reload
If a switch reverts to default factory settings or an empty configuration prompt after rebooting—despite running copy run start—the device is failing to read the startup-config from NVRAM.
FAQ: Diagnosing and Fixing Reload Configuration Loss
Why does the switch boot with a blank configuration even after saving?
This condition occurs when the device bootloader is instructed to bypass NVRAM during startup. On routers and select switches, this is governed by the configuration register. On modular Catalyst switches running IOS-XE, it is typically governed by a ROMmon environment variable (SWITCH_IGNORE_STARTUP_CFG).
How do I check the Configuration Register on standard switches?
Run the show version command and inspect the final line of output:
Switch# show version
...
Configuration register is 0x2142
0x2102(Normal): The switch loads the startup configuration from NVRAM during boot.0x2142(Bypass Mode): Used during password recovery. The switch ignores NVRAM contents and starts with an empty configuration.
How do I reset the Configuration Register back to normal?
If your switch displays 0x2142, restore default boot behavior from global configuration mode:
Switch# configure terminal
Switch(config)# config-register 0x2102
Switch(config)# exit
Switch# copy running-config startup-config
Switch# reload
What if config-register is not supported on my Catalyst switch?
Catalyst switches (such as the Catalyst 2960, 3560, 3850, and 9000 series) handle NVRAM bypass directly via ROMmon environment settings. Check if startup config ignoring is active:
Switch# show boot
...
Manual Boot: NO
Enable Break: NO
Ignore Startup-Config: YES
If Ignore Startup-Config is enabled, disable it using:
Switch# configure terminal
Switch(config)# no system ignore startupconfig
Switch(config)# exit
Switch# write memory
If configuration issues persist from a previous password recovery, access the bootloader (ROMmon) via console during startup and verify that the variable is cleared:
switch: unset SWITCH_IGNORE_STARTUP_CFG
switch: boot
Official Cisco Documentation and Technical Standards
Cisco Systems details configuration management and command hierarchies within the Cisco IOS / IOS-XE Software Configuration Guides: System Management.
Canonical Command Syntax Reference
According to Cisco’s official command references, the primary command is defined as:
copy system:/running-config nvram:/startup-config
system:/running-config: The absolute file-system URI representing active RAM.nvram:/startup-config: The target file-system URI representing NVRAM.
The standard syntax copy running-config startup-config is an alias to this absolute path specification.
Navigating Official Technical Resources
For product-specific variations and command trees:
1. Navigate to Cisco.com > Support & Downloads > Product Support.
2. Select your switch family (e.g., Cisco Catalyst 9200 / 9300 / 9500 Series Switches).
3. Access Configure > Configuration Guides.
4. Open the System Management Configuration Guide for your active IOS-XE release and locate the section titled Managing Configuration Files.
Committing configuration changes to NVRAM using copy running-config startup-config or write memory is fundamental to managing Cisco network infrastructure. Establishing this habit—alongside implementing automated archiving and verifying standard boot register values—ensures that operational state changes persist through maintenance windows, power events, and device reloads.











Comments