Saving and Managing Configurations
Lab Objectives
- Learn how to save the active configuration (running-config) to the persistent configuration (startup-config) so changes survive a reload.
- Learn how to remove the saved configuration (erase startup-config) and how reload behaves with and without a saved configuration.
- Be able to verify the state of running and startup configurations and understand why each action matters in production networks.
Base topology (use this EXACT topology for all CCNA labs):
[Internet]
203.0.113.1
|
R1 (Gateway)
Gi0/0: 10.10.10.1
Gi0/1: 10.10.20.1
Gi0/2: 10.10.30.1
/ | \
R2 R3 R4
Gi0/0: 10.10.10.2 | Gi0/0: 10.10.30.2
Gi0/1: 10.10.40.1 |
/ \ |
S1 S2 S3
/ \ | /
PC1 PC2 PC3 PC4 PC5
IP scheme (for reference):
- 10.10.10.0/24 — R1-R2 link
- 10.10.20.0/24 — R1-R3 link
- 10.10.30.0/24 — R1-R4 link
- 10.10.40.0/24 — R2-S1 link
- 192.168.1.0/24 — VLAN 10 (Sales)
- 192.168.2.0/24 — VLAN 20 (Engineering)
- 192.168.3.0/24 — VLAN 30 (Management)
- 203.0.113.0/24 — Public/Internet simulation
Tip: Think of the running-config like your computer’s open document in RAM — changes are immediate but lost if you power off. The startup-config is like the saved file on disk that is loaded when the device boots.
Lab Tasks (Try It Yourself First!)
Complete these tasks WITHOUT looking at the solution below. Use
?andshowcommands to figure it out.
Task 1: Save the running configuration to persistent storage
Save the current active configuration so it will be preserved across reloads. Use R1 as the device to operate on.
Task 2: Erase the saved startup configuration
Remove the saved (persistent) configuration on R1 so that the device will boot with an empty startup-config (or default) on the next reload.
Task 3: Reload the router and observe behavior
Reload R1 and observe what configuration the router uses after reload (with startup-config present vs erased).
Think About It: If you make an emergency CLI change to restore reachability but forget to save it, why might that result in a bigger outage after the next planned restart?
Lab Solution
Task 1 Solution: Save the running configuration to persistent storage
What we are doing: Persist the active configuration (running-config in RAM) to NVRAM as the startup configuration so the router loads it on boot.
R1# copy running-config startup-config
What this command does and why it matters:
copy running-config startup-config— copies the current active configuration (what the device is actively using in RAM) into the non-volatile configuration file (startup-config) stored in NVRAM.- Why it matters: In production, any important change (ACLs, routing, interface IPs) must be saved so the device will not revert to the previous configuration after a scheduled reboot or power loss. Think of it as "saving your document" before closing the application.
Verify:
R1# show startup-config
Building configuration...
Current configuration : 245 bytes
!
version 15.7
service timestamps debug datetime msec
service timestamps log datetime msec
hostname R1
!
interface GigabitEthernet0/0
ip address 10.10.10.1 255.255.255.0
!
interface GigabitEthernet0/1
ip address 10.10.20.1 255.255.255.0
!
interface GigabitEthernet0/2
ip address 10.10.30.1 255.255.255.0
!
end
- The
show startup-configoutput above demonstrates the saved (persistent) configuration. If thehostname, interfaces, and addresses you expect are present, the save succeeded.
Important: Some IOS versions prompt for confirmation or ask you to specify a destination filename — accept the defaults (press Enter) to save to the standard startup-config unless you intentionally want a different filename.
Task 2 Solution: Erase the saved startup configuration
What we are doing: Remove the file in NVRAM so the device has no saved configuration to load on next boot.
R1# write erase
Erasing the nvram filesystem will remove all files in this filesystem! Continue? [confirm]
What this command does and why it matters:
write erase— deletes the saved startup configuration (and other NVRAM files on some platforms).- Why it matters: In labs or recovery scenarios you might intentionally erase startup-config to start from factory defaults. In production, erasing startup-config without exported backup is dangerous — you will lose persistent settings.
Verify (expected output showing no startup-config present):
R1# show startup-config
%Error opening nvram:
%Startup configuration is not present.
- After
write erase, theshow startup-configindicates nothing is present. This verifies the startup configuration was removed.
Warning:
write eraseis destructive. Always export a backup (e.g.,copy startup-config tftp) before erasing in production. (This lab omits backup steps to focus on the save/erase/reload workflow.)
Task 3 Solution: Reload the router and observe behavior
What we are doing: Restart R1 to observe boot behavior when startup-config exists vs. when it does not.
Scenario A — With startup-config present (if you completed Task 1 and did NOT erase):
R1# reload
Proceed with reload? [confirm]
*Mar 1 00:00:00.000: %SYS-5-RELOAD: Reload requested by console. Reload reason: Reload command.
What this does and why it matters:
reload— restarts the router immediately (or after a specified delay). On boot, the device loads thestartup-configfrom NVRAM. If you saved changes in Task 1, they will persist after reload.
Verification after reload (expected running-config matching saved startup-config):
R1# show running-config
Building configuration...
Current configuration : 245 bytes
!
version 15.7
service timestamps debug datetime msec
service timestamps log datetime msec
hostname R1
!
interface GigabitEthernet0/0
ip address 10.10.10.1 255.255.255.0
!
interface GigabitEthernet0/1
ip address 10.10.20.1 255.255.255.0
!
interface GigabitEthernet0/2
ip address 10.10.30.1 255.255.255.0
!
end
Scenario B — With startup-config erased (if you completed Task 2):
R1# reload
Proceed with reload? [confirm]
*Mar 1 00:01:00.000: %SYS-5-RELOAD: Reload requested by console. Reload reason: Reload command.
Verification after reload (expected minimal/default running-config):
R1# show running-config
Building configuration...
Current configuration : 102 bytes
!
version 15.7
service timestamps debug datetime msec
service timestamps log datetime msec
!
end
- When no startup-config exists, the router boots with a minimal configuration. You may be prompted by the setup dialog on some IOS versions. This demonstrates why saving is critical: changes not saved are lost when the device reboots.
Troubleshooting Scenario
Scenario: Router lost configuration after scheduled reboot
Symptom: After a planned maintenance reboot, R1 reverted to no hostname and interfaces show no IPs. Ping to downstream networks fails.
Your task: Find and fix the issue.
Hint: Check whether the configuration was saved before the reboot.
Solution:
- Inspect the saved configuration:
R1# show startup-config
%Startup configuration is not present.
- If startup-config is missing, restore the desired running-config (reconfigure or load from backup) and then save it:
R1(config)# hostname R1
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ip address 10.10.10.1 255.255.255.0
R1(config-if)# exit
R1# copy running-config startup-config
- Verify:
R1# show startup-config
Building configuration...
<-- expected saved configuration with hostname and interface addresses -->
Explanation: The configuration was never saved to startup-config; the reload loaded a blank/default config. Saving fixes this permanently.
Verification Checklist
- Confirm running-config contains intended settings (
show running-config). - Confirm startup-config matches running-config after saving (
show startup-config). - Confirm device boots with expected configuration after reload.
Common Mistakes
| Symptom | Cause | Fix |
|---|---|---|
| Configuration lost after reboot | Forgot to save running-config to startup-config | Execute copy running-config startup-config and verify with show startup-config |
show startup-config still shows old config after save | Saved to wrong filename or location, or insufficient privilege | Use copy running-config startup-config from privileged EXEC; ensure you are in # prompt |
| Device boots to setup mode after reload | Startup-config erased or corrupted | Restore from backup or reconfigure, then copy running-config startup-config |
Challenge Task
On R2 (Gi0/0: 10.10.10.2, Gi0/1: 10.10.40.1), change the hostname and add a static route to the 203.0.113.0/24 network pointing to R1 (10.10.10.1). Save the running-config, verify the startup-config, then reload R2 to prove the setting persists. Do this without step-by-step guidance.
Final tip: Always treat configuration saves as part of your change control checklist in production — saving is not optional.