The Virtual Configuration Register


When a router boots, the virtual configuration register is checked to determine many boot parameters, including what mode to enter upon booting, where to get the software image, and how to deal with the configuration file in NVRAM.

The virtual configuration register is a 16-bit register stored in a special section of NVRAM separate from the startup configuration file. The parameters specified control many of the booting and low-level code functions, such as the console port baud rate, the loading operation of the software, enabling or disabling the Break key during normal operations, controlling the default broadcast address, and setting a boot source for the router. You display the configuration register by typing the command show version or show hardware.

Typically, the factory default for the configuration register is 0x2102 (hexadecimal value). Each number in the hexadecimal value represents 4 bits of the configuration register. The configuration register bits are numbered 0 to 15, inclusive, with 0 being the low-order (far-right) bit. If you translate the configuration register into binary, the value 0x2102 is as follows :

0010 0001 0000 0010

The bits are numbered 0 to 15, starting with the rightmost bit. Thus, bits 1, 8, and 13 would be on in this setting. All other bits would be off. Table E-1 later in this appendix lists the meaning of each of the virtual configuration register bits.

Changing the Virtual Configuration Register Settings

You can change the configuration register settings through the Cisco IOS Software or in ROM monitor mode. Some common reasons to modify the value of the virtual configuration register include recovering a lost password, changing the console baud rate, and enabling or disabling the break function. Another reason for modifying the value of the virtual configuration register might be to control the boot process.

NOTE

If the router finds no boot system commands, and there are no images in Flash memory, the router uses the netboot value in the configuration register to form a filename from which to netboot a default system image stored on a network server via TFTP (see Table E-3).


To change the configuration register while running the system Cisco IOS Software, follow these steps:

Step 1. Enter the enable command and your password to enter the privileged level, as follows:

 router>  enable  Password:      router# 
Step 2. At the privileged-level system prompt ( router# ), enter the configure terminal command. You are prompted as follows:

 router#  configure terminal  Enter configuration commands, one per line.      Edit with DELETE, CTRL/W, and CTRL/U; end with CTRL/Z Router(config)# 
Step 3. To set the contents of the configuration register, enter the config-register value configuration command, where value is a hexadecimal number preceded by 0x (see Table E-1), as in the following:

 Router(config)#  config-register 0x2102  
Step 4. Exit configuration mode by pressing Ctrl-Z. The new value settings are written into the virtual configuration register; however, the new settings do not take effect until the system software is reloaded when you reboot the router.

Step 5. To display the configuration register value currently in effect and the value that will be used at the next reload, enter the show version EXEC command. The value is displayed on the last line of the screen display, as follows:

 Configuration register is 0x2142 (will be 0x2102 at next reload) 

NOTE

Although this appendix discusses the concept of the virtual configuration register, not all routers have identical settings. For example, the filenames listed in Table E-3 differ between platforms. On some routers, an additional bit (see Table E-6) is used for console speed to allow higher speeds. For more detailed information about your specific hardware, check your Documentation CD or CCO.


Table E-1. Common Virtual Configuration Register Bit Meanings
Bit Number(s) Hexadecimal Value Meaning
00 to 03 0x0000 to 0xl000F Boot field (see Table E-2).
04 0x0010 Undefined.
05 0x0020 Undefined or console speed. Platform-dependent; see Table E-6.
06 0x0040 Causes system software to ignore NVRAM contents.
07 0x0080 OEM bit enabled.
08 0x0100 Break disabled.
09 0x0200 Undefined.
10 0x0400 IP broadcast with all 0s if bit is on. This works with bit 14, as shown in Table E-4.
11 to 12 0x0800 to 0x1800 Console line speed. See Tables E-5 and E-6.
13 0x2000 Boots the default ROM software if the network boot fails.
14 0x4000 IP broadcasts do not have net numbers . This value works with bit 10, as shown in Table E-4.
15 0x8000 Enables diagnostic messages and ignores NVRAM contents.

CAUTION

To avoid confusion and possibly hanging the router, remember that valid configuration register settings might be combinations of settings and not just the individual settings listed in Table E-1. For example, the factory default value of 0x2102 is a combination of settings.


Table E-2. Explanation of the Boot Field (Configuration Register Bits 00 to 03)
Boot Field Meaning
0x0 Upon boot, this setting directs the router to enter ROM Monitor mode.
0x1 Upon boot, this setting allows the router to boot from the image in ROM. This is also known as Boot mode.
0x2 to 0xF Specifies a default netboot filename. May enable boot system commands that override the default netboot filename.

The lowest 4 bits of the virtual configuration register (bits 3, 2, 1, and 0) form the boot field. (See Table E-2.) The boot field specifies a number in binary. If you set the boot field value to 0, you must boot the operating system manually by entering the b command at the boot prompt, as follows:

 >  b  [  tftp  ]  flash   filename  

Definitions of the various b command options follow:

  • b ” Boots the default system software from ROM.

  • b flash ” Boots the first file in Flash memory.

  • b filename host Allows you to boot using the TFTP server specified by the host option.

  • b flash filename Boots the file (filename) from Flash memory.

If you set the boot field value to be in the range of 0x2 through 0xF, and a valid boot system command is stored in the configuration file, the router boots using the boot system commands in the configuration or the first valid IOS file in Flash if there are no boot system commands. If you set the boot field to any other bit pattern, the router uses the resulting number to form a default boot filename for netbooting. (See Table E-3.)

The router creates a default boot filename as part of the automatic configuration processes. To form the boot filename, the router starts with Cisco and links the octal equivalent of the boot field number, a dash, and the processor-type name . Table E-3 lists the default boot filenames or actions for the 2500 series routers.

Table E-3. Default Boot Filenames
Action/Filename Bit 3 Bit 2 Bit 1 Bit 0
Bootstrap mode
ROM software 1
Cisco2-igs 1
Cisco3-igs 1 1
Cisco4-igs 1
Cisco5-igs 1 1
Cisco6-igs 1 1
cisco7-igs 1 1 1
cisco10-igs 1
cisco11-igs 1 1
cisco12-igs 1 1
cisco13-igs 1 1 1
cisco14-igs 1 1
cisco15-igs 1 1 1
cisco16-igs 1 1 1
cisco17-igs 1 1 1 1

NOTE

A valid boot system configuration command in the router configuration in NVRAM overrides the default netboot filename.


In Example E-1, the virtual configuration register is set to boot the router from Flash memory and to ignore Break at the router's next reboot.

Example E-1 Setting the Configuration Register to Boot from Flash
 router#  configure terminal  Enter configuration commands, one per line. Edit with DELETE, CTRL/W, and CTRL/U; end with CTRL/Z config-register 0x2102 boot system flash [filename] ^Z router# 

Whereas the lower 4 bits of this register control the boot characteristics, other bits control other functions. Bit 8 controls the console Break key. Setting bit 8 (the factory default) causes the processor to ignore the console Break key. Clearing bit 8 causes the processor to interpret the Break key as a command to force the system into the ROM monitor, thereby halting normal operation. A break issued in the first 60 seconds while the system reboots affects the router, regardless of the configuration settings. After the initial 60 seconds, a break works only if bit 8 is set to 0.

Bit 10 controls the host portion of the Internet broadcast address. Setting bit 10 causes the processor to use all 0s; clearing bit 10 (the factory default) causes the processor to use all 1s. Bit 10 interacts with bit 14, which controls the network and subnet portions of the broadcast address. Table E-4 shows the combined effect of bits 10 and 14.

Table E-4. Configuration Register Settings for the IP Broadcast Address Destination
Bit 14 Bit 10 Address (<net> <host>)
Off Off <1s> <1s>
Off On <0s> <0s>
On On <net> <0s>
On Off <net> <1s>

Bits 11 and 12 in the configuration register determine the baud rate of the console terminal.

Table E-5 shows the bit settings for the four available baud rates. (The factory-set default baud rate is 9600.)

Table E-5. System Console Terminal Baud Rate Settings
Baud Bit 12 Bit 11
9600
4800 1
1200 1
2400 1 1

For some devices, such as the 2600 and 3600 series routers, Bit 5 also defines the console port speed. Table E-6 shows the bit settings for the available baud rates. (The factory-set default baud rate is 9600.)

Table E-6. System Console Terminal Baud Rate Settings for 2600 and 3600 Series Routers
Baud Bit 5 Bit 12 Bit 11
115200 1 1 1
57600 1 1
38400 1 1
19200 1
9600
4800 1
1200 1
2400 1 1

Bit 13 determines the router response to a bootload failure. Setting bit 13 causes the router to load operating software from ROM after five unsuccessful attempts to load a boot file from the network. Clearing bit 13 causes the router to keep trying to load a boot file from the network indefinitely. By factory default, bit 13 is set to 1.

Enabling Booting from Flash Memory

To enable booting from Flash memory, set configuration register bits 3, 2, 1, and 0 to a value between 2 and F in conjunction with the boot system flash filename configuration command. The actual value of 2 to F is not really relevant here; it serves only to tell the router not to boot from its ROM IOS image.

While in the system Cisco IOS Software image, enter the configure terminal command at the privileged-level system prompt and specify a Flash filename to boot from, as demonstrated in Example E-2.

Example E-2 Specifying a Flash Filename
 router#  configure terminal  Enter configuration commands, one per line. Edit with DELETE, CTRL/W, and CTRL/U; end with CTRL/Z Router(config)#  boot system flash  [filename] 

To disable break and allow the router to boot from Flash, enter the config-register command with the value shown in Example E-3.

Example E-3 Setting the Default Configuration Register
 router#  configure terminal  Enter configuration commands, one per line. Edit with DELETE, CTRL/W, and CTRL/U; end with CTRL/Z Router(config)#  config-reg 0x2102  ^Z router# 

It is important to realize that the configuration register is a virtual register that is configured in a special portion of NVRAM. When you change the register, it is automatically saved into that portion of NVRAM, but it is implemented only during the next router reload. If you make this change, it is not necessary to copy the configuration to NVRAM. If you reload a router after you have entered configuration mode without a save, however, you are prompted to save the configuration. A save is necessary only if you have made other changes to the configuration.

The virtual configuration register is an integral part of a router's configuration and basic operation. Understanding how it works and what each bit does is important to the router's operation and configuration.



Cisco Field Manual[c] Router Configuration
Cisco Field Manual[c] Router Configuration
ISBN: 1587050242
EAN: N/A
Year: 2005
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net