IOS Upgrade

Router
Router Flash
Internal Flash (ex: 2600)PCMCIA flash cards (ex: 3600)
PCMCIA flash cards (ex: 3600)

Before you start make sure you have enough space for new file system

Check how much is required by the IOS when you download it

IOS Memory Req

IOS Memory Req

and now check on the router
#show version
...
DRAM configuration is 72 bits wide with parity enabled.
256K bytes of non-volatile configuration memory.
255744K bytes of ATA System CompactFlash 0 (Read/Write)
...

so (256+255744)/1024=250Mb of total flash

now check how much of that is free and if its enough for the new ios or do you need to delete the current one

#dir flash0:
Directory of flash0:/
1 -rw- 60584584 Dec 14 2011 03:50:20 +00:00 c3900e-universalk9-mz.SPA.151-2.T4.bin
...
261586944 bytes total (105418752 bytes free)

so 105418752 bytes are free … convert to Mb is about 100Mb

and to check for amount of dram
sh ver
.....
If you require further assistance please contact us by sending email to
export@cisco.com.
Cisco CISCO3925-CHASSIS (revision 1.0) with C3900-SPE200/K9 with 752640K/295936K bytes of memory.
Processor board ID FGL155XXXXXX
4 Gigabit Ethernet interfaces
......

So 752640K+295936= 1048576 kilobytes or kB so 1024Mb

1. Console connection to router (9600 baud, 8 databits, 0 parity bits, 1 stop bit, no flow control).
2. ping from router to PC
3. Make a backup of your current ios. Copy current IOS to tftp #copy flash tftp
4. copy current config #sh run
5. copy new ios to flash copy tftp flash
6. check boot var show boot or show run | include boot
7. user the verify flash:xxx command to check the ios
8. wr mem
9. reload

Switch
switch#
switch#dir flash:
Directory of flash:/
!
460 -rwx 1584 Mar 6 1993 22:16:40 +00:00 vlan.dat
461 -rwx 5663 Mar 6 1993 22:38:51 +00:00 config.text
462 -rwx 5 Mar 6 1993 22:38:51 +00:00 private-config.text
2 drwx 512 Mar 1 1993 00:09:46 +00:00 c3560-ipbase-mz.122-35.SE5
!
27998208 bytes total (18639360 bytes free)
!
!Note "erase flash:" will delete all on flash
switch#delete /force /recursive flash:c3560-ipbase-mz.122-35.SE5
switch#
switch#archive tar /xtract tftp://10.12.202.100/c3560-ipbasek9-tar.122-55.SE1.tar flash:
switch#
switch:verify flash:c3560-ipbasek9-mz.122-55.SE1/c3560-ipbasek9-mz.122-55.SE1.bin
!
Verified flash:c3560-ipbasek9-mz.122-55.SE1/c3560-ipbasek9-mz.122-55.SE1.bin
switch#show boot
!
switch#show flash:
Directory of flash:/
!
2 -rwx 1919 Mar 1 1993 00:03:48 +00:00 private-config.text
3 -rwx 1584 Mar 7 1993 20:56:03 +00:00 vlan.dat
5 drwx 512 Mar 8 1993 20:41:30 +00:00 c3560-universalk9-mz.122-55.SE2
585 -rwx 3096 Mar 1 1993 00:02:26 +00:00 multiple-fs
583 -rwx 111 Mar 8 1993 20:46:08 +00:00 info
584 -rwx 5750 Mar 1 1993 00:03:48 +00:00 config.text
!
57931776 bytes total (42743296 bytes free)
switch(config)#boot system flash:c3560-ipbasek9-mz.122-55.SE1/c3560-ipbasek9-mz.122-55.SE1.bin
switch#
switch#wr mem
switch#
switch#reload

Note also found the following in another blog post
upgrade the IOS on my 3750 series switches
#wr mem
#archive download-sw /safe /allow-feature-upgrade /reload tftp:ip_address/ios_image.tar

it will download/verify/redownload if need be
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)
if you’re running a stack, if you upgrade the stack master, it should auto-upgrade the rest of the stack
Ref:http://www.thegeekstuff.com/2011/06/upgrade-cisco-ios-image/

Also making a router a tftp server..
Router A
(config)#tftp-server flash:c3900e-universalk9-mz.SPA.152-4.M3.bin
Router B
#copy tftp://10.1.1.1/c3900e-universalk9-mz.SPA.152-4.M3.bin flash:

If your transferring IOS over the WAN tftp can take a long time … ftp is much faster
(config)#ip ftp username alexis
(config)#ip ftp password alexispass
Router#copy ftp: flash:

Tags: ,

About Alexis Katsavras

Working as Freelance Cisco Unified Communications Consultant in the UK. www.NetPacket.co.uk