A Cisco router consists of multiple components.
The major internal components of a Cisco router include a central processing unit or CPU.
The various physical interfaces, such as serial interfaces or FastEthernet interfaces or gigabit interfaces,
random access memory or ram, rom or read only memory, flash memory, as well as N.V. Ram or nonvolatile
RAM. A router is similar to a computer and has several hardware and software components.
So as an example, in a PC today you may have a flash drive or hard drive, and in a similar way, a
router has flash as well as memory and CPU. The router, CPU or central processing unit executes operating
instructions such as system initialization, routing functions and switching functions.
A router may run a routing protocol such as OSPF and when OSPF recalculates the routes to add to the routing
table, the central processing unit needs to do those computations.
The router also has RAM or random access memory installed.
This is very similar to a PC.
RAM is a volatile memory and any data stored in RAM is lost when the routers powered down or restarted.
So in the same way as on a PC, if you're working in Microsoft Word and you lose power to your PC, you'll
lose any changes to the Microsoft Word document if you haven't saved the document to your hard drive.
So if you turn the PC off and you've made some changes without saving them, those changes are lost
because the word changes are only stored in RAM and haven't been written to the hard drive.
So a router has RAM, which is read-write memory and contain software and data structures that allow the
router to function.
Now, in some cases with PCs, when you boot up a PC, the operating system which is stored on the hard
drive is loaded into memory.
That's not always possible because of the size of operating systems and the amount of RAM available
in a PC.
However, a Cisco router today copies the entire Cisco IOS software into RAM during the boot process.
That didn't take place in the past, but that's what happens today.
In a similar way, when you make changes on a router, those changes are written to the running configuration.
The running configuration is stored in RAM, and unless you save that configuration to the startup-config,
which is stored in nonvolatile RAM or NVRAM your changes will be lost.
So the running configuration of a router is stored in RAM and when you save your configuration, it's copied
to the startup-config, which is stored in nonvolatile ram, which means that when the router is turned off,
those configuration changes are saved and not lost.
So NVRAM or Nonvolatile RAM is used to store information such as the startup config, which is not
lost when the router is turned off or loses power.
So the running configuration file is the file that stores the configuration commands that the Cisco
IOS software is currently using on the router typically, all commands that are configured on the
router or stored in the running config.
There are as always, some exceptions to the rule, but generally, the show run command shows you the
configuration that's currently being used by the router.
Once again, NVRAM doesn't lose its information when the router is powered off.
The Cisco IOS software uses NVRAM to permanently store the routers configuration in the startup
config.
When you make changes to the Cisco router using the command line interface.
Those changes are made to the running config.
If you want to save those changes, you need to use commands such as copy running-config, startup-config
to copy the configuration from RAM to NVRAM or from the running-config to the Start-Up config.
Flash memory is nonvolatile computer memory and is used as the permanent storage for the operating system
and other files.
This is very similar to the hard drive or flash drive on PCs today
depending on the size of the flash, multiple copies of the Cisco iOS can be stored in flash.
Other files, such as Music on Hold, which is used in call managing express environments, can also
be stored in flash.
When a Cisco router boots up, it will copy the iOS software from Flash into RAM during the boot process
and then the CPU will execute the iOS.
Some very old models of Cisco routers, such as the 2500 ran the IOS from memory and Flash at the same
time
but these days the entire operating system is copying to RAM and is run from RAM in a similar way to
a hard drive or flash drive on a computer when the router is turned off
Flash memory doesn't lose its contents.
ROM is another form of permanent storage.
This memory contains MICRO code for basic functions to start and maintain the router and includes the
bootstrap code and power on self-test or post.
ROM also contains Rom Monitor or ROMMON, which is used for password recovery and for Router disaster
recovery functions.
ROM is nonvolatile, so the contents are maintained even when the router is turned off or rebooted.
The router also stores the IP routing table, this stores information about directly connected and remote
networks and is used to determine the best path to a local or remote
network. ARP caches are also used by the router and this contains the IPv4 address to MAC address
mappings, which is very similar to the ARP cache on a PC.
The ARP cache on routers is used on Ethernet interfaces and is used, for example, when the router pings
another device on the local subnet, the router will send out an ARP request and when it receives an
ARP response, that information is stored in the ARP cache.
Typically, however, it's populated when PCs are forwarding traffic through a router to a remote destination.
PCs will send an ARP request for their default gateway and the router will reply, and hence the ARP cache
will be populated.
Routers also have packet buffers when packets are received on interfaces they are stored in
buffers, they are also stored in buffers before they exit an interface.
As an example, if an interface is congested, the buffer of the outgoing interface will fill up with
packets in the queue to be processed out of that interface.
A router also has the configuration register, which is stored in NVRAM,
this is used to control how a router boots.
You could configure this value to get a router to boot into ROM MONITOR mode or to bypass the startup-config
config to do a password recovery and can be used for other functions, such as changing the speed of
the console
port. A router has multiple interfaces and may include an auxiliary port which is used in the past for
modem connections.
It'll have a console port.
It may have a USB interface, it may have serial interfaces,
FastEthernet interfaces, gigabit interfaces and may contain other components such as PVDM
which are used in voice environments for trans coding.
These have what are called DSP or digital signal processors to convert analog voice into a digital stream.
Various other types of interfaces and components may be found in routers, and even servers can be installed
in routers today.