Computer Network | Backing up Cisco IOS router image

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

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

Trivial File Transfer Protocol (TFTP) –
TFTP is a simple file transfer protocol which 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 is 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. Router has IP address and TFTP server has IP address

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

As shown in the figure, we see a 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 []?
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.

  • Source filename – It is the name of IOS image file.here, it is named as c1841-advipservicesk9-mz.124-15.T1.bin (shown in flash).
  • Address or name of remote host – It is the IP address of the TFTP server.In our scenario, it is
  • Destination filename – It is the name of the destination file that will be put in the TFTP server.Here,we have named it as routerios.

As shown in the above figure, the file has been as copied to 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 tftp server we will use the command:

rommon 1>tftpdnld

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

ROMMON 6>TFTP_FILE=routerios
  • IP_ADDRESS – It is the IP address we want to give to our router’s interface fa0/0 but remember this IP address should be of the same subnet. Here, we have provided on the router’s interface.
  • IP_SUBNET_MASK – This is the subnet mask which we want to give it to the router’s interface IP address which is in our scenario.
  • DEFAULT_GATEWAY – Here, we have to give the default gateway for that router’s interface IP address.
    Here, notice that our TFTP server is directly connected to router’s interface therefore we can give TFTP server’s IP address which have given as but if there is any router in between TFTP server and router then we have to give the default gateway IP address of the router.
  • TFTP_server – This command requires the IP address of the TFTP server which is in our scenario.
  • TFTP_FILE – It is the name of the file which we have saved on the TFTP server. In our scenario, we have given the name as routerios.bin.

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

After that it will ask us to continue 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.

This article is attributed to GeeksforGeeks.org

leave a comment



load comments

Subscribe to Our Newsletter