Download presentation
Presentation is loading. Please wait.
Published byConstance Sparks Modified over 9 years ago
1
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 5 Managing Cisco IOS Software
2
Objectives
3
Router Startup Sequence
4
The purpose of the router power-on/bootup sequence is to not only verify the operation of hardware but also load the correct IOS and configuration file. The router follow a predefined set of steps when booting, listed below: When the router is first powered-on, it executes the Power-on self test or POST These diagnostics are located in ROM and verify the proper operation of the router’s hardware If the router passes the POST, the bootstrap loader in ROM executes The bootstrap loader provides capability to load the IOS Now the router is ready to load the operating system, Cisco’s IOS The IOS can be found in several different places, flash, TFTP, or ROM. The boot field of the configuration register will indicate the location of the IOS image After the operating system is loaded and operational, the configuration file from NVRAM is then loaded and executed If you erase the configuration from NVRAM you can observe the process of first checking for a TFTP server and then entering a question driven setup menu when the TFTP server is not found Use Control to exit the setup menu
5
Stages of the Router Power-on Boot Sequence POST Cisco Internetwork Operating System Configuration File NVRAMTFTPConsole Bootstrap FlashTFTPROM Find and load the Cisco IOS software into RAM Test the router hardware Run program which provides the ability to read from FLASH Find and apply configuration statements i.e. interface addresses, routing protocol configuration
6
Locating and Loading the Cisco IOS The router can load the Cisco IOS from several different locations that can be specified by the operator 1. Through the use of the boot system commands, the router will look for the location of the IOS. These boot system commands will be executed only if they are saved in NVRAM 2. If no boot system commands are saved in NVRAM, the router will use the default fallback process: flash, TFTP, and finally ROM The IOS loaded from ROM is only a subset of the IOS loaded from flash
7
Locating IOS Software
8
Using the boot system Command Once the boot system command has been saved to the start-up configuration in NVRAM, it will be used in the next startup to locate the IOS Loading the IOS from flash memory has the advantage of being located locally Loading the IOS from a TFTP server might be an option if flash memory has been corrupted Finally, if the IOS is not loaded from flash or the TFTP server, a subset of the IOS can be loaded from ROM
9
How a Cisco Device Locates and Loads IOS Router# configure terminal Router(config)#Boot system flash c4500-p-mz_111-18.bin Router(config)#Boot system tftp c4500-1.bin 192.168.1.7 Router(config)#Boot system rom Router(config)#exit Router(config)#copy running-config startup-config After it is reloaded, the router will try these commands in the order they were entered. 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 following command: Router(config)#config-register 0x2142 The router uses boot system commands saved in NVRAM to locate the IOS. Note hex number
10
Configuration Register – Boot Field To view the current values of the configuration register: Router# show version.. Configuration register is 0x2102 The configuration register is a 16-bit register in NVRAM. Configuration register is 0x2102 The lowest four bits of the configuration register form the boot field. Note: the notation 0x informs us that the following number is a hexadecimal number. From the example, Hex 2142 is 0010.0001.0000.0010 in binary. SettingDescription 0xnnn0 0xnnn1 0xnnn2 Enter ROM monitor mode on reload. Boot automatically from ROM. Use boot system commands in NVRAM, this is the default.
11
The Configuration Register 16-bit value bits divided into fields 0 – 3 = boot field –0 = bootstrap prompt, –1 = load IOS from ROM –2 = check for boot system commands or load IOS from Flash 6 = ignore NVRM contents 8 = break key disabled 11 – 12 = console line speeds 13 = boot from network indefinitely
12
Troubleshooting IOS Boot Failure In the event that the router does not boot properly, there are several things that could be wrong: Configuration file has missing or incorrect boot system statement Incorrect configuration register value Corrupted flash image Hardware failure To identify the boot image source, type the show version command and look for the line that identifies the image boot 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, delete the statement using the “no” version of the command
13
IOS File System Overview 1.The two types of software required are _________________ and _____________. 2.The ___________ is software that allows the hardware to function as a router or switch. 3.The configuration contains the “instructions” that define how the device is to _________________. 4.A ____________________ creates the configuration that defines the desired functionality of the Cisco device. 5.The IOS is stored in a memory area called _______. 6.The flash allows the IOS to be _________ or stores _____________ files. 7.The IOS is copied into and run from ______. 8.A copy of the configuration file is stored in ________. 9.This is referred to as the “______________”. 10.The startup configuration is copied into RAM at _________. 11.This configuration in RAM is the configuration used to _______ the router. 12.It is referred to as the “_____________”. 13.Beginning with version 12, the ______________________ provides a single method to perform all file system management. 14.The IFS uses ______ to specify files on network devices and the network. operating system configuration Cisco IOS® route or switch network administrator flash upgradedmultiple IOS RAM NVRAM startup-config boot time operate running-config Cisco IOS File System URLs
14
Identifying Boot Image Source
15
Software Components in Memory
16
Fields in the IOS Name
17
IOS Naming Convention System image file is "flash:c2600-d-mz.122-16a.bin" Located in Flash PlatformFeature SetBinary file File FormatIOS Version number Examples of feature-set categories are: Basic Plus Encryption (designated by ‘k8’ or ‘k9’ in IOS 12.2 and later) The file format flag “z” specifies if the IOS is compressed in flash and if the IOS is relocatable. A relocatable image is copied from flash into RAM to run. A non-relocatable image is run directly from flash. As Cisco develops newer versions of the IOS, the numerical version number increases.
18
File System Any location that information is stored can be examined or addressed using the standard directory structure format
19
Managing Configuration Files using TFTP To store the current configuration on a network TFTP server use the following command: My# copy running-config tftp Remote host []? 131.108.2.155 Name of configuration file to write[my-config]? myconfig Write file myconfig to 131.108.2.155 ? [confirm] y Writing myconfig !!!!!!!!!!!!!!!!!!!! [OK] Router# copy tftp running-config Host or network configuration file [host]? IP address of remote host[255.255.255.255]? 10.0.0.13 Name of configuration file [Router-config] ? myconfig Configure using myconfig from 10.0.0.13? [confirm] y Booting myconfig from 10.0.0.13: A configuration file on a network servers can be used to configure a router: !!!!!! [OK-180/16000 bytes]
20
Managing Configuration Files Using TFTP
21
Managing Configuration Files Using Copy and Paste
22
Managing Configuration Files using Capture and Send To capture the configuration from HyperTerminal to a text file: 1.Select Transfer Capture Text 2.Specify a name for the text file to capture the output to 3.Select Start to start capturing text Now all that appears on the screen will be written to the text file. 4.Display the configuration with a show running-config Press the space bar when –more– is displayed 5.To stop the capture select Transfer Capture Text Stop After the capture is complete, the configuration file needs to be edited to remove extra text, to add commands or to add comments with a ! HyperTerminal can be used to restore a configuration. The edited backup of the configuration can be copied into the router: 1.Enter router global configuration mode. 2.From HyperTerminal, click on Transfer > Send Text File. 3.Select the name of the saved configuration file. 4.The lines of the file will be entered into the router as if they were being typed at the CLI. Observe any errors.
23
Lost / Damaged IOS If the router will not properly boot, a new IOS image needs to be downloaded The IOS file may be recovered using one of two methods: 1. Use Xmodem to restore the image through the console 2. Download the image using TFTP from the ROMmon mode
24
Managing IOS Images Using TFTP
25
Managing IOS Images using TFTP Occasionally the router will need to have the IOS upgraded or restored. Also the IOS on a new router should be backed up. Nescot01# copy tftp flash Address or name of remote host []?192.168.1.17 Source filename []?c2600-d-mz.122-16a.bin Destination filename [c2600-d-mz.122-16a.bin]? Accessing tftp://192.168.1.17/c2600-d-mz.122-16a.bin Erase Flash: before copying? [confirm] Erasing the flash file system will remove all files Continue? [confirm] Erasing deviceeeeeeeeeeeeeeeeeeeee..Erased Loading c2600-d-mz.122-16a.bin from 192.168.1.17 (via FastEthernet 0/0): !!!!!!!!!!!!!!!!!!!!!! Verifying checksum........OK [OK 8906598 bytes] 8906598 bytes copied in 270.12 secs
26
To identify why the IOS image did not load from flash Recovering IOS Images 1.Check to see if an image is available in flash: rommon 1> dir flash: 2.If a valid image is present try to boot it: rommon 1> 3.If router now boots properly check the configuration register: Router# 4.If the configuration register value is correct check for boot system commands: Router# If the router will not properly boot from the image or there is no IOS image, a new IOS will need to be downloaded. The IOS file may be recovered using either: Xmodem to restore the image through the console TFTP from the rommon mode boot flash:c2600-is-mz.121-5 show version show startup-config
27
Managing IOS Using XModem
28
Download using Xmodem from rommon > To restore the IOS through the console you need: 1.Copy of the IOS file on a PC. 2.Terminal emulation program such as HyperTerminal. Changing the baud rate from 9600 bps to 115200 bps speeds up the download. To change console speed from rommon: rommon 1> confreg Configuration Summary.. Console baud: 9600 Boot: the ROM Monitor Do you wish to change the configuration? y/n [n]: Note: After changing the console speed and restarting the router in rommon mode, the original terminal session at 9600 bps should be terminated and a new session started to match the 115200 bps console speed. y Enable diagnostic mode y/n [n]:.. Change console baud rate? y/n [n]: y Enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400 4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [0]: 7
29
The confreg Command
30
Rommon 1> The xmodem command can be used from the rommon mode to restore the IOS software image from the PC: Download using Xmodem from rommon > xmodem -c c2600-is-mz.122-10a.bin Next, In HyperTerminal select Transfer > Send File. 1. Specify the image name/location 2. select Xmodem as the protocol 3. start the transfer. During the transfer the Sending File popup will display the status of the transfer. On completion, return config-register and HyperTerminal settings to normal. Use CRC for error checking during the download Do not start sending program yet… Warning: All existing data in bootflash will be lost! Invoke this application only for disaster recovery. Do you wish to continue? y/n [n]: y Ready to receive file c2600-is-mz.122-10a.bin...
31
TFTP and Environment Variables Downloading the image using TFTP from rommon is the fastest way to restore an IOS image to the router. This is done by setting environmental variables and then using the tftpdnld command: rommon 1> ip_address=10.0.0.1 rommon 2>ip_subnet_mask=255.255.255.0 rommon 3>default_gateway=10.0.0.254 rommon 4>tftp_server=192.168.1.1 rommon 5>tftp_file=GAD/basic0204/c2600-I-mz.12-1.bin rommon 6>set IP_ADDRESS=10.0.0.1 IP_SUBNET_MASK=255.255.255.0 DEFAULT_GATEWAY=10.0.0.254 TFTP_SERVER=192.168.1.1 TFTP_FILE=GAD/basic0204/c2600-i-mz.12-1.bin rommon 7>tftpdnld.. Receiving GAD/basic0204/c2600-I-mz.12-1.bin from 192.168.1.1 !!!!!!!!!!!!!!!!!!File reception completed
32
The set Command
33
The tftpdnld Command
34
File System Verification There are several commands used to verify the router file system: One is the show version command. This command is used to check the current image and available flash. It also verifies the source of the IOS image and the config register boot field setting The show flash command is also used to verify the flash system. This command identifies the amount of flash that is available. It also confirms that there is ample space to store a new IOS image
35
The show version Command
36
The show flash Command
37
Summary
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.