Upgrade IOS

De Slacam_Wiki
Ir para: navegação, pesquisa

Any software is pron to have software upgrades either to fix a bug or a Security vulnerability or even for the fact the software has reached its end of life.

While Network devices and appliances are no exception, the upgrade process requires a lot of precautions and measures are taken to ensure that the upgrade process doesn't fail or cause problems post installation. Upgrading Cisco IOS is no exception. Care has to be taken to ensure that the newer version is tested on a test bed before deploying in the production network especially if we are talking core network switches and routers.

<span id="more-143" />

The following procedure takes you through the steps to successfully upgrade Cisco IOS in a Cisco Router or a Switch. The latest version of the Cisco IOS can be downloaded from the Cisco Software Downloade center. You need to be a registered user to be able to download the software.

<a href="http://www.cisco.com/tacpage/sw-center/index.shtml" >http://www.cisco.com/tacpage/sw-center/index.shtml</a>

Write Unsaved configurations

ciscorouter# write memory
Building configuration…
[OK]

Check space on Flash Memory

ciscorouter# show flash

Backup Startup Configuration

Setup a TFTP server in the same IP range as the Cisco device to backup the configs, IOS image and also for later to upload the new IOS image.

ciscorouter# copy startup-config tftp
Address or name of remote host []? 192.168.1.50
Destination filename [startup-config]?
 !!
1278 bytes c opied in 0.100 secs

Click the links for Backups using <a href="http://www.itsyourip.com/cisco/how-to-backup-and-restore-cisco-routers-using-a-ftp-server/" target="_blank" title="Backup configs using FTP Server">FTP</a> & <a href="http://www.itsyourip.com/cisco/how-to-backup-restore-config-in-cisco-routers-and-switches-using-hyperterminal/" target="_blank" title="Backup and restore cisco config using Hyperterminal">Hyperterminal</a>

Backup Current IOS Image

ciscorouter# copy flash: tftp:
Source filename []? xxxxx-xx-xx.121-x.XB
Address or name of remote host []? 192.168.1.150
Destination filename [xxxxx-xx-xx.121-x.XB]?

Now, we are all set. Load the new IOS image from the TFTP onto the flash

ciscorouter# copy tftp: flash:
Address or name of remote host []? 192.168.1.150
Source filename []? xxxxx-xx-xx.121-x.XB
Destination filename [xxxxx-xx-xx.121-x.XB]?
 %Warning:There is a file already existing with this name
Do you want to over write? [confirm]
Accessing tftp://192.168.1.150/xxxxx-xx-xx.121-x.XB…
Erase flash: before copying? [confirm]
Erasing the flash filesystem will remove all files! Continue? [confirm]
Erasing device… eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
ee …erased
Erase of flash: complete
Loading xxxxx-xx-xx.121-x.XB from 192.168.1.150 (via Ethernet0): !!!!!!!!!!!!!!!!!!!!
…..
….

..
[OK - 3802992/7605248 bytes]

Verifying checksum…  OK (0×1ABC)
3802992 bytes copied in 68.236 secs (65568 bytes/sec)

 This may error if there isn't enough memory in which case, you need to delete the existing image and copy the newer image onto the router  or switch.

On a Cisco Catalyst 3560

ciscorouter# delete /force /recurssive flash:/c3560-ipbase-mz.122-35.SE5 

ciscorouter#sh flash:
Directory of flash:/

   3  -rwx        1216   Mar 1 1993 00:10:27 +00:00  config.text
   4  -rwx           5   Mar 1 1993 00:10:27 +00:00  private-config.text

15998976 bytes total (15995904 bytes free)

That deletes the existing image and the show command just show that.

Now copy the newer image onto the flash

ciscorouter#copy tftp: flash:
Address or name of remote host []? 10.10.10.2
Source filename []? c3560-ipbasek9-mz.122-40.SE.bin
Destination filename [c3560-ipbasek9-mz.122-40.SE.bin]?
Accessing tftp://10.10.10.2/c3560-ipbasek9-mz.122-40.SE.bin…
Loading c3560-ipbasek9-mz.122-40.SE.bin from 10.10.10.2 (via Vlan1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!
[OK - 8295106 bytes]

8295106 bytes copied in 124.571 secs (66589 bytes/sec)

Check if the version is upgraded

ciscorouter# sh flash

Update the system config to boot with new image.

Importante dar o comando abaixo para manter a flash antiga:

ciscorouter(config)#boot system flash:/c3560-ipbasek9-mz.122-40.SE.bin 

If it looks ok. Reload the Cisco Router

ciscorouter# reload

When is back online check if the cisco device has booted with the new Cisco IOS image.

ciscorouter# sh ver

Thats it. We are rocking!!!!