Router follows a boot sequence to bring it up. Knowing this sequence will help you in managing this device easily.
the main components of a Cisco router and how the boot process takes place.
Types of memory
Generally Cisco routers (and switches) contain four types of memory:
Read-Only Memory (ROM): ROM stores the router’s bootstrap startup program, operating system software, and power-on diagnostic test programs (POST).
Flash Memory: Generally referred to simply as “flash”, the IOS images are held here. Flash is erasable and reprogrammable ROM. Flash memory content is retained by the router on reload.
Random-Access Memory (RAM): Stores operational information such as routing tables and the running configuration file. RAM contents are lost when the router is powered down or reloaded.
Non-volatile RAM (NVRAM): NVRAM holds the router’s startup configuration file. NVRAM contents are not lost when the router is powered down or reloaded.
Some comparisons to help you remember easier:
- RAM is a volatile memory so contents are lost on reload, where NVRAM and Flash contents are not.
- NVRAM holds the startup configuration file, where RAM holds the running configuration file.
- ROM contains a bootstrap program called ROM Monitor (or ROMmon). When a router is powered on, the bootstrap runs a hardware diagnostic called POST (Power-On Self Test).
The boot sequence consists of the following steps:
- Router is powered on.
- Power on self test (POST) is performed to check hardware components including memory and interfaces.
- Bootstrap program is loaded and executed.
- Bootstrap reads configuration register value to determine how the router will boot up.
- Depending on the value of configuration register, bootstrap program finds and loads the IOS image.
- If bootstrap fails to load IOS from all possible locations it will drop boot sequence in ROMMON mode for troubleshooting.
- If IOS is loaded, the IOS will try to find and load the configuration.
- If configuration is not presented, system configuration dialog would be launched.
- If configuration is loaded, you would be presented in CLI interface.
Configuration register value
Configuration register value is a special register that is used to control the booting process. You can check current configuration register value with “show version” command from exec mode .
- It is a four characters hexadecimal value, that can be changed from privileged mode.
- Default value is 0x2102.
- “0x” indicates that the characters that follow are in hexadecimal.
- The third character in the configuration register can modify how the router loads the configuration file.
- The fourth character in the configuration register is known as the boot field. Changing this value, will change booting process.
- Setting of 0x2100 will always boot router in ROMMON mode.
- Setting of 0x2101 will always boot router in RXBOOT mode.
- Setting of 0x2102 to 0x210F will always load first valid IOS from flash.
- values of 2 through F for the fourth character specify other IOS image files in flash.
- Router keeps password in startup-config file that is stored in NVRAM.
- The setting of 0x2142 causes the router to ignore the startup-config file in NVRAM and proceed without a configuration. Thus the setting of 0x2142 is used for password recovery process of router.