This tutorial describes the procedure of installing and upgrading Cisco IOS software. Learn how to install or upgrade Cisco IOS software in detail with examples.
Just like Windows and Linux, the IOS is also an operating system. Cisco developed the IOS primarily for its routers. Gradually, Cisco started using IOS software on its other devices as well. Currently, Cisco uses IOS software to manage multiple devices such as routers, high-end switches, and firewalls.
Like other operating systems, Cisco does not release bug fixes and updates of the IOS as separate files. Instead of releasing bug fixes and updates separately, Cisco merges them into the original IOS file and releases that updated IOS file.
It means, if you want to upgrade an existing IOS, then you have to replace the existing IOS file with the newly released IOS file. In other words, for every update, you have to install a new IOS image file from scratch. Fortunately, installing a new IOS image file is not as difficult and complex as installing other operating systems.
You can install a new IOS or upgrade an existing IOS in three easy steps.
- Download the new IOS file that includes the updates and bug fixes.
- Use a file transfer protocol to copy the downloaded file into the flash memory of the router.
- Either delete the old IOS file or configure the router to use the new IOS file.
Although the procedure of installing a new IOS image file or upgrading the existing IOS image file is fairly simple, still you should be very careful when following this procedure on a real Cisco router. A little mistake in this process can cause serious problems. Your router may even stop working.
For practice, instead of using a real router, you should use simulator software such as the Packet Tracer. To download the latest version of the packet tracer, visit the following page.
Setting up a packet tracer LAB for the practice
Open the Packet Tracer and click the 'End Devices' icon. Drag a Server and a PC-PT from the end devices and drop them in the workspace.
The following image shows these steps.
Click the 'Routers' icon. Drag an '1841 series' router from the available routers and drop it in the workspace.
The following image shows these steps.
Click the 'Connections' icon. Connect the FastEthernet0/0 interface of the Router to the FastEthernet0 interface of the Server and the console port of the Router to the RS232 port of the PC-PT via a cross cable and a console cable, respectively.
The following image shows these steps.
Access the CLI prompt of the Router and assign an IP address to the FastEthernet0/0.
The following image shows this process step-by-step.
Assign an IP address from the same subnet to the FastEthernet0 interface of the Server.
The following image shows this process step-by-step.
Click the PC-PT and click the Desktop menu and click the Terminal icon and click the OK button to accept the default settings.
That's all the setup we need. Either create this LAB in your packet tracer or download this pre-created LAB and load it on the Packet Tracer.
Pre-built Packet Tracer LAB for the practice
Using a real Cisco router for practice
If you are doing or following this exercise on a real Cisco router, you have to take a few additional steps.
The following table lists these steps and the purpose of each step with a parallel step in the packet tracer.
Step for the real devices | Purpose or reason | The step that we took in the Packet Tracer to simulate the step |
Connect the router with a PC or laptop via a console cable and access the CLI prompt of the router. | During this producer, we will execute a few commands on the router. For this, we have to access the CLI prompt of the router. | We connected the PC0 and the router via a console cable. |
Connect the router with the same PC or another PC via an Ethernet cable. | Routers do not allow the data connection on the console port. To transfer a new IOS image file from the TFTP server to the router, we have to connect the TFTP server to the router on the data port of the router such as Ethernet port. | We connected the Server with the router on the Ethernet port. |
Download and install a TFTP server program on the PC that you have connected with the router via an Ethernet cable. | Routers support the TFTP protocol. TFTP protocol allows us to transfer files between a TFTP server and a TFTP client. | Since the TFTP server is pre-installed on the Server that we connected to the router, we did nothing to replicate this step. |
Download the IOS image file that you want to install form the Cisco' official site and copy or move the downloaded IOS file to the root directory of the TFTP server. | TFTP protocol can only read from the root directory of the TFTP server. | The Sever system already contains a few IOS image files in the root directory of the TFTP server. Same as the previous step, we did nothing to replicate this step, as it's already done. |
Installing or updating the Cisco IOS software
Routers store IOS image files in the Flash memory. If there is only one IOS image file available in the flash memory, the router automatically uses it as the default IOS image. If multiple IOS image files are available, then the router uses the first accessible image file as the default IOS image file.
When a router starts, it loads its default IOS image file from the flash memory into the RAM. Once the default IOS image file is loaded into the RAM, the router uses it until the next boot. This means, when a router is running and you delete its default IOS image file from the flash memory, the router will not stop working. It will keep functioning until the next boot.
In other words, during the running state of the router, you can safely delete the existing IOS image file and install a new IOS image file. No matter whether you use a real Cisco router or use the packet tracer, commands for installing and updating Cisco IOS software are the same.
Access the privileged-exec mode of the router and run the 'show version' command. From the output, note down the name of the IOS file.
Run the 'show flash' command and note down the name of all available IOS image files.
The following image shows the output of both commands.
To check and verify the connectivity between the router and the TFTP server, use the following command.
Router#ping 10.0.0.2
The following image shows the output of this command.
To download the new IOS image file from the TFTP Server into the Flash memory, use the following command.
Router#copy tftp flash
This command requires three parameters.
Address or name of remote host: - Specify the IP Address of the TFTP Server.
Source filename: - Type the exact name of the IOS image file that you want to download from the root directory of the TFTP server.
Destination filename: - If you want to install this IOS image file with a different name, type the new name otherwise press the Enter key to use the default name. The default name is the source filename.
The following image shows this procedure step-by-step with the output.
Once the downloading is finished, you can use the 'show flash' command again to verify the installation of the new IOS image file.
The following image shows the output of the show flash command.

To instruct the router to use the new IOS image file when it boots next time, we have two choices: either set the new IOS image file as the default IOS image file or delete the old IOS image file leaving only the new IOS image file available in the flash memory.
To set the new IOS image file as the default IOS image file, use the following privileged-exec mode command.
Router# boot system flash: [ name of the new IOS image file]
This command does not work on the packet tracer. If you execute this command on the packet tracer, you will get the 'command not found' error. Because the Packet Tracer uses the stripped-down version of the IOS software and this command is not available in the stripped-down version of the IOS.
This command is available in the full version of the IOS software. If you are using a real router or using a simulator software (such as GNS3) that uses the full version of the IOS, you can use this command.
If you are following this exercise on the packet tracer, use the second option.
To delete the old IOS image file, use the following command from the privileged-exec mode.
Router#delete flash: [ name of the old IOS image file]
The following image shows this command with the output.
Once the new IOS file is set as the default IOS image file or the old IOS image file is deleted, use the 'reload' command to reboot the router.
The following image shows this command with the output.
After the reboot, the router will use the new IOS image. You can verify this by using the 'show version' and 'show flash' commands again.
That's all for this part. In the next part of this tutorial, we will understand how to restore the Cisco IOS image file in an emergence. If you like this tutorial, please don't forget to share it with friends through your favorite social network.