TechKnowSurge
Cisco CCNA 1.1 Cisco CCST Networking 5.5 Cisco CCST Networking 5.4
VideoNetworkFree

DEMO: Configs

Network devices use distinct memory types and configuration files to manage settings across reboots. Understanding the difference between RAM-based running configuration and the persistent startup configuration is essential for maintaining consistent device behavior.

Complete this video to capture a CTF flag worth 1 point.

About this video

Network devices rely on three primary memory types to store and manage configuration data: RAM, NVRAM, and flash. RAM holds the running configuration, which represents the device's current active settings. Because RAM is volatile, any changes made during a session are lost if the device is powered off or restarted without saving. NVRAM and flash provide non-volatile storage and are used to retain configuration data across reboots, with modern devices often combining these into a single storage location. The running configuration and the startup configuration are the two key files at the center of device management. The running configuration reflects every active setting at a given moment and is stored in RAM. The startup configuration is the saved version that loads into RAM each time the device boots, becoming the new running configuration. Changes made to the running configuration do not automatically persist to the startup configuration, making the save step a critical part of any configuration workflow. Saving configuration changes is accomplished using the copy running-config startup-config command or the write memory command, both of which copy the current running configuration into the startup configuration file. To verify changes, the show running-config and show startup-config commands display the contents of each file. To remove saved settings entirely and return a device to a clean state, the erase startup-config command deletes the startup configuration. Notably, the startup configuration stored in NVRAM and the config.text file found in flash reference the same underlying file, so erasing one removes the other as well.

What you'll learn

What's covered

Device Configuration Files

Aligned to

Cisco CCNA
1.1 Explain the role and function of network components
Cisco CCST Networking
5.5 Run basic show commands on a Cisco network device
5.4 Differentiate between different ways to access and collect data about network devices

Key terms

Random Access Memory
RAM
Volatile memory that temporarily stores data and program instructions the CPU is actively using, allowing fast read and write access from any memory location. RAM contents are lost when power is removed, unlike persistent storage.
NVRAM
Non-volatile memory on a Cisco device that retains stored data, such as the startup configuration, even when the device loses power.
Flash
Long-term storage on a Cisco device used to hold the IOS operating system and, often, the startup configuration file.
Running Configuration
The active configuration file stored in RAM that reflects all current settings on a Cisco device; changes are lost on restart if not saved.
Startup Configuration
A saved configuration file stored in NVRAM that is loaded into RAM during the boot process to configure the device's settings and parameters.
Configuration Management
The process of tracking and controlling changes to hardware, software, and documentation throughout a system's lifecycle.

Topics

Cisco Ios Network Device Configuration Running Config Startup Config Cisco Memory Types Networking

Transcript

How devices store information

It's going to be important for you to understand configuration, so let's talk about different configuration files and what their purposes are.

There are several different ways that these devices can actually store information. One is RAM. Using RAM — this is the same type of RAM that's in your computers, that you're used to hearing about — this is the fast memory, the stuff that's pretty close to the processor. But the problem with it is that when you unplug the device, then you lose the information that is within RAM.

Then you've got the NVRAM. This is the information that gets stored long term, so if there's something that we want to store long term, then we store that in NVRAM. And then we have flash, and the flash is the same thing, it's long-term memory. Now, in a lot of our devices nowadays these are actually combined, and you'll see the same information.

Running config and startup config

We also have different configuration files. We make configuration changes on our devices, and when we make a change on that device, that goes into RAM, and it goes into a file that is called the running configuration. So it is the running-config file, and that running-config file then stores that change, and it also uses that information in order to know what its configuration is at any given time. Then what will happen is, if we want to save that, we would save that and it gets saved to the startup-config file. And this startup-config file, when we load up the machine, then it'll get reloaded on there as well.

Let me give an example. Let's say I change the hostname of the device, so the device is named switch and I instead then call it switch2. I enter the command hostname switch2 and I hit enter. It goes into the running configuration. My prompt from there on then says switch2. If it were to be reset, then it would go back to just switch, whatever it was set to before that.

But if I save this running-config, then that information that gets saved gets moved to the startup-config, and so now it exists in both places. So then if that device were to get restarted, it would load up this startup-config — it actually loads that startup config into RAM and then it becomes the running-config — and therefore then you don't lose that information, it keeps the hostname switch2.

Flash is usually where that IOS is installed, but quite often we see that the IOS and the startup config file get stored in the same location. So it's important to understand the difference between the running-config, which is whatever current state that it's running with, with those configurations, and the startup-config file, which is the long term, "I'm storing, I'm saving these settings." And how they interact: when I do a save, it copies the information from the running config to the startup config, and then vice versa, when I restart that device, then the startup config gets loaded up into the RAM and becomes the running config.

Looking at the files on the device

Let's get on to the device and take a look at these different configuration files. I'm on the switch here. I'm going to need to get into privilege EXEC mode to see some of this, so I get into privilege EXEC mode, and then I'm going to do a show flash. When I do a show flash, I see all the directory listing for what is on flash. I can actually just type in directory and it would show me the same thing, because I'm in the directory right now.

I can use my other commands to navigate the directories. I can do a change directory and change it to all these other different systems. In here we see the flash, we also see the NVRAM, and we'll also talk about the system. We can see other items that we can access as well.

I'm not going to change directories at this point in time, but I can also see what's inside these directories without changing directories, just by typing in dir. Maybe I want to see what's inside NVRAM, so I type that out, and then I can see what's inside of the NVRAM — the non-volatile RAM.

I said we'd take a look at the systems, so let's take a look at dir system and take a look at what's in there. We see the default running config and the running config. So we see the running config right here, and that is the file, what's inside of RAM, all of our configurations and how we're running currently.

I can actually see what's inside of the running config by typing in show running-config. That is going to give me a view into what this running config looks like. I'm going to hit enter and it's going to show me the start of this, and I can scroll through the rest of this, but I'm not going to for now. I do see that switch is right here.

Changing and saving a setting

Let's play around with this a little bit. I'm going to change the hostname of this, so I'm going to get in and say hostname switch2, hit enter. Then I will get back into show, and now I see that the hostname has switched to switch2. So that change now made it to the running config, and I can see that, as well as my prompt has changed as well.

Now if I take a look at the show, I will see that it is still the original switch, it has not changed. Right now, since that exists inside of RAM but it does not exist inside of my non-volatile RAM or my flash, then what's going to happen is I'm going to lose that setting if I do a restart right now. So I need to save that.

There are a couple of ways I can save this. I can do a copy running-config startup-config, and that's going to copy it from the running configuration into the startup configuration. So then I hit enter with that, and it's going to prompt me, are you sure you want to do that? Yes, I do. So it's saving that. And then I can do a show startup-config, and I see now it is in the startup-config. So if I were to restart this device, it would then save that change, so I am good to go.

One other way that I can actually save that file is the write memory. If I do a write memory, that will also go through the same process of saving that.

Now let's say I want to start fresh and I want to delete the startup-config. All I need to do is type in erase startup-config and then hit enter, and then it's going to prompt me, are you sure you want to do that? Yes, I do. I'm going to hit enter, and now it's going to erase that. It no longer exists in there.

So that's how you're going to save your files and settings and navigate to the different files. That is the different configs and the different storage methods.

NVRAM and config.text

One thing to note with this: we say that the startup-config file is found in the NVRAM, but we also see this config.text. If you take a look, these are actually the same file. They're 2305, so it's actually the same size of file, and it is the same file. These reference each other. If you were to save something to the startup config, it is in fact saving it in the config.text. When you erase this or remove it, then you are removing this config.text and it no longer exists. So what you see in NVRAM and flash are actually the same thing here.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →