Backup and Restore Router Flash file from TFTP server - Techxio.com

The Educational & IT Support Site

Breaking

Home Top Ad

Post Top Ad

3 November 2018

Backup and Restore Router Flash file from TFTP server




How to backup Router IOS/Flash on TFTP Server

Step 1. Connect Router to the TFTP server
Step 2. Connect Router to PC using Console cable
Step 3. Access Router using Putty utility or hyper terminal of windows
Step 4. Configure Router Interface IP address for connecting TFTP server

IP address configuration

Router>enable
Router#
Router#configure terminal

Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)# 
Router(config-if)#exit
Router#




Step 5. Now Show the flash file to check IOS file name

Router#
Router#show flash

OUTPUT

System flash directory:
File Length Name/status
3 5571584 c2600-i-mz.122-28.bin
2 28282 sigdef-category.xml
1 227537 sigdef-default.xml
[5827403 bytes used, 58188981 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)

Step 6. Now backup flash to the TFTP server
(Before do this step, check the connectivity of tftp server)

Router#copy flash tftp

Source filename []? c2600-i-mz.122-28.bin
Address or name of remote host []? 20.0.0.2
Destination filename [c2600-i-mz.122-28.bin]?

Writing c2600-i-mz.122-28.bin....!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 5571584 bytes]

5571584 bytes copied in 3.156 secs (404504 bytes/sec)
Router# 



(Remote Host means TFTP server IP - 20.0.0.2)

Backup process is competed successful





I am deleting flash file to show you restoring IOS from TFTP server

Delete Flash.....


Router#delete c2600-i-mz.122-28.bin


Delete filename [c2600-i-mz.122-28.bin]?
Delete flash:/c2600-i-mz.122-28.bin? [confirm]y

Showing flash

Router#show flash

System flash directory:
File Length Name/status
2 28282 sigdef-category.xml
1 227537 sigdef-default.xml
[255819 bytes used, 63760565 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)

There is no flash file is showing

Now restore the IOS flash from TFTP server
Step 1 First Reload the Router by running reload command

Router#reload

While Booting Press Ctlr + C  for boot in Rommon Mode 

The system is unable to boot automatically. The BOOT
environment variable needs to be set to a bootable
image.

rommon 1 >

Step 2 Download flash from TFTP server  

rommon 4 > tftpdnld

The Output will be like this

Missing or illegal ip address for variable IP_ADDRESS
Illegal IP address.

usage: tftpdnld
Use this command for disaster recovery only to recover an image via TFTP.
Monitor variables are used to set up parameters for the transfer.
(Syntax: "VARIABLE_NAME=value" and use "set" to show current variables.)
"ctrl-c" or "break" stops the transfer before flash erase begins.

The following variables are REQUIRED to be set for tftpdnld:
IP_ADDRESS: The IP address for this unit
IP_SUBNET_MASK: The subnet mask for this unit
DEFAULT_GATEWAY: The default gateway for this unit
TFTP_SERVER: The IP address of the server to fetch from
TFTP_FILE: The filename to fetch

The following variables are OPTIONAL:
TFTP_VERBOSE: Print setting. 0=quiet, 1=progress(default), 2=verbose
TFTP_RETRY_COUNT: Retry count for ARP and TFTP (default=7)
TFTP_TIMEOUT: Overall timeout of operation in seconds (default=7200)
TFTP_CHECKSUM: Perform checksum test on image, 0=no, 1=yes (default=1)
FE_SPEED_MODE: 0=10/hdx, 1=10/fdx, 2=100/hdx, 3=100/fdx, 4=Auto(deflt)

Now You Have to configure the following setting as I configured

rommon 5 > IP_ADDRESS=20.0.0.1
rommon 6 > IP_SUBNET_MASK=255.0.0.0
rommon 7 > DEFAULT_GATEWAY=20.0.0.2
rommon 8 > TFTP_SERVER=20.0.0.2
rommon 9 > TFTP_FILE=c2600-i-mz.122-28.bin

Step3 Now run the following command (tftpdnld)

rommon 10 > tftpdnld

when you hit enter, Restoring Process will begin (Output)

IP_ADDRESS: 20.0.0.1
IP_SUBNET_MASK: 255.0.0.0
DEFAULT_GATEWAY: 20.0.0.2
TFTP_SERVER: 20.0.0.1
TFTP_FILE: c2600-i-mz.122-28.bin
Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash will be lost!

Do you wish to continue? y/n: [n]: y

.
Receiving c2600-i-mz.122-28.bin from 20.0.0.2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
File reception completed.
Copying file c2600-i-mz.122-28.bin to flash.
Erasing flash at 0x60000000
Erasing flash at 0x60040000
Erasing flash at 0x60080000
Erasing flash at 0x600c0000
Erasing flash at 0x60100000
program flash location 0x60520000
program flash location 0x60530000
program flash location 0x60540000
program flash location 0x60550000

rommon 14 >
rommon 14 > reset

System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1)
Copyright (c) 2000 by cisco Systems, Inc.
Cisco 2620 (MPC860) processor (revision 0x200) with 253952K/8192K bytes of memory

Readonly ROMMON initialized

Self decompressing the image :
########################################################################## [OK]
--- System Configuration Dialog ---

Continue with configuration dialog? [yes/no]:
Continue with configuration dialog? [yes/no]: no

Step 4 Now Reload the Router

Router>
Router>enable
Router#reload

After Reload

Restoring process successfully completed, verify by show flash command

Router>enable
Router#show flash

System flash directory:
File Length Name/status
4 5571584 c2600-i-mz.122-28.bin
[5571584 bytes used, 58444800 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)

Now everything is done 

No comments:

Post a Comment

Post Bottom Ad

Pages