Xmodem Generic
Xmodem Generic
ROMmon
Introduction
Examples
Xmodem Procedure for Downloading an IOS Image onto a Cisco 1603 Router
Xmodem Procedure for Downloading an IOS Image onto a Cisco 2620 Router
Tools Information
Related Information
Introduction
This document explains how to use the xmodem command at the console to download Cisco IOS® Software
using the ROM monitor (ROMmon). Xmodem can be used on a group of routers (listed below) and is used in
disaster recovery situations where the router has no valid Cisco IOS or bootflash image to boot from and
hence, only boots up in ROMmon. This procedure can also be used where there are no TFTP servers or
network connections, and a direct PC connection (or via a modem connection) to the router's console is the
only viable option. Because this procedure relies on the console speed of the router and the serial port of the
PC, it can take a long time to download an image. For example, downloading a Cisco IOS 12.1(16) IP Plus
image to a Cisco 1600 series router using a speed of 38400 bps takes approximately 25 minutes.
• Cisco 827, 1600, 1700, 2600, 3600, and 3700 Series Routers
• Cisco AS5200, AS5300, AS5350, and AS5400 Universal Access Server
Note: Xmodem can also be used on certain Catalyst switches. Refer to the Recovery Section of LAN
Technologies Technical Tips under Software Management.
Usage
Here is the command syntax for xmodem as per the Command Reference Manual for Cisco IOS version 12.2.
To copy a Cisco IOS image to a router using the ROMmon and the Xmodem or Ymodem protocol, use the
xmodem ROMmon command.
xmodem [−c] [−y] [−e] [−f] [−r] [−x] [−s data−rate] [filename]
The following table describes the command syntax for the xmodem command.
syntax Description
rommon 9 >xmodem −?
usage: xmodem [−cyrxefs] <destination filename>
−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<speed> Set speed of Download, where speed may be
1200|2400|4800|9600|19200|38400|115200
rommon 1 >xmodem −?
xmodem: illegal option −− ?
usage: xmodem [−cyrx] <destination filename>
−c CRC−16
−y ymodem−batch protocol
−r copy image to dram for launch
−x do not launch on download completion
Note: The xmodem transfer only works on the console port. You can only download files to the router. You
cannot use xmodem to get files from the router.
It is also important to note that the −sdata−rate option is only available on the Cisco 1600 series routers and
was implemented to overcome the console baud rate limitation of 9600 bps. By specifying −sdata−rate of
115200 bps for example, you can increase the download rate and hence, reduce download time. Other Cisco
routers support console speeds up to 115200 bps. Therefore, the −sdata−rate option is not required.
Note: Ensure that the PC serial port is using a 16550 universal asynchronous transmitter/receiver (UART) if
you're downloading a Cisco IOS image through the router's console speed at 115200. If the PC serial port is
not using a 16550 UART, it is recommended that you use a speed of 38,400 or lower.
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 will need to get into the ROMmon prompt (rommon 1>). Typically, if the router's
Cisco IOS image and bootflash image are both corrupt, the router will only come up in ROMmon
mode. If the former is not true and you need to get into the ROMmon prompt, then you will need to
change the config 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.
2. From the ROMmon prompt, issue the xmodem command. However, before issuing the xmodem
command, ensure that you have the new Cisco IOS image on your PC. 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:
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 Transfer
> Send from the HyperTermincal menu bar.
4. Specify the image file name and location and enter xmodem as the Protocol.
Download Complete!
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:.
7. Change the config register back to 0x2102 and reset or power cycle the router so that the new Cisco
IOS image gets loaded.
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 SOF
........
1. Launch a terminal emulator program. This example Windows HyperTerminal is configured for
8−N−1 at 9600 bps. Connect your PC's serial port to the console port of the router. Once connected,
get into the ROMmon prompt (rommon 1>). Typically, if the router's Ciosco IOS image and bootflash
image are both corrupt, the router will only come up in ROMmon mode. If the former is not true and
you need to get into the ROMmon prompt, then you will need to change the config register (typically
0x2102 as given by show version) to 0x0 as follows:
2620#configure term
Enter configuration commands, one per line. End with CNTL/Z.
2620(config)#con
2620(config)#conf
2620(config)#config−register 0x0
2620(config)#^Z
2620#
5d03h: %SYS−5−CONFIG_I: Configured from console by console
2620#
2620#reload
rommon 1 >
2. Once in ROMmon, change the console baud rate from 9600 bps to 115200 bps to speed up the
download time. Use the confreg command and follow the instructions presented on the screen.
rommon 1 >confreg
Configuration Summary
enabled are:
Configuration Summary
enabled are:
break/abort has effect
console baud: 115200
boot: the ROM Monitor
You must reset or power cycle for new config to take effect.
rommon 2 >
3. Once the router boots up in ROMmon, the HyperTerminal sessions start to display illegible
characters. You will need to exit the current terminal session and start a new one at a data rate of
115200 bps to match the console rate as in step 2 above.
4. You are now ready to issue the xmodem command. However, before issuing the xmodem command,
ensure that you have the new Cisco IOS image on your PC.
rommon 1 >
rommon 1 >xmodem −?
xmodem: illegal option −− ?
usage: xmodem [−cyrx] <destination filename>
−c CRC−16
−y ymodem−batch protocol
−r copy image to dram for launch
−x do not launch on download completion
rommon 2 >
rommon 2 >
rommon 2 > xmodem −c c2600−is−mz.122−10a.bin
!−−− Note that [−s datarate] is not available here since you are set for 115200 bps.
Do not start the sending program yet...
File size Checksum File name
9939820 bytes (0x97ab6c) 0x4991 c2600−is−mz.122−7a.bin
5. From the HyperTerminal menu bar select Transfer > Send and specify the image name/location and
xmodem protocol as in steps 3 and 4 above and start the transfer.
Download Complete!
Notice how the Flash gets erased towards the end automatically compared to Cisco C1600. Hence, the
reason why the f option is not required here. Finally, ensure that you reset the console speed back to
9600 and change the boot sequence back to default by changing the config register back to 0x2102 as
follows:
You must reset or power cycle for new config to take effect
rommon 2 >reset
............................
cisco 2620 (MPC860) processor (revision 0x100) with 61440K/4096K bytes of memory.
Processor board ID JAB03110MUB (3691217154)
M860 processor: part number 0, mask 49
Bridging software.
X.25 software, Version 3.0.0.
1 FastEthernet/IEEE 802.3 interface(s)
2 Voice FXS interface(s)
32K bytes of non−volatile configuration memory.
16384K bytes of processor board System flash (Read/Write)
.........................
Tools Information
For additional resources, refer to Cisco TAC Tools for Router and IOS Architecture Technologies.
Related Information
• Software Installation and Upgrade Procedures
• Router and IOS Architecture Technical Tips