Cisco Router/Switch components

I have done some reading about Cisco Routers and Switches main components, such as ROM/RAM/NVRAM/FLASH, it is a little bit confusing. I wonder if there is an Expert out there to clarify the function sequences of these components. For instance I will go through boot sequences the way I understand it and please correct me if I am wrong:
 when a router/switch boots up:
1- The ROM will check the functioning of CPU/RAM, and the rest of the hardware ...
This is called boot strap..
2-IOS will be loaded from RAM if it has been initially used and uncompressed, otherwise it will be loaded from Flash and will uncompress it and store it in RAM.... However I have read that the contents of RAM gets lost when the router is powered off, so why does it look in RAM to load the IOS during the boot process ????

Does that mean powering off then powering on  the device will purge the RAM, but reload the device will not ?
by the way, the Running config is stored in RAM, I am not sure either if it is lost when the router is reloaded.

3- NVRAM stores the Start-up config... the configuration that has been saved from running config
4- Flash : will be used only if the router has been in power off state. I mean it is not a Reload but it is after Power off then Power On.

Any clarification will be very much appreciated

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I was about to break down some examples and then remember some study material from ages ago. It's a bit simplified and certainly underlines what you are asking.

      "A router is a special type of computer. It has the same basic components as a standard desktop PC. It has a CPU, memory, a system bus, and various input/output interfaces. However, routers are designed to perform some very specific functions that are not typically performed by desktop computers. For example, routers connect and allow communication between two networks and determine the best path for data to travel through the connected networks.
Just as computers need operating systems to run software applications, routers need the Internetwork Operating System software (IOS) to run configuration files. These configuration files contain the instructions and parameters that control the flow of traffic in and out of the routers. Specifically, by using routing protocols, routers make decisions regarding the best path for packets. The configuration file specifies all the information for the correct set up and use of the selected, or enabled, routing and routed protocols on the router.

The main internal components of the router are random access memory (RAM), nonvolatile random-access memory (NVRAM), flash memory, read-only memory (ROM), and interfaces.  

RAM, also called dynamic RAM (DRAM), has the following characteristics and functions:
Stores routing tables
Holds ARP cache
Holds fast-switching cache
Performs packet buffering (shared RAM)
Maintains packet-hold queues
Provides temporary memory for the configuration file of the router while the router is powered on
Loses content when router is powered down or restarted

NVRAM has the following characteristics and functions:
Provides storage for the startup configuration file
Retains content when router is powered down or restarted

Flash memory has the following characteristics and functions:
Holds the operating system image (IOS)
Allows software to be updated without removing and replacing chips on the processor
Retains content when router is powered down or restarted
Can store multiple versions of IOS software
Is a type of electronically erasable, programmable ROM (EEPROM)

Read-only memory (ROM) has the following characteristics and functions:
Maintains instructions for power-on self test (POST) diagnostics
Stores bootstrap program and basic operating system software
Requires replacing pluggable chips on the motherboard for software upgrades

Interfaces have the following characteristics and functions:
Connect router to network for frame entry and exit
Can be on the motherboard or on a separate module"
jskfanAuthor Commented:
Can you please explain the sequences when the router boots up, and how are all those component inter-reacts  during the boot up???
Sure thing, as I understand it..

When a router is powered on the first thing it performs is POST which i believe is ran from ROM,  it makes sure everything on the device functional ->

Then, depending on the config register value, it loads the default IOS from flash vs a different config register value such as -- tftp. For more info on that type of config, click -> here ->

Bootstrap is in ROM, it basically runs programs. It looks for IOS images and loads them from flash memory (i.e. flash:) by default->

Then, IOS looks for startup-config in NVRAM and when it finds the startup-config it will load and run the config.

by the way, the Running config is stored in RAM, I am not sure either if it is lost when the router is reloaded.

Yes, if the running-config isn't save, it will be lost. You have to use the write memory (write mem, wr mem, wr <- all the same) to save the config before reloading or powering it off.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jskfanAuthor Commented:
I will check back later
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.