CCENT (ICND1)MaintenanceSND

Upgrading the IOS on a Cisco Router

Cisco brings out new versions of the operating system quite frequently, and of course there are different versions of the operating system for each of the appliances. Different IOS’s will support different commands and different features and it’s not uncommon to have to change the IOS that your device is running to support commands you wish to use.

 

The other major reason for IOS upgrades is to fix bugs that Cisco may have found in the software.

 

The 2 most common ways to do an upgrade are:

  1. Take the Flash card out the router, plug it into a card reader and paste the new file on the card. Replace the card in the router and reboot.
  2. Copy the file over the network using a protocol like TFTP.

 

When copying the IOS over the network, the router will check to confirm it has enough storage space to accommodate the file. It will often ask to erase the flash before copying the new image. Before erasing the flash on the router, make sure there are no other files on the flash that you might need. If there are files that you will require, make sure you have made a backup of them before erasing!

 

Here are the steps for upgrading via the network.

 

  1. Run your TFTP server and confirm it’s hosting the IOS that you wish to upgrade to
  2. Configure the following on the router

 

AOIP.ORG# copy tftp: flash:

Address or name of remote host []? 192.168.1.1

Source filename []? c1841-ipbase-mz.124-5b.bin

Destination filename [c1841-ipbase-mz.124-5b.bin]?

%Warning: There is a file already existing with this name

Do you want to over write? [confirm]

 

In the example above, I had chosen to upgrade to the same image that was already loaded on the router. Although not a practical solution, it does show the commands to upgrade.

 

Below you will see the different output when I chose a different file.

 

AOIP.ORG# copy tftp: flash:

Address or name of remote host [192.168.1.1]?

Source filename [c1841-ipbase-mz.124-5b.bin]? c1841.bin

Destination filename [c1841.bin]?

Accessing tftp://192.168.1.1/c1841.bin…

Loading c1841.bin from 192.168.1.1 (via FastEthernet0/0): !

%Error copying tftp://192.168.1.1/c1841.bin (Not enough space on device)

 

Again, I have received an error message, this time due to lack of free space on my flash card on the router. I would then have a chance to confirm there are no files on the flash that I need to keep before erasing the flash. If there are files I need to retain, make sure you back them up before erasing!

 

Make sure that you have already confirmed that the router physically has enough flash to be able to support the image you wish to install. You can see how much Flash is available and installed by using the ‘show flash:’ and ‘show version’ commands

 

Depending on the router model, you can erase the contents of the flash by typing

 

AOIP.ORG# erase flash:

OR

AOIP.ORG# erase nvram:

 

After the flash has been erased, you would then be able to copy the file from the tftp server.

 

Below is a live demo of an upgrade.

 

 

4 thoughts on “Upgrading the IOS on a Cisco Router

  1. A few weeks ago I found this blog and have been following along steadily. I decided I would give my opening comment. I dont know what to say but that Ive loved reading. Nice website. I will keep visiting this site very often. I have also grabbed your RSS feed to get any updates.

  2. I have a task to upgrade all of my remote routers in a hub and spoke environment over the holidays. This website have answered my questions and concerns I had about doing this task and completing it successfully. Great job. Keep sharing these great instructions and tips on how to accomplish real world networking tasks.

  3. @ eric – Sadly not. The image is already in compressed format and during boot you can see the router decompressing the image before it uses it.

Leave a Reply

Your email address will not be published. Required fields are marked *