Home > Cisco, Networking > Update Cisco Switch Software

Update Cisco Switch Software

August 31st, 2014

Sometimes it’s imperative to update the software of the networking devices. This could be due to a critical bug or general maintenance.

In any way, it is important to know the process and I’ve decided to summarize the steps for future reference.

1. Download the latest software from CISCO.COM. Please note that downloading software images requires an active CISCO account. In case you don’t have such, you will have to register for one.

At present the support download page is located at here. You need to know the exact version of the switch you will be updating. In case you don’t know it, you can run the following command in the switch terminal and observer the end of the output:

PRASKOVA22#show version

— output suppressed —

Switch Ports Model              SW Version            SW Image
—— —– —–              ———-            ———-
*    1 26    WS-C2960-24PC-L    12.2(44)SE1           C2960-LANBASEK9-M

Our software version is 12.2(44)SE1 and the switch model is WS-C2960-24PC-L. Now search the CISCO.com website and download the latest software images (.bin) or (.tar).

2. Start a TFTP server in order to backup existing software image and to upload the new one.

Since I am using a Windows 7 machine for connecting to the switch through COM1 console access (besides SSH), I downloaded TFTPD64. It is really easy and straightforward to use.

Once you start the server, you have to allow access to the internal network (windows will automatically prompt you for that).

Create a temporary folder on your drive and point the “Current Directory” of the TFTPd server to that location.

Move the image files downloaded in step 1 to this same folder location.

Now you can test the TFTP server by backing up your current switch running-config.

Here is an example that I did:

PRASKOVA22#copy running-config tftp:
Address or name of remote host []? 192.168.1.120
Destination filename [praskova22-confg]? backuoAug312014_st0ma
!!
1573 bytes copied in 1.426 secs (1103 bytes/sec)

Now check the folder you created and make sure there is a new file by the name you entered as Destination filename above.

In case you don’t see the file there seems to be some sort of a problem with the TFTP server, your networking environment, firewall, etc.

3. Back up your existing configuration and software image.

Similarly to the previous command, you can easily backup the existing image file to the TFTP server you started in the above step.

By issuing the “show version” command again, you can check which is the System image file in use by the switch. In my case this is:

PRASKOVA22#show version

–output suppressed–

System image file is “flash:c2960-lanbasek9-mz.122-44.SE1”

–output suppressed–

Now I’ll backup the system image by copying it to the TFTP server

PRASKOVA22#copy flash:c2960-lanbasek9-mz.122-44.SE1 tftp:
Address or name of remote host []? 192.168.1.120
Destination filename [c2960-lanbasek9-mz.122-44.SE1]? c2960-lanbasek9-mz.122-44.SE1_aug312014
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6935296 bytes copied in 16.157 secs (429244 bytes/sec)

Check on the TFTP folder and make sure the file has been transferred successfully.

4. Copy the software update image on the flash memory of the switch

Let’s first check the available space on the flash memory:

PRASKOVA22#cd flash:
PRASKOVA22#dir
Directory of flash:/

    2  -rwx     6935296   Jan 1 1970 03:03:16 +00:00  c2960-lanbasek9-mz.122-44.SE1
    3  -rwx        1586   Mar 1 1993 00:28:23 +00:00  backup_aug302014_sk.bkp
    4  -rwx       12626  Oct 27 2011 07:47:11 +00:00  config.text.renamed
    5  -rwx        1605  Oct 27 2011 07:47:11 +00:00  private-config.text.renamed
    6  -rwx        1036   Mar 1 1993 00:00:34 +00:00  vlan.dat.renamed
    7  -rwx        3570   Mar 1 1993 00:33:21 +00:00  private-config.text
    8  -rwx        2072   Mar 1 1993 00:33:21 +00:00  multiple-fs
    9  -rwx        1542   Mar 1 1993 00:33:21 +00:00  config.text
   11  -rwx         536   Mar 1 1993 03:45:53 +00:00  info

27998208 bytes total (20973056 bytes free)

In case you don’t have enough space to copy the new software image on the flash, you might have to delete the existing software image.

The following command will extract the tar software image you have downloaded from the CISCO.COM support download page into the flash memory of the switch:

PRASKOVA22#archive tar /xtract tftp://192.168.1.120/c2960-lanbasek9-tar.122-55.SE9.tar flash:

–output suppressed–

extracting c2960-lanbasek9-mz.122-55.SE9/html/reset.htm (6490 bytes)
extracting c2960-lanbasek9-mz.122-55.SE9/html/back.htm (515 bytes)
extracting c2960-lanbasek9-mz.122-55.SE9/c2960-lanbasek9-mz.122-55.SE9.bin (9821732 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
extracting info (107 bytes)
[OK – 13772800 bytes]

Once you get the OK message you can verify the extracted image on the flash memory:


PRASKOVA22#verify /md5 flash:c2960-lanbasek9-mz.122-55.SE9/c2960-lanbasek9-mz.122-55.SE9.bin

…………………………………………………………………………………………………………………………………………………..Done!
verify /md5 (flash:c2960-lanbasek9-mz.122-55.SE9/c2960-lanbasek9-mz.122-55.SE9.bin) = e668bede8824f56c576f007e1ed85f31

 

5. Let’s make the new software image the default one for system boot:

 

PRASKOVA22#configure terminal

PRASKOVA22(config)#boot system flash:c2960-lanbasek9-mz.122-55.SE9/c2960-lanbasek9-mz.122-55.SE9.bin

PRASKOVA22(config)#end

PRASKOVA22#write memory
Building configuration…
[OK]
PRASKOVA22#reload

 

Once the switch reloads we check the software version again:

PRASKOVA22>show version
Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(55)SE9, RELEASE SOFTWARE (fc1)

We have successfully updated the software version from 12.2(44)SE1 to  12.2(55)SE9.

 

 

 

 

 

 

 

 

 

 

 

Categories: Cisco, Networking Tags:
Comments are closed.