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 :
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 SettingsYou 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:
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
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)
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:
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
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
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
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
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 MemoryTo 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 Filenamerouter# 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 Registerrouter# 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. |