Cisco router boot process and password reset

Source: Internet
Author: User
Tags lost password cisco 2811

One, the internal components of the Cisco router

In order to configure, Cisco Internetwork and troubleshoot, we must first understand the major components of the Cisco routers and understand these components

The respective function.

Table 7-1 gives a description of the major components of the Cisco router.

The micro-code that the bootstrapper stores in ROM, the main function is to start it when the router initializes. The bootloader starts the router and loads the 10S

post (POST) micro-code stored in ROM to detect the basic functionality of the router's hardware and determine which interfaces are available at that time

ROM monitor Micro code stored in ROM for manufacturing, testing and troubleshooting

Micro iOS is known as the rxboot or boot loader by Cisco and is a small 10S storage in ROM. Used to start a

interface and load Cisco IOS into flash memory. Micro iOS can also be used to perform some other maintenance operations


RAM (Random access memory) is used to store packet caches, ARP caches, routing tables, and the software and data structures required for the router to run. The run configuration is saved in RAM, and most routers are loaded at boot 108 from the Flash and released to RAM to run the

ROM (read-only memory) is used to start and maintain the normal operation of the router. Its main function is to save p08t, boot programs, and micro iOS

The Flash default saves the router's port SCO IOS. The contents of the flash memory are not erased when the router restarts. It is an EEPROM developed by Intel (electronically erasable Programmable read-only Memory,

Electrically erasable programmable read-only memory)

NVRAM (non-volatile RAM) is used to store the configuration contents of routers and switches. The contents of the NVRAM are not lost with the router or switch restart. NVRAM cannot save iOS, configuration registers are stored in NVRAM

Configuration register (config register)

Used to control how the router is started. The value of the configuration register is given in the final-line content of the show version command output, which is typically Ox2102, which means that the router needs to load iOS from the flash and load the configuration from the NVRAM


Second, the boot sequence of the router

When the router starts, it needs to perform a series of operations, the so-called Boot sequence (boot sequence), which is designed to test

Hardware and load the required software. The boot sequence includes the following steps.

(1) The router performs post (POST) 0 post will check the hardware to verify that all components of the device are currently operational.

For example, the POST examines the different interfaces of the router, respectively. The POST is saved in ROM (read-only memory) and runs from ROM.

(2) After that, the bootloader will find and load the Cisco IOS software. The bootstrapper is saved in ROM and is used to execute the program. Guide

The program is responsible for finding where each iOS program is stored and then loading the file. By default, all Cisco routers will first

Load the iOS software from the question store.

(3) The IOS software will look for a valid profile in NVRAM. This file is called a boot configuration (startup-config) and only

Occurs when an administrator copies a run configuration file into the NVRAM. (A small boot is preset in the new ISR router

Configuration file. )

(4) If a boot profile is found in NVRAM, the router copies the file into RAM and calls it a running

Reset The router will use this file to run the router. The router will go into a normal state of operation. If not found in NVRAM

Starting the configuration file, the router will send a broadcast on all the interfaces that are available for CD (Carrier detect, carrier detection) to find the configuration file that the TFTP host can use, if not found (this lookup will not normally succeed, and most people will not even

The router has made such an attempt), the router will go into setup mode for configuration.


Third, Management configuration register

All Cisco routers have a 16-bit software-programmable register written to the NVRAM. By default, the direct register is set to load the Cisco 10S from flash memory, and the boot configuration file is found and loaded in NVRAM. The configuration park is discussed below

Settings and how to use these settings to restore the router's password.

1. Understanding the bits of the configuration register

The value of this 16-bit (2B) configuration register is read from 15 to 0, that is, in order from left to right. Cisco Routing

The default configuration setting on the device is 0x2102. This means that the 13th, 8th, and 1th bits are set to 1, as shown in table 7-2. Note that every

The binary values corresponding to bits in a 4-bit group (called a half-byte) are 8, 4, 2, 1, respectively.

Configuration Register 2 1 0 2

Bit value 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Binary 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0


Meaning of the software configuration bit

0-3 oxoooo-oxooof startup field (see table 7-4)

6 Ox0040 Ignore NVRAM content

7 Ox0080 Enable OEM bits

8 Ox101 Disable interrupts

Ten Ox0400 e broadcast all zeros

5, 11-12 Ox0800-ox1 000 console line rate

0x2000 if the network boot fails, start the default ROM software

Ox4000 IP broadcasts that do not use network numbers

Ox8000 Enable diagnostic information and ignore NVRAM content

The 0-3-bit in the configuration register is the so-called startup field that controls how the router is started. Table 7-4 describes the startup fields

The meanings and effects of different bit values.

Startup field (00-03 bits of configuration register)

Start field meaning function

Video ROM monitor mode if you want to start the ROM monitor mode, we can set the configuration register

The value is set to 2100. We must manually start the route using the B command

Manager After booting, the router will be rommon> as a prompt

01 booting from ROM if you want to use a micro iOS boot router saved in ROM, I

We need to set the configuration register to 2101. After booting, the router

will be at router (boot) > as a prompt

02-F specifies that the default startup file sets the configuration register to any value in 2102-210f, which is

Require the router to use the start command specified in NVRAM

Check the value in the current configuration register

Using the command show version (SH version or Show ver), we can view the configuration register in the

The current value is as follows:

Router>sh version

Cisco 2811 (MPC860) Processor (revision 0x200) with 60416k/5120k bytes of memory

Processor Board ID Jad05190mtz (4292891495)

M860 processor:part number 0, mask 49

2 Fastethernet/ieee 802.3 interface (s)

2 low-speed serial (Sync/async) network interface (s)

239K bytes of NVRAM.

62720K bytes of processor board System Flash (read/write)


Configuration Register is 0x2102


This command gives the last part of the message that is the value in the current configuration register. In this example, the value is 0x2 102, which is the default setting

Reset Setting the value of the configuration register to 0x2102 requires the router to look for a boot configuration in NVRAM.

Note that the show version command also provides iOS version information.


Four, password recovery

If you forget the login password of the router and are therefore denied access by the router, then we can change the value of the configuration register to

Restores normal access to the router. As described earlier, the sixth bit in the configuration register is used to tell the router whether to add a

Download the configuration file stored in NVRAM.

The default value for the router configuration register is Ox2102, which indicates that its sixth bit is off (with a value of 0). The default setting requires the path

The device finds and loads the router configuration stored in the NVRAM (boot configuration file). If you want to recover a lost password,

Then we need to turn on the 6th bit and explicitly tell the router not to load the configuration stored in the NVRAM. After placing the sixth position 1,

The value of the configuration register is 0x2 142.


1. Start the router and press the Ctrl+break key within 60 seconds.

2, Rommon>confreg 0x2142//Modify the Register value, the router's NVRAM configuration file is ignored at startup, directly call the factory configuration

3, Rommon>reset//Restart router

4, Router#copy startup-config running-config//This time the configuration is factory configuration, stored in the NVRAM inside the configuration in the end of the RAM password modification

5, Router (config) #no enable secrect//can delete the password can also be changed, here for deletion

6, Router (config-line) #no enable password//can delete the password can also be changed, here for deletion

7, Router (config-line) Config-register 0x2102//Modify register value, call the router's NVRAM configuration file at startup

8, Router#write//Note save

9, Router#reload


This article is from the "Autumn Fairy tale" blog, please be sure to keep this source http://wushank.blog.51cto.com/3489095/1628955

Cisco router boot process and password reset

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.