Cisco devices
hardware component and booting process
ROM
ROM contains
the necessary firmware to boot up your router and typically has the following
four components:
·
POST (power-on self-test) Performs
tests on the router's hardware components.
·
Bootstrap program Brings the router
up and determines how the IOS image and configuration files will be found and
loaded.
·
ROM Monitor (ROMMON mode) A
mini–operating system that allows you to perform low-level testing and
troubleshooting, the password recovery procedure,
·
Mini-IOS A stripped-down version of the
IOS that contains only IP code. This should be used in emergency situations
where the IOS image in flash can't be found and you want to boot up your router
and load in another IOS image. This stripped-down IOS is referred to as RXBOOT
mode.
RAM
RAM is like
the memory in your PC. On a router, it (in most cases) contains the running IOS
image; the active configuration file; any tables (including routing, ARP, CDP
neighbor, and other tables); and internal buffers for temporarily storing
information, such as interface input and output buffers. The IOS is responsible
for managing memory. When you turn off your router, everything in RAM is
erased.
Flash
Flash is a
form of nonvolatile memory in that when you turn the router off, the
information stored in flash is not lost. Routers store their IOS image in
flash, but other information can also be stored here. Note that some lower-end
Cisco routers actually run the IOS directly from flash (not RAM). Flash is
slower than RAM, a fact that can create performance issues.
NVRAM
NVRAM is like
flash in that its contents are not erased when you turn off your router. It is
slightly different, though, in that it uses a battery to maintain the
information when the Cisco device is turned off. Routers use NVRAM to store
their configuration files. In newer versions of the IOS, you can store more
than one configuration file here.
Router Boot up Process
A router
typically goes through five steps when booting up:
·
The router loads
and runs POST (located in ROM), testing its hardware components, including
memory and interfaces.
·
The bootstrap
program is loaded and executed.
·
The bootstrap
program finds and loads an IOS image: Possible locations: - flash, a TFTP
server, or the Mini-IOS in ROM.
·
Once the IOS is
loaded, the IOS attempts to find and load a configuration file, stored in NVRAM
·
After the
configuration is loaded, you are presented with the CLI interface. you are
placed into is User EXEC mode.
Setup Mode
Cisco devices
include a feature called Setup mode to help you make a basic initial
configuration. Setup mode will run only if there is no configuration file in
NVRAM—either because the router is brand-new, or because it has been erased.
Setup mode will ask you a series of questions and apply the configuration to
the device based on your answers. You can abort Setup mode by typing CTRL+C or
by saying "no" either when asked if you want to enter the initial
configuration dialog or when asked if you want to save the configuration at the
end of the question.
Configuration register
The
configuration register is a special register in the router that determines many
of its boot up and running options, including how the router finds the IOS
image and its configuration file. The configuration register is a
four-character hexadecimal value that can be changed to manipulate how the
router behaves at bootup. The default value is 0x2102.
The characters "0x" indicate that the characters that follow are in
hexadecimal. This makes it clear whether the value is "two thousand one
hundred and two" or, as in this case, "two one zero two
hexadecimal".
The fourth character in the configuration register is known as the boot field.
Changing the value for this character will have the following effects:
·
0x2100 = Always
boot to ROMMON.
·
0x2101 = Always
boot to RXBOOT.
·
0x2102 through
0x210F = Load the first valid IOS in flash; values of 2 through F for the
fourth character specify other IOS image files in flash.
The third
character in the configuration register can modify how the router loads the
configuration file. The setting of 0x2142 causes the router to ignore the
startup-config file in NVRAM (which is where the password is stored) and
proceed without a configuration—as if the router were brand new or had its
configuration erased.
How to reset Router password
The Password
Recovery process is simple and takes less than five minutes depending on how
fast your router boots
·
Connect to the
console port, start your terminal application, and power cycle the router. When
you see the boot process beginning, hit the Break sequence. (This is usually Ctrl+Page Break, but it might differ for different terminal applications.) Doing this
interrupts the boot process and drops the router into ROMMON.
·
At the ROMMON
prompt, enter the command confreg 0x2142 to set the
configuration register to 0x2142.
·
Restart the router
by power cycling it or by issuing the command reset.
·
When the router
reloads, the configuration register setting of 0x2142 instructs the router to
ignore the startup-config file in NVRAM. You will be asked if you want to go
through Setup mode because the router thinks it has no startup-configuration
file. Exit from Setup mode.
·
Press Return and
enable command enable to go into privileged EXEC command mode. No password is
required because the startup config file was not loaded.
·
Load the
configuration manually by entering copy startup-config running-config.
·
Go into the Global
Configuration mode using the command configure terminal and change the password
with the command enable
password password or enable secret password.
·
Save the new
password by entering copy running-config startup-config.
·
Go to the global
config prompt, and change the configuration register back to the default
setting with the command config-register 0x2102. Exit back to
the privileged exec prompt.
·
Reboot the router
using the reload command. You will be asked to save your changes; you can do so
if you have made additional configuration changes.
Reset password on 1841
System
Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
Cisco 1841
(revision 5.0) with 114688K/16384K bytes of memory.
Self
decompressing the image :
################
monitor:
command "boot" aborted due to user interrupt
rommon 1 >
confreg 0x2142
rommon 2 >
reset
System
Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
Cisco 1841
(revision 5.0) with 114688K/16384K bytes of memory.
Self
decompressing the image :
###############################################################
[OK]
Cisco IOS
Software, 1841 Software (C1841-ADVIPSERVICESK9-M),
Version 12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical
Support: http://www.cisco.com/techsupport
Copyright (c)
1986-2007 by Cisco Systems, Inc.
Compiled Wed
18-Jul-07 04:52 by pt_team
Image
text-base: 0x60080608, data-base: 0x6270CD50
Cisco 1841
(revision 5.0) with 114688K/16384K bytes of memory.
Processor board
ID FTX0947Z18E
M860 processor:
part number 0, mask 49
2
FastEthernet/IEEE 802.3 interface(s)
191K bytes of
NVRAM.
31360K bytes of
ATA CompactFlash (Read/Write)
Cisco IOS
Software, 1841 Software (C1841-ADVIPSERVICESK9-M),
Version 12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical
Support: http://www.cisco.com/techsupport
Copyright (c)
1986-2007 by Cisco Systems, Inc.
Compiled Wed
18-Jul-07 04:52 by pt_team
--- System Configuration Dialog ---
Continue with
configuration dialog? [yes/no]: no
Press RETURN to
get started!
Router>enable
Router#copy
startup-config running-config
Destination
filename [running-config]?
428 bytes
copied in 0.416 secs (1028 bytes/sec)
Router#configure
terminal
Enter configuration
commands, one per line. End with CNTL/Z.
Router(config)#enable
password abc123456789
Router(config)#enable
secret abc123456789
Router(config)#config-register
0x2102
Router(config)#exit
Router#copy
running-config startup-config
Destination
filename [startup-config]?
Building
configuration...
[OK]
Router#reload
Proceed with
reload? [confirm]