Lessons · Network switches · saving the configuration
Running is not saved
The running configuration lives in memory and is lost on a reboot; write memory copies it to the startup configuration, which survives.
Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.
What it is for
This is the most expensive mistake on the list. An afternoon of correct work disappears in a power cut, and everything looked perfect right up until the lights flickered.
How to think about it
Make the change, prove it works, then save. Get into the habit of ending every session with a save, and of checking `show startup-config` before you walk away.
Worked example
enableThe # prompt.
configure terminalInto configuration mode.
hostname BRANCH2A change, live immediately, saved nowhere.
endOut to BRANCH2#.
write memoryBuilding configuration... [OK]. The running configuration has been copied to startup.
show startup-configIt is really there now. Before the save, this command said startup-config is not present.
Your turn
Save the running configuration so it survives a reboot.
write
Console into a switch
The trap
Believing the change is safe because the switch is behaving. It is behaving from memory. `copy running-config startup-config` and `write memory` do the same job; either is fine, neither is optional.