Archive for category Cisco

Step by Step – How to Update Cisco IOS/Firmware

I did this on a 3560 Switch, mileage may vary.

1: Save a Copy of the Running Config just in case.

This is just a safety net but always a good practice.

Switch#Show Running-Config

Copy the output to a text file some place.

2: Check the version of IOS in Flash

Log into the Switch and get into privilege mode by typing “enable”

Run the command “dir” or “show flash” to see what is stored in flash

Switch#dir
Directory of flash:/

500 -rwx 1048 Mar 1 1993 00:01:34 +00:00 multiple-fs
3 drwx 512 Mar 1 1993 00:10:14 +00:00 c3560e-universalk9-mz.122-55.SE5

57671680 bytes total (38020096 bytes free)

Then validate the version that is running is the same as it never hurts to check.

Run the command show version

Switch#show ver

.....................

Switch Ports Model              SW Version            SW Image
------ ----- -----              ----------            ----------
*    1 54    WS-C3560X-48P      12.2(55)SE5           C3560E-UNIVERSALK9-M

Configuration register is 0xF

3: Download the latest version from Cisco’s website

Website: http://software.cisco.com/download/navigator.html?mdfid=268438038&flowid=2622

The ISO must match the switch model and version of ISO.

Example:
We are running c3560e-universalk9-mz.122-55.SE5 as we can see from the version command or more specific 12.2 on a 3560e Switch in this case. The upgrade file is c3560e-universalk9-mz.152-1.E1 or version 15.2.

4: Place the IOS file some place it can be fetched by the switch

I installed Solarwinds free tftp server on a server at 192.168.200.100. You could use ssh or ftp if you want commands will be similar. You would have to do some other work and tftp is the simplest.

5: From the Cisco Switch Download ISO from TFTP Server

Make sure your TFTP Server is running. On the Cisco device run the following command from enable (exec) mode. Where c3560e-universalk9-mz.152-1.E1.bin is the upgrade image you downloaded from Cisco.

230Net-4#copy tftp flash
Address or name of remote host []? 192.168.200.100
Source filename []? c3560e-universalk9-mz.152-1.E1.bin
Destination filename [c3560e-universalk9-mz.152-1.E1.bin]?

After a series of ”!” the file should show up under flash, you can check with another “dir” or “show flash” command test. To see the file is now in Flash, but not used yet.

Switch#show flash
Directory of flash:/

....
    5  drwx         512   Mar 1 1993 00:10:33 +00:00  c3560e-universalk9-mz.122-55.SE3
  444  -rwx    23152768  Feb 10 2014 05:12:47 +00:00  c3560e-universalk9-mz.152-1.E1.bin

57671680 bytes total (15296000 bytes free)

6: Validate Image

Do this just to make sure the file is what it should be.
Note: I discovered on the cisco site I link below they did not include the /md5 part of the command but I couldn’t get it to work without it.

230Net-4#verify /md5 flash:c3560e-universalk9-mz.152-1.E1.bin
......................................Done!
verify /md5 (flash:c3560e-universalk9-mz.152-1.E1.bin) = 8d8332134837780940f2672db566697d

7: Verify The Configuration Register

Use the show version command to check the value. The last line item will show the Register you are booting from.

Switches should be 0xF
Routers should be 0x2102

230Net-4#show version
Cisco IOS Software, C3560E Software (C3560E-UNIVERSALK9-M), Version 15.2(1)E1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2013 by Cisco Systems, Inc.
Compiled Fri 22-Nov-13 10:28 by prod_rel_team
.....

CLEI Code Number                : COMJP00ARB
Hardware Board Revision Number  : 0x03


Switch Ports Model              SW Version            SW Image
------ ----- -----              ----------            ----------
*    1 54    WS-C3560X-48P      15.2(1)E1             C3560E-UNIVERSALK9-M


Configuration register is 0xF

8: Set the next boot to be the new Image

Configure the system to boot from the new image after the next reboot.

Show current boot image
The second line shows the Image we are booting from in this case the old one.

230Net-4#show boot
BOOT path-list      : flash:c3560e-universalk9-mz.122-55.SE3
Config file         : flash:/config.text
Private Config file : flash:/private-config.text
Enable Break        : no
Manual Boot         : no
Allow Dev Key         : yes
HELPER path-list    :
Auto upgrade        : yes
Auto upgrade path   :
NVRAM/Config file
      buffer size:   524288
Timeout for Config
          Download:    0 seconds
Config Download
       via DHCP:       disabled (next boot: disabled)

Change the boot image to the new one.
Run the following command from config mode.

230Net-4(config)#boot system flash:c3560e-universalk9-mz.152-1.E1.bin

Validate Change

230Net-4#show boot
BOOT path-list      : flash:c3560e-universalk9-mz.152-1.E1.bin
Config file         : flash:/config.text
Private Config file : flash:/private-config.text
Enable Break        : no
Manual Boot         : no
Allow Dev Key         : yes
HELPER path-list    :
Auto upgrade        : yes
Auto upgrade path   :
NVRAM/Config file
      buffer size:   524288
Timeout for Config
          Download:    0 seconds
Config Download
       via DHCP:       disabled (next boot: disabled)

Save Config

230Net-4#Write

9: Reload/Reboot device

230Net-4#reload

Note:This can take a while, on my switch it took between 20 and 30 minutes in this case.

Show Version
After the reboot log back in and check to make sure the new version is running.

230Net-4#Sh Ver
..
Switch Ports Model              SW Version            SW Image
------ ----- -----              ----------            ----------
*    1 54    WS-C3560X-48P      15.2(1)E1             C3560E-UNIVERSALK9-M

Delete the old IOS Image

230Net-4#delete /f /r flash:c3560e-universalk9-mz.122-55.SE3

That’s it.

References:

How to upgrade the IOS http://www.cisco.com/en/US/products/ps5855/products_tech_note09186a00801fc986.shtml

Register Values http://www.cisco.com/en/US/products/hw/routers/ps133/products_tech_note09186a008022493f.shtml

Leave a comment