15
NESCOT CATC 1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

  • View
    215

  • Download
    1

Embed Size (px)

Citation preview

Page 1: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC 1

Managing Cisco IOS Software

CCNA 2 v3 – Module 5

Page 2: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC 2

Stages of the Router Power-on Boot Sequence

POST

Cisco Internetwork

Operating System

Configuration File

NVRAM TFTP Console

Bootstrap

Flash TFTP ROM

Find and load the Cisco IOS software into RAM

Test the router hardware

Find and apply configuration statements, including protocol

functions and interface addresses

Page 3: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC 3

How a Cisco Device Locates and Loads IOSThe router uses boot system commands saved in NVRAM to locate the IOS.Different settings in the configuration register enable the several alternatives:

Router#configure terminalRouter(config)# Boot system flash c4500-p-mz_111-18.bin Router(config)# Boot system tftp c4500-1.bin 192.168.1.7Router(config)# Boot system rom Router(config)# exit Router#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

Hexadecimal number

Do 5.1.3e-Lab

Do 5.1.4e-Lab

Page 4: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC 4

Configuration Register – Boot FieldTo view the current values of the configuration register:

Router# show version..<output omitted>..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.

Setting Description

0xnnn0

0xnnn1

0xnnn2

Enter ROM monitor mode on reload.

Boot automatically from ROM.

Use boot system commands in NVRAM, this is the default.

0x2142: the system will not load the configuration file.

Page 5: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC 5

Troubleshooting IOS Boot Failure

Configuration file has missing or incorrect boot system statement Incorrect configuration register value Corrupted flash image Hardware failure

Router# show versionCisco Internetwork Operating System SoftwareIOS (tm) C2600 Software (C2600-D-M), Version 12.2(16a), RELEASE SOFTWARE (fc2) ..<output omitted>..ROM: System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1) Router uptime is 1 minuteSystem returned to ROM by power-onSystem image file is "flash:c2600-d-mz.122-16a.bin"

To identify the boot image source:

On boot the router checks the configuration file for a boot system statement.Boot problems are typically caused by any of the following:

Page 6: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC 6

Troubleshooting IOS Boot FailureIf the router has a corrupted flash image file an error message should be displayed during boot.

Some examples are:

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.

The router could have a hardware failure. If so, the Cisco TAC should be contacted.

Do 5.1.5e-Lab

Page 7: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC 7

IOS File System Overview1. 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 systemconfiguration

Cisco IOS®

route or switchnetwork administrator

flashupgraded multiple IOS

RAMNVRAM

startup-configboot time

operaterunning-config

Cisco IOS File System

URLs

Page 8: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC 8

IOS Naming Convention

System image file is "flash:c2600-d-mz.122-16a.bin"

Located in Flash

Platform Feature Set Binary file

File Format IOS 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 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.

Page 9: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC 9

Managing configuration files using TFTPTo store the current configuration on a network TFTP server enter the following command:My# copy running-config tftpRemote host []? 131.108.2.155Name of configuration file to write[my-config]? My2Write file My2 to 131.108.2.155 ? [confirm] y

Writing My2 !!!!!!!!!!!!!!!!!!!! [OK]

Router# copy tftp running-configHost or network configuration file [host]? IP address of remote host[255.255.255.255]? 10.0.0.13Name of configuration file [Router-config] ? My2Configure using My2 from 10.0.0.13? [confirm] y

Booting My2 from 10.0.0.13:

A configuration file stored on one of the network servers can be used to configure a router:

!!!!!! [OK-180/16000 bytes]

5.2.3 Lab

Page 10: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC 10

Managing Configuration Files using Capture and SendTo capture the configuration from HyperTerminal to a text file: 1. Select Transfer Capture Text2. Specify a name for the text file to capture the output to3. 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-config5. To stop the capture select Transfer Capture Text StopAfter 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.

Page 11: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC 11

Managing IOS Images using TFTPOccasionally the router will need to have the IOS upgraded or restored. On a new router the IOS should be backed up.Nescot01#

copy tftp flashAddress or name of remote host []? 192.168.1.17Source 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.binErase Flash: before copying? [confirm]Erasing the flash file system will remove all filesContinue? [confirm]

Erasing device eeeeeeeeeeeeeeeeeeee.. ErasedLoading 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

5.2.5 Lab

Page 12: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC 12

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

ROM monitormode

Page 13: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

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> confregConfiguration Summary..<output omitted>..Console baud: 9600Boot: the ROM MonitorDo 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.

yEnable diagnostic mode y/n [n]:..<output omitted>..Change console baud rate? y/n [n]: yEnter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400 4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [0]: 7

Page 14: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC 14

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/location2. select Xmodem as the protocol3. 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]: yReady to receive file c2600-is-mz.122-10a.bin . . .

Page 15: NESCOT CATC1 Managing Cisco IOS Software CCNA 2 v3 – Module 5

NESCOT CATC 15

TFTP and Environment VariablesDownloading 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.1rommon 2> ip_subnet_mask=255.255.255.0rommon 3> default_gateway=10.0.0.254rommon 4> tftp_server=192.168.1.1rommon 5> tftp_file=GAD/basic0204/c2600-I-mz.12-1.binrommon 6> setIP_ADDRESS=10.0.0.1IP_SUBNET_MASK=255.255.255.0DEFAULT_GATEWAY=10.0.0.254TFTP_SERVER=192.168.1.1TFTP_FILE=GAD/basic0204/c2600-i-mz.12-1.binrommon 7> tftpdnld..<output omitted>..Receiving GAD/basic0204/c2600-I-mz.12-1.bin from 192.168.1.1 !!!!!!!!!!!!!!!!!! File reception completed