Password Recovery of a router

In this article I describe the password recovery of a 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 need to use the configuration resister to password recovery of a router. There are some easy commands to password recovery of a router which are required to run in the CLI of the router. We can do password recovery of a router by changing some values of 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. We do some changes in the configuration register or router to get access the router by password recovery of a router. 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 password recovery of a router.

In this article I brief you the password recovery of a router. We know that 5 types of passwords are setup in a router. It is possible that the password is lost by the administrator or user. We have to recover the password without change in startup-config or running-config file. Actually this process show you to change the password via ROMMON mode. We change the value of configuration register and change the password

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.

You may also like to read --  Link State Routing Protocols

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. 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.

You may also like to read --  Ping Command in Packet Tracer

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.

Steps for password recovery of a router

There are few steps for password recovery of a router. Firstly we enter into the ROMMON mode by pressing Break key during booting of router. We change the configuration register value from 0x2102 to 0x2142. We know that bit 6 of configuration register set to use the NVRAM for booting. After changing the value to 0x2142 reboot the router. The router will boot in normal mode and then we copy the startup-config to running-config. We got the privilege command mode of the router and then we can change the password. After changing the password set the configuration register value to 0x2102 default value. So follow the below steps for password recovery of a router.

Enter into ROMMON mode

We have a router whose hostname was ccnatutorials. To recover the password power on the router and press CTRL+Break key. By doing this you will got the ROMMON mode of router.

 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
 
 
 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 >  

Change the configuration register value

Now you are in ROMMON mode see the prompt above. After going in RMMON mode you have to change the configuration register value to 0x2142. To change the value see the below commands.

 rommon 1 > confreg 2142
 rommon 2 > reset
 Initializing Hardware ...
 
 System integrity status: 00000610
  at the end you will ask to change the configuration press n and enter
 
  --- System Configuration Dialog ---
  
 Would you like to enter the initial configuration dialog? [yes/no]: n
  Press RETURN to get started!
  Router> 

copy the startup-config to running-config

you can see the router is in user command mode and the hostname is changed to default hostname. Now we have to go on privilege command mode and copy the startup-config file to running-config file. Then we got the previous setup in startup-config file. See the commands below

 Router>
 Router>en
 Router#copy startup-config running-config  
 Destination filename [running-config]? [press enter key]
  
 570 bytes copied in 0.416 secs (1370 bytes/sec)
 ccnatutorials#
 %SYS-5-CONFIG_I: Configured from console by console
  ccnatutorials# 

Change the password

Now you can change the passwords by entering in global command mode see the below commands

 ccnatutorials(config)#enable secret ccna
 ccnatutorials(config)#end
 ccnatutorials#
 %SYS-5-CONFIG_I: Configured from console by console
 
 ccnatutorials#wr
 Building configuration...
 [OK]
 ccnatutorials# 

Change the configuration register value to 2102

Your password is changed. Now we have to change the configuration register value to default value 0x2102. After changing the configuration register value reboot the router and you will got full access to the router with hostname ccnatutorials see the below commands.

 ccnatutorials#
 ccnatutorials#config t
 Enter configuration commands, one per line. End with CNTL/Z.
 ccnatutorials(config)#config-register 2102
 ccnatutorials(config)#do wr
 Building configuration...
 [OK]
 ccnatutorials(config)#exit
 ccnatutorials# 

The configuration register value is changed successfully to 2102. Now we need to reboot the router then we will got the prompt with old hostname ccnatutorials. See the below scenario.

 Press RETURN to get started!
 
 ccnatutorials>en
 Password:  
 ccnatutorials#
 ccnatutorials# 

Now you can access the privilege mode by entering the password which was earlier setup. I set up password ccna and got the privilege mode.

You may also like to read --  On Premise Networking Concepts for CCNA:

I describe the password recovery of a router in this article. I hope this article may be helpful to you. 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 :)
, ,

11 thoughts on “Password Recovery of a router

  1. 1. power off and then ON
    2. For Boot ctrl+pause
    3. Rommon>confreg 0x2142
    Rommon>reset

    R(config)#config-register 0x2102
    R(config)#exit
    R#sh version

  2. Y᧐u’re so intеresting! I do not suppose I have read something like that before.
    S᧐ wonderful to find another ρerson with some genuine thouɡhts on this subject.
    Really.. many thanks for starting this up. This website is one thing that is
    neeԁed on the web, someone with some ⲟriginality!

  3. Oһ my goodness! Amazing аrticle duɗe! Ꮇany thanks, Howevеr
    I am going through difficulties with your RSS. I don’t know the reason why I cannot ѕubscribe tߋ it.
    Is there аnybody else getting identical RSS issues? Anyone who knows the solսtion can you kindly reѕpond?
    Thanks!!

  4. Hello juѕt wanted to give you a brief heads uρ and let you know a
    few of the pictuгes arеn’t loading correctly. I’m not
    sure wһy but I think its a linking issue.
    I’ve tried it in two different broѡѕers and both show the same results.

  5. This is νery interesting, You ɑre ɑn excessively sқilled blogger.
    I have joined your rss feed and look forward to in quest of more of your fantastіc post.
    Also, I have shared your weƅsite in my social networks

  6. Hello, I think your site miցht be having
    browser compatibilitу issues. When I look at your Ьlog site in Chrоme, it looks fine but ԝhen opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heaԁs up! Other then that, exсellent
    ƅlog!

  7. Hmm is anyone elsе encountering proЬlems with the images on this blⲟg loading?
    І’m trying to find oսt if its a prоblem
    on my end or if it’ѕ the blog. Any feed-back would be ɡreatly appreⅽiated.

  8. Helpful info. Lcky me I discovered your site by chance, and I am surprised why thnis
    coincidence didn’t came about earlier! I bookmarked it.

  9. Ηave you ever thought about adding a little bit
    more than just youг articles? I mean, what yօu say is fundamental and everүthing.
    Hoѡever think аƄout if you added some great images or videos to
    gіve your posts more, “pop”! Your content is excellent but with іmages and videos, this site could certainly be one of the very best in its field.

    Amazing blog!

  10. It’s fantastіc that you are getting thougһts from this post
    as well as from our discussion mаde at this time.

Leave a Reply

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