Upgrade IOS
Archive
Switch#dir Directory of flash:/ 509 -rwx 2301 Mar 1 1993 00:24:41 +00:00 config.text 510 -rwx 24 Mar 1 1993 00:24:41 +00:00 private-config.text 511 -rwx 2072 Mar 1 1993 00:24:41 +00:00 multiple-fs 512 -rwx 3584 Mar 1 1993 00:38:49 +00:00 tftp 2 drwx 512 Mar 1 1993 00:15:19 +00:00 c3750-ipbasek9-mz.122-55.SE7
The command below creates new archive saved.tar including all files and directories in c3750-ipbasek9-mz.122-55.SE7 directory and saves the TAR archive on tftp server.
Switch#archive tar /create tftp://192.168.173.1/saved.tar c3750-ipbasek9-mz.122-55.SE7
Extract
Switch#archive tar /xtract tftp://192.168.173.1/c3750-ipbasek9-tar.122-55.SE5.tar flash1: Loading c3750-ipbasek9-tar.122-55.SE5.tar from 192.168.173.1 (via Vlan1): ! c3750-ipbasek9-mz.122-55.SE5/ (directory) < --- output omitted --- > extracting c3750-ipbasek9-mz.122-55.SE5/c3750-ipbasek9-mz.122-55.SE5.bin (12098310 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! extracting c3750-ipbasek9-mz.122-55.SE5/info (681 bytes) extracting info (106 bytes) [OK - 15912960 bytes]
Delete
We need sometimes delete old IOS image due to limited space.
Switch#delete /recursive flash1:c3750-ipbasek9-mz.122-55.SE5 Delete filename [c3750-ipbasek9-mz.122-55.SE5]? Examine files in directory flash:c3750-ipbasek9-mz.122-55.SE5? [confirm] Delete flash:c3750-ipbasek9-mz.122-55.SE5? [confirm]
Set to boot from new image
Check current boot anchor
Switch#sh boot BOOT path-list : flash:/c3750-ipbasek9-mz.122-55.SE7/c3750-ipbasek9-mz.122-55.SE7.bin Config file : flash:/config.text Private Config file : flash:/private-config.text Enable Break : no Manual Boot : no 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)
List directories on flash1:
Switch(config)#do dir Directory of flash:/ 509 -rwx 2301 Mar 1 1993 00:24:41 +00:00 config.text 510 -rwx 24 Mar 1 1993 00:24:41 +00:00 private-config.text 511 -rwx 2072 Mar 1 1993 00:24:41 +00:00 multiple-fs 512 -rwx 3584 Mar 1 1993 00:38:49 +00:00 tftp 2 drwx 512 Mar 1 1993 01:32:54 +00:00 c3750-ipbasek9-mz.122-55.SE5 513 -rwx 106 Mar 1 1993 01:41:19 +00:00 info 27998208 bytes total (11941888 bytes free) Swith(config)do dir flash1:c3750-ipbasek9-mz.122-55.SE5 Directory of flash:/c3750-ipbasek9-mz.122-55.SE5/ 3 drwx 5632 Mar 1 1993 01:32:54 +00:00 html 507 -rwx 12098310 Mar 1 1993 01:34:53 +00:00 c3750-ipbasek9-mz.122-55.SE5.bin 508 -rwx 681 Mar 1 1993 01:41:19 +00:00 info 27998208 bytes total (11941888 bytes free)
Set to boot from another image
boot system switch all flash1:c3750-ipbasek9-mz.122-55.SE5/c3750-ipbasek9-mz.122-55.SE5.bin
Verify new boot image has been anchored
Switch#sh boot BOOT path-list : flash1:c3750-ipbasek9-mz.122-55.SE5/c3750-ipbasek9-mz.122-55.SE5.bin Config file : flash:/config.text Private Config file : flash:/private-config.text Enable Break : no Manual Boot : no 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)
Write changes and reload
#wri #reload
After reboot
Before reboot
Switch#show version Cisco IOS Software, C3750 Software (C3750-IPBASEK9-M), Version 12.2(55)SE7, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2013 by Cisco Systems, Inc. Compiled Mon 28-Jan-13 10:16 by prod_rel_team Image text-base: 0x01000000, data-base: 0x02D00000 ROM: Bootstrap program is C3750 boot loader BOOTLDR: C3750 Boot Loader (C3750-HBOOT-M) Version 12.2(53r)SEY4, RELEASE SOFTWARE (fc1) Switch uptime is 2 hours, 2 minutes System returned to ROM by power-on System image file is "flash:/c3750-ipbasek9-mz.122-55.SE7/c3750-ipbasek9-mz.122-55.SE7.bin"
After reboot
Switch#sh version Cisco IOS Software, C3750 Software (C3750-IPBASEK9-M), Version 12.2(55)SE5, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2012 by Cisco Systems, Inc. Compiled Thu 09-Feb-12 18:59 by prod_rel_team Image text-base: 0x01000000, data-base: 0x02D00000 ROM: Bootstrap program is C3750 boot loader BOOTLDR: C3750 Boot Loader (C3750-HBOOT-M) Version 12.2(53r)SEY4, RELEASE SOFTWARE (fc1) Switch uptime is 3 minutes System returned to ROM by power-on System image file is "flash:/c3750-ipbasek9-mz.122-55.SE5/c3750-ipbasek9-mz.122-55.SE5.bin"
Upgrade all switches in stack
This procedure allows upgrade/downgrade ios image on up to 9 switches connected by stack cable. In the example we use Cisco WS-C3750V2-24PS stack of 8x switches.
Switch(config)#do sh flash Directory of flash:/ 509 -rwx 1048 Mar 1 1993 00:02:43 +00:00 multiple-fs 2 drwx 512 Mar 1 1993 00:42:48 +00:00 c3750-ipbasek9-mz.122-55.SE7 27998208 bytes total (11952128 bytes free)
Switch(config)#do show inventory Switch#show version NAME: "1", DESCR: "WS-C3750V2-24PS" <---- output omitted ------> PID: WS-C3750V2-24PS-S , VID: V08 , SN: FDO1718AAA1 Switch Ports Model SW Version SW Image NAME: "2", DESCR: "WS-C3750V2-24PS" ------ ----- ----- ---------- ---------- PID: WS-C3750V2-24PS-S , VID: V08 , SN: FDO1718AAA2 * 1 26 WS-C3750V2-24PS 12.2(55)SE7 C3750-IPBASEK9-M NAME: "3", DESCR: "WS-C3750V2-24PS" 2 26 WS-C3750V2-24PS 12.2(55)SE7 C3750-IPBASEK9-M PID: WS-C3750V2-24PS-S , VID: V08 , SN: FDO1718AAA3 3 26 WS-C3750V2-24PS 12.2(55)SE7 C3750-IPBASEK9-M NAME: "4", DESCR: "WS-C3750V2-24PS" 4 26 WS-C3750V2-24PS 12.2(55)SE7 C3750-IPBASEK9-M PID: WS-C3750V2-24PS-S , VID: V08 , SN: FDO1718AAA4 5 26 WS-C3750V2-24PS 12.2(55)SE7 C3750-IPBASEK9-M NAME: "5", DESCR: "WS-C3750V2-24PS" 6 26 WS-C3750V2-24PS 12.2(55)SE7 C3750-IPBASEK9-M PID: WS-C3750V2-24PS-S , VID: V08 , SN: FDO1726AAA5 7 26 WS-C3750V2-24PS 12.2(55)SE7 C3750-IPBASEK9-M NAME: "6", DESCR: "WS-C3750V2-24PS" 8 26 WS-C3750V2-24PS 12.2(55)SE7 C3750-IPBASEK9-M PID: WS-C3750V2-24PS-S , VID: V08 , SN: FDO1718AAA6 NAME: "7", DESCR: "WS-C3750V2-24PS" PID: WS-C3750V2-24PS-S , VID: V08 , SN: FDO1718AAA7 NAME: "8", DESCR: "WS-C3750V2-24PS" PID: WS-C3750V2-24PS-S , VID: V08 , SN: FDO1718AAA8
Configure switch interface
Switch(config)#interface vlan 1 Switch(config-if)#ip add 10.0.99.100 255.255.255.128
You can manually delete image but this need to be done on per switch basis. It is no required as the upgrade command will take care of it if there is not enough space on a flash card.
Switch#delete /force /recursive flash:c3750-ipbasek9-mz.122-55.SE7
Download image
Connect your laptop configured as static ip address i.e 10.0.99.1 255.255.255.128 to any of a master switch ports. Then issue the command below. This process can take up to 30 min as image is downloaded to each switch separately and applied on one by one basis. Once process finish the switch will reload itself.
Switch#archive download-sw /imageonly tftp://10.0.99.2/c3750-ipbasek9-tar.122-55.SE5.tar Loading c3750-ipbasek9-tar.122-55.SE5.tar from 10.0.99.2 (via Vlan1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK - 15912960 bytes] Loading c3750-ipbasek9-tar.122-55.SE5.tar from 10.0.99.2 (via Vlan1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! examining image... extracting info (106 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/info (681 bytes) extracting info (106 bytes) Stacking Version Number: 1.45 System Type: 0x00000000 Ios Image File Size: 0x00B8B200 Total Image File Size: 0x00F2D200 Minimum Dram required: 0x08000000 Image Suffix: ipbasek9-122-55.SE5 Image Directory: c3750-ipbasek9-mz.122-55.SE5 Image Name: c3750-ipbasek9-mz.122-55.SE5.bin Image Feature: IP|LAYER_3|SSH|3DES|MIN_DRAM_MEG=128 Old image for switch 1: unknown Old image for switch 2: flash2:/c3750-ipbasek9-mz.122-55.SE7 Old image will be deleted before download. Old image for switch 3: flash3:/c3750-ipbasek9-mz.122-55.SE7 Old image will be deleted before download. Old image for switch 4: flash4:/c3750-ipbasek9-mz.122-55.SE7 Old image will be deleted before download. Old image for switch 5: flash5:/c3750-ipbasek9-mz.122-55.SE7 Old image will be deleted before download. Old image for switch 6: flash6:/c3750-ipbasek9-mz.122-55.SE7 Old image will be deleted before download. Old image for switch 7: flash7:/c3750-ipbasek9-mz.122-55.SE7 Old image will be deleted before download. Old image for switch 8: flash8:/c3750-ipbasek9-mz.122-55.SE7 Old image will be deleted before download. Deleting `flash2:/c3750-ipbasek9-mz.122-55.SE7' to create required space Deleting `flash3:/c3750-ipbasek9-mz.122-55.SE7' to create required space Deleting `flash4:/c3750-ipbasek9-mz.122-55.SE7' to create required space Deleting `flash5:/c3750-ipbasek9-mz.122-55.SE7' to create required space Deleting `flash6:/c3750-ipbasek9-mz.122-55.SE7' to create required space Deleting `flash7:/c3750-ipbasek9-mz.122-55.SE7' to create required space Deleting `flash8:/c3750-ipbasek9-mz.122-55.SE7' to create required space extracting c3750-ipbasek9-mz.122-55.SE5/c3750-ipbasek9-mz.122-55.SE5.bin (12098310 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/info (681 bytes) extracting info (106 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/c3750-ipbasek9-mz.122-55.SE5.bin (12098310 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/info (681 bytes) extracting info (106 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/c3750-ipbasek9-mz.122-55.SE5.bin (12098310 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/info (681 bytes) extracting info (106 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/c3750-ipbasek9-mz.122-55.SE5.bin (12098310 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/info (681 bytes) extracting info (106 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/c3750-ipbasek9-mz.122-55.SE5.bin (12098310 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/info (681 bytes) extracting info (106 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/c3750-ipbasek9-mz.122-55.SE5.bin (12098310 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/info (681 bytes) extracting info (106 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/c3750-ipbasek9-mz.122-55.SE5.bin (12098310 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/info (681 bytes) extracting info (106 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/c3750-ipbasek9-mz.122-55.SE5.bin (12098310 bytes) extracting c3750-ipbasek9-mz.122-55.SE5/info (681 bytes) extracting info (106 bytes) Installing (renaming): `flash:update/c3750-ipbasek9-mz.122-55.SE5' -> `flash:/c3750-ipbasek9-mz.122-55.SE5' New software image installed in flash:/c3750-ipbasek9-mz.122-55.SE5 Installing (renaming): `flash2:/update/c3750-ipbasek9-mz.122-55.SE5' -> `flash2:/c3750-ipbasek9-mz.122-55.SE5' New software image installed in flash2:/c3750-ipbasek9-mz.122-55.SE5 Installing (renaming): `flash3:/update/c3750-ipbasek9-mz.122-55.SE5' -> `flash3:/c3750-ipbasek9-mz.122-55.SE5' New software image installed in flash3:/c3750-ipbasek9-mz.122-55.SE5 Installing (renaming): `flash4:/update/c3750-ipbasek9-mz.122-55.SE5' -> `flash4:/c3750-ipbasek9-mz.122-55.SE5' New software image installed in flash4:/c3750-ipbasek9-mz.122-55.SE5 Installing (renaming): `flash5:/update/c3750-ipbasek9-mz.122-55.SE5' -> `flash5:/c3750-ipbasek9-mz.122-55.SE5' New software image installed in flash5:/c3750-ipbasek9-mz.122-55.SE5 Installing (renaming): `flash6:/update/c3750-ipbasek9-mz.122-55.SE5' -> `flash6:/c3750-ipbasek9-mz.122-55.SE5' New software image installed in flash6:/c3750-ipbasek9-mz.122-55.SE5 Installing (renaming): `flash7:/update/c3750-ipbasek9-mz.122-55.SE5' -> `flash7:/c3750-ipbasek9-mz.122-55.SE5' New software image installed in flash7:/c3750-ipbasek9-mz.122-55.SE5 Installing (renaming): `flash8:/update/c3750-ipbasek9-mz.122-55.SE5' -> `flash8:/c3750-ipbasek9-mz.122-55.SE5' New software image installed in flash8:/c3750-ipbasek9-mz.122-55.SE5 All software images installed.