0% found this document useful (0 votes)
18 views37 pages

CH 5

Uploaded by

farhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views37 pages

CH 5

Uploaded by

farhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 37

Ch.

5 – Managing Cisco IOS Software

CCNA 2
Version 3.1
Overview

2
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.
3
Router Boot Process – At a Glance
1. ROM 1, 2
1. POST
2. Bootstrap code executed
3. Check Configuration Register value (NVRAM) 3
0 = ROM Monitor mode
1 = ROM IOS
2 - 15 = startup-config in NVRAM 4

2. Check for IOS boot system commands in startup-config file (NVRAM)


If boot system commands in startup-config
a. 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, TFTP, ROM)

3. Locate and load IOS, Default fallback sequence: No IOS boot system commands in startup-config
a. Flash (sequential)
b. TFTP server (netboot) - The router uses the configuration register value to form a filename from
which to boot a default system image stored on a network server.
c. ROM (partial IOS) or keep retrying TFTP depending upon router model
- If no IOS located, get partial IOS version from ROM

4. Locate and load startup-config


a. If startup-config found, copy to running-config
b. If startup-config not found, prompt for setup-mode
c. If setup-mode bypassed, create a “skeleton” default running-config (no startup-config)
4
2. Check for IOS boot system commands in startup-
config file (NVRAM)

5
Using the boot system command

6
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.
• The configuration register is a 16-bit register in NVRAM.
• The lowest four bits of the configuration register form the boot field.
• To ensure that the upper 12 bits are not changed, first retrieve the
current values of the configuration register using the show version
command.
• Then use the config-register command, changing only the value
of the last hexadecimal digit.
7
show version –
Showing the configuration register
Gateway-Router>show version
Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-DO3S-M), Version 12.0(5)T1, RELEASE SOFTWARE (fc
1)
Copyright (c) 1986-1999 by cisco Systems, Inc.
Compiled Tue 17-Aug-99 13:18 by cmong
Image text-base: 0x80008088, data-base: 0x80CB67B0

ROM: System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)

NoSmo-Gateway uptime is 5 weeks, 3 days, 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.120-5.T1" IOS source
cisco 2621 (MPC860) processor (revision 0x102) with 39936K/9216K bytes of memory
.
Processor board ID JAB03520113 (2485375272)
M860 processor: part number 0, mask 49
Bridging software.
X.25 software, Version 3.0.0.
2 FastEthernet/IEEE 802.3 interface(s)
4 Serial(sync/async) network interface(s)
32K bytes of non-volatile configuration memory.
--More—
Configuration register is 0x2102
configuration register
Gateway-Router>
8
Troubleshooting IOS boot failure

• What would you do?


• How would you begin?

9
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?

10
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.
– The value in the configuration register tells the router where to get
the IOS.
– This can be confirmed by using the show version command and
looking at the last line for the configuration register.
• The router may have a corrupted flash image file. If this is the case,
an error message should be displayed during boot. Some examples
are:
– open: read error...requested 0x4 bytes, got 0x0
– boot: cannot open "flash:"
– boot: cannot determine first file name on device "flash:"ú
• If none of the above appears to be the problem, the router could have
a hardware failure. If this is the case, the Cisco Technical Assistance
(TAC) center
11
IOS file system overview

running-config startup-config IOS ios


IOS (running)
RAM

• 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
Internetwork Operating System (IOS).
– The software a router or switch uses is referred to as the configuration
file or the config, running-config and startup-config.
12
IOS naming conventions

A relocatable image is copied


from flash into RAM to run. A non-
relocatable image is run directly
from flash.

13
Preparing for TFTP

Be sure you can


communicate
with the TFTP
server.

Know the name


of the IOS file
you are going to
copy from on
the router.

14
Managing configuration files using TFTP

15
Cisco Traditional Copy Commands

copy from-file to-file

running-config
RAM
IOS (running) 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

16
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 Capture Text
3. Specify the name for the text file to
capture the configuration
4. Select Start to start capturing text
5. Display the configuration to the
screen by entering show
running-config
6. Press the space bar when each "-
More -" prompt appears
7. When the complete configuration
has been displayed, stop the
capture by:
8. Select Transfer
9. Select Capture Text
10. Select Stop
17
Managing IOS images using TFTP

18
Restoring the IOS image from Flash

• If the IOS image in flash has been erased or corrupted, the IOS may
need to be restored from the ROM monitor mode (ROMmon).
1. ROM
1. POST
2. Bootstrap code executed
3. Check Configuration Register value (NVRAM)
0 = ROM Monitor mode
1 = ROM IOS
2 - 15 = startup-config in NVRAM

• In many of the Cisco hardware architectures, the ROMmon mode is


identified from the rommon 1 > prompt.
• The flash should be examined with the rommon 1 > dir flash:
command.
• If an image is located that appears to be valid, an attempt should be
made to boot from that image.
• This is done using boot flash: command.
rommon 1>boot flash:c2600-is-mz.121-5
19
Restoring the IOS image from Flash

running-config
RAM
IOS (running) startup-config IOS ios

• If the router properly boots, determine why the router booted to the ROMmon
instead of using IOS from flash.
– show version - to check the configuration register to ensure that it is
configured for the default boot sequence
– show startup-config - to see if there is a boot system command
instructing the router to use the IOS for ROM monitor.
• 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
• Downloading the image using TFTP from the ROMmon mode.
20
Download using Xmodem from ROMmon

console

• Optional – Modifying the console baud rate to speed-up download.


• 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.

21
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.
• 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.
22
Download using Xmodem from ROMmon

console

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

Router(config)#config-register 0x2102
Router(config)#line con 0 console
Router(config-line)#speed 9600

• Once the transfer is complete a message appears that flash is being erased.
• This is followed by the “Download Complete!” message.
• Before restarting the router, the console speed needs to be set back to 9600
and the config register back to 0x2102.
• Enter the command config-register 0x2102 at the privileged EXEC
prompt.
• While the router is rebooting, the 115200 bps terminal session needs to be
ended and a 9600 bps session begun. 24
Download using TFTP from ROMmon

• The IOS can also be restored from a TFTP session using the
tftpdnld command.
• The environmental variables provide a minimal configuration to allow
for the TFTP of the IOS.
• To set a ROMmon environment variable:
rommon>IP_ADDRESS=10.0.0.1
25
Download using TFTP from ROMmon

• Once the variables are set for the IOS download, the
tftpdnld command is entered with no arguments.

26
File system verification

27
Getting the TFTP Software

• TFTP software is available for free for multiple OS’s.


28
Starting TFTP on Windows

Cisco TFTP Server.lnk

• Be sure TFTP is running before copying to or from the


TFTP server.

29
Password Recovery
Step 1 config-register - At the router type the show version command.
Record the configuration register setting, which is usually 0x2102. In a
real world scenario, If for some reason you cannot log into the router,
i.e. someone changed the password, then of course you will not be
able to perform this step.

Step 2 – Entering rommon


Within 60 seconds press the Break key (control-break on a PC). You
may need to press this more than once. You will then see the
following prompt:

System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE


Copyright (c) 1986-1995 by cisco Systems
2500 processor with 8192 Kbytes of main memory

Abort at 0x10EA82C (PC)


>
30
Password Recovery

Step 3 Breaking in - For the 2500 Series routers, after the “>” prompt
type o/r 0x42 and press return. (Note, that this is the letter “o,” not the
numerical zero.) Then type “i” and press return.

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.
• i – This will reboot (reload) the router.

The router will reboot and ask you if you want to go into setup mode.
Type no

31
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. class is what we always use!.


Router(config)# enable secret class

Change the configuration-register back to its proper value.


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.
Router# copy running-config startup-config
32
Password Recovery

Step 5 – Verify
• At the router type the show version command.
• The configuration register setting should be 0x2102.

33
Downloading an IOS

34
Downloading an IOS

35
Downloading an IOS

36
Downloading an IOS

37

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy