Ch.

5 – Managing Cisco IOS Software
CCNA 2 version 3.0 Rick Graziani Cabrillo College

Note to instructors
• If you have downloaded this presentation from the Cisco Networking
Academy Community FTP Center, this may not be my latest version of this PowerPoint. • For the latest PowerPoints for all my CCNA, CCNP, and Wireless classes, please go to my web site: http://www.cabrillo.cc.ca.us/~rgraziani/ • The username is cisco and the password is perlman for all of my materials. • If you have any questions on any of my materials or the curriculum, please feel free to email me at graziani@cabrillo.edu (I really don’t mind helping.) Also, if you run across any typos or errors in my presentations, please let me know. • I will add “(Updated – date)” next to each presentation on my web site that has been updated since these have been uploaded to the FTP center. Thanks! Rick
Rick Graziani graziani@cabrillo.edu 2

Overview

• • • • • • • • • • •

Identify the stages of the router boot sequence Determine how a Cisco device locates and loads the Cisco IOS Use the boot system command Identify the configuration register values Briefly describe the files used by the Cisco IOS and their functions List the locations on the router of the different file types Briefly describe the parts of the IOS name Save and restore configuration files using TFTP and copy-and-paste Load an IOS image using TFTP Load an IOS image using XModem Verify the file system using show commands
3

Rick Graziani graziani@cabrillo.edu

Stages of the router power-on boot sequence

• • •

Test the router hardware. Find and load the Cisco IOS software. Find and apply configuration statements, including protocol functions and interface addresses.
4

Rick Graziani graziani@cabrillo.edu

Locate and load startup-config a.edu 5 . Flash (sequential) b. copy to running-config b. POST 2. prompt for setup-mode c.Router Boot Process – At a Glance 1. ROM) 3. If setup-mode bypassed.15 = startup-config in NVRAM 1. Run boot system commands in order they appear in startup-config to locate the IOS b If boot system commands fail. use default fallback sequence to locate the IOS (Flash. create a “skeleton” default running-config (no startup-config) Rick Graziani graziani@cabrillo. ROM 1.If no IOS located. get partial IOS version from ROM 4. Check for IOS boot system commands in startup-config file (NVRAM) If boot system commands in startup-config a.The router uses the configuration register value to form a filename from which to boot a default system image stored on a network server. Check Configuration Register value (NVRAM) 0 = ROM Monitor mode 1 = ROM IOS 2 . If startup-config not found. TFTP server (netboot) . ROM (partial IOS) or keep retrying TFTP depending upon router model . Bootstrap code executed 3. 2 3 4 2. Locate and load IOS. Default fallback sequence: No IOS boot system commands in startup-config a. TFTP. If startup-config found. c.

2.edu 6 . Check for IOS boot system commands in startupconfig file (NVRAM) Rick Graziani graziani@cabrillo.

Using the boot system command Rick Graziani graziani@cabrillo.edu 7 .

changing only the value of the last hexadecimal digit. The configuration register is a 16-bit register in NVRAM. To ensure that the upper 12 bits are not changed.edu . The lowest four bits of the configuration register form the boot field. Then use the config-register command. first retrieve the current values of the configuration register using the show version command. 8 Rick Graziani graziani@cabrillo.Configuration register Check Configuration Register value (NVRAM) 0 = ROM Monitor mode 1 = ROM IOS 2 .15 = startup-config in NVRAM • The order in which the router looks for system bootstrap information • • • • depends on the boot field setting in the configuration register.

0. mask 49 Bridging software.0(5)T1. --More— Configuration register is 0x2102 Gateway-Router> Rick Graziani graziani@cabrillo. 1) Copyright (c) 1986-1999 by cisco Systems. 2 FastEthernet/IEEE 802. 20 hours. 33 minutes System returned to ROM by power-on System restarted at 13:30:22 PST Thu Mar 7 2002 System image file is "flash:c2600-do3s-mz. X. RELEASE SOFTWARE (fc1) NoSmo-Gateway uptime is 5 weeks. Processor board ID JAB03520113 (2485375272) M860 processor: part number 0.3 interface(s) 4 Serial(sync/async) network interface(s) 32K bytes of non-volatile configuration memory. 3 days. Inc. data-base: 0x80CB67B0 RELEASE SOFTWARE (fc ROM: System Bootstrap.3(2)XA4.120-5. Version 3.0.25 software. Compiled Tue 17-Aug-99 13:18 by cmong Image text-base: 0x80008088.T1" IOS source cisco 2621 (MPC860) processor (revision 0x102) with 39936K/9216K bytes of memory .show version – Showing the configuration register Gateway-Router>show version Cisco Internetwork Operating System Software IOS (tm) C2600 Software (C2600-DO3S-M). Version 11. Version 12.edu configuration register 9 .

From ROM monitor. These values set the boot field bits to a value between 0010 and 1111 binary. where nnn represents the previous value of the non-boot field digits. This value sets the boot field bits to 0000 binary. • To configure the system to use the boot system commands in NVRAM. set the configuration register to any value from 0xnnn2 to 0xnnnF.edu 10 . set the configuration register value to 0xnnn0. This value sets the boot field bits to 0001 binary. where nnn represents the previous value of the non-boot field digits. where nnn represents the previous value of the non-boot field digits. • To configure the system to boot automatically from ROM. set the configuration register to 0xnnn1. Using boot system commands in NVRAM is the default. follow these guidelines: • To enter the ROM monitor mode.Modifying the configuration register Router(config)#config-register value To change the boot field in the configuration register. Rick Graziani graziani@cabrillo. boot the operating system manually by using the b command at the ROM monitor prompt.

edu 11 .Troubleshooting IOS boot failure • • What would you do? How would you begin? Rick Graziani graziani@cabrillo.

Possible problems • Configuration file has missing or incorrect boot system statement Incorrect configuration register value Corrupted flash image Hardware failure • • • How would you determine if any of these were the problem? Rick Graziani graziani@cabrillo.edu 12 .

the Cisco Technical Assistance (TAC) center 13 • • Rick Graziani graziani@cabrillo. the router could have a hardware failure.edu . Some examples are: – open: read error. – The value in the configuration register tells the router where to get the IOS.Troubleshooting • An incorrect boot system command. Use the show running• config command and look for a boot system statement An incorrect configuration register setting will prevent the IOS from loading from flash.. an error message should be displayed during boot..requested 0x4 bytes. got 0x0 – trouble reading device magic number – boot: cannot open "flash:" – boot: cannot determine first file name on device "flash:"ú If none of the above appears to be the problem. If this is the case. The router may have a corrupted flash image file. – This can be confirmed by using the show version command and looking at the last line for the configuration register. If this is the case.

– The software a router or switch uses is referred to as the configuration file or the config. 14 Rick Graziani graziani@cabrillo. The two types of software required are operating systems and configuration. running-config and startup-config. – The operating system used in almost all Cisco devices is the Cisco Internetwork Operating System (IOS).IOS file system overview running-config IOS (running) startup-config RAM IOS ios • • Routers and switches depend on software for their operation.edu .

and FTP) – reading or writing data (such as NVRAM. the running configuration. The IFS provides a single method to perform all the file system management that a router uses.edu . including – the flash memory file systems.Cisco IOS File System (IFS) running-config IOS (running) startup-config IOS ios RAM • • Beginning with version 12. Cisco IOS File System (IFS). – the network file systems (TFTP. ROM). a single interface to all the file systems that a router uses is provided. rcp. 15 Rick Graziani graziani@cabrillo.0 of the IOS.

The IFS also supports FTP file transfer. • 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].edu . 16 Rick Graziani graziani@cabrillo.Cisco IOS File System (IFS) • The IFS uses a common set of prefixes to specify file system devices.

Preparing for TFTP Be sure you can communicate with the TFTP server. Rick Graziani graziani@cabrillo. Know the name of the IOS file you are going to copy from on the router.edu 17 .

edu 18 .Cisco IOS File System (IFS) copy from-file to-file system: running-config IOS (running) nvram: RAM startup-config flash: IOS ios copy flash:<filename> tftp: copy tftp: flash:<filename> copy tftp: nvram:startup-config copy nvram:startup-config tftp: copy tftp: system:running-config copy system:running-config tftp: Rick Graziani graziani@cabrillo.

Cisco Traditional Copy Commands copy from-file to-file running-config IOS (running) RAM startup-config IOS ios copy flash tftp copy flash tftp copy tftp startup-config copy startup-config tftp copy tftp running-config copy running-config tftp Rick Graziani graziani@cabrillo.edu 19 .

IP/FW Plus. the encryption designators are k8/k9: • k8 – Less than or equal to 64-bit encryption in IOS version 12. for example IP and IP/FW • Plus – A basic feature set plus additional features such as IP Plus.2 onwards. From Cisco IOS Release 12.IOS naming conventions A relocatable image is copied from flash into RAM to run. and Enterprise Plus • Encryption – The addition of the 56-bit data encryption feature sets. Examples of feature-set categories are: • Basic – A basic feature set for the hardware platform.2 and up) Rick Graziani graziani@cabrillo. A nonrelocatable image is run directly from flash.2 and up • k9 – Greater than 64-bit encryption (on 12. to either a basic or plus feature set. Examples include IP/ATM PLUS IPSEC 56 or Enterprise Plus 56.edu 20 . such as Plus 56.

Example Rick Graziani graziani@cabrillo.edu 21 .

Managing configuration files using TFTP Rick Graziani graziani@cabrillo.edu 22 .

Display the configuration to the screen by entering show running-config 6. stop the capture by: 8. Select Capture Text 3. When the complete configuration has been displayed. Specify the name for the text file to capture the configuration 4.Managing configuration files using copy and paste Perform the following to capture the configuration using the text displayed on the HyperTerminal screen to a text file: 1. Select Transfer 2. Select Start to start capturing text 5. Select Stop 23 Rick Graziani graziani@cabrillo. Select Capture Text 10.edu . Press the space bar when each "More -" prompt appears 7. Select Transfer 9.

Managing IOS images using TFTP Rick Graziani graziani@cabrillo.edu 24 .

ROM 1.121-5 25 • • Rick Graziani graziani@cabrillo. Check Configuration Register value (NVRAM) 0 = ROM Monitor mode 1 = ROM IOS 2 . rommon 1>boot flash:c2600-is-mz. The flash should be examined with the rommon 1 > dir flash: command. the ROMmon mode is • identified from the rommon 1 > prompt. 1. Bootstrap code executed 3. POST 2. an attempt should be made to boot from that image. This is done using boot flash: command. If an image is located that appears to be valid.edu . the IOS may need to be restored from the ROM monitor mode (ROMmon).Restoring the IOS image from Flash • If the IOS image in flash has been erased or corrupted.15 = startup-config in NVRAM • In many of the Cisco hardware architectures.

– show version . – The IOS file may be recovered using either: • Xmodem to restore the image through the console • Downloading the image using TFTP from the ROMmon mode.Restoring the IOS image from Flash running-config IOS (running) RAM startup-config IOS ios • • If the router properly boots. determine why the router booted to the ROMmon instead of using IOS from flash. 26 Rick Graziani graziani@cabrillo.to check the configuration register to ensure that it is configured for the default boot sequence – show startup-config .edu . If the router will not properly boot from the image or there is no IOS image. a new IOS will need to be downloaded.to see if there is a boot system command instructing the router to use the IOS for ROM monitor.

• Requires rebooting of the router and the terminal session (at 9600) should be terminated and a new session started at 115200 bps to match the console speed.Download using Xmodem from ROMmon console • Optional – Modifying the console baud rate to speed-up upload. Rick Graziani graziani@cabrillo.edu 27 .

The format of the command is: xmodem -c image_file_name The -c instructs the Xmodem process to use Cyclic Redundancy Check (CRC) for error checking during the download.Download using Xmodem from ROMmon console • The Xmodem command can be used from the ROMmon mode to • • restore the IOS software image from the PC. 28 Rick Graziani graziani@cabrillo.edu .

Then in the Send File popup specify the image name/location. During the transfer. and start the transfer. select Transfer > Send File. the Sending File popup will display the status of the transfer. The warning message informs that the bootflash will be erased and asks to confirm continuing.edu The router will prompt not to begin the transfer and present a warning message. select Xmodem as the protocol. In HyperTerminal. Now the Xmodem transfer needs to be started from the terminal emulator. 29 .Download using Xmodem from ROMmon console • • • • • • Rick Graziani graziani@cabrillo.

the 115200 bps terminal session needs to be ended and a 9600 bps session begun.edu 30 .Download using Xmodem from ROMmon Router(config)#config-register 0x2102 Router(config)#line con 0 Router(config-line)#speed 9600 console • • • Once the transfer is complete a message appears that flash is being erased. the console speed needs to be set back to 9600 and the config register back to 0x2102. Rick Graziani graziani@cabrillo. • While the router is rebooting. This is followed by the “Download Complete!” message. Before restarting the router. • Enter the command config-register 0x2102 at the privileged EXEC prompt.

Download using TFTP from ROMmon • The IOS can also be restored from a TFTP session using the • • tftpdnld command.0. To set a ROMmon environment variable: rommon>IP_ADDRESS=10.1 31 Rick Graziani graziani@cabrillo.0.edu . The environmental variables provide a minimal configuration to allow for the TFTP of the IOS.

edu 32 . the tftpdnld command is entered with no arguments.Download using TFTP from ROMmon • Once the variables are set for the IOS download. Rick Graziani graziani@cabrillo.

File system verification Rick Graziani graziani@cabrillo.edu 33 .

edu . 34 Rick Graziani graziani@cabrillo.Getting the TFTP Software • TFTP software is available for free for multiple OS’s.

Rick Graziani graziani@cabrillo.Starting TFTP on Windows • Be sure TFTP is running before copying to or from the TFTP server.edu 35 .

RELEASE SOFTWARE Copyright (c) 1986-1995 by cisco Systems 2500 processor with 8192 Kbytes of main memory Abort at 0x10EA82C (PC) > Rick Graziani graziani@cabrillo.e. Version 5. Step 2 – Entering rommon Within 60 seconds press the Break key (control-break on a PC).edu 36 . i. In a real world scenario.At the router type the show version command. If for some reason you cannot log into the router. which is usually 0x2102. You will then see the following prompt: System Bootstrap. You may need to press this more than once. then of course you will not be able to perform this step.2(8a). Record the configuration register setting.Password Recovery Step 1 config-register . someone changed the password.

after the “>” prompt type o/r 0x42 and press return. Type no Rick Graziani graziani@cabrillo. The router will reboot and ask you if you want to go into setup mode.” not the numeral zero.For the 2500 Series routers. Abort at 0x10EA82C (PC) > o/r 0x42 > i • o/r 0x42 – This will change the configuration register on the router to • ignore the startup-config file during boot-up.) Then type “i” and press return.edu 37 . i – This will reboot (reload) the router. that this is the letter “o. (Note.Password Recovery Step 3 Breaking in .

Password Recovery Step 4 – Recovering the password Router> enable Router# config t To recover your previous startup-config file so you do not lose your previous configuration (if needed): Router# copy startup-config running-config Set your enable secret password. Router# copy running-config startup-config Rick Graziani graziani@cabrillo. Router(config)# enable secret class Change the configuration-register back to its proper value. class is what we always use!. Question: What happens the next time you reboot the router if you do not do this? Router(config)# config-register 0x2102 Router(config)# exit Copy the running-config with the current privileged password to the startup-config.edu 38 .

• The configuration register setting should be 0x2102. Rick Graziani graziani@cabrillo.edu 39 .Password Recovery Step 5 – Verify • At the router type the show version command.

Downloading an IOS Rick Graziani graziani@cabrillo.edu 40 .

edu 41 .Downloading an IOS Rick Graziani graziani@cabrillo.

edu 42 .Downloading an IOS Rick Graziani graziani@cabrillo.

edu 43 .Downloading an IOS Rick Graziani graziani@cabrillo.

Summary Rick Graziani graziani@cabrillo.edu 44 .

0 Rick Graziani Cabrillo College . 5 – Managing Cisco IOS Software CCNA 2 version 3.Ch.