Configuration Register in Cisco router

In this article I describe the configuration register in Cisco router for CCNA exam. configuration register in Cisco router is a type of setting which stores some specific data like password and other secret data of the router. We can recover the password of a Cisco router by using the configuration register in Cisco router. The configuration register in Cisco router controls the booting sequence of the router. Basically configuration register in Cisco router is a 16 bit software register stored in NVRAM of Cisco router.

Configure register in Cisco router is responsible to load the IOS from various memories of router. By default the configuration register in Cisco router load the IOS from Flash memory and startup-config file from NVRAM. User can change the setting of configuration register as per requirement. Configuration register also used for password recovery in a Cisco router. It may be good to know about the memory types used in router alongwith the configuration register in Cisco router.

RAM

RAM is an acronym that stands for Random Access Memory. RAM of a router works like RAM of a computer. RAM is a volatile memory so it needs power all time. Router loads the IOS and the configuration file in RAM when the router is power on or reboot. It store the data like routing table and running config files. Data transfer speed of RAM of router is very fast. The running configuration remain save in the RAM or router until the power is available. Later these settings can be copied to start up configuration for future use. RAM stores data in power on condition of router. All data in RAM erased automatically if router is power off. The size of RAM in router is generally in MB. The size may be 16 MB, 32 MB.

RAM of a router keep the running configuration file, routing table and other information related to the interfaces of the router. When we works on CLI of a router actually we are working in the RAM of router. To take the back up configuration of Router, We need to copy the running configuration into startup configuration to save the current settings of the router. The startup configuration saved in the NVRAM which can be used later after rebooting the router.

ROM

ROM is acronym that stands for Read Only Memory. Data on ROM is write once only. After writing the data on ROM router can read the data but can not change it. ROM stores the bootstrap of IOS which is responsible to boot the router. Bootstrap find the IOS image file and run the IOS in RAM of router. ROM keep the instructions for POST process when router is power ON. ROM is chip on motherboard and it is programmed once only.

You may also like to read --  Back up configuration of Router

ROM is just like the BIOS system of the computer. The booting process starts from the ROM of the router. ROM is a non volatile memory which does not require any power all the time to keep save the information in it. We can not do any changes in the ROM of a router. The settings of ROM configured by the firm so it is generally known as a firmware. The another internal component of router is NVRAM which is very similar to the ROM.

NVRAM

NVRAM keep the startup configuration file which is a backup copy of the running configuration. For back up configuration of Router we need to copy the running configuration to the startup configuration. Every time when the router power on the settings of startup configuration loaded into the RAM of the router. NVRAM is also a non volatile memory similar to ROM. In switches NVRAM stores the information of VLANs. When we configure VLAN in a switch the VLAN configuration saved into the NVRAM memory of the switch. NVRAM stands for Nonvolatile Random Access Memory.

NVRAM is like RAM but it is non volatile memory. It means NVRAM stores the data after power of the router. NVRAM stores the startup config file. Startup config file contains the routing table and other configuration which was copied from a running config file. The difference between NVRAM and ROM is that the content of ROM can not be changed but the content of NVRAM is changeable. When router is power on it search the startup config file in NVRAM only.

Flash Memory

Flash memory is a kind of EEPROM. EEPROM stands for Electrically Erasable Programmable Read-Only Memory. The content of Flash memory can not be change like ROM. Flash memory stores the IOS image. The data of Flash memory remain unchanged when the router is reboot or power off. We can say the operating system of router IOS saved in the flash memory. Every time when a router is power on the IOS loaded into the RAM from the Flash memory. The IOS checks all the interface of router when loaded first time in the RAM. To know all the functions or internal component of router you can read the full article related to booting sequence here.

You may also like to read --  Setting Up Inter VLAN Routing on a Layer 3 Switch

Configuration Register bits explained

The configuration register is consist 16 bit or we can say 2 bytes. We take the default value of configuration register, it is 0x2102. I will explain here which bits are on for value 0x2102. 0X represents the value is in hexadecimal format. Hexadecimal format contains number and figure 0 to 9 and A to F. A represents 10, B represents 11 so on F represents 15. each digit of hexa value is made of four bits which are known as nibble. See the below table which describe the hexadecimal to decimal and binary value.

Configuration Register in Cisco router, ccna, ccna tutorials

0x2102 represents a hexadecimal number 2102 we can change it into binary by converting each digit into 4 bit. I mean 2 is equal to 0010, 1 is equal to 0001 so we can write the number 2102 as 0010 0001 0000 0010. We can see the bits placed at 13, 8 and 1 are on and remaining bits are off count from right to left.

Configuration Register in Cisco router, ccna, ccna tutorials

I hope you understand well the value of 0x2102 configuration register in cisco router.

Boot field in configuration register

Boot field consist the first four bits 0 to 3. These bits control the router boot sequence and find the IOS Image in various memories of Cisco router. In below table you can see the different values of Boot field in below table

Configuration Register in Cisco router, ccna, ccna tutorials

Function of each bit of configuration register

Each bit of configuration register responsible for particular task. You can change the configuration bits as you desire to boot the router by default. Below table shown the value of each digit and the function of each bit.

Configuration Register in Cisco router, ccna, ccna tutorials

Change in configuration register value

you can check the current configuration register value by running show version command. At the end you will see the configuration register value. By default it is 0x2102. Now i am going to change the value to 2100 so the router starts in ROMMON mode on next boot. See the below command

You may also like to read --  Default Routing in router

command to check the configuration register value

 ccnatutorials#show ver | begin configura
 32768K bytes of non-volatile configuration memory.
 4194304K bytes of physical memory.
 3223551K bytes of flash memory at bootflash:.
 

 Configuration register is 0x2102
 ccnatutorials#

command to change the value of configuration register value to ROMMON mode

 ccnatutorials#
 ccnatutorials#config t
 Enter configuration commands, one per line.  End with CNTL/Z.
 ccnatutorials(config)#config-register 2100
 ccnatutorials(config)#do wr
 Building configuration...
 [OK]
 ccnatutorials(config)#end
 ccnatutorials#
 %SYS-5-CONFIG_I: Configured from console by console
 ccnatutorials#

Now check the version by running show version command you will got a message that the value of configuration register will change in next reload see the example below

 ccnatutorials#show version | begin configuration
 32768K bytes of non-volatile configuration memory.
 4194304K bytes of physical memory.
 3223551K bytes of flash memory at bootflash:.
 
 Configuration register is 0x2102 (will be 0x2100 at next reload)
 ccnatutorials#

On next start up you can see the below changes. You will got the ROMMON mode on startup next time.

 ccnatutorials#Initializing Hardware ...
 
 System integrity status: 00000610
 Rom image verified correctly
  System Bootstrap, Version 15.4(3r)S5, RELEASE SOFTWARE
 Copyright (c) 1994-2015  by cisco Systems, Inc.
  Current image running: Boot ROM0
  Last reset cause: LocalSoft
 Cisco ISR4321/K9 platform with 4194304 Kbytes of main memory
  no valid BOOT image found
 Final autoboot attempt from default boot device...
 File size is 0x1d0580a0
 Located isr4300-universalk9.03.16.05.S.155-3.S5-ext.SPA.bin
 Image size 486899872 inode num 12, bks cnt 102567 blk size 8*512
 rommon 1 > 

Revert the default ROMMON mode to user mode. Change the configuration register value from 2100 to 2142. see the below command to revert the ROMMON mode to user mode in next startup. All the previous configuration will be erased after running the below commands.

 rommon 1 > confreg 0x2142
 rommon 2 > reset
 Initializing Hardware ...

at the end 
 --- System Configuration Dialog ---
 

 Would you like to enter the initial configuration dialog? [yes/no]: n
 Press RETURN to get started!
Router>

I hope this article may be helpful to you. You understood the configuration register in cisco router. For any query or suggestion on this article you may contact us or drop a comment below. Your suggestions are always welcome by us.

Share this article in your social circle :)
, ,

2 thoughts on “Configuration Register in Cisco router

  1. Aw, this was an exceptionally good post. Taking the time and actual effort to produce a great article… but what can I say… I put things off a whole lot and don’t manage to get nearly anything done.

Leave a Reply

Your email address will not be published. Required fields are marked *