≡ Menu

7 Steps to Upgrade IOS Image on Cisco Catalyst Switch or Router

Anytime Cisco releases a new IOS image for its network switch (or router), it is recommended that you upgrade it.

This article explains 7 easy steps to upgrade IOS image on a cisco switch or router.

Since you’ll be upgrading the IOS image, make sure you have physical access to the switch and you are in front of it. Use a console cable to connect to the switch.

Please note that the steps given below will be similar to both switches and routers. However this examples shows how to upgrade ios image on a cisco catalyst switch.

1. Verify Current IOS Version

After you login, go to enable mode, by entering the enable password. This example uses two cisco catalyst 3750 switches configured in stack mode as shown below. So, while upgrading you should upgrade the image on both the flash cards.

# show switch
Switch/Stack Mac Address : 0012.abcd.1234
                                           H/W   Current
Switch#  Role   Mac Address     Priority Version  State
*1       Master 0012.abcd.1234     10     0       Ready
 2       Member 0012.abcd.2345     1      0       Ready

If you have only one cisco catalyst switch (non stack mode), follow all the steps mentioned in this document, but you’ll be doing it only on one flash card.

First, verify the content of the flash cards, using “dir flash1:” command.

# dir flash1:

# dir flash2:

As you see above, both the flash cards contains the current IOS image file, which is version “122.35.SE5”

Verify what version of IOS image your switch is currently running. Most likely this will be same as the current IOS image file that you see in your flash card. As you see below, it is using “12.3(35)SE5”

# show ver
Switch Ports Model              SW Version            SW Image
------ ----- -----              ----------            ----------
*    1 24    WS-C3750G-24T      12.2(35)SE5           C3750-IPBASEK9-M
     2 24    WS-C3750G-24T      12.2(35)SE5           C3750-IPBASEK9-M

2. Download Latest IOS Image from Cisco Website

Download the latest IOS image for your cisco website
Go to cisco.com -> IOS Software -> Select your Siwtch (for example: Cisco Catalyst Switch 3750G-24T) -> Click on “Download IP BASE” -> Select the latest version that you want to download (for example: 12-2.55.SE1).

While you are on this download page, copy/paste the MD5 given to your system. After we download the IOS image and move it to the switch, we’ll verify the MD5 checksum before installing the image.

3. Delete Old IOS Software Image from Flash

Since we’ll be downloading the new ISO image and moving it to the flash card, we need some space. So, delete the current old image from the flash card.

# delete /f /r flash1:c3750-ipbase-mz.122.35-35.SE5

# delete /f /r flash2:c3750-ipbase-mz.122-35.SE5

# dir flash1:

# dir flash2:

In the above delete command, /f stands for force, and /r stands for recurssive.

On a side note, you should be using some software to monitor your switch status. If you are not doing it install Nagios, and monitor your switches.

4. Copy the IOS image to Cisco Switch

To transfer the IOS image from your laptop to Cisco Switch, you should run a TFTPserver on your laptop (or on the system where you’ve downloaded the IOS image).

If you are running a TFTPserver on your laptop, and connected to the switch using a console cable, assign a ip-address to your laptop, and put your laptop on the same network as the switch.

Copy the ISO image to the flash as shown below using the “copy command”. This will ask you to enter the address of the remote host (which is your laptop in this case), and the source filename that needs to be transferred (which is the ISO image you downloaded from cisco website).

# copy tftp flash1
>Address or name of remote host?
>source filename? c3750-ipbasek9-mz-122-55.SE1.bin
>Destination filename? c3750-ipbasek9-mz-122-55.SE1.bin

Once you’ve copied it, make sure the file is there on the flash card.

# dir flash1:

Just to make sure nothing went wrong during the copy, do a MD5 check-sum on this, and compare with the MD5 that you noted down from cisco website while downloading the IOS image. To create MD5 checksum of a file in Cisco catalyst switch, use the “verify” command as shown below.

# verify /md5 flash1:c3750-ipbasek9-mz-122-55.SE1.bin

If you are running two switches in stack configuration, do the same on the second flash card.

# copy tftp flash2:
# dir flash2:
# verify /md5 flash2:c3750-ipbasek9-mz-122-55.SE1.bin

5. Modify Switch Boot path-list

Now it is time to tell switch cisco to use the new ISO image to boot from. Before changing the boot information, verify the current configuration, and change it using the “boot system” command as shown below.

# show boot

# config t
# boot system switch all flash:c3750-ipbasek9-mz-122-55.SE1.bin

6. Save Config and Restart the Switch

Verify the current boot information, save the current configuration, and reboot the cisco switch as shown below.

# show boot

# write mem

# reload

7. Final Verification after IOS Upgrade

Finally verify the current IOS version of the switch, after the upgrade, it should display the new version as shown below.

# show ver
Switch Ports Model              SW Version            SW Image
------ ----- -----              ----------            ----------
*    1 24    WS-C3750G-24T      12.2(55)SE1           C3750-IPBASEK9-M
     2 24    WS-C3750G-24T      12.2(55)SE1           C3750-IPBASEK9-M

Make sure to verify your interface and vlan status, to make sure everything is running properly without any issues.

If you enjoyed this article, you might also like..

  1. 50 Linux Sysadmin Tutorials
  2. 50 Most Frequently Used Linux Commands (With Examples)
  3. Top 25 Best Linux Performance Monitoring and Debugging Tools
  4. Mommy, I found it! – 15 Practical Linux Find Command Examples
  5. Linux 101 Hacks 2nd Edition eBook Linux 101 Hacks Book

Bash 101 Hacks Book Sed and Awk 101 Hacks Book Nagios Core 3 Book Vim 101 Hacks Book

{ 20 comments… add one }

  • Andras Dosztal June 23, 2011, 2:43 am

    For step 4: If you downloaded a .tar file instead of .bin, you can extract it on the fly. Use the following command in enable mode:
    archive tar /xtract tftp:///flash:c3750-ipbasek9-mz-122-55.SE1.tar flash:

    Be aware that in this case the boot command will be:
    boot system switch all flash:c3750-ipbasek9-mz-122-55.SE1/flash:c3750-ipbasek9-mz-122-55.SE1.bin

    BTW the .tar contains the files needed by the http-server.

  • Yme June 23, 2011, 8:15 am


  • Andras Dosztal June 23, 2011, 9:49 am

    I think the engine messed up my archive command. It was:
    archive tar /xtract tftp://IP_address/c3750-ipbasek9-mz-122-55.SE1.tar flash:

  • Ryan Brady June 24, 2011, 9:56 am

    Here’s how I upgrade the IOS on my 3750 series switches at work, via TFTP:

    wr mem
    archive download-sw /safe /allow-feature-upgrade /reload tftp:ip_address/ios_image.tar

    it will download/verify/redownload if need be, also will wait to delete the old image off the flash once the new image is verified non-corrupt (assuming there is room on the flash to hold a 2nd image, otherwise it will tell you there is not enough room)

    also if you’re running a stack, if you upgrade the stack master, it should auto-upgrade the rest of the stack, since it will notice a version mismatch (same as if you introduce a virgin switch into a existing/new stack, it will auto-flash the new member)

  • David June 27, 2011, 5:37 am

    Hi Ramesh,
    Thank you for your steps.
    I am trying to upgrade Cisco IOS on my 3750. I notice that there is a ‘html’ directory under ‘c3750-ipbase-mz.122-35.SE5’:
    Directory of flash:/c3750-ipbase-mz.122-35.SE5/
    6 -rwx 7175078 Mar 1 1993 00:05:41 +00:00 c3750-ipbase-mz.122-35.SE5.bin
    7 drwx 4224 Mar 1 1993 00:06:04 +00:00 html
    508 -rwx 598 Mar 1 1993 00:06:42 +00:00 info
    The ‘html’ directory seems for HTTP access:
    Directory of flash:/c3750-ipbase-mz.122-35.SE5/html/

    8 -rwx 7084 Mar 1 1993 00:05:42 +00:00 toolbar.js
    9 -rwx 23783 Mar 1 1993 00:05:42 +00:00 framework.js
    10 -rwx 1749 Mar 1 1993 00:05:42 +00:00 appsui.js
    11 -rwx 47300 Mar 1 1993 00:05:42 +00:00 sorttable.js
    12 -rwx 577 Mar 1 1993 00:05:42 +00:00 title.js
    13 -rwx 20829 Mar 1 1993 00:05:43 +00:00 sitewide.js
    14 -rwx 62 Mar 1 1993 00:05:43 +00:00 more.txt
    15 -rwx 65479 Mar 1 1993 00:05:44 +00:00 fpv.js
    16 -rwx 9353 Mar 1 1993 00:05:44 +00:00 combo.js
    17 -rwx 13563 Mar 1 1993 00:05:44 +00:00 forms.js
    18 -rwx 39650 Mar 1 1993 00:05:44 +00:00 graph.js
    19 -rwx 21674 Mar 1 1993 00:05:45 +00:00 stylesheet.css
    20 -rwx 865 Mar 1 1993 00:05:45 +00:00 helpframework.js
    21 -rwx 1616 Mar 1 1993 00:05:45 +00:00 layers.js
    22 -rwx 425 Mar 1 1993 00:05:45 +00:00 reloadstatus.htm
    23 -rwx 1654 Mar 1 1993 00:05:45 +00:00 menu.css
    24 -rwx 12179 Mar 1 1993 00:05:45 +00:00 setup_report.htm
    As the flash in my Cisco3750 has insufficient place for the new Cisco IOS, can i simply delete ‘c3750-ipbase-mz.122-35.SE5.bin’ in ‘ c3750-ipbase-mz.122-35.SE5/’ directory? Then tftp the new Cisco IOS over?

    Thank you

  • Deshown December 10, 2011, 3:29 pm

    How to update latest iOS

  • Andras Dosztal December 11, 2011, 1:47 am

    David, you can erase first and upload after, but it is recommended to use a UPS.

  • Sanjay April 19, 2012, 8:00 pm

    Recovery Procedure

    Thanks man, i fu**** up my switch with the wrong IOS image 3750X (my fault) and the switch was not able to boot. so if anyone doing a force upgrade with the above method and found that switch or router is not booting up please follow the recovery procedure here:

    1. the original image must be present in the flash unless it is specifically deleted
    2. try to find the original OS directory in the flash –
    after the switch reboot, it will go to the roman mod and shows
    Switch: mode
    now type switch: dir flash:
    you will see all the directories in the flash with the new and old IOS directories
    usually it is the same name as the bin file, and the .bin file is residing within that directories
    if you find the old IOS directory then copy the name of dir and type the command below
    boot flash:/.bin for example

    boot flash:c3750-ipservices-mz.122-25.SEB1/c3750-ipservices-mz.122-25.SEB1.bin
    hit enter
    that’s all
    your system should be back to normal
    after reload finish
    hit the command
    switch# write mem

    so it will keep in memory which is the boot file in future

    i found the help from
    1. of-course this page
    2. https://supportforums.cisco.com/thread/2105637
    3. http://www.fryguy.net/2011/08/15/cisco-3750-stack-member-recover/#more-1984

  • Bharat August 21, 2012, 1:35 pm

    Hi Ramesh,
    I am trying to load downgrade version of IOS on Cisco 3750G-48TS-S. I am not able to do that. Infact i loaded 12.2(25) but its not working and whats i am finding there have to reload by previous version Boot Rom with IOS. Is that possible to load down garde version of the both Boot as well as IOS on Cisco 3750G-48TS-S?

    Thanking You.


  • abel October 17, 2012, 9:03 am

    very well structured… liked !

  • san July 23, 2013, 6:16 pm

    Thanks a lot. Really helpful.

  • Chris H September 10, 2013, 7:51 am

    Never could establish a connection. What am I missing?

  • sugatang itlog December 14, 2013, 3:23 pm

    Hi. does WS-C3560V2-24TS-S (ios ver: 12.2(35)SE5) supports ospf? Or should I upgrade it from 35 to 55. Does OSPF applicable only on IP Services ios images and not IP Base?

    Thanks and really appreciate it.

  • Bandu July 8, 2014, 5:58 pm

    I have upgraded Cisco 3750X-24T-L from c3750e-universalk9-mz.122-53.SE2.bin to
    After Reload Switch took 40min to come up.
    Because the Version of IOS i am upgrading included Microcode Update.
    and only for the first time switch does below
    Front-end Microcode IMG MGR: Preparing to program device microcode…
    Front-end Microcode IMG MGR: Preparing to program device[0]…594412 bytes.
    Front-end Microcode IMG MGR: Programming device 0…rwRrrrrrrwsssssssssss





    this thing goes on unto 30min and switch automatically reboots.

  • Vishal August 7, 2014, 2:54 pm

    I am not able to verify IOS in 2nd flash of stack member. Actullay in stak it has to give verification of ios in all flashes..any clue on this?

    SBKRS01#show switch


    Switch# Role Mac Address Priority State


    *1 Master 0017.9410.0700 1 Ready

    2 Member 0018.b9fc.9380 1 Ready

    SBKRS01#verify ?

    /md5 Compute an md5 signature for a file

    flash1: File to be verified

    flash: File to be verified

    ++++++++++++++++++++++++>flash2 missing

    nvram: File to be verified

  • irfan September 4, 2014, 1:06 am

    Thanks you are a life savior

  • Ahmed Muhi October 20, 2014, 5:46 am

    Thank you so much for such a clear a simple instructions.

  • Joey April 25, 2015, 10:01 am

    For step 5 if you are using an older IOS the commands do not work. Here is a sample command output of what did on a 12.1 IOS taken from Cisco


    2950#conf t
    2950(config)#boot system flash:c2950-i6q4l2-mz.121-13.EA1.bin
    2950#sh boot
    BOOT path-list: flash:c2950-i6q4l2-mz.121-13.EA1.bin

    !— output suppressed —
    !— The boot system statement does not show up in the configuration.
    !— Issue the show boot command to verify whether the new image
    !— boots on the next reload of the switch.

    Issue the wr mem command to save your changes and reload the switch. Here is a sample command output:

    2950#wr mem
    Building configuration…
    Proceed with reload? [confirm]

  • BostonDave May 20, 2015, 9:12 am

    Thanks so much for your clear and helpful instructions!

  • Ade January 6, 2016, 5:37 pm

    Please I need help to upgrade my Catalyst 3750G 12S-S to the latest IOS. I have downloaded the upgrade file but have not been able to installed using tftp. I followed the instruction as shown above but I keep getting the following error message “Error opening tftp:// (Socket error)”. Please what shall I do to get the switch upgraded?
    Thank you.

Leave a Comment