Sunteți pe pagina 1din 8

Back Up and Restore : configuration file and IOS

You can use download TFTP software from http://tftpd32.jounin.net/ ; its free.

To back up your IOS, you will use the copy command from within privileged EXEC mode. The
syntax of this command is copy <from> <to>. Thus, if you want to copy an IOS from your IOS
to a TFTP server, the syntax would be copy tftp flash. After executing this command, you will be
prompted with a number of questions asking for such things as the IOS filename and IP address
of the TFTP server.

To restore or upgrade your IOS from a TFTP server to a router, the syntax would be copy tftp
flash.

Remember the following troubleshooting steps if you are having difficulties using TFTP:

 Verify that the TFTP server is running.


 Verify cable configurations. You should use a crossover cable between a router and a
server or, if you have a switch, use a straight-through cable from the router to the switch
and from the switch to the server.
 Verify that your router is on the same subnet as your TFTP server.
 If you are using a Linux TFTP server, make sure that you first use the touch command to
create a zero-byte file with the name of the IOS image; otherwise, the file will not copy to
the TFTP server.

Being a Cisco Associate you should be able to take back and restore of networks critical
resources. Cisco devices use Tftp server for this purpose. In real life you should keep daily back
up of Cisco IOS and running configuration. In lab we can do the same practical on packet
tracker.

Step by Step Guide to Back up and Restore of Network Devices

Download this topology and load it in packet tracer

As you can see in diagram we have a TFTP server connected with router from cross cable. A pc
is connected with router from console cable. IP address on Server is 10.0.0.2 and 10.0.0.1 on
routers fast Ethernet port 0/0 is already configured.
Now your task is to take the back of running configuration on tftp server. So we can
retrieve it in any situations.

Double click on pc0 click on Desktop tab select terminal click on terminal
configuration ( Do not change default setting). Click on ok This will emulate
Router on screen

Now Follow these steps

R1>enable
R1#copy running-config tftp:
Address or name of remote host []? 10.0.0.2
Destination filename [R1-confg]?
.!!
[OK - 359 bytes]

359 bytes copied in 3.078 secs (0 bytes/sec)


R1#

Now we have taken the backup of running configuration. To verify it click on


Server and select config tab and click on TFTP and scroll down. At the end of
window you can see the backup files.

As you can see in image we have successfully taken the backup. Now open again
terminal in PC0 and remove the startup configuration. And reload the router.

R1>enable
R1#erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue?
[confirm]
[OK]
Erase of nvram: complete
%SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram
R1#reload
Proceed with reload? [confirm]

Now router will restart and as we have already discussed in our pervious article Booting process
of Cisco devices, that router load its running configuration from NARAM. And we have deleted
the contain for NAVRAM (Startup-configuration) so it will launch default startup program.
Write No and press enter.
Now you will see default router prompt. We have to do some basic setting before
connecting the TFTP Server.

Router>enable
Router#configure terminal
Router(config)#interface fastethernet 0/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#exit
Router#

we have done the essential configuration to connect the tftp server. Now restore
the configuration back to router

Router#copy tftp running-config


Address or name of remote host []? 10.0.0.2
Source filename []? R1-confg
Destination filename [running-config]?

Loading R1-confg from 10.0.0.2: !


[OK - 359 bytes]

359 bytes copied in 0.032 secs (11218 bytes/sec)


R1#

At this point the configuration is in RAM so you will lost it on reboot so copy it in
NVRAM.

R1#copy running-config startup-config


Destination filename [startup-config]?
Building configuration...
[OK]
R1#

Step by step guide on How to update IOS

Being a CCNA certified associate you should also be capable to update the IOS of Cisco devices.
This process include the serious risk of getting defective of device. So don’t do it on live device
until you became perfect on simulator.
IP and other setting is already configured on Server and Router. We have new IOS
stored on TFTP Server. Double click on pc0 click on Desktop tab select terminal
click on terminal configuration ( Do not change default setting). This will emulate
Router on screen.

First step toward the updating of IOS is to check the available space in flash

R1>enable
R1#sh flash

System flash directory:


File Length Name/status
1 33591768 c1841-advipservicesk9-mz.124-15.T1.bin
[33591768 bytes used, 30424616 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)
R1#

As you can see in output we have 30424616 bytes free available. We can
download new IOS in flash from TFTP Server. To load new IOS

R1#copy tftp flash


Address or name of remote host []? 10.0.0.2
Source filename []? c1841-ipbasek9-mz.124-12.bin
Destination filename [c1841-ipbasek9-mz.124-12.bin]?
.
Loading c1841-ipbasek9-mz.124-12.bin from 10.0.0.2: !!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 16599160 bytes]

16599160 bytes copied in 5.989 secs (620180 bytes/sec)

As you can see in output we have downloaded new IOS now we can remove old IOS

R1#delete flash:c1841-advipservicesk9-mz.124-15.T1.bin
Delete filename [c1841-advipservicesk9-mz.124-15.T1.bin]?
Delete flash:/c1841-advipservicesk9-mz.124-15.T1.bin? [confirm]

R1#show flash

System flash directory:


File Length Name/status
2 16599160 c1841-ipbasek9-mz.124-12.bin
[16599160 bytes used, 47417224 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)
R1#

Now restart the router to take effect of new IOS

R1#reload
Proceed with reload? [confirm]
%SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.
System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory.

Self decompressing the image :


################################################################# [OK]
Restricted Rights Legend

Cisco IOS Software, 1841 Software (C1841-IPBASEK9-M), Version 12.4(12),


Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Mon 15-May-06 14:54 by pt_team
Image text-base: 0x600790EC, data-base: 0x61480000
Cisco IOS Software, 1841 Software (C1841-IPBASEK9-M), Version 12.4(12),
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Mon 15-May-06 14:54 by pt_team

--- System Configuration Dialog ---

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

Press RETURN to get started!

Router>

As you can see in output router is booted from new IOS. As new IOS is loaded so all pervious
configuration will also be removed load it again from TFTP Server and save it to NVRAM.

Other Useful administrative commands


no ip domain-lookup

Router(config)#no ip domain-lookup

Ever type in a command incorrectly and are left having to wait for a minute or two as the router
tries to translate your command to a domain server of 255.255.255.255? The router is set by
default to try to resolve any word that is not a command to a Domain Name System (DNS)
server at address 255.255.255.255. If you are not going to set up DNS, turn off this feature to
save you time as you type, especially if you are not good in typing.

logging synchronous

Router(config)#line console 0
Router(config-line)#logging synchronous
Router(config-line)#exit
Router(config)#
Some time it happens that you are typing a command and an informational line appears in the
middle of what you were typing? Lose your place? Do not know where you are in the command,
so you just press R and start all over? The logging synchronous command tells the router that if
any informational items get displayed on the screen, your prompt and command line should be
moved to a new line, so as not to confuse you. The informational line does not get inserted into
the middle of the command you are trying to type. If you were to continue typing, the command
would execute properly, even though it looks wrong on the screen.

exec-timeout

Router(config)#line console 0
Router(config-line)#exec-timeout 0 0
Router(config-line)#

The command exec-timeout 0 0 is great for a lab environment because the console never logs
out. This is considered to be bad security and is dangerous in the real world. The default for the
exec-timeout command is 10 minutes and zero (0) seconds (exec-timeout 10 0).

erase startup-config

Router#erase startup-config

Some time you want to reconfigure the router. Or want to sell the old one. In such a scenario you
would like to erase the start up configuration. The running configuration is still in dynamic
memory. Reload the router to clear the running configuration.

do Command

Router(config)#do show running-config

The do command is useful when you want to execute EXEC commands, such as show, clear, or
debug, while remaining in global configuration mode or in any configuration submode. You
cannot use the do command to execute the configure terminal command because it is the
configure terminal command that changes the mode to global configuration mode

Summary of Useful commands for administrations

Router(config)#boot system flash


Loads the Cisco IOS Software with image-name
imagename
Router(config)#boot system tftp Loads the Cisco IOS Software with image-name
image-name 172.16.10.3 from a TFTP server
Router(config)#boot system rom Loads the Cisco IOS Software from ROM.
Router(config)#exit exit from global configurations
Saves the running configuration to NVRAM. The
Router#copy running-config
router will execute commands in their order on the
startup-config
next reload.
Router#copy running-config Saves the running configuration from DRAM to
startup-config NVRAM (locally).
Copies the running configuration to the remote TFTP
Router#copy running-config tftp
server
Address or name of remote host[
The IP address of the TFTP server. Press Enter key
]? 192.168.1.20
Destination Filename [Router- The name to use for the file saved on the TFTP
confg]? server Press Enter key
!!!!!!!!!!!!!!!
Each bang symbol (!) = 1 datagram of data.
624 bytes copied in 7.05 secs
Router# File has been transferred successfully
Copies the configuration file from the TFTP server to
Router#copy tftp running-config
DRAM.
Address or name of remote host[
The IP address of the TFTP server.
]? 192.168.119.20
Source filename [ ]?Router-confg Enter the name of the file you want to retrieve
Destination filename [running-
Press Enter key
config]?
Router# File has been transferred successfully.
Router#copy flash tftp Backup of flash to tftp
Router#copy tftp flash Restore flash from tftp server

S-ar putea să vă placă și