cisco hands-on experience


Cisco Configuration Register

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.

N
O
T
E
The boot sequence details in this section, particularly those regarding theconfiguration register and the ROMMON OS, differ from Cisco LAN switches, but they do apply to most every model of Cisco router. This book does not cover the equivalent options in Cisco switches.

When a router first powers on, it follows these four steps:

  1. The router performs a power-on self-test (POST) to discover the hardware components
    and verify that all components work properly.
  2. The router copies a bootstrap program from ROM into RAM, and runs the bootstrap
    program.
  3. 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.
  4. 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):

  1. If boot field = 0, use the ROMMON OS.
  2. If boot field = 1, load the first IOS file found in Flash memory.
  3. 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
  • Ignores break
  • 9600 console baud
0x1202
  • 1200 baud rate
0x2101
  • Boots into bootstrap
  • Ignores break
  • Boots into ROM if initial boot fails
  • 9600 console baud rate
0x2102
  • Ignores break
  • Boots into ROM if initial boot fails
  • 9600 console baud rate default value for most platforms
0x2120
  • Boots into ROMmon
  • 19200 console speed
0x2122
  • Ignores break
  • Boots into ROM if initial boot fails
  • 19200 console baud rate
0x2124
  • NetBoot
  • Ignores break
  • Boots into ROM if initial boot fails
  • 19200 console speed
0x2142
  • Ignores break
  • Boots into ROM if initial boot fails
  • 9600 console baud rate
  • Ignores the contents of Non-Volatile RAM (NVRAM) (ignores configuration)
0x2902
  • Ignores break
  • Boots into ROM if initial boot fails
  • 4800 console baud rate
0x2922
  • Ignores break
  • Boots into ROM if initial boot fails
  • 38400 console baud rate
0x3122
  • Ignores break
  • Boots into ROM if initial boot fails
  • 57600 console baud rate
0x3902
  • Ignores break
  • Boots into ROM if initial boot fails
  • 2400 console baud rate
0x3922
  • Ignores break
  • Boots into ROM if initial boot fails
  • 115200 console baud rate

++++++++++++++++++++++++ Bits table meaning ++++++++++++++++++++++++++++++++++++

Bit Number Hex Meaning
00-03 0x0000-0x000F
    Boots Field Parameters:

  • 0x0000 – Stays at the system bootstrap prompt
  • 0x0001 – Boots the first system image in onboard Flash memory (EPROM).
  • 0x0002-0x000F- Specifies a default netboot filename. Enables boot system commands that override the default netboot filename.
06 0x0040
  • Ignore NVRAM contents
06 0x0040
  • Ignore NVRAM contents
06 0x0040
  • Ignore NVRAM contents
07 0x0080
  • Disable boot messages
08 0x0100
  • Break disabled
10 0x0400
  • IP broadcast with all zeros
5,11,12 0x0020, 0x0800, 0x1000
  • Console line speed
13 0x2000
  • Boots default ROM software if network boot fails
14 0x4000
  • IP broadcasts do not have net numbers
15 0x8000
  • Enables diagnostic messages
  • Ignores NVRAM contents

Leave a Reply

*

captcha *