IOS Upgrade on a Cisco 3560
When I finished with the Cisco Networking Academy, I learned that upgrading an IOS was as simple as copying the new IOS .bin file to the flash drive of the device you are upgrading. At my first job working with actual Cisco devices, I was tasked with upgrading a 3560. The problem was that the IOS downloaded from Cisco was a .tar–not .bin like I had seen before. This is when I learned that there are two main methods to upgrading your IOS devices.
When you download an IOS from Cisco, some version include extra files in the package such as an SDM interface. Instead of packaging everything individually, Cisco creates a tar file with all the files. Alternatively, if you don’t need all the extras, Cisco can provide a single .bin as well or you can extract the .bin from inside the .tar.
If you decide to use the tar file, upgrading the IOS is simple. From priviledged mode, simply enter the follow commands:
Switch# archive download-sw /overwrite /reload tftp://10.10.1.27/c3560-ipservicesk9-mz.122-55.SE3.tar
Let’s break down this command. First, we are using the archive command. Since we are using a .tar file (an archive) we need to decompress the file to the local flash memory. Second command is download-sw. This is just to indicate that we are going to download software instead of upload it (there is also a upload-sw command). Next, we tell IOS to overwrite the existing image. You may or may not have enough room in flash to hold multiple images. Finally, we specify the location of the new image. In this case, I have it on a TFTP server on 10.10.1.27. Cisco makes it easy and allows you to download the file, uncompress it, and reload the switch with one command.
Once this command is run, IOS downloads the file, deletes your existing IOS, extracts the files in the .tar on to flash and reloads the system. When the system finishes starting up, your IOS upgrade is complete! You can verify this with a show version.
Last night, I had to upgrade the IOS on the 3560 but I only have a .bin file. In this case, it was similar to upgrading an IOS on a router. All you have to do is simply copy the .bin file to the flash directory and set the boot variable.
Switch# copy tftp://10.10.1.27/c3560-ipservicesk9-mz.122-55.SE3.bin flash:c3560-ipservicesk9-mz.122-55.SE3.bin Switch# Switch# boot system flash:c3560-ipservicesk9-mz.122-52.SE.bin Switch# Switch# copy running-config startup-config Building configuration... [OK] Switch# Switch# show boot BOOT path-list : flash:c3560-ipservicesk9-mz.122-52.SE.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 : Timeout for Config Download: 0 seconds Config Download via DHCP: disabled (next boot: disabled) Switch# Switch# reload
We first copied the IOS to the local flash and then we configured IOS to use the new IOS. We saved our changes and verified them with a show boot command. After a reload, the switch will use the new IOS.
TIP: Always backup your current IOS. Using the copy command, copy it from the flash to your tftp in case you need to rollback. In addition, once the system has started, you are able to delete the .bin file from the flash without problems. This is useful when you have an existing image that is taking up most of the room on your flash and you are copying a new one that requires more space than you have available.