Use a TFTP Server to Upgrade a Cisco IOS Image

Yaser Rahmati | Instructor Version

Topology

Download Packet Tracer Completed File

Addressing Table

Objectives

  • Part 1: Upgrade an IOS Image on a Cisco Device

  • Part 2: Backup an IOS Image on a TFTP Server

Scenario

A TFTP server can help manage the storage of IOS images and revisions to IOS images. For any network, it is good practice to keep a backup copy of the Cisco IOS Software image in case the system image in the router becomes corrupted or accidentally erased. A TFTP server can also be used to store new upgrades to the IOS and then deployed throughout the network where it is needed. In this activity, you will upgrade the IOS images on Cisco devices by using a TFTP server. You will also backup an IOS image with the use of a TFTP server.

Instructions

Part 1: Upgrade an IOS Image on a Cisco Device

Step 1: Upgrade an IOS image on a router.

  • Access the TFTP server and enable the TFTP service.

Go to TFTP Server –> tab Services –> TFTP –> tick On

  • Note the IOS image files that are available on the TFTP server.

Question: Which IOS images stored on the server are compatible with a 1941 router?

c1900-universalk9-mz.SPA.155-4.M4a.bin

Question: From R2, issue the show flash: command and record the available flash memory.

R2#show flash: 

System flash directory:
File  Length   Name/status
  3   33591768 c1900-universalk9-mz.SPA.151-4.M4.bin
  2   28282    sigdef-category.xml
  1   227537   sigdef-default.xml
[33847587 bytes used, 221896413 available, 255744000 total]
249856K bytes of processor board System flash (Read/Write)

Answer: 221896413

  • Copy the CISCO1941/K9 IOS version 15.5 image for the 1941 router from the TFTP Server to R2.

R2#copy tftp: flash: 
Address or name of remote host []? 192.168.2.254
Source filename []? c1900-universalk9-mz.SPA.155-4.M4a.bin
Destination filename [c1900-universalk9-mz.SPA.155-4.M4a.bin]? 

[...]

[OK - 33591768 bytes]

33591768 bytes copied in 3.856 secs (914677 bytes/sec)
  • Verify that the IOS image has been copied to flash.

R2#show flash: 

System flash directory:
File  Length   Name/status
  3   33591768 c1900-universalk9-mz.SPA.151-4.M4.bin
  4   33591768 c1900-universalk9-mz.SPA.155-4.M4a.bin
  2   28282    sigdef-category.xml
  1   227537   sigdef-default.xml
[67439355 bytes used, 188304645 available, 255744000 total]
249856K bytes of processor board System flash (Read/Write)

Question: How many IOS images are located in flash?

Answer: 2

  • Use the boot system command to load the version 15.5 IPBase image on the next reload.

R2(config)#boot system flash c1900-universalk9-mz.SPA.155-4.M4a.bin
R2(config)#^Z
R2#copy running-config startup-config 
R2#reload 

Step 2: Upgrade an IOS image on a switch.

  • Access the TFTP server and copy the c2960-lanbasek9-mz.150-2.SE4.bin image to Switch.

Switch#show flash: 
Directory of flash:/

    1  -rw-     4414921          <no date>  c2960-lanbase-mz.122-25.FX.bin

64016384 bytes total (59601463 bytes free)
Switch#
Switch#
Switch#copy tftp: flash: 
Address or name of remote host []? 192.168.2.254
Source filename []? c2960-lanbasek9-mz.150-2.SE4.bin
Destination filename [c2960-lanbasek9-mz.150-2.SE4.bin]? 

Accessing tftp://192.168.2.254/c2960-lanbasek9-mz.150-2.SE4.bin....
Loading c2960-lanbasek9-mz.150-2.SE4.bin from 192.168.2.254: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 4670455 bytes]

4670455 bytes copied in 3.086 secs (121674 bytes/sec)
Switch#
Switch#
Directory of flash:/

    1  -rw-     4414921          <no date>  c2960-lanbase-mz.122-25.FX.bin
    3  -rw-     4670455          <no date>  c2960-lanbasek9-mz.150-2.SE4.bin

64016384 bytes total (54931008 bytes free)
Switch#
  • Use the boot system command to configure the switch to load the new IOS image on boot.

Switch(config)#boot system flash0:c2960-lanbasek9-mz.150-2.SE4.bin
  • Reload S1 and verify the new image has been loaded into memory.

Switch#copy running-config startup-config 
Destination filename [startup-config]? 
Building configuration...
[OK]
Switch#reload 

Personal website: www.yaser-rahmati.ir

Last updated