Usage
Here is the command syntax for xmodem.xmodem [-c] [-y] [-e] [-f] [-r] [-x] [-s data-rate]
The following table describes the command syntax for the xmodem command.syntax | Description |
---|---|
-c | (Optional) CRC-16 checksumming, which is more sophisticated and thorough than standard checksumming. |
-y | (Optional) Uses the Ymodem protocol for higher throughput. |
-e | (Optional) Erases the first partition in Flash memory before starting the download. This option is only valid for the Cisco 1600 series. |
-f | (Optional) Erases all Flash memory before starting the download. This option is only valid for the Cisco 1600 series routers. |
-r | (Optional) Downloads the file to DRAM. The default is Flash memory. |
-x | (Optional) Does not execute the Cisco IOS software image on completion of the download. |
-s data-rate | (Optional) Sets the console port's data rate during file transfer. Values are 1200, 2400, 4800, 9600, 19200, 38400, and 115200 bps. The default rate is specified in the configuration register. This option is only valid for the Cisco 1600 series routers. |
filename | (Optional) Filename to copy. This argument is ignored when the -r keyword is specified since only one file can be copied to DRAM. On the Cisco 1600 series routers, files are loaded to the ROMmon for execution. |
|
rommon 9 >xmodem -?
usage: xmodem [-cyrxefs]
-c CRC-16
-y ymodem-batch protocol
-r copy image to dram for launch
-x do not launch on download completion
-f Perform full erase of flash
-e Perform erase of first flash partition
-sSet speed of Download, where speed may be
1200|2400|4800|9600|19200|38400|115200
Here's an example of the xmodem command issued on a Cisco 2620 router:usage: xmodem [-cyrxefs]
-c CRC-16
-y ymodem-batch protocol
-r copy image to dram for launch
-x do not launch on download completion
-f Perform full erase of flash
-e Perform erase of first flash partition
-s
1200|2400|4800|9600|19200|38400|115200
rommon 1 >xmodem -?
xmodem: illegal option -- ?
usage: xmodem [-cyrx]
-c CRC-16
-y ymodem-batch protocol
-r copy image to dram for launch
-x do not launch on download completion
xmodem: illegal option -- ?
usage: xmodem [-cyrx]
-c CRC-16
-y ymodem-batch protocol
-r copy image to dram for launch
-x do not launch on download completion
Examples
rommon 12 > xmodem -cfs115200 c1600-sy-mz.121-16.bin
rommon 2 > xmodem -c c2600-is-mz.122-10a.bin
rommon 2 > xmodem -c c2600-is-mz.122-10a.bin
|
|
|
Xmodem Procedure for Downloading a Cisco IOS Software Image onto a Cisco 1603 Router
Use the following xmodem procedure to download a Cisco IOS software image onto a Cisco 1603 router.Step 1 Launch a terminal emulator program.
In the following example, configure Windows HyperTerminal for 8-N-1 at 9600 bps and connect your PC's serial port to the console port of the router. Once connected, you need to get into the ROMmon prompt (rommon 1>). Typically, if the router's Cisco IOS software image and bootflash image are both corrupt, the router only comes up in ROMmon mode. If the former is not true and you need to get into the ROMmon prompt, you need to change the configuration register (typically 0x2102 as given by show version) to 0x0 as follows:
1600#configure term
Enter configuration commands, one per line. End with CNTL/Z.
1600(config)#configure
1600(config)#config-register 0x0
1600(config)#^Z
1600#
00:22:06: %SYS-5-CONFIG_I: Configured from console by console
1600#reload
System configuration has been modified. Save? [yes/no]: n
Proceed with reload? [confirm]
00:22:16: %SYS-5-RELOAD: Reload requested
System Bootstrap, Version 12.0(3)T, RELEASE SOFTWARE (fc1)
Copyright (c) 1999 by cisco Systems, Inc.
Simm with parity detected, ignoring onboard DRAM
C1600 platform with 16384 Kbytes of main memory
rommon 1 >
Step 2 From the ROMmon prompt, issue the xmodem command. However, before issuing the xmodem command, ensure that you have the new Cisco IOS software image on your PC. Enter configuration commands, one per line. End with CNTL/Z.
1600(config)#configure
1600(config)#config-register 0x0
1600(config)#^Z
1600#
00:22:06: %SYS-5-CONFIG_I: Configured from console by console
1600#reload
System configuration has been modified. Save? [yes/no]: n
Proceed with reload? [confirm]
00:22:16: %SYS-5-RELOAD: Reload requested
System Bootstrap, Version 12.0(3)T, RELEASE SOFTWARE (fc1)
Copyright (c) 1999 by cisco Systems, Inc.
Simm with parity detected, ignoring onboard DRAM
C1600 platform with 16384 Kbytes of main memory
rommon 1 >
In this example, all Flash memory is erased before downloading using the f option (only on the Cisco 1600 series). Perform a CRC-16 checksum using the c option and using a download speed of 115200 bps (only on the Cisco 1600 series) by specifying -s115200:
rommon 12 >xmodem -cfs115200 c1600-sy-mz.121-16.bin
Do not start the sending program yet...
Do not start the sending program yet...
|
Use console speed 115200 bps for download [confirm]
File size Checksum File name
1957444 bytes (0x1dde44) 0xe345 c1600-y-mz.113-9.T
Erasing flash at 0x83f0000 no partition 2 on device: PCMCIA slot 1
Ready to receive file c1600-sy-mz.121-16.bin ...
Download will be performed at 115200.
make sure your terminal emulator is set to
this speed before sending file. All existing files in the partition displayed and files in any other partitions on this device will be lost!
Continue ? press 'y' for yes, 'n' for no:y
Step 3 Configure the terminal emulator program for a data rate of 115200 bps to match the xmodem speed specified above. This is done by closing the previous terminal session of 9600 bps and opening a new one at 115200 with 8-N-1. The trick here is that the Cisco 1603 only supports a maximum baud rate of 9600 bps. Therefore, when connecting at 115200 bps, you won't be able to see the router prompt. This is an important point to remember. Once connected to the router at 115200 bps, select from the HyperTerminal menu bar. File size Checksum File name
1957444 bytes (0x1dde44) 0xe345 c1600-y-mz.113-9.T
Erasing flash at 0x83f0000 no partition 2 on device: PCMCIA slot 1
Ready to receive file c1600-sy-mz.121-16.bin ...
Download will be performed at 115200.
make sure your terminal emulator is set to
this speed before sending file. All existing files in the partition displayed and files in any other partitions on this device will be lost!
Continue ? press 'y' for yes, 'n' for no:y
Step 4 Specify the image file name and location and enter xmodem as the Protocol.
Step 5 Click on Send to start the transfer.
The following message is received when the transfer is complete:
Download Complete!
Returning console speed to 9600
Please reset your terminal emulator to this speed...
Step 6 Per the message above, you need to exit your 115200 bps HyperTerminal session and restart a new one at 9600 bps. Once connected, the router's ROMmon prompt appears. Verify that the download was successful by issuing a dir flash:. Returning console speed to 9600
Please reset your terminal emulator to this speed...
rommon 9 >dir flash:
File size Checksum File name
3686656 bytes (0x384100) 0x1a5e c1600-sy-mz.121-16.bin
Step 7 Change the config register back to 0x2102 and reset or power cycle the router so that the new Cisco IOS software image gets loaded. File size Checksum File name
3686656 bytes (0x384100) 0x1a5e c1600-sy-mz.121-16.bin
rommon 10 >confreg 0x2102
You must reset or power cycle for new config to take effect.
rommon 11 >reset
System Bootstrap, Version 12.0(19981130:173850) [rameshs-120t_lava 114],
DEVELOPMENT SOFTWARE Copyright (c) 1994-1998 by cisco Systems, Inc.
Simm with parity detected, ignoring onboard DRAM
C1600 platform with 16384 Kbytes of main memory
program load complete, entry point: 0x4020060, size: 0x15568c
%SYS-6-BOOT_MESSAGES: Messages above this line are from the boot loader.
program load complete, entry point: 0x2005000, size: 0x3840e0
Self decompressing the image : ########################################
################
You must reset or power cycle for new config to take effect.
rommon 11 >reset
System Bootstrap, Version 12.0(19981130:173850) [rameshs-120t_lava 114],
DEVELOPMENT SOFTWARE Copyright (c) 1994-1998 by cisco Systems, Inc.
Simm with parity detected, ignoring onboard DRAM
C1600 platform with 16384 Kbytes of main memory
program load complete, entry point: 0x4020060, size: 0x15568c
%SYS-6-BOOT_MESSAGES: Messages above this line are from the boot loader.
program load complete, entry point: 0x2005000, size: 0x3840e0
Self decompressing the image : ########################################
################