Cisco Xmodem Download
Last week at work now, so been rushing to get things sorted out. I have still been doing a bit of study and planing some more ROUTE posts, but with a broken down car and house sale looking like its falling through haven’t had time to do any actually real posting.
However I came across something today, that I have known about for a while but never really used much. One of the things every one seems to love about CISCO is the fact you can simple copy and past configurations in to the terminal emulator window. And this is indeed great. set up one interface, copy the config to notepad, update it as you wish and past it back in… A real time saver and why we all love CISCO more than Microsoft ;).
Cisco recently announced availability of the latest release on the IOS-XE train – IOS-XE Gibraltar 17.4.1. This is a standard maintenance release supporting Switching, Wireless, SP-Access, Routing as well as IOT platforms with a sustaining support lifetim. If you are connecting to the switch via hyperterminal, power cycle it first and the press ESC in order for your to go to the main menu for the switch and then select download software after that, right click on the hyperterminal screen and then send the.ros file and then select Xmodem as the protocol.
Switch: copy xmodem: flash:c3550-ipservicesk9-mz.122-44.SE6.bin. Once you press enter, you see the following: Begin the Xmodem or Xmodem-1K transfer now C. At this point, you need to choose the file location from the terminal program. Go under File - Transfer - Xmodem - Send and choose the file that you wish the transfer.
In the past this is also how I have always copied backed up configurations on to a new switch/router. Simply open the saved config in notepad. Ctrl-A to select it all, copy and paste to the device. However I was doing this today and hit an issues. With really large configuration files (500+ lines of configuration), I was watching the console windows and could see it was skipping some of the configuration when doing this connected through the serial port. I could see that while things like VLAN’s where being created and the device was pausing, the following lines would some times get lost or corrupted. Now while if you only have a small size configuration file this is not an issue as it is quite easy to check, hundreds of lines become very hard to validate.
I found the best way around this problem was to set up the device with an IP address, put it on a limited access network that has a TFTP sever and copy over the configuration file, either to the startup-config or running-config. This works fine but it is a bit of a hassle going to all that trouble and it means you have to connect the switch to the network, so you have to be very careful with things like VTP and spanning tree. What I really wanted was a way to send the configuration file through the console port.
This made me think of how to recover a corrupted IOS image (which you can fine in the tips and tricks link above). Where boot the device in to ROMmon mode, and then copy the IOS over using the xmodem protocol. Almost all the mainstream terminual emulators have this built in, and while for recovering the IOS you need to increase the baud speed of the console port to speed up the copying process, as the configuration file is only 20-30kb max for most people, the standard speed will move that across in a few seconds.
So then it is just a case of knowing the command to achieve the goal, and I was happy to see it is as simple as it should be. On the device simple type the following from the enable prompt.
router#copy xmodem: startup-config
That’s it, no file names or anything, the device will now wait to receive the file(if you do not start the transfer within a few minutes the device will time out waiting). Then in your terminal emulation program start the transfer. In teraterm it is under the file menu, while secure CRT has a whole menu structure dedicated to various methods to transfer files. Simple chose the xmodem protocol (I found selecting the 1K option was more reliable), and browse to the configuration file, and away it goes. A few moments later the configuration will be on the device (#show Flash: to confirm), and a reboot will have it all up and running.
To me this is a far more reliable way of copying large configurations across, and allows you to easily set up the device from any client, this can be very useful if you are out on site and don’t have access to a limited access network, or the TFTP server to use to copy the files via TFTP or FTP using the network.
DevilWAH.
PS. Some older routers don’t seem to like you copying from xmodem to nvram, or require you to give a source file name. But you can still achieve the same by copying the file to Flash: .
PPS. Although I prefer the xmodem method, you can improve the reliability of the copy/paste method by increasing the line/character delay in you terminal emulation program. A 5msec delay per character seems to help, although with a 1000+ lines of configuration you may get from a complex configuration, you may find the paste takes a little time, and you may still get errors.
If you find yourself without an IOS on a switch during a reboot, you will need to transfer an image using Xmodem.
Download the image from TFTP to your computer:
tftp <tftp server ip>
get <image name>
quit
NOTE: You do NOT want to use a .tar package with Xmodem. Only use .bin images. If only a .tar image is available, extract the .bin to your computer.
Download and install Minicom to your computer:
kodi download for nextbook tablet sudo aptitude install minicom
- Configure Minicom:
sudo minicom -s
- Filenames and paths
- B (this lets you set the directory to upload from for xmodem)
- Type in the directory path to the IOS image.
- Serial port setup
- Press A
- Type in the path to your serial device (most likely /dev/ttyUSB0)
- Press E
- Press C
- Save setup as dfl
- Exit
Upload the IOS Image/download-batman-arkham-city-pc-patch-fixes-save-corruption.html.
- You should now be at a switch: prompt. If so, make sure there is enough room for the new image in flash:
dir flash:
- If not,
format flash:
Cisco Xmodem Download Version
- Power down, power back up.
- Change the baud rate to 115200:
Cisco Xmodem Download Pc
set BAUD 115200
- The session should stop responding. No big deal.
- Ctrl-A then Z.
- Press Q
- Console in at 115200 baud.
minicom -b 115200
- Now, get ready to copy over the new image. (Go grab a cup of coffee, because this is going to take a long time.)
copy xmodem:<image name> flash:<image name>
- Press Ctrl-A then Z
- Press S
- Select xmodem
- Select the IOS with space
- Press Enter
- The file transfer will start. It will take a long time.
- When it finishes, change the baud back to 9600
set BAUD 9600
Your session should stop responding. If it does not:
unset BAUD 115200
- Exit Minicom and reconnect again:
- Ctrl-A then Z
- Press Q
minicom
Cisco Xmodem Download
- Try to boot from the new image:
Xmodem Download
boot flash:<image name>
Cisco Xmodem Download Software
You should now boot into full IOS.