Process of Backing Up and Restoring the Cisco IOS
Cisco IOS is just like any other operating system and is used by routers and switches or other Cisco networking devices. Cisco IOS is a single image file that is stored in the flash memory in the case of Routers. When these routers are booted (powered on), the IOS stored in the Flash memory is loaded into the RAM. If there is no IOS available in the Flash memory of the Router, the Router simply enters the ROMMON mode which allows us to install the IOS image file again. For the Backup process, we will be using TFTP (Trivial File Transfer Protocol). There is no need to go in depth of what TFTP really is or how it works, just know that it is a UDP-based file-transferring protocol used to read and write files from a remote server. Using TFTP, the transfer of files starts with a request to read or write files after requesting a connection. These file transfers take place only when the server grants the connection request.
Setting up a Simple Lab Topology:
Here, we will be using a single Router and a server with TFTP protocol running. (The server can be found on the End Devices tab in CPT).
Step 1: Configuring IP address on Router:
Router(config)#int f0/0 Router(config-if)#ip address 10.0.0.1 255.255.255.0 Router(config-if)#no shut
Step 2: Configuring IP address on Server. Go to the Desktop tab and then to the IP Configuration and add the IP address to be configured.
Backup Process of the Cisco IOS:
Step 1: Checking the Router’s IOS filename:
Step 2: Checking the Server’s TFTP Service:
Go to the Services Tab and then click on the TFTP tab available on the list.
Step 3: Verifying Reachability from Router to Server:
Step 4: Copy the Router’s IOS to the TFTP Server:
Router#copy flash: tftp: Source filename ? 2800nm-advipservicesk9-mz.151-4.M4.bin Address or name of remote host ? 10.0.0.2 Destination filename [2800nm-advipservice sk9-mz.151-4.M4.bin]? Router-IOS.bin
Step 6: Verifying if IOS has been copied to the TFTP Server:
Go to the Services Tab and then click on the TFTP tab to check if our IOS Destination filename is present on the list.
Now, our Router’s IOS has been copied. Before starting the Recovery Process, we must delete our IOS first.
Router#delete flash: Delete filename ?2800nm-advipservicesk9-mz.151-4.M4.bin Delete flash:/2800nm-advipservicesk9-mz.151-4.M4.bin? [confirm]y Router#reload System configuration has been modified. Save? [yes/no]:no Proceed with reload? [confirm]y
As you can see, the IOS file stored in the Flash memory has been deleted and the Boot Process has failed. This failure of the Boot Process when the Router fails to load the IOS from Flash makes the Router go into ROMMON mode.
Recovery Process of the Cisco IOS:
Step 1: We need to enter the required information to the Router which it requires to recover the IOS from the Server. To see which information is required type the following command:
Rommon 1 >tftpdnld
Step 2: Type the required information as shown below (These commands are case-sensitive)
Rommon 2 >IP_ADDRESS=10.0.0.1 Rommon 3 >IP_SUBNET_MASK=255.255.255.0 Rommon 4 >DEFAULT_GATEWAY=10.0.0.1 Rommon 5 >TFTP_SERVER=10.0.0.2 Rommon 6 >TFTP_FILE=Router-IOS.bin Rommon 7 >tftpdnld Rommon 8 >reset
As you can see, the IOS of the Router has been recovered from the TFTP Server and has been loaded successfully.
Please Login to comment...