How to Upgrade Cisco IOS on Cisco Switches & Routers

How to Upgrade Cisco IOS on Cisco Switches & Routers

Govind Jha Govind Jha
6 minute read

This article is a step-by-step tutorial on  Cisco IOS software upgrades for improved network performance and security.

Keeping network devices up-to-date with the latest software is crucial for optimal performance, security, compatibility, access to the latest features, and bug fixes. Cisco IOS (Internetwork Operating System) is no exception. Regularly upgrading the IOS of Cisco switches and routers ensures that they have the latest features, bug fixes, and security patches. This essay will provide a step-by-step guide on how to upgrade Cisco IOS for both switches and routers. It will cover the upgrade process, followed by step-by-step instructions for the Cisco IOS upgrade on switches and routers, including relevant examples.

Before diving into the upgrade process, it is important to note that Cisco IOS supports both upgrading and downgrading. This flexibility allows network administrators to install a higher version for enhanced features or revert to a stable version if issues arise. It is advisable to check the release notes and compatibility matrix to ensure a smooth upgrade or downgrade process.

Upgrading Cisco IOS software

Upgrading Cisco IOS software on Switches & Routers

First of all, before proceeding with the upgrade, it is essential to back up the existing configuration and download the Cisco IOS files to a secure location. This ensures that any critical settings and data can be restored if needed. Additionally, ensure the switch has sufficient disk space to accommodate the new IOS image. Additionally, upgrading the Cisco IOS software involved the following steps.

1.  Download the Cisco IOS Image

Visit the Cisco website or use the Cisco Software Download Center to obtain the desired Cisco IOS image. Select the appropriate version based on compatibility and feature requirements. Place the downloaded file in a designated location.

2.  Establish Connection to Routers/Switches

Before upgrading Cisco IOS, establish a connection to the switch using terminal emulator software such as PuTTY. Once connected, log in to the switch and enter privileged EXEC mode. From there, use the command "copy tftp flash" to transfer the IOS image from the TFTP server to the switch's flash memory.

3.  Verify Existing Cisco IOS Image

To determine the current IOS version running on the switch, use the command "show version" in the switch's command-line interface (CLI) for the enable mode. Verify that the existing image supports the upgrade process and meets the requirements of the new IOS version.

Switch# show version

4.  Copy the IOS Software Image to the Switch

Transfer the downloaded new Cisco IOS image to the switch using a TFTP (Trivial File Transfer Protocol) server. Establish a connection to the switch's CLI and use the "copy" command to transfer the Cisco IOS software image. Copy the downloaded image in ‘slot0’. Also, when prompted, enter the required information of the TFTP Server, as in the example below:

Switch# copy tftp: slot0:

Address or name of remote host [ ]? 1.1.1.1

Source filename []? newios.bin

Destination filename []? newios.bin

5.  Verify the Image Integrity

After the image is copied to the switch, verify its integrity. This ensures that the image was not corrupted during the transfer process. We can verify the image by using the command below:

Switch# dir slot0

6.  Set the accurate parameters of the boot system

After transferring the IOS software image to the switch or router, we need to specifically tell the router/switch to load the new image at the boot. The following steps can be followed for the setup:

To see if there are any boot commands defined, we can use the “show running-config” command. For example:

Switch# show running-config

!

version 12.2

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

no service single-slot-reload-enable

!

hostname 7500

!

boot system flash slot0:oldios.bin

!

To see the boot system configuration, we can use the following command, “show bootvar”.

Switch# show bootvar

BOOT variable = slot0: oldios.bin,12;

CONFIG_FILE variable =

BOOTLDR variable does not exist

Configuration register is 0x102

 

We need to change the boot statement to the new image. To remove the previous boot statement, we can follow below steps:

Switch# configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#no boot system flash slot0: oldios.bin

Switch(config)#^Z

“no boot system flash slot0: oldios.bin” will remove the boot setting from the configuration. To Verify command has been removed, we can use the “show running-config” command.

To set the new boot statements, we can use the following commands:

Switch#configure terminal

Switch (config)#boot system flash slot0:newios.bin

Switch (config)#^Z

We also need to use config-register 0x2102. If the value is set differently, we can change the value to “config-register 0x2102” in configuration mode:

Switch# configure terminal

Switch(config)#config-register 0x2102

Switch# (config)#^Z

After completing all the steps mentioned above, we need to verify the boot parameters. To verify the parameters, we can use the following command:

Switch# show bootvar

BOOT variable = slot0: newios.bin,12;

CONFIG_FILE variable =

BOOTLDR variable does not exist

Configuration register is 0x102

7.  Reload the Switch/Router

To activate the new IOS image, reload the switch using the "reload" command. Ensure that all active connections are terminated before initiating the reload. During the reload process, the switch will load the new IOS image from flash memory.

Switch# reload

8.  Verify the upgrade

After the switch has restarted, it is important to verify that the upgrade was successful. This can be done using the command "show version," which displays detailed information about the switch, including the newly installed IOS version. Additionally, testing the functionality of different features and verifying network connectivity ensures that the upgrade has not caused any issues.

Switch# show version

Validate the upgrade

Validate the upgrade & services

If the newly upgraded IOS version introduces problems or incompatibilities, it may be necessary to downgrade to a previous version. To do this, repeat the steps mentioned above but specify the previous IOS image as the default boot image instead. Once the configuration changes are saved and the router or switch is reloaded, it will start running the downgraded IOS software.

Keeping Cisco IOS software up to date is critical for ensuring the performance, security, and functionality of network routers. Upgrading or downgrading the IOS software on Cisco routers involves several steps, including selecting the appropriate IOS version, transferring the IOS image to the device, configuring the boot system, saving configuration changes, and verifying the success of the upgrade. By following these steps and conducting thorough testing, network administrators can maintain a stable and reliable network infrastructure.

For further inquiries, bulk order requests, and technical support, please CONTACT US.

« Back to Blog

Just added to your wishlist:
My Wishlist
You've just added this product to the cart:
Checkout