Open In App

Backing up Cisco IOS Router image

As a network administrator, you should always have a backup for worse conditions. One of the common worse conditions that can occur is the IOS image of a device being deleted. This condition gets worse if there is no backup of the IOS image present. 

So to ignore conditions like these, a backup should be a must and here we will take a Cisco IOS image backup on the TFTP server. 



Trivial File Transfer Protocol (TFTP) – 
TFTP is a simple file transfer protocol that is either used to put or get a file from a remote host. It uses UDP port number 69. 
But TFTP is used where no authentication and control are required. Also, it takes less overhead. While on the other hand, it is less interactive than FTP. Therefore, according to the need, FTP or TFTP is used. 

Configuration – 



 

Here is a simple topology in which there is a router (for which we will take IOS backup) and a TFTP server. The router has IP address 10.1.1.1/24 and the TFTP server has IP address 10.1.1.2/24. 

Note – 
Before taking IOS backup, make sure the Tftp server and router are able to ping each other. 

 

As shown in the figure, we see an IOS image file in flash (.bin file) by command: 
 

router#show flash

Now, we will copy this file to our Tftp server by command: 
 

router#copy flash: tftp:
Source filename[]? c1841-advipservicesk9-mz.124-15.T1.bin
Address or name of remote host []? 10.1.1.2
Destination filename [c1841-advipservicesk9-mz.124-15.T1.bin]? routerios 

 

Now, as we can see in the above image it is asking for source filename, Address of remote host, and destination filename. 
 

 

As shown in the above figure, the file has been copied to the TFTP server. 
Now, we will delete the IOS image from the router: 
 

router(config)#delete flash:

Note – 
Now, as the file is deleted still the router is running because the IOS has already been loaded into RAM. Therefore, when we will reload the router, it will enter ROMMON mode. 

Therefore, now to copy the IOS file from the TFTP server we will use the command: 
 

rommon 1>tftpdnld

 

Now, as soon as we type this command, we see the parameters which we have to enter next. 
 

ROMMON 2>IP_ADDRESS=10.1.1.1
ROMMON 3>IP_SUBNET_MASK=255.255.255.0
ROMMON 4>DEFAULT_GATEWAY=10.1.1.2
ROMMON 5>TFTP_SERVER=10.1.1.2
ROMMON 6>TFTP_FILE=routerios

 

After we have entered these commands, we will again enter the command tftpdnld. 

 

After that, it will ask us to continue to say yes (as shown in the figure) if we have entered the right parameters otherwise enter no and again specify the correct parameters. 
 

ROMMON 7>reset

After that just enter command reset to reload the router. 
 

Article Tags :