How to Upgrade the Cisco IOS Image
This section provides information about upgrading the Cisco IOS image on the router and Cisco IOS image on the access point.
Router Upgrade
SUMMARY STEPS
1.
enable
2.
copy
nvram:startup-config
{
ftp:
|
rcp:
|
tftp:
}
3.
dir flash:
4.
copy
flash:
{
ftp:
|
rcp:
|
tftp:
}
DETAILED STEPS
|
|
|
Step 1
|
enable
Router> enable
|
Enables privileged EXEC mode.
-
Enter your password if prompted.
|
Step 2
|
copy
nvram:startup-config
{
ftp:
|
rcp:
|
tftp:
}
Router# copy nvram:startup-config ftp:
|
Copies the startup configuration file to a server.
-
The configuration file copy can serve as a backup copy.
-
Enter the destination URL when prompted.
|
Step 3
|
dir flash:
Router# dir flash:
|
Displays the layout and contents of a flash memory file system.
-
Learn the name of the system image file.
|
Step 4
|
copy
flash:
{
ftp:
|
rcp:
|
tftp:
}
Router# copy flash: ftp:
|
Copies a file from flash memory to a server.
-
Copy the system image file to a server. This file can serve as a backup copy.
-
Enter the flash memory partition number if prompted.
-
Enter the filename and destination URL when prompted.
|
Examples
The following examples show how to copy a startup configuration to a TFTP server and how to copy from files flash memory to an FTP server.
Copying the Startup Configuration to a TFTP Server: Example
The following example shows copying the startup configuration to a TFTP server:
Router# copy nvram:startup-config tftp: Name of configuration file to write [rtr2-confg]? rtr2-config-b4upgrade Write file rtr2-confg-b4upgrade on host 192.0.0.1?[confirm] <cr>
Copying from Flash Memory to a TFTP Server: Example
The following example uses the
dir flash:
command in privileged EXEC mode to learn the name of the system image file and the
copy flash: tftp:
command to copy the system image to a TFTP server.
1 -rw- 166502 Feb 18 2028 22:47:24 +00:00 crashinfo_19000218-224723C 1024655360 bytes total (1024475136 bytes free) Router# copy flash: tftp: IP address of remote host [255.255.255.255]? 192.0.0.1 filename to write on tftp host? cgr2010
DRAM Size and the New System Image
This section describes how to check whether your router has enough DRAM for upgrading to the new system image.
Note The DRAM in the Cisco CGR 2010 is fixed and cannot be removed and replaced by DRAM with more memory.
Ensuring Adequate Flash Memory for the New System Image
This section describes how to check whether your router has enough flash memory to upgrade to the new system image and, if necessary, how to properly delete files in flash memory to make room for the new system image.
Cisco CGR 2010 routers have two sets of external CF slots: 2 PCMCIA and 2 USB. Use the secondary CF for overflow files, if required.
Table 2
lists CF slot numbering and naming.
Table 2 CF Slot Numbering and Naming
|
|
|
|
Slot0
|
flash0
|
usbflash0
|
256MB
|
Slot1
|
flash1
|
usbflash1
|
0
|
Total
|
-
|
-
|
4GB
|
Prerequisites
You must have an account on Cisco.com to access this website. If you do not have an account or have forgotten your username or password, click
Cancel
at the login dialog box and follow the instructions that appear.
From the File Download Information table, write down the minimum flash requirements for the image.
SUMMARY STEPS
1.
enable
2.
dir flash
:
3. From the displayed output of the
dir flash
:
command, compare the number of bytes
available
to the minimum flash requirements for the new system image.
a. If the available memory is equal to or greater than the new system image’s minimum flash requirements, proceed to the “Copying the System Image into Flash Memory” section.
b. If the available memory is less than the new system image’s minimum flash requirements, proceed to Step 4.
4. From the displayed output of the
dir flash:
command, compare the number of bytes
total
to the size of the system image to which you want to upgrade.
a. If the total memory is less than the new system image’s minimum flash requirements, you
cannot
upgrade your compact flash memory card because the DRAM is fixed. You must delete files in flash memory to make room for the new system image.
Note The DRAM in the Cisco CGR 2010 router is fixed and cannot be removed and replaced by DRAM with more memory.
b. If the total memory is equal to or greater than the new system image’s minimum flash requirements, proceed to Step 5.
5. Enter the
dir
/all
flash:
command.
6. From the displayed output of the
dir
/all flash:
command, write down the names and directory locations of the files that you can delete.
7.
(Optional) Enter the copy
flash:
{
tftp
|
rcp
} command.
8. (Optional) Repeat Step 7 for each file that you identified in Step 6.
9. Enter the
delete flash:
directory-path
/
filename
command.
10. Repeat Step 9 for each file that you identified in Step 6.
11. Enter the
dir flash
:
[
partition-number
:
] command.
12. From the displayed output of the
dir flash:
command, compare the number of bytes
available
to the size of the system image to which you want to upgrade.
a. If the available memory is less than the new system image’s minimum flash requirements, then you cannot download the new image.
b. If the available memory is equal to or greater than the new system image’s minimum flash requirements, proceed to the “Copying the System Image into Flash Memory” section.
DETAILED STEPS
Step 1 Use the
enable
command to enter privileged EXEC mode. Enter your password if prompted. For example:
Step 2 Use the
dir flash
:
command to display the layout and contents of flash memory:
1 -rw- 166502 Feb 18 2028 22:47:24 +00:00 crashinfo_19000218-224723C 1024655360 bytes total (1024475136 bytes free)
Step 3 From the displayed output of the
dir flash
:
command, compare the number of bytes
available
to the minimum flash requirements for the new system image.
Step 4 From the displayed output of the
dir flash:
command, compare the number of bytes
total
to the size of the system image to which you want to upgrade.
-
If the total memory is less than the new system image’s minimum flash requirements, you
cannot
upgrade your compact flash memory card because the DRAM is fixed. You must delete files in flash memory to make room for the new system image.
-
If the total memory is equal to or greater than the new system image’s minimum flash requirements, proceed to Step 5.
Step 5 Enter the
dir
/all
flash:
command to display a list of all files and directories in flash memory:
1 -rw- 166502 Feb 18 2028 22:47:24 +00:00 crashinfo_19000218-224723C 1024655360 bytes total (1024475136 bytes free)
Step 6 From the displayed output of the
dir
/all flash:
command, write down the names and directory locations of the files that you can delete. If you cannot delete any files, you cannot download the new image.
Note The DRAM in the Cisco CGR 2010 router is fixed and cannot be removed and replaced by DRAM with more memory.
Note Do not delete the system image that the router already uses. If you are not sure which files can be safely deleted, either consult your network administrator. You cannot upgrade your compact flash memory card to a size that can accommodate both the existing files and the new system image.
Step 7 (Optional) Enter the
copy
flash:
{
tftp
|
rcp
} to copy a file to a server before deleting the file from flash memory. When prompted, enter the filename and the server’s hostname or IP address:
Step 8 (Optional) Repeat Step 7 for each file that you identified in Step 6.
Step 9 Enter the
delete flash:
directory-path
/
filename
command to delete a file in flash memory:
Router# delete flash:c29xx.tmp Delete filename [cgr2010.tmp]? <cr> Delete flash:cgr2010.tmp? [confirm] <cr>
Step 10 Repeat Step 9 for each file that you identified in Step 6.
Step 11 Enter the
dir flash
:
command to display the layout and contents of flash memory.
Step 12 From the displayed output of the
dir flash:
command, compare the number of bytes
available
to the size of the system image to which you want to upgrade.
-
If the available memory is less than the new system image’s minimum flash requirements you
cannot
download the new image.
-
If the available memory is equal to or greater than the new system image’s minimum flash requirements, proceed to the “Copying the System Image into Flash Memory” section.
Copying the System Image into Flash Memory
This section describes how to copy the system image into the compact flash memory card for your router. Choose one of the following methods:
Using TFTP or Remote Copy Protocol to Copy the System Image into Flash Memory
This section describes how to use TFTP or Remote Copy Protocol (RCP) to upgrade the system image. This is the recommended and most common method of upgrading the system image.
Prerequisites
-
Install a TFTP server or an RCP server application on a TCP/IP-ready workstation or PC. Many third-party vendors provide free TFTP server software, which you can find by searching for “TFTP server” in a web search engine.
If you use TFTP:
– Configure the TFTP application to operate as a TFTP
server
, not a TFTP
client
.
– Specify the outbound file directory to which you will download and store the system image.
-
Download the new Cisco IOS software image into the workstation or PC. See the “Where Do I Download the System Image?” section.
-
Establish a console session to the router. We recommend that you connect your PC directly to the router console port. See the hardware installation guide that shipped with your router.
-
Verify that the TFTP or RCP server has IP connectivity to the router. If you cannot successfully ping between the TFTP or RCP server and the router, do one of the following:
– Configure a default gateway on the router.
– Make sure that the server and the router each have an IP address in the same network or subnet. See the tech note,
Determining IP Addresses: Frequently Asked Questions
.
Tip For more detailed information on how to perform the prerequisites, see the Software Installation and Upgrade Procedure.
SUMMARY STEPS
1.
enable
2.
copy
tftp
flash:
or
copy
rcp
flash:
3. When prompted, enter the IP address of the TFTP or RCP server.
4. When prompted, enter the filename of the Cisco IOS software image to be installed.
5. When prompted, enter the filename as you want it to appear on the router.
6. If an error message appears that says, “Not enough space on device,” do one of the following, as appropriate:
7. If the error message does not appear, enter
no
when prompted to erase the flash memory before copying.
DETAILED STEPS
Step 1 Use the
enable
command to enter privileged EXEC mode. Enter your password if prompted:
Step 2 Enter the
copy
tftp
flash:
command
or
copy
rcp
flash
command o copy a file from a server to flash memory.
For example:
Address or name of remote host [223.255.254.254]? Source filename [ypatel/cgs2520-ipservices-mz.s12]? Destination filename [cgs2520-ipservices-mz.s12]? Accessing tftp://223.255.254.254/ypatel/cgs2520-ipservices-mz.s12... Loading ypatel/cgs2520-ipservices-mz.s12 from 223.255.254.254 (via GigabitEthernet0/0): !!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!! 11776175 bytes copied in 20.576 secs (572326 bytes/sec)
Step 3 When prompted, enter the IP address of the TFTP or RCP server:
Address or name of remote host []? 10.10.10.2
Step 4 When prompted, enter the filename of the Cisco IOS software image to be installed:
Source filename []? cgr2010-universalk9-mz.SPA.151-1.T
Note The filename is case sensitive.
Step 5 When prompted, enter the filename as you want it to appear on the router. Typically, the same filename is entered as was used in Step 4:
Destination filename []? cgr2010-universalk9-mz.SPA.151-1.T
Step 6 If an error message appears that says, “Not enough space on device,” do one of the following as appropriate:
-
If you are certain that all the files in flash memory should be erased, enter
y
when prompted twice to confirm that flash memory will be erased before copying:
Accessing tftp://10.10.10.2/cgr2010-universalk9-mz.SPA.151-1.T.bin... Erase flash: before copying? [confirm] y Erasing the flash filesystem will remove all files! Continue? [confirm] y Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Step 7 If the error message does not appear, enter
no
when prompted to erase the flash memory before copying:
Accessing tftp://10.10.10.2/cgr2010-universalk9-mz.SPA.151-1.T.bin... Erase flash: before copying? [confirm] no
Troubleshooting Tips
See
Resolving Common Image Installation Problems
.
Using the ROM Monitor to Copy the System Image over a Network
This section describes how to download a Cisco IOS software image from a remote TFTP server to the router flash memory using the tftpdnld ROM monitor command.
Caution Using the tftpdnld ROM monitor command may erase the system image, configuration, and data files. System image, configuration, and data files must be present on USB CF in slot0 for the router to boot and perform normal file operations.
Before you can enter the tftpdnld ROM monitor command, you must set the ROM monitor environment variables.
Prerequisites
Connect the TFTP server to a fixed network port on your router.
Restrictions
The LAN ports on network modules or interface cards are not active in ROM monitor mode. Therefore, only a fixed port on your router can be used for TFTP download. This can be either a fixed Ethernet port on the router or one of the Gigabit Ethernet ports on routers equipped with them.
Note You can use this command only to download files to the router. You cannot use tftpdnld to get files from the router.
SUMMARY STEPS
1. Enter ROM monitor mode
2. Set the IP_ADDRESS=ip_address configuration variable.
3. Set the IP_SUBNET_MASK=ip_address configuration variable.
4. Set the DEFAULT_GATEWAY=ip_address configuration variable.
5. Set the TFTP_SERVER=ip_address configuration variable.
6. Set the TFTP_FILE=[directory-path/]filename configuration variable.
7. (Optional) Set the GE_PORT=[0 | 1] port number for download.
8. (Optional) Set the TFTP_MEDIA_TYPE=[0 | 1] copper or fiber.
9. (Optional) Set the TFTP_MACADDR= mac address of unit.
10. (Optional) Set the TFTP_VERBOSE= [0 | 1| 2] print setting variable.
11. (Optional) Set the TFTP_RETRY_COUNT=retry_times configuration variable.
12. (Optional) Set the TFTP_TIMEOUT=timeout of operation in seconds.
13. (Optional) Set the TFTP_ACK_RETRY=ack retry in seconds.
14. (Optional) Set the TFTP_CHECKSUM=[0 | 1] perform checksum test on image.
15. (Optional) Set the TFTP_DESTINATION=[flash0 | flash1 | usbflash0 | usbflash1] flash destination device for file.
16. (Optional) Set the GE_SPEED_MODE= speed configuration.
17. Use the set command to verify that you have set the variables correctly.
18. Use the tftpdnld [-r] command to download the image.
DETAILED STEPS
Step 1 Enter ROM monitor mode.
Step 2 Set the IP address of the router. For example:
rommon > IP_ADDRESS=172.16.23.32
Step 3 Set the IP subnet mask. For example:
rommon > IP_SUBNET_MASK=255.255.255.224
Step 4 Set the default gateway address. For example:
rommon > DEFAULT_GATEWAY=172.16.23.40
Step 5 Set the TFTP server IP address, which is the location from which the software will be downloaded:
rommon > TFTP_SERVER=172.16.23.33
Step 6 Set the name and directory location to which the image file will be downloaded onto the router. For example:
rommon > TFTP_FILE=archive/rel22/<image name>
Step 7 (Optional) Set the input port to use a Gigabit Ethernet port. Usage is GE_PORT=[0 | 1]. For example:
Step 8 (Optional) Set the Ethernet media type. Usage is TFTP_ MEDIA_TYPE=[0 1], where Copper= 0 and Fiber=1:
rommon > TFTP_MEDIA_TYPE=1
Step 9 (Optional) Decide whether the router will perform a checksum test on the downloaded image. Usage is TFTP_CHECKSUM=[0 | 1], where 1=checksum test is performed (default) and 0=no checksum test. For example:
Step 10 (Optional) Set the number of times that the router will attempt Address Resolution Protocol (ARP) and TFTP download. The default is 7 attempts. For example:
rommon > TFTP_RETRY_COUNT=10
Step 11 (Optional) Set the amount of time, in seconds, before the download process times out. The default is 2400 seconds (40 minutes). The following example shows 1800 seconds (30 minutes):
Step 12 (Optional) Configure the print variable. Usage is TFTP_VERBOSE= [0 | 1 | 2], where print:
0= is quiet.
1= in progress.
2= verbose
Step 13 Use the set command to display the ROM monitor environment variables to verify that you have configured them correctly. For example:
Step 14 Download the system image, as specified by the ROM monitor environmental variables, using the tftpdnld [-r] command. Without the -r option, the command downloads the specified image and saves it in flash memory, deleting all existing data in all partitions in flash memory. Using the -r option downloads and boots the new software but does not save the software to flash memory.
Do you wish to continue? y/n: [n]: y
Entering “y” confirms that you want to continue with the TFTP download.
Loading the New System Image
This section describes how to load the new system image that you copied into flash memory. First, determine whether you are in ROM monitor mode or in the Cisco IOS CLI. Then choose one of the following methods of loading the new system image:
Loading the New System Image from the Cisco IOS Software
This section describes how to load the new system image from the Cisco IOS software.
SUMMARY STEPS
1.
dir flash:
2.
configure terminal
3.
no boot system
4.
(Optional) boot system
flash
system-image-filename
5. (Optional) Repeat to specify the order in which the router should attempt to load any backup system images.
6.
exit
7.
show version
8. If the last digit in the configuration register is 0 or 1, proceed to Step 9. However, if the last digit in the configuration register is between 2 and F, proceed to Step 12.
9.
configure terminal
10.
config-register
0x2102
11.
exit
12.
copy run start
13.
reload
14. When prompted to save the system configuration, enter
no
.
15. When prompted to confirm the reload, enter
y
.
16.
show version
DETAILED STEPS
Step 1 Enter the
dir flash:
command to display a list of all files and directories in flash memory:
3 -rw- 6458388 Mar 01 1993 00:00:58 c38xx.tmp 1580 -rw- 6462268 Mar 06 1993 06:14:02 c38xx-ata 63930368 bytes total (51007488 bytes free)
Note Determine whether the new system image is the first file or the only file listed in the dir flash command output ( is not required if it is the first file or only file listed).
Step 2 Enter the
configure terminal
command to enter global configuration mode:
Router# configure terminal
Step 3 Enter the
no boot system
command to delete all entries in the bootable image list, which specifies the order in which the router attempts to load the system images at the next system reload or power cycle:
Router(config)# no boot system
Step 4 If the new system image is the first file or the only file displayed in the
dir flash:
command output, you do not need to perform the following step.
Enter the
boot system
flash
system-image-filename
command to load the new system image after the next system reload or power cycle. For example:
Router(config)# boot system flash cgr2010-universalk9-mz.SPA.151-1.T.bin
Step 5 (Optional) Repeat to specify the order in which the router should attempt to load any backup system images.
Step 6 Enter the
exit
command to exit global configuration mode:
Router(config)# exit
Router#
Step 7 Enter the
show version
command to display the configuration register setting:
Cisco Internetwork Operating System Software Configuration register is 0x0
Step 8 If the last digit in the configuration register is 0 or 1, proceed to Step 9. However, if the last digit in the configuration register is between 2 and F, proceed to Step 12.
Step 9
Enter the
configure terminal
command to enter global configuration mode:
Router# configure terminal
Step 10 Enter the
config-register
0x2102
command to set the configuration register so that, after the next system reload or power cycle, the router loads a system image from the
boot system
commands in the startup configuration file:
Router(config)# config-register 0x2102
Step 11 Enter the
exit
command to exit global configuration mode:
Router(config)# exit
Router#
Step 12
Enter the
copy run start
command to copy the running configuration to the startup configuration:
Step 13 Enter the
reload
command to reload the operating system:
Step 14 When prompted to save the system configuration, enter
no
:
System configuration has been modified. Save? [yes/no]: no
Step 15 When prompted to confirm the reload, enter
y
:
Proceed with reload? [confirm] y
Step 16 Enter the
show version
command to verify that the router loaded the proper system image:
00:22:25: %SYS-5-CONFIG_I: Configured from console by console Cisco Internetwork Operating System Software System returned to ROM by reload System image file is "flash:cgr2010-universalk9-mz.SPA.151-1.T.bin"
Loading the New System Image from ROM Monitor Mode
This section describes how to load the new system image from ROM monitor mode.
SUMMARY STEPS
1.
dir flash0:
[
partition-number
:
]
2.
confreg 0x2102
3.
boot flash0:
[
partition-number
:
]
filename
4. After the system loads the new system image, press
Return
a few times to display the Cisco IOS command-line interface (CLI) promp
t.
5.
enable
6.
configure terminal
7.
no boot system
8.
boot system
flash0:
new-system-image-filename
9. (Optional) Repeat to specify the order in which the router should attempt to load any backup system images.
10.
exit
11.
copy run start
DETAILED STEPS
Step 1 Enter the
dir flash0:
[
partition-number
:
] command to list files in flash memory:
program load complete, entry point: 0x80803000, size: 0x1b340 2 47089944 -rw- cgr2010-universalk9-mz.SPA.151-1.T
Note whether the new system image is the first file or the only file listed in the dir flash0: command output. ( is not required if the image is the first file or only file listed.)
Step 2 Enter the
confreg 0x2102
command to set the configuration register so that, after the next system reload or power cycle, the router loads a system image from the boot system commands in the startup configuration file:
Step 3 Enter the
boot flash0:
[
partition-number
:
]
filename
command to force the router to load the new system image:
rommon > boot flash0:cgr2010-universalk9-mz.SPA.151-1.T.bin
Step 4 After the system loads the new system image, press
Return
a few times to display the Cisco IOS CLI prompt.
Step 5 Enter the
enable
command to enable privileged EXEC mode, and enter your password if prompted:
Step 6 Enter the
configure terminal
command to enter global configuration mode:
Router# configure terminal
Step 7 Enter the
no boot system
to eliminate all entries in the bootable image list, which specifies the system image that the router loads at startup:
Router(config)# no boot system
Step 8 If the new system image is the first file or only the file displayed in the
dir flash0:
command output, this step is not required.
Enter the
boot system
flash
new-system-image-filename
command to load the new system image after the next system reload or power cycle:
Router(config)# boot system flash cgr2010-universalk9-mz.SPA.151-1.T.bin
Step 9 (Optional) Repeat to specify the order in which the router should attempt to load any backup system images.
Step 10 Enter the
exit
command to exit global configuration mode:
Router(config)# exit
Router#
Step 11 Enter the
copy run start
command to copy the running configuration to the startup configuration:
Saving Backup Copies of Your New System Image and Configuration
To aid file recovery and to minimize downtime in the event of file corruption, we recommend that you save backup copies of the startup configuration file and the Cisco IOS software system image file on a server.
Tip Do not erase any existing backup copies of your configuration and system image that you saved before upgrading your system image. If you encounter serious problems using your new system image or startup configuration, you can quickly revert to the previous working configuration and system image, if necessary.
For more detailed information, see the “
Managing Configuration Files
” chapter and the “
Loading and Maintaining System Images
” chapter of
Cisco IOS Configuration Fundamentals Configuration Guide, Release 15.0
.
To save backup copies of the startup configuration file and the system image file, complete the following steps:
SUMMARY STEPS
1.
enable
2.
copy
nvram:startup-config
{
ftp:
|
rcp:
|
tftp:
}
3.
dir flash0:
4.
copy
flash0:
{
ftp:
|
rcp:
|
tftp:
}
DETAILED STEPS
|
|
|
Step 1
|
enable
Router> enable
|
Enables privileged EXEC mode.
-
Enter your password if prompted.
|
Step 2
|
copy
nvram:startup-config
{
ftp:
|
rcp:
|
tftp:
}
Router# copy nvram:startup-config ftp:
|
Copies the startup configuration file to a server.
-
The configuration file copy serves as a backup copy.
-
Enter the destination URL when prompted.
|
Step 3
|
dir flash0:
Router# dir flash0:
|
Displays the layout and contents of a flash memory file system.
-
Write down the name of the system image file.
|
Step 4
|
copy
flash0:
{
ftp:
|
rcp:
|
tftp:
}
Router# copy flash0: ftp:
|
Copies a file from flash memory to a server.
-
Copy the system image file to a server to serve as a backup copy.
-
Enter the flash memory partition number if prompted.
-
Enter the filename and destination URL when prompted.
|
Examples
Copying the Startup Configuration to a TFTP Server: Example
The following example shows the startup configuration being copied to a TFTP server:
Router# copy nvram:startup-config tftp: Remote host[]? 172.16.101.101 Name of configuration file to write [rtr2-confg]? <cr> Write file rtr2-confg on host 172.16.101.101?[confirm] <cr>
Copying from Flash Memory to a TFTP Server: Example
The following example uses the
dir flash:
privileged EXEC command to obtain the name of the system image file and the
copy flash: tftp:
privileged EXEC command to copy the system image to a TFTP server. The router uses the default username and password.
[4137952 bytes used, 12639264 available, 16777216 total] 16384K bytes of processor board System flash (Read/Write)\ Router# copy flash0: tftp: IP address of remote host [255.255.255.255]? 192.0.0.1 filename to write on tftp host? cgr2010-mz writing cgr2010-mz !!!!...