Backup Cisco IOS image to TFTP Server | Copy Image in Flask
In this post we will explain how to Backup Cisco IOS image to TFTP Server or how to copy IOS Image in Router Flash. Using TFTP server you can take backup Cisco configurations and save Cisco Image as well.TFTP SERVERS AS BACKUP LOCATION
As a network grows, the Cisco IOS software configuration images and files can be stored on a central TFTP server. This helps control the amount of IOS images and revisions to those IOS images, as well as the configuration files that must be maintained.Production internetworks usually cover large areas and contain several routers. For any network, it is advisable to have a backup copy of the Cisco IOS software image in case the system image on the router is damaged or accidentally deleted.
Widely distributed routers need a source or backup location for Cisco IOS software images. The use of a network TFTP server allows uploads and downloads of the image and configuration through the network. The network TFTP server can be another router, a workstation or a host system.
Creating Cisco IOS Image Backup
To maintain network operations with minimal downtime, it is necessary to implement procedures to back up Cisco IOS images.In following figure, the network administrator wishes to back up the current image file on the router ( c1900-universalk9-mz.SPA.152-4.M3.bin ) on the TFTP server at 172.16. 1,100. You can learn the Cisco IOS name convention here.
To back up the Cisco IOS image on a TFTP server, follow these three steps:
- Step 1 . Make sure there is access to the network TFTP server. Ping the TFTP server to test connectivity.
R1 # ping 172.16.1.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.100, timeout is 2
seconds:
!!!!!
Success rate is 100 percent (5/5),
round-trip min / avg / max = 56/56/56 ms
- Step 2 . Verify that the TFTP server has enough disk space to support the Cisco IOS software image. Use the show flash0: command on the router to determine the size of the Cisco IOS image file. The sample file is 68831808 bytes in length.
R1 # show flash0:
- # - --length-- ----- date / time ------ path
8 68831808 Apr 2 2017 21:29:58 +00: 00
c1900-universalk9-mz.SPA.152-4.M3.bin
- Step 3 . Copy the image to the TFTP server using the copy source-url destination-url command.
R1 # copy flash0: tftp:
Source filename []? c1900-universalk9-mz.SPA.152-4.M3.bin
Address or name of remote host []? 172.16.1.100
Destination filename [c1900-universalk9-mz.SPA.152-4.M3.bin]?
Writing c1900-universalk9-mz.SPA.152-4.M3.bin ...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
68831808 bytes copied in 363,468 secs (269058 bytes / sec)
After issuing the command using the specified source and destination URLs, the user is requested to enter the name of the source file, the IP address of the remote host and the name of the destination file. Then the transfer starts.Copying a Cisco IOS Image to TFTP Server
In this example, IPv6 is used for transfer, to show that TFTP can also be used over IPv6 networks.Image illustrates how to copy an image of Cisco IOS software from a TFTP server. A new image file ( c1900-universalk9-mz.SPA.152-4.M3.bin ) will be copied from the TFTP server in 2001: DB8: CAFE: 100 :: 99 to the router.
Follow these steps to update the software on the Cisco router:
- Step 1 . Select a Cisco IOS image file that meets the requirements in terms of platform, features and software. Download the file from cisco.com and transfer it to the TFTP server.
- Step 2 . Verify connectivity to the TFTP server. Ping the TFTP server from the router.
R1 # ping 2001: DB8: COFFEE: 100 :: 99
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001: DB8: CAFE: 100 :: 99,
timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5),
round-trip min / avg / max = 56/56/56 ms
- Step 3 . Make sure there is enough space in the flash memory on the router that is updated. You can check the amount of available flash memory using the show flash0: command .
R1 # show flash0:
- # - --length-- ----- date / time ------ path
182394880 bytes available (74092544 bytes used)
R1 #
- Step 4 . Copy the IOS image file from the TFTP server to the router with the copy command .
After issuing this command with the specified destination and source URLs, the user will be asked to enter the IP address of the remote host, the name of the source file and the name of the destination file. File transfer will start.
BOOT SYSTEM COMMAND
To update the copied IOS image once that image is saved in the router's flash memory, configure the latter to load to a new image during boot using the boot system command.Save the configuration . Reload the router to boot with the new image. Once you start the router, use the show version command to verify that the new image was loaded.
During boot, the bootstrap code analyzes the boot configuration file in the NVRAM to detect boot system commands that specify the name and location of the Cisco IOS software image to load. Several boot system commands can be entered sequentially to provide a boot plan that has fault tolerance.
- As shown below, the boot system command is a global configuration command that allows the user to specify the source for the Cisco IOS software image to load.
R1 # configure terminal
R1 (config) # boot system
flash0: //c1900-universalk9-mz.SPA.152-4.M3.bin
R1 (config) # exit
R1 # copy running-config startup-config
R1 # reload
Among the available syntax options are the following:- Specify the flash device as the source of the Cisco IOS image:
Router (config) # boot system flash0: //c1900-universalk9-mz.SPA.152-4.M3.bin
Specify the TFTP server as the source of the Cisco IOS image, with ROMmon as backup.
Router (config) # boot system tftp: //c1900-universalk9-mz.SPA.152-4.M3.bin
If there are no boot system commands in the configuration, by default, the router loads and runs the first valid Cisco IOS image in flash memory.Finally, as shown in Image, the show version command can be used to verify the software image file.
No comments:
Post a Comment