Nov 21, 2011

Abstract of CCNA study guide-17 -Backup and Restore Cisco IOS


Backing Up and Restoring the Cisco IOS
before you back up an IOS image to a network server on your intranet, you’ve got to do these three things:
- Make sure you can access the network server.
- Ensure that the network server has adequate space for the code image.
- Verify the file naming and path requirement.

And if you have a workstation’s Ethernet port directly connected to a router’s Ethernet interface, you need to verify the following before attempting to copy the image to or from the router:

- TFTP server software must be running on the administrator’s workstation.
- The Ethernet connection between the router and the workstation must be made with a crossover cable.
- The workstation must be on the same subnet as the router’s Ethernet interface.
- The copy flash tftp command must be supplied the IP address of the workstation.
_   And if you’re copying “into” flash, you need to verify that there’s enough room in flash memory


Verifying Flash Memory
Before you attempt to upgrade the Cisco IOS on your router with a new IOS file, you should verify that your flash memory has enough room to hold the new image by using the show flash command (sh flash):
Router#sh flash
-#- --length-- -----date/time------ path
1 21710744 Jan 2 2007 22:41:14 +00:00 c2800nm-advsecurityk9-mz.124-12.bin
[output cut]
32989184 bytes available (31027200 bytes used)

The ISR router above has 64MB of RAM, and half of the memory is in use.
To know The amount of flash use the show version command on the ISR routers:
Router#show version
[output cut]
DRAM configuration is 64 bits wide with parity enabled.
239K bytes of non-volatile configuration memory.
62720K bytes of ATA CompactFlash (Read/Write)

the amount of flash is 64MB.
Notice that the filename in this example is c2800nm-advsecurityk9-mz.124-12.bin.
The main difference in the output of the show flash and show version commands is that the show flash command displays all files in flash and the show version command shows the actual name of the file that the router is using to run the router.

Backing Up the Cisco IOS
To back up the Cisco IOS to a TFTP server, you use the copy flash tftp command.
Router#copy flash tftp
Source filename []?c2800nm-advsecurityk9-mz.124-12.bin
Address or name of remote host []?1.1.1.2
Destination filename [c2800nm-advsecurityk9-mz.124-12.bin]?[enter]
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!
21710744 bytes copied in 60.724 secs (357532 bytes/sec)
Router#
Just copy the IOS filename from either the show flash or show version command and then paste it when prompted for the source filename.

Restoring or Upgrading the Cisco Router IOS
You can download the file from a TFTP server to flash memory by using the copy tftp flash command. make sure the file you want to place in flash memory is in the default TFTP directory on your host.
Router#copy tftp flash
Address or name of remote host []?1.1.1.2
Source filename []?c2800nm-advsecurityk9-mz.124-12.bin
Destination filename [c2800nm-advsecurityk9-mz.124-12.bin]?[enter]
Accessing tftp://1.1.1.2/c2800nm-advsecurityk9-mz.124-12.bin...
Loading c2800nm-advsecurityk9-mz.124-12.bin from 1.1.1.2 (via
FastEthernet0/0):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 21710744 bytes]
21710744 bytes copied in 82.880 secs (261954 bytes/sec)
Router#

Backing Up and Restoring the Cisco Configuration
Backing Up the Cisco Router Configuration
To copy the router’s configuration from a router to a TFTP server, you can use either the copy running-config tftp or the copy startup-config tftp command. Either one will back up the router configuration that’s currently running in DRAM or that’s stored in NVRAM.
Verifying the Current Configuration
To verify the configuration in DRAM, use the show running-config command (sh run ) like this:
Router#show running-config
Building configuration...
Current configuration : 776 bytes
!
version 12.4
The current configuration information indicates that the router is running version 12.4 of the IOS.
Verifying the Stored Configuration
Next, you should check the configuration stored in NVRAM. To see this, use the show startup-config command (sh start for short) like this:
Router#show startup-config
Using 776 out of 245752 bytes
!
version 12.4

Copying the Current Configuration to NVRAM
By copying running-config to NVRAM as a backup, as shown in the following output, you’re assured that your running-config will always be reloaded if the router gets rebooted:
Router#copy running-config startup-config
Destination filename [startup-config]?[enter]
Building configuration...
[OK]
Router#
Copying the Configuration to a TFTP Server
Once the file is copied to NVRAM, you can make a second backup to a TFTP server by using the copy running-config tftp command (copy run tftp for short), like this:
Router#copy running-config tftp
Address or name of remote host []?1.1.1.2
Destination filename [router-confg]?todd-confg
!!
776 bytes copied in 0.800 secs (970 bytes/sec)
Router#
In the preceding example, I named the file todd-confg because I had not set a hostname for the router. If you have a hostname already configured, the command will automatically use the hostname plus the extension -confg as the name of the file.
Restoring the Cisco Router Configuration
If you want to restore the configuration to the version in the startup-config file use the copy startup-config running-config command (copy start run for short).
If you did copy the router’s configuration to a TFTP server as a second backup, you can restore the configuration using the copy tftp running-config command (copy tftp run for short) or the copy tftp startup-config command (copy tftp start for short), as shown here :
Router#copy tftp running-config
Address or name of remote host []?1.1.1.2
Source filename []?todd-confg
Destination filename[running-config]?[enter]
Accessing tftp://1.1.1.2/todd-confg...
Loading todd-confg from 1.1.1.2 (via FastEthernet0/0): !
[OK - 776 bytes]
776 bytes copied in 9.212 secs (84 bytes/sec)
Router#

Erasing the Configuration
To delete the startup-config file on a Cisco router, use the command erase startup-config, like this:
Router#erase startup-config
Erasing the nvram filesystem will remove all configuration files!
Continue? [confirm][enter]
[OK]
Erase of nvram: complete
Router#reload
System configuration has been modified. Save? [yes/no]:n
Proceed with reload? [confirm][enter]
*Mar 7 17:56:31.059: %SYS-5-RELOAD: Reload requested by console.
Reload Reason: Reload Command.

This command deletes the contents of NVRAM on the router. If you type reload at privileged mode and say no to saving changes, the router will reload and come up into setup mode.

No comments:

Post a Comment