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.
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 10.1.1.1/24 and TFTP server has IP address 10.1.1.2/24.
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:
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.
- 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 10.1.1.2.
- 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:
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:
Now, as soon as we type this command, we see that 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
- 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 10.1.1.1 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 255.255.255.0 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 10.1.1.2 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 10.1.1.2 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.
After that just enter command reset to reload the router.
- Cisco Router modes
- Cisco Router basic commands
- Hot Standby Router Protocol (HSRP) and Virtual Router Redundancy Protocol (VRRP)
- Introduction of a Router
- Difference between Router and Switch
- Configuration of Router on a stick
- Difference between Modem and Router
- Difference between Router and Firewall
- Difference between Bridge and Router
- Difference between Router and Layer-3 Switch
- Hot Standby Router Protocol (HSRP)
- Introduction of Virtual Router Redundancy Protocol (VRRP) and its configuration
- Open shortest path first (OSPF) router roles and configuration
- Network Devices (Hub, Repeater, Bridge, Switch, Router, Gateways and Brouter)
- Cisco ASA Redistribution example
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.