Reference:Catalyst 3750 Switch Cisco IOS Commands
archive download-sw
and IOS tar image
Upgrading or downgrading of Cisco IOS has been made easier with archive download-sw
command, this command downloads and unpacks the IOS tar file and install them into their respective directories in the flash. No longer you need to do a delete of IOS then upload the IOS, the archive
command does all the thing for you.
Without option and /safe
option
archive download-sw
command has several options, if none is specified the default option is /overwrite
, this option means to overwrite everything in the flash with the downloaded IOS tar image.
3560-2#$archive download-sw tftp://10.10.10.10/c3560-ipservicesk9-tar.122-52.SE.tar Loading c3560-ipservicesk9-tar.122-52.SE.tar from 10.10.10.10 (via Vlan1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK - 15093760 bytes] Loading c3560-ipservicesk9-tar.122-52.SE.tar from 10.10.10.10 (via Vlan1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! examining image... extracting info (109 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/info (519 bytes) extracting info (109 bytes) System Type: 0x00000000 Ios Image File Size: 0x00BB5A00 Total Image File Size: 0x00E65200 Minimum Dram required: 0x08000000 Image Suffix: ipservicesk9-122-52.SE Image Directory: c3560-ipservicesk9-mz.122-52.SE Image Name: c3560-ipservicesk9-mz.122-52.SE.bin Image Feature: IP|LAYER_3|PLUS|SSH|3DES|MIN_DRAM_MEG=128 Old image for switch 1: flash:/c3560-ipservicesk9-mz.122-46.SE Old image will be deleted after download. Extracting images from archive into flash... c3560-ipservicesk9-mz.122-52.SE/ (directory) extracting c3560-ipservicesk9-mz.122-52.SE/c3560-ipservicesk9-mz.122-52.SE.bin (12272570 bytes) ..... extracting c3560-ipservicesk9-mz.122-52.SE/html/images/toolbar_refresh.gif (1189 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/3560F_24TS_DC.gif (6488 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/tab_left_inactive.gif (919 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/10gb_sfp_type2_gray.gif (233 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/down_arrow.gif (837 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/141282.gif (2882 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/131081.gif (1320 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/cna_icon3.gif (1196 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/c3560_mode.gif (900 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/toolbar_help.gif (1077 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/port_label_blank.gif (807 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/sfp_side_gray.gif (217 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/131075.gif (1223 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/92753.gif (9532 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/sitewide_glossary_off.gif (914 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/205791.gif (8525 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/images/131077.gif (975 bytes) ..... Installing (renaming): `flash:update/c3560-ipservicesk9-mz.122-52.SE' -> `flash:/c3560-ipservicesk9-mz.122-52.SE' New software image installed in flash:/c3560-ipservicesk9-mz.122-52.SE Removing old image: flash:/c3560-ipservicesk9-mz.122-46.SE All software images installed.
Caution: When IOS is being extracted, it may seems your switch or router hangs, but it does not! Do not turn off the power or do anything stupid that disrupt the update process, wait patiently!
3560-2#cd flash:/c3560-ipservicesk9-mz.122-52.SE 3560-2#dir Directory of flash:/c3560-ipservicesk9-mz.122-52.SE/ 368 -rwx 12272570 Mar 2 1993 14:40:51 +00:00 c3560-ipservicesk9-mz.122-52.SE.bin 369 drwx 4544 Mar 2 1993 14:42:10 +00:00 html 760 -rwx 519 Mar 2 1993 14:42:13 +00:00 info 32514048 bytes total (17410048 bytes free) 3560-2#
The old IOS was deleted and replaced with the new one.
/allow-feature-upgrade
If you are updating firmware that is a different feature set you need to use this option otherwise the installation process will produce an error.
/allow-feature-upgrade
is not really an upgrade, if your switch is using ipservices image but for some reason you need ipbase image instead you can use this option to download the ipbase and install.
3560-2#$archive download-sw /allow-feature-upgrade tftp://10.10.10.10/c3560-ipbasek9-tar.122-55.SE5.tar ...... extracting c3560-ipbasek9-mz.122-55.SE5/html/smartports.shtml (81609 bytes) extracting c3560-ipbasek9-mz.122-55.SE5/html/xhome.htm (11219 bytes) extracting c3560-ipbasek9-mz.122-55.SE5/html/portstatistics.shtml (21606 bytes) extracting c3560-ipbasek9-mz.122-55.SE5/c3560-ipbasek9-mz.122-55.SE5.bin (11760304 bytes) extracting c3560-ipbasek9-mz.122-55.SE5/info (505 bytes) extracting info (106 bytes) Installing (renaming): `flash:update/c3560-ipbasek9-mz.122-55.SE5' -> `flash:/c3560-ipbasek9-mz.122-55.SE5' New software image installed in flash:/c3560-ipbasek9-mz.122-55.SE5 Removing old image: flash:/c3560-ipservicesk9-mz.122-52.SE All software images installed. 3560-2#
As shown above, the switch feature set is downgraded from ipservices feature set to ipbase feature set.
/imageonly
option
/imageonly
is the option that download only the bin image and not the html files. If the old IOS has html, as soon as the new IOS bin is downloaded the old IOS bin image and the html are deleted.
This is the original output before doing archive download-sw /imageonly
3560-2#cd flash:/c3560-ipbasek9-mz.122-55.SE5 3560-2#dir Directory of flash:/c3560-ipbasek9-mz.122-55.SE5/ 13 drwx 4800 Mar 1 1993 00:12:06 +00:00 html 900 -rwx 11760304 Mar 1 1993 00:22:05 +00:00 c3560-ipbasek9-mz.122-55.SE5.bin 901 -rwx 505 Mar 1 1993 00:22:05 +00:00 info 32514048 bytes total (16907264 bytes free) 3560-2#
3560-2#$archive download-sw /imageonly tftp://10.10.10.10/c3560-ipbasek9-tar.122-52.SE.tar Loading c3560-ipbasek9-tar.122-52.SE.tar from 10.10.10.10 (via Vlan1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK - 13690880 bytes] Loading c3560-ipbasek9-tar.122-52.SE.tar from 10.10.10.10 (via Vlan1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! examining image... extracting info (105 bytes) extracting c3560-ipbasek9-mz.122-52.SE/info (502 bytes) extracting info (105 bytes) System Type: 0x00000000 Ios Image File Size: 0x00A5F200 Total Image File Size: 0x00D0EA00 Minimum Dram required: 0x08000000 Image Suffix: ipbasek9-122-52.SE Image Directory: c3560-ipbasek9-mz.122-52.SE Image Name: c3560-ipbasek9-mz.122-52.SE.bin Image Feature: IP|LAYER_3|SSH|3DES|MIN_DRAM_MEG=128 Old image for switch 1: unknown Extracting images from archive into flash... extracting c3560-ipbasek9-mz.122-52.SE/c3560-ipbasek9-mz.122-52.SE.bin (10871418 bytes) extracting c3560-ipbasek9-mz.122-52.SE/info (502 bytes) extracting info (105 bytes) Installing (renaming): `flash:update/c3560-ipbasek9-mz.122-52.SE' -> `flash:/c3560-ipbasek9-mz.122-52.SE' New software image installed in flash:/c3560-ipbasek9-mz.122-52.SE All software images installed. 3560-2#
the output after the IOS is downloaded.
3560-2#dir Directory of flash:/ 367 drwx 128 Mar 1 1993 04:41:41 +00:00 c3560-ipbasek9-mz.122-52.SE 3 -rwx 74 Mar 1 1993 09:32:05 +00:00 backbonefast 4 -rwx 3002 Mar 1 1993 02:10:24 +00:00 ine.cfg 5 -rwx 3877 Mar 2 1993 06:12:26 +00:00 cyrus-vol-1.cfg 6 -rwx 3096 Mar 1 1993 04:49:08 +00:00 multiple-fs 8 -rwx 1938 Mar 1 1993 04:49:07 +00:00 private-config.text 9 -rwx 2237 Mar 1 1993 00:02:36 +00:00 default.cfg 10 -rwx 924 Mar 1 1993 11:11:18 +00:00 vlan.dat 11 drwx 192 Mar 1 1993 04:41:42 +00:00 c3560-ipbasek9-mz.122-55.SE5 12 -rwx 170167 Mar 1 1993 13:23:29 +00:00 backbonefast.log 2 -rwx 1761 Mar 1 1993 04:49:07 +00:00 config.text 32514048 bytes total (6034944 bytes free) 3560-2#cd c3560 3560-2#cd flash:/c3560 3560-2#cd flash:/c3560-ipbasek9-mz.122-55 3560-2#cd flash:/c3560-ipbasek9-mz.122-55.SE5 3560-2#dir Directory of flash:/c3560-ipbasek9-mz.122-55.SE5/ 13 drwx 4800 Mar 1 1993 00:12:06 +00:00 html 900 -rwx 11760304 Mar 1 1993 00:22:05 +00:00 c3560-ipbasek9-mz.122-55.SE5.bin 901 -rwx 505 Mar 1 1993 00:22:05 +00:00 info 32514048 bytes total (6034944 bytes free) 3560-2# 3560-2#cd flash:/c3560-ipbasek9-mz.122-52.SE 3560-2#dir Directory of flash:/c3560-ipbasek9-mz.122-52.SE/ 368 -rwx 10871418 Mar 1 1993 04:41:41 +00:00 c3560-ipbasek9-mz.122-52.SE.bin 369 -rwx 502 Mar 1 1993 04:41:41 +00:00 info 32514048 bytes total (6034944 bytes free) 3560-2#
Concatenate option
Option can be concatenated to perform more specific task.
Example:3560-2#archive download-sw /overwrite /allow-feature-upgrade tftp://10.10.10.10/c3560-ipservicesk9-tar.122-55.SE5.tar
This upgrades the feature set and overwrite the existing software in the flash.
..... extracting c3560-ipservicesk9-mz.122-55.SE5/html/portstatistics.shtml (21606 bytes) extracting c3560-ipservicesk9-mz.122-55.SE5/c3560-ipservicesk9-mz.122-55.SE5.bin (12752928 bytes) extracting c3560-ipservicesk9-mz.122-55.SE5/info (522 bytes) extracting info (110 bytes) Installing (renaming): `flash:update/c3560-ipservicesk9-mz.122-55.SE5' -> `flash:/c3560-ipservicesk9-mz.122-55.SE5' New software image installed in flash:/c3560-ipservicesk9-mz.122-55.SE5 Removing old image: flash:/c3560-ipbasek9-mz.122-52.SE All software images installed. 3560-2#
After you did the feature set upgrade the directory of the old IOS still exists however the old IOS was deleted.
3560-2#dir Directory of flash:/ 7 -rwx 1880 Mar 1 1993 01:59:02 +00:00 config.text 3 -rwx 74 Mar 1 1993 09:32:05 +00:00 backbonefast 4 -rwx 3002 Mar 1 1993 02:10:24 +00:00 ine.cfg 5 -rwx 3877 Mar 2 1993 06:12:26 +00:00 cyrus-vol-1.cfg 2 -rwx 1938 Mar 1 1993 01:59:02 +00:00 private-config.text 8 -rwx 3096 Mar 1 1993 01:59:03 +00:00 multiple-fs 9 -rwx 2237 Mar 1 1993 00:02:36 +00:00 default.cfg 10 -rwx 924 Mar 1 1993 11:11:18 +00:00 vlan.dat 11 drwx 128 Mar 1 1993 00:26:03 +00:00 c3560-ipbasek9-mz.122-55.SE5 12 -rwx 170167 Mar 1 1993 13:23:29 +00:00 backbonefast.log 370 drwx 192 Mar 1 1993 00:44:00 +00:00 c3560-ipservicesk9-mz.122-55.SE5 32514048 bytes total (12258816 bytes free)
The switch has already upgraded the feature set to ipservices, the ipbase directory does not contain any IOS.
3560-2#cd flash:/c3560-ipbasek9-mz.122-55.SE5 3560-2#dir Directory of flash:/c3560-ipbasek9-mz.122-55.SE5/ 13 drwx 4800 Mar 1 1993 00:12:06 +00:00 html 901 -rwx 505 Mar 1 1993 00:22:05 +00:00 info
To remove the directory use the delete /recursive /force
command.
/safe
option
The /safe
option waits for the new IOS to be downloaded successfully before deleting the old IOS, the old IOS is deleted as soon as the new IOS is downloaded.
3560-2#$archive download-sw /safe tftp://10.10.10.10/c3560-ipservicesk9-tar.122-52.SE.tar Loading c3560-ipservicesk9-tar.122-52.SE.tar from 10.10.10.10 (via Vlan1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK - 15093760 bytes] Loading c3560-ipservicesk9-tar.122-52.SE.tar from 10.10.10.10 (via Vlan1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! examining image... extracting info (109 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/info (519 bytes) extracting info (109 bytes) System Type: 0x00000000 Ios Image File Size: 0x00BB5A00 Total Image File Size: 0x00E65200 Minimum Dram required: 0x08000000 Image Suffix: ipservicesk9-122-52.SE Image Directory: c3560-ipservicesk9-mz.122-52.SE Image Name: c3560-ipservicesk9-mz.122-52.SE.bin Image Feature: IP|LAYER_3|PLUS|SSH|3DES|MIN_DRAM_MEG=128 Old image for switch 1: unknown Extracting images from archive into flash... c3560-ipservicesk9-mz.122-52.SE/ (directory) extracting c3560-ipservicesk9-mz.122-52.SE/c3560-ipservicesk9-mz.122-52.SE.bin (12272570 bytes) ...... ...... extracting c3560-ipservicesk9-mz.122-52.SE/html/discover.js (67802 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/discover.shtml (23298 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/xsetup.js (71430 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/smartports.js (72548 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/menu.js (9732 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/html/xsetup.shtml (107182 bytes) extracting c3560-ipservicesk9-mz.122-52.SE/info (519 bytes) extracting info (109 bytes) Installing (renaming): `flash:update/c3560-ipservicesk9-mz.122-52.SE' -> `flash:/c3560-ipservicesk9-mz.122-52.SE' New software image installed in flash:/c3560-ipservicesk9-mz.122-52.SE All software images installed. 3560-2#