Sunday, May 1, 2011

Configuration register

Configuration register
5.1.4
This page will explain how a router uses the configuration register. Students will also learn how to change the boot field.
The order in which the router looks for system bootstrap information depends on the boot field setting in the configuration register. The default configuration register setting can be changed with the global configuration mode command config-register. Use a hexadecimal number as the argument for this command.
The configuration register is a 16-bit register in NVRAM that is represented as 4 hexadecimal digits. The lowest four bits of the configuration register form the boot field. To ensure that the upper 12 bits are not changed, first use the show version command to retrieve the current values of the configuration register. Then use the config-register command and change only the value of the last hexadecimal digit.
To change the boot field in the configuration register, follow these guidelines: 
  • To enter the ROM monitor mode, set the configuration register value to 0xnnn0, where nnn represents the previous value of the non-boot field digits. This value sets the boot field bits to 0000 binary. After a reload or power cycle, the device will boot to ROM monitor prompt. Use the b command to boot the operating system manually.
  • To boot from the first image in Flash or to boot to the IOS in ROM (platform dependant), set the configuration register to 0xnnn1, where nnn represents the previous value of the non-boot field digits. This value sets the boot field bits to 0001 binary. Older platforms, such as Cisco 1600 and 2500 routers, will boot to a limited IOS in ROM. Newer platforms, such as Cisco 1700, 2600 and high end routers, will boot from the first image in Flash.
  • To configure the system to use the boot system commands in NVRAM, set the configuration register to any value from 0xnnn2 to 0xnnnF, where nnn represents the previous value of the non-boot field digits. These values set the boot field bits to a value between 0010 and 1111 binary. The router sequentially processes each boot system command in NVRAM until the process is successful or the end of the list is reached. If there are no boot system commands in the startup configuration file, the router attempts to boot the first file in flash memory.
The Lab Activity will require students to change the boot process of a router.
The next page will teach students how to troubleshoot IOS boot failures.

Using the boot system command

Using the boot system command
5.1.3
This page will explain how boot system commands are used to specify the fallback boot-up sequence for Cisco IOS software.
The three figures show boot system entries. These entries specify that a Cisco IOS software image will load first from flash memory, then from a network server, and finally from ROM:
  • Flash memory - A system image can be loaded from flash memory. Information stored in flash memory is not vulnerable to network failures that can occur when system images are loaded from TFTP servers. 
  • Network server - If flash memory is corrupted, a system image can be loaded from a TFTP server. 
  • ROM - The final bootstrap option is to boot from ROM. However, a system image in ROM is usually a subset of the Cisco IOS that lacks the protocols, features, and configurations of the full Cisco IOS. Also, if the software has been updated, a router may have an older version stored in ROM.  
The command copy running-config startup-config saves the commands in NVRAM. The router will execute the boot system commands as needed in the order in which they were originally entered into configuration mode.
In the Lab Activities, students will use boot system commands to display information about the Cisco IOS image and boot procedure of a router.
The next page will describe the router configuration register.

How a Cisco device locates and loads IOS

 How a Cisco device locates and loads IOS
5.1.2
The default source for Cisco IOS software depends on the hardware platform. Most routers use the boot system commands saved in NVRAM. Cisco IOS software allows several alternatives to be used. Other sources can be specified for the software, or the router can use its own fallback sequence to load the software.
The settings in the configuration register enable the following alternatives:
  • Global configuration mode boot system commands can be specified to enter fallback sources for a router to use in sequence. The router will use these commands as needed when it restarts.
  • If NVRAM lacks boot system commands that a router can use, the system will use the Cisco IOS software in flash memory by default.
  • If flash memory is empty, a router will try to use TFTP to load an IOS image from the network. The router will use the configuration register value to form a filename from which to boot a default system image that is stored on a network server.
  • If a TFTP server is unavailable, the router will load the limited version Cisco IOS software image stored in ROM.
The Interactive Media Activity will help students become familiar with the process a Cisco device uses to find and load IOS.
The next page will explain how boot system commands are used.