Sunday, May 1, 2011

Managing the Cisco File System / IOS file system overview

Managing the Cisco File System
IOS file system overview
5.2.1
This page will introduce the Cisco IOS File System.
Routers and switches depend on software for their operation. The two types of software required are operating systems and configuration.
The operating system used in almost all Cisco devices is the Cisco IOS. The Cisco IOS is the software that allows the hardware to function as a router or switch. The IOS file is several megabytes.
The software a router or switch uses is referred to as the configuration file or the config. The configuration contains the instructions that define how the device is to route or switch. A network administrator creates a configuration that defines the desired functionality of a Cisco device. The functions that can be specified by the configuration are the IP addresses of the interfaces, routing protocols, and networks to be advertised. The configuration file typically is a few hundred to a few thousand bytes.
Each of the software components is stored in memory as a separate file. These files are also stored in different types of memory. 
The IOS is stored in a memory area called flash. Flash memory provides non-volatile storage of an IOS that can be used as an operating system at startup. The flash allows the IOS to be upgraded or stores multiple IOS files. In many router architectures, the IOS is copied into and run from RAM.
A copy of the configuration file is stored in NVRAM to be used during startup. This is referred to as the startup configuration or startup config. The configuration in RAM is used to operate a router. It is referred to as the running configuration or running config.
Version 12 and later releases of the IOS provide a single interface to all the file systems that a router uses. This is referred to as the Cisco IOS File System (IFS). The IFS provides a single method to perform all the file system management for a router. This includes the flash memory file systems, the network file systems, such as TFTP and FTP, and read or write data, such as NVRAM, the running configuration, and ROM. The IFS uses a common set of prefixes to specify file system devices. 
The IFS uses the URL convention to specify files on network devices and the network. The URL convention identifies the location of the configuration files following the colon as [[[//location]/directory]/filename]. The IFS also supports FTP file transfers.
The Interactive Media Activity will help students become familiar with the IFS configuration files and their locations.
The next page will describe the IOS naming conventions.

Troubleshooting IOS boot failure

Troubleshooting IOS boot failure
5.1.5 
This page will explain why a router may not boot properly and show students what to do when this occurs.
There are several reasons that a router may not boot properly:
  • Configuration file has missing or incorrect boot system statement
  • Incorrect configuration register value
  • Corrupted flash image
  • Hardware failure
When a router boots, it looks in the startup configuration file for a boot system statement. This boot system statement can force the router to boot from another image instead of the IOS in flash. Use the show version command to look for the line that identifies the boot image source.
Use the show running-config command and look for a boot system statement near the top of the configuration. If the boot system statement points to an incorrect IOS image, use the no version of the command to delete the statement.
If the configuration register setting is incorrect, the IOS cannot load from flash. The value in the configuration register tells the router where to get the IOS. To confirm this, use the show version command and look at the last line for the configuration register. The correct value varies for different hardware platforms. A part of the documentation of the internetwork should be a printed copy of the show version output. If that documentation is not available, there are resources on the Cisco documentation CD or Cisco website to identify the correct configuration register value. To correct this, change the configuration register and save this as the start-up configuration.
If there is still a problem, the router may have a corrupted flash image file. If this is the case, an error message should be displayed during boot. That message may take one of several forms. Some examples are as follows:
  • open: read error...requested 0x4 bytes, got 0x0
  • trouble reading device magic number
  • boot: cannot open "flash:"
  • boot: cannot determine first file name on device "flash:"
If the flash image is corrupt, a new IOS should be uploaded into the router.
If none of the above appears to be the problem, the router could have a hardware failure. If this occurs, contact the Cisco Technical Assistance Center (TAC). Although hardware failures are rare, they do occur.
The value of the configuration register is not displayed by the show running-config or show startup-config commands.
Students can use the Lab Activities to troubleshoot IOS boot failure and document configuration register settings.
This page concludes this lesson. The next lesson will show students how to manage the Cisco IOS File System. The first page will give an overview of the IOS File System.

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.