Cisco IOS Startup and Running Configuration Files

Learn how Cisco IOS running-config and startup-config differ, where they are stored, how to inspect them, and how to save changes before a reboot.

Why Cisco IOS Uses Configuration Files

Cisco IOS is the operating system used by many Cisco routers and switches. A configuration file is a collection of IOS commands that defines how the device operates. Configuration commands can set a hostname, interface IP addresses, routing-related settings, passwords, descriptions, and many other behaviors.

IOS uses two important configurations:

  • running-config: the active configuration currently being used by the device.
  • startup-config: the saved configuration that IOS uses when the device starts.

Commands entered in global configuration mode, interface configuration mode, or another configuration mode take effect in the active configuration immediately. However, taking effect now does not automatically mean that a command has been saved for the next boot.

Running Configuration

The running configuration, commonly called running-config, is the current active configuration used by IOS. It is held in RAM, or random-access memory.

RAM is volatile memory. Its contents are lost when the device reloads, reboots, or loses power. Therefore, a command can be working correctly now while still being lost later if it has not been copied to startup-config.

Viewing running-config

From privileged EXEC mode, identified commonly by a # prompt, use:

Router# show running-config

IOS also accepts the common abbreviated form:

Router# show run

The output can include the hostname, passwords, interface sections, IP addresses, routing settings, and other active commands. On real devices, the output may be long. Terminal paging, sections, and filters can help you inspect only the relevant part, but show running-config remains the primary command for viewing the active configuration.

Startup Configuration

The startup configuration, commonly called startup-config, is the saved configuration that IOS reads during device startup. It is stored in NVRAM, or nonvolatile random-access memory.

NVRAM retains its contents without power. A saved startup configuration therefore remains available after a reload or power failure.

Viewing startup-config

From privileged EXEC mode, use:

Router# show startup-config

A new device or a device whose startup configuration has been erased may not have a startup-config. In that case, IOS starts without the expected saved user configuration and may present initial setup behavior.

How the Two Configurations Relate

During boot, IOS reads startup-config from NVRAM and loads its commands into RAM. This produces the initial running-config used by the device.

  1. The device boots.
  2. IOS reads startup-config from NVRAM.
  3. The saved commands are loaded into RAM as the initial running-config.
  4. An administrator enters new commands or changes existing commands.
  5. Those changes affect running-config immediately.
  6. The changes remain only in RAM until an administrator saves them.

Because of this process, startup-config and running-config can differ. Saving copies the current running-config into startup-config and replaces the previous saved configuration with the current one.

Startup Configuration vs. Running Configuration

Characteristic — running-config — startup-config

Purpose — Active configuration currently used by IOS — Saved configuration used when IOS starts

Storage location — RAM — NVRAM

Retained after power loss — No — Yes

Used immediately by the device — Yes — Not until loaded during startup

Used during startup — It is created from the boot process — Yes, IOS reads it during startup

View commandshow running-config or show runshow startup-config

How it is updated — Configuration commands change it immediately — It changes when running-config is explicitly saved

Saving Configuration Changes

After testing a change and confirming that it is correct, save the active configuration with:

Router# copy running-config startup-config

In this command, running-config is the source, and startup-config is the destination. IOS copies the current contents of RAM to the startup configuration in NVRAM. Depending on the IOS platform, the device may ask you to confirm the destination filename.

A typical interaction looks like this:

Router# copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]

The traditional equivalent is:

Router# write memory

The commonly used abbreviation is:

Router# wr

Use the save command after changes have been tested and before a planned reload or shutdown. Saving makes the current configuration available at the next boot, but it does not replace the need to verify that the active configuration actually works.

Configuration Lifecycle

Event — Running Configuration Result — Startup Configuration Result

Device boots — IOS loads the saved commands into RAM — The saved file in NVRAM is read

Administrator enters a configuration command — The command takes effect immediately — No change unless it was already saved

Administrator saves configuration — The current active configuration remains in RAM — It is replaced with a copy of running-config

Device reloads without saving recent changes — RAM is cleared and rebuilt from the saved file — It remains unchanged, so recent unsaved commands are absent after boot

Device loses power after configuration has been saved — RAM contents are lost, then rebuilt during startup — The saved commands remain in NVRAM

Verification Workflow

Use a repeatable workflow whenever you configure a router or switch:

  1. Make the configuration change.
  2. Inspect the active result with show running-config.
  3. Check operational state with a suitable verification command such as show ip interface brief.
  4. Inspect the saved file with show startup-config.
  5. Compare the relevant sections. If a command appears in running-config but not startup-config, it has not been saved.
  6. After testing, save with copy running-config startup-config.
  7. Inspect startup-config again to confirm that the intended command is present.

The command show ip interface brief provides a quick view of interface names, assigned IP addresses, and interface status. It helps confirm the active operational state, while the two configuration commands show whether the configuration is present in RAM and NVRAM.

Common IOS Commands for Configuration Files

Command — Purpose — Typical Mode — Important Note

show running-config — Displays the active configuration stored in RAM — Privileged EXEC — Use it to verify current commands

show startup-config — Displays the saved boot configuration stored in NVRAM — Privileged EXEC — It may be absent on a new or erased device

copy running-config startup-config — Saves the active configuration as the startup configuration — Privileged EXEC — Source is running-config; destination is startup-config

write memory — Traditional command for saving running-config — Privileged EXEC — Equivalent to copying to startup-config

wr — Abbreviated form of write memory — Privileged EXEC — Supported on IOS platforms that accept the abbreviation

show ip interface brief — Quickly verifies interface status and assigned IP addresses — Privileged EXEC — Shows active operational information

Example: Configure an IP Address Without Saving

This example demonstrates how a command can work immediately while remaining absent from the saved configuration. The interface name is an example; the correct name varies by device.

Router# configure terminal
Router(config)# interface FastEthernet0/0
Router(config-if)# ip address 192.0.2.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)# end

The interface address now affects running-config. Verify the active state:

Router# show ip interface brief

Look for the interface and its address, such as 192.0.2.1. Then inspect both files:

Router# show running-config
Router# show startup-config

The interface section and address should appear in running-config. If the change was not previously saved, the corresponding commands will not appear in startup-config. This proves that the interface can be configured and active now without being prepared for the next boot.

What Happens During Reload or Power Loss?

The reload command restarts the Cisco IOS device:

Router# reload

When the device reloads, RAM is cleared. IOS then reads startup-config from NVRAM and rebuilds the initial running-config from that saved file.

If an interface IP address existed only in running-config, the address disappears after reboot because the RAM copy was lost and no matching command was available in startup-config. If the address was saved first, IOS loads it again during startup.

Unsaved Change

  1. Configure an IP address.
  2. Confirm it with show ip interface brief.
  3. Reload without saving.
  4. After startup, check show ip interface brief and show running-config.
  5. The address is absent if it was not in startup-config.

Saved Change

  1. Configure or modify the interface.
  2. Verify the active result.
  3. Run copy running-config startup-config.
  4. Confirm the command with show startup-config.
  5. Reload the device.
  6. Use show ip interface brief and show running-config to confirm that the setting returned.

Example: Detect and Resolve a Configuration Mismatch

Make a small change, such as a hostname or interface description:

Router# configure terminal
Router(config)# hostname Branch-Router
Branch-Router(config)# interface FastEthernet0/0
Branch-Router(config-if)# description LAN connection
Branch-Router(config-if)# end

Inspect both files separately:

Branch-Router# show running-config
Branch-Router# show startup-config

Identify commands present only in running-config. In this example, the hostname or description may be missing from startup-config. Once the active configuration is confirmed to be correct, save it:

Branch-Router# copy running-config startup-config

Run show startup-config again and verify that the intended commands now appear in the saved file.

Troubleshooting Configuration Persistence

An Interface IP Address Is Missing After Reboot

Likely cause: The address was added to running-config but was never copied to startup-config.

Verify:

  • Run show running-config.
  • Run show startup-config.
  • Check the interface with show ip interface brief.

Resolve: Reapply the intended interface configuration, verify it in running-config, and save it with copy running-config startup-config.

Recent Changes Appear Only in Running-config

Likely cause: The active configuration has not been saved since the changes were made.

Resolve: After confirming that the active configuration is correct, run:

Router# copy running-config startup-config

The Device Starts With Defaults or Initial Setup

Likely cause: There is no valid startup-config in NVRAM, or the intended configuration was not saved.

Verify: Run show startup-config and inspect show running-config.

Resolve: Configure the required settings, verify them, and save the verified running configuration to startup-config.

A Saved Command Does Not Produce the Expected Result Immediately

Saving controls persistence at boot; it does not guarantee that a command is valid or that an interface is operational. Check show running-config for the command and use show ip interface brief to inspect interface addressing and status. Correct the active configuration or interface state, verify operation, and then save the final configuration.

Exam-Relevant Notes

  • running-config is in RAM.
  • startup-config is in NVRAM.
  • RAM is volatile; unsaved changes disappear after reload or power loss.
  • NVRAM is nonvolatile; saved startup configuration persists without power.
  • show running-config displays the active configuration.
  • show startup-config displays the saved boot configuration.
  • copy running-config startup-config saves current changes.
  • write memory and, on supported platforms, wr are traditional save commands.
  • A command taking effect immediately does not prove that it has been saved.

Summary

IOS loads startup-config from NVRAM into RAM when the device boots. The resulting running-config controls the device immediately. New configuration commands modify running-config first, so the active and saved files can differ. Use show running-config to inspect current behavior, show startup-config to inspect boot persistence, and copy running-config startup-config to save verified changes before a reload or shutdown.