SystemPrivileged EXEC

write memory

Saves the running configuration to the startup configuration in nonvolatile memory.

Overview

The 'write memory' command is a fundamental Cisco ASA command used to save the current running configuration to the startup configuration file stored in nonvolatile memory (flash). This ensures that all changes made during the current session persist after a system reload or power cycle. The command is equivalent to 'copy running-config startup-config' on Cisco IOS devices. On the ASA platform, the startup configuration is typically stored as 'startup-config' in the flash file system. The command is essential for configuration management, as it commits changes permanently. Without executing 'write memory', any modifications are lost upon reboot. Network engineers use this command after completing configuration tasks, before maintenance windows, or as part of a backup routine. The ASA also supports saving configurations to remote servers using TFTP, FTP, or SCP via the 'write memory network' variant. Understanding this command is crucial for CCNP Security candidates, as it appears in configuration and troubleshooting scenarios. The command operates in Privileged EXEC mode and is one of the first commands taught for ASA administration.

Syntax·Privileged EXEC
write memory [all | history | network [location] | terminal]

When to Use This Command

  • After making configuration changes, ensure they persist across a reload.
  • Before performing a critical upgrade or maintenance, backup the current configuration.
  • When deploying a new ASA, save the initial configuration after setup.
  • After troubleshooting and applying fixes, commit changes permanently.

Parameters

ParameterSyntaxDescription
allwrite memory allSaves the entire configuration including system and user data. Typically not needed as default saves all.
historywrite memory historySaves the command history to the startup configuration. Rarely used.
networkwrite memory network [location]Saves the running configuration to a remote server. The location specifies the protocol and path (e.g., tftp://server/file).
terminalwrite memory terminalDisplays the running configuration on the terminal without saving. Equivalent to 'show running-config'.

Command Examples

Basic save to startup config

write memory
Building configuration...
Cryptochecksum: 1a2b 3c4d 5e6f 7a8b 9c0d 1e2f 3a4b 5c6d
[OK]

The ASA builds the configuration and computes a checksum. [OK] indicates success.

Save configuration to a remote server

write memory network tftp://10.1.1.100/asa-config.cfg
!!!!
[OK]

The ASA sends the configuration to the TFTP server. '!!!!' shows progress, [OK] confirms transfer.

Understanding the Output

The 'write memory' command output typically shows 'Building configuration...' while the ASA compiles the running config into a format suitable for startup. A checksum (Cryptochecksum) is displayed to verify integrity. The final '[OK]' indicates the save was successful. If the output shows 'Error' or 'Failed', the save did not complete, possibly due to insufficient flash space or file system errors. A healthy output always ends with '[OK]'.

Configuration Scenarios

Saving Configuration After Initial Setup

A new ASA is deployed in a branch office. After basic interface and security policy configuration, the engineer needs to save the config.

Topology

N/A

Steps

  1. 1.Configure interfaces, NAT, ACLs, etc.
  2. 2.Verify with 'show running-config'.
  3. 3.Enter Privileged EXEC mode.
  4. 4.Execute 'write memory'.
Configuration
! No specific config block needed; just the command.

Verify: Use 'show startup-config' to confirm the saved configuration matches the running config.

Watch out: If flash is full, 'write memory' fails. Check free space with 'show flash:'.

Backing Up Config to TFTP Server

Before upgrading ASA firmware, backup the current configuration to a TFTP server at 192.168.1.10.

Topology

ASA (inside) --- Switch --- TFTP Server (192.168.1.10)

Steps

  1. 1.Ensure network connectivity to TFTP server.
  2. 2.Enter Privileged EXEC mode.
  3. 3.Execute 'write memory network tftp://192.168.1.10/asa-backup.cfg'.
Configuration
! No config changes needed.

Verify: Check the TFTP server for the file and verify its size. Optionally, use 'more tftp://192.168.1.10/asa-backup.cfg' to view contents.

Watch out: TFTP has no authentication; ensure the server is trusted. Use SCP for secure transfers.

Troubleshooting with This Command

When troubleshooting ASA issues, 'write memory' is often used after making changes to ensure they are not lost during a reboot. However, if the ASA fails to save, check the following: 1) Flash space: use 'show flash:' to verify available space. If full, delete unnecessary files with 'delete filename'. 2) File system errors: if the flash is corrupted, the save may fail. Use 'fsck' to repair. 3) Permissions: ensure the configuration file is not locked. 4) If using 'write memory network', verify network connectivity and TFTP server availability. Use 'ping' to test reachability. Also, ensure the server has write permissions. Common error messages include 'Error opening tftp://...' or 'Insufficient space'. In high-availability setups, 'write memory' on the active unit replicates to the standby. If replication fails, check failover link and configuration synchronization settings. Always verify the save with 'show startup-config' and compare to 'show running-config'. If they differ, the save did not complete. For remote backups, consider using 'copy running-config tftp:' as an alternative.

CCNA Exam Tips

1.

Remember that 'write memory' is equivalent to 'copy running-config startup-config' on Cisco IOS.

2.

On ASA, 'write memory' saves to disk0:/startup-config by default.

3.

Be aware that 'write memory' does not save the running configuration to a remote server; use 'write memory network' for that.

Common Mistakes

Assuming 'write memory' saves to a remote server without specifying 'network' – it only saves locally.

Forgetting that 'write memory' overwrites the existing startup config without prompting.

Using 'write memory' during a configuration session without verifying the running config first – may save unintended changes.

Platform Notes

On Cisco ASA, 'write memory' is the traditional command, while 'copy running-config startup-config' is also accepted. Unlike Cisco IOS, ASA does not have a 'write erase' command; use 'write erase' to clear startup config. On ASA 9.x and later, the startup config is stored in 'disk0:/startup-config'. The command 'write memory' is identical to 'copy running-config startup-config'. For remote storage, ASA supports TFTP, FTP, SCP, and HTTP/HTTPS. Note that 'write memory network' uses the same syntax as 'copy running-config tftp:'. In ASDM, the equivalent is 'File > Save Running Configuration to Flash'. For context, on Cisco IOS, 'write memory' is deprecated in favor of 'copy running-config startup-config', but ASA maintains backward compatibility. Version differences: ASA 8.x and earlier used 'write memory' exclusively; later versions accept both. Always use 'write memory' for consistency in exam scenarios.

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions