Running-config, startup-config and saving your work

Two copies of the configuration

NameLives inWhat it is
running-configRAM (memory)What the router is doing right now. Every command you type changes it at once.
startup-configNVRAM (memory that survives power-off)What the router loads when it starts up.

RAM is emptied when the router restarts. So until you save, your changes only live in the running-config, and a reload or power cut throws them away.

Saving

copy running-config startup-config (short: copy run start) saves. The router asks for a file name and suggests [startup-config]: just press Enter. write memory (wr) does the same job and is still widely used.

In NetLab

▶ R1
Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname HQ
HQ(config)#end
*Mar  1 00:00:04.000: %SYS-5-CONFIG_I: Configured from console by console
HQ#copy running-config startup-config
Destination filename [startup-config]? 
Building configuration...
[OK]
HQ#show startup-config | include hostname
hostname HQ

Watch unsaved work disappear

Here a change is made but not saved, and the router is reloaded. When it asks Save? [yes/no] we answer no:

In NetLab

▶ R1
Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname BRANCH
BRANCH(config)#end
*Mar  1 00:00:04.000: %SYS-5-CONFIG_I: Configured from console by console
BRANCH#reload

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

Reloading...

VulnTech NetLab router restarting...
No startup-config found: starting with the factory configuration.

Press RETURN to get started!

After the reload the prompt is back to Router>: the hostname was never saved.

Useful commands

CommandWhat it does
show running-configShow the live configuration
show startup-configShow the saved configuration
copy running-config startup-configSave
reloadRestart the router (it offers to save first if something changed)
erase startup-configDelete the saved configuration (back to factory settings after the next reload)

Remember: Change it, check it works, then save it. A router that is fixed but not saved is only fixed until the next power cut.

HOME LABS COMMUNITY DASHBOARD