ANEXO 6. Matriz de identificación documental diligenciada (Archivo digital
12. Fortalecimiento de una cultura del cuidado del medio ambiente
Manage Cisco IOS
Before you upgrade or restore a Cisco IOS, you really should copy the existing file to a TFTP host as a backup just in case the new image crashes and burns. And you can use any TFTP host to accomplish this. By default, the flash memory in a router is used to store the Cisco IOS. I’ll describe how to check the amount of flash memory, how to copy the Cisco IOS from flash memory to a TFTP host, and how to copy the IOS from a TFTP host to flash memory.
But before you back up an IOS image to a network server on your intranet, you’ve got to do these three things:
Make sure that you can access the network server.
Ensure that the network server has adequate space for the code image.
Verify the file naming and path requirements.
And if you have a laptop or workstation’s Ethernet port directly connected to a router’s Ethernet interface, as shown in Figure 9.3, 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.
FIGURE 9.3 Copying an IOS from a workstation to a router
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 if you are copying from the router flash.
And if you’re copying “into” flash, you need to verify that there’s enough room in flash memory to accommodate the file to be copied.
Before you attempt to upgrade the Cisco IOS on your router with a new IOS file, it’s a good idea to verify that your flash memory has enough room to hold the new image. You verify the amount of flash memory and the file or files being stored in flash memory by using the show flash command (sh flash for short):
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 roughly half of the memory is in use.
The amount of flash is actually easier to tally using the show version command on the ISR routers:
Router#show version [output cut]
Cisco 2811 (revision 49.46) with 249856K/12288K bytes of memory. Processor board ID FTX1049A1AB
2 FastEthernet interfaces
4 Serial(sync/async) interfaces
1 Virtual Private Network (VPN) Module
DRAM configuration is 64 bits wide with parity enabled. 239K bytes of non-volatile configuration memory.
62720K bytes of ATA CompactFlash (Read/Write)
You can see that the amount of flash shows up on the last line. By averaging up, we get the amount of flash to 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. It’s a straightforward command that requires only the source filename and the IP address of the TFTP server.
The key to success in this backup routine is to make sure that you’ve got good, solid connectivity to the TFTP server. Check this by pinging the TFTP device from the router console prompt like this:
Router#ping 1.1.1.2
is 2 seconds: !!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/8 ms
After you ping the TFTP server to make sure that IP is working, you can use the copy flash tftp command to copy the IOS to the TFTP server as shown next:
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. In the preceding example, the contents of flash memory were copied successfully to the TFTP server. The address of the remote host is the IP address of the TFTP host, and the source filename is the file in flash memory.
Restoring or Upgrading the Cisco Router IOS
What happens if you need to restore the Cisco IOS to flash memory to replace an original file that has been damaged or if you want to upgrade the IOS? You can download the file from a TFTP server to flash memory by using the copy tftp flash command. This command requires the IP address of the TFTP host and the name of the file you want to download.
But before you begin, make sure that the file you want to place in flash memory is in the default TFTP directory on your host. When you issue the command, TFTP won’t ask you where the file is, so if the file you want to use isn’t in the default directory of the TFTP host, this just won’t work.
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] %Warning:There is a file already existing with this name
Do you want to over write? [confirm][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):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!
!!!!!!
21710744 bytes copied in 82.880 secs (261954 bytes/sec) Router#
In the above example, I copied the same file into flash memory, so it asked me if I wanted to overwrite it. Remember that we are “playing” with files in flash memory. If I just corrupted my file by overwriting the file, I won’t know this until I reboot the router. Be careful with this command! If the file is corrupted, then you’ll need to do an IOS restore from ROMMON.
If you are loading a new file and you don’t have enough room in flash memory to store both the new and existing copies, the router will ask to erase the contents of flash memory before writing the new file into flash memory.