4 Types of Memory in Cisco Devices
There are in total four kinds of memories in Cisco devices, namely-Â
FLASH
Flash memory is a non-volatile memory which means that it can retain the stored information even if there is a sudden power loss. It is the memory where the Cisco operating system i.e., Cisco IOS software images is stored. The IOS image is the operating system that runs on Cisco devices and provides the functionality to manage the network and perform various tasks. It is also called Erasable Programmable Router-only Memory (EPROM). Data stored in flash can be modified by flashing the chip but when the router is running, flash memory is set to read-only mode.Â
ROMÂ
It stands for read-only memory and is similar to the BIOS chip on our computers. ROM is the memory using which the device proceeds with the boot process. ROM contains essential firmware and bootstrap code required to initialize the device during the boot process. It is a non-volatile memory and cannot be modified.  Â
It stores programs like-Â Â Â
- Power-on Self-Test (POST): – Whenever a router is turned on, a Power-On Self-Test is performed which checks the hardware components like CPU, memory, interfaces, etc are running properly. Â
- Bootstrap program: – It is the program that tells how the Cisco IOS operating system must be loaded i.e., it helps to locate and load the Cisco IOS. Â
- Mini IOS program: – A mini IOS program is also stored in ROM. Whenever valid IOS images cannot be found in Flash memory, a mini IOS program is loaded which is used to install new IOS images into the Flash memory. Â
- ROM monitor: – It is used for troubleshooting the errors that occurred while booting the device.Â
NVRAMÂ
It is known as Non-Volatile Random Access Memory (NVRAM) and is used to store the startup configuration of the device. It is a permanent memory and does not lose its data even if there is a power loss. Whenever a device is booted up, it looks for the configuration stored in NVRAM. Whenever the changes are made or a new config is done on a device, it should be saved in NVRAM i.e., to startup Configuration. It stores configurations like IP address, router name, ACL, NAT config, etc.Â
NVRAM can be seen using the R#show startup-config command.Â
RAMÂ
Random Access Memory (RAM) is a volatile memory. It is not a permanent memory, i.e., whenever the router goes down, the data stored in RAM is lost.Â
It is divided into two types: –Â
- Main processor memory: – It is the memory where the routing table, ARP tables, running configuration, and other operational data needed for device functionality are stored. Â
- Shared I/O memory: – It temporarily stores packets/frames.Â
RAM can be seen using the R#show running-config command.Â
Currently running configuration and startup configuration both look the same because I have not configured anything in the router.Â
Now let us change the hostname from nwkings to getthejobwithnwkings and see what happens-Â
Let us now check the running configuration: –Â
version 15.2Â
Let’s check our startup configuration-
version 15.2Â
So, the hostname is still in RAM and to save it into NVRAM, we need to use the #write command.Â
Booting Process of a Device
Whenever we power on the router, it performs POST, Power-ON Self Test, which check all the hardware component. The device checks the ROM and performs the bootstrap program and checks from where it has to load the Cisco IOS images. Images are generally stored in Flash memory but it may also be loaded using TFTP servers. If IOS is not found on both, it loads a mini IOS program from ROM itself and takes the necessary steps to recover the IOS images.Â
Once the IOS image is found, it gets loaded from the flash memory/TFTP server to RAM.Â
The configuration from NVRAM is loaded into the RAM i.e., startup configurations are initiated. Â
Further changes are saved in RAM itself until they are saved to NVRAM.Â
The initial boot looks something like this. Further, it depends on the IOS version.Â