The Purpose of the Cisco Configuration Register
The configuration register can be used to change router behavior in several ways, such as:
- how the router boots (into ROMmon, NetBoot)
- options while booting (ignore configuration, disable boot messages)
- console speed (baud rate for a terminal emulation session)
The configuration register can be set from configuration mode using the config-register command. From ROMmon, use the confreg command.
Issue the show version command to view the current setting of the configuration register:
Router#show version
Cisco Internetwork Operating System Software
IOS ™ 2500 Software (C2500-JS-L), Version 12.1(5), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Wed 25-Oct-00 05:18 by cmong
.
.
cutting output
.
.
X.25 software, Version 3.0.0.
SuperLAT software (copyright 1990 by Meridian Technology Corp).
TN3270 Emulation software.
1 Token Ring/IEEE 802.5 interface(s)
2 Serial network interface(s)
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read ONLY)
Configuration register is 0x2102
The Cisco IOS Software Boot Sequence
Cisco routers perform the same types of tasks that a typical computer performs when
you power it on or reboot (reload) it. Most computers have a single operating system
(OS) installed, and that OS boots by default. However, a router can have multiple IOS
images available both in Flash memory and on external TFTP servers, so the router
needs to know which IOS image to load. This section examines the entire boot process,
with extra emphasis on the options that impact a router’s choice of what IOS image
to load.
When a router first powers on, it follows these four steps:
- The router performs a power-on self-test (POST) to discover the hardware components
and verify that all components work properly. - The router copies a bootstrap program from ROM into RAM, and runs the bootstrap
program. - The bootstrap program decides which IOS image (or other OS) to load into RAM, and
loads that OS. After loading the IOS image, the bootstrap program hands over
control of the router hardware to the newly loaded OS. - If the bootstrap program loaded IOS, IOS finds the configuration file (typically the
startup-config file in NVRAM) and loads it into RAM as the running-config.
All routers attempt all four steps each time that the router is powered on or reloaded. The
first two steps do not have any options to choose; these steps either work or the router
initialization fails.However, Steps 3 and 4 have several configurable options that tell the
router what to do next. Figure 13-7 depicts those options, referencing Steps 2 through 4
shown in the earlier boot process.
Loading the Cisco IOS
As you can see, the router can get the IOS image from three locations and can get the initial
configuration from three locations as well. Routers almost always load the
configuration from NVRAM (the startup-config file), when it exists. There is no real
advantage to storing the initial configuration anywhere else except NVRAM. So, this
chapter will not look further into the options of Step 4. However, there are good reasons
for putting multiple IOS images in Flash, and keeping images on external servers, so
the rest of this section examines Step 3 in more detail. In particular, the next few pages
explain a few facts about some alternate router operating systems besides IOS, and a
router feature called the configuration register, before showing how a router chooses which
IOS image to load.
How a Router Chooses Which OS to Load
A router chooses the OS to load based on the low-order 4 bits in the configuration register
and the details configured in any boot system global configuration commands found in
the startup-config file. The low-order 4 bits (the 4th hex digit) in the configuration register
are called the boot field, with the value of these bits being the first value a router examines
when choosing which OS to try and load. The boot field’s value when the router is powered
on or reloaded tells the router how to proceed with choosing which OS to load.
The process to choose which OS to load, on more modern routers that do not have
an RxBoot OS, happens as follows (note that “boot” refers to the boot field in the
configuration register):
- If boot field = 0, use the ROMMON OS.
- If boot field = 1, load the first IOS file found in Flash memory.
- If boot field = 2-F:
a. Try each boot system command in the startup-config file, in order, until one works.
b. If none of the boot system commands work, load the first IOS file found in Flash memory.
++++++++++++++++++++ table of configuration register values ++++++++++++++++++++++++++
Configuration Register Setting | Router Behavior |
0x102 |
|
0x1202 |
|
0x2101 |
|
0x2102 |
|
0x2120 |
|
0x2122 |
|
0x2124 |
|
0x2142 |
|
0x2902 |
|
0x2922 |
|
0x3122 |
|
0x3902 |
|
0x3922 |
|
++++++++++++++++++++++++ Bits table meaning ++++++++++++++++++++++++++++++++++++
Bit Number | Hex | Meaning |
00-03 | 0x0000-0x000F |
|
06 | 0x0040 |
|
06 | 0x0040 |
|
06 | 0x0040 |
|
07 | 0x0080 |
|
08 | 0x0100 |
|
10 | 0x0400 |
|
5,11,12 | 0x0020, 0x0800, 0x1000 |
|
13 | 0x2000 |
|
14 | 0x4000 |
|
15 | 0x8000 |
|