Running and Startup Config

1. Introduction

When working on Cisco devices, it’s essential to understand the difference between the running configuration and the startup configuration.

  • The running configuration is stored in RAM, a temporary memory that loses its content after a reboot.
  • The startup configuration is stored in NVRAM, a persistent memory that survives restarts and is automatically loaded at boot.
Running Config need to be saved in the startup config scaled

To keep your work after a reboot, changes made in the running config must be saved to the startup config.

2. How It Works

At every reboot, the device loads the configuration stored in NVRAM (startup config) into RAM (running config).

You make changes in the running config but they are lost if not saved.

What Are Running and Startup Configurations 2 scaled

There are two directions to remember:

  • On reboot → the startup config is loaded into the running config.
  • When saving → the running config is copied into the startup config.

This flow is key to understanding how configuration changes behave.

3. Essential Commands

To check what configuration is currently active, use:

SW1# show running-config
hostname SW1
!
interface GigabitEthernet0/1
 negotiation auto
!
spanning-tree mode pvst
!
ip ssh version 2
!
line vty 0 4
 login
!
end

This displays everything currently stored in RAM the live configuration used by the device.

Now let’s modify a setting. For example, configure the STP priority:

SW1(config)# spanning-tree vlan 1 priority 24576

➔ The change is active immediately in RAM but is not yet saved.

This change is immediately applied, but only in RAM. It will be lost if the device reboots.

Verify that the command is now in the running config:

SW1# show running-config
hostname SW1
!
interface GigabitEthernet0/1
 negotiation auto
!
spanning-tree mode pvst
spanning-tree vlan 1 priority 24576
!
ip ssh version 2
!
line vty 0 4
 login
!
end

The spanning-tree vlan 1 priority 24576 command is now active but not saved in the startup config!

Let’s now check what’s stored in the startup config:

SW1# show startup-config
hostname SW1
!
interface GigabitEthernet0/1
 negotiation auto
!
spanning-tree mode pvst
!
ip ssh version 2
!
line vty 0 4
 login
!
end

If the command isn’t there yet, it means the change hasn’t been saved to NVRAM.

4. Saving Running Config to Startup Config

To make your changes permanent, copy the running configuration to the startup configuration:

SW1# copy running-config startup-config
Destination filename [startup-config]? 
Building configuration...
Compressed configuration from 2967 bytes to 1407 bytes[OK]
*Dec  4 17:55:02.875: %GRUB-5-CONFIG_WRITING: GRUB configuration is bein
g updated on disk. Please wait...**
*Dec  4 17:55:03.698: %GRUB-5-CONFIG_WRITTEN: GRUB configuration was wri *
tten to disk successfully.
Diagram illustrating how to save the running-config to the startup-config in Cisco devices.

Once saved, the configuration is written to NVRAM and will survive a reboot.

You can also use this shorter legacy command:

Router# write memory  
Building configuration...  
[OK]  

KBoth commands achieve the same goal:

  • copy running-config startup-config: explicitly defines what to copy and where.
  • write memory: shorter form, still valid today.
SW1# show startup-config
hostname SW1
!
interface GigabitEthernet0/1
 negotiation auto
!
spanning-tree mode pvst
spanning-tree vlan 1 priority 24576
!
ip ssh version 2
!
line vty 0 4
 login
!
end

You should now see the STP priority line included meaning it’s safely stored and will persist after a reboot.

5. Conclusion

Understanding the difference between the running and startup configuration is critical when working with Cisco devices.

  • The running config is stored in RAM. It’s active immediately but lost after a reboot.
  • The startup config is stored in NVRAM. It’s persistent and automatically loaded at boot.

If you don’t save your work, your changes will be lost.

To avoid unexpected issues and ensure the device always boots with the correct settings, remember to save your configuration after every change:

copy running-config startup-config

Or, if you prefer the short version:

write memory

Getting into the habit of saving your configuration is one of the most important best practices in network administration.