Over the long weekend, I caught up on some much needed network maintenance at several of our buildings. I was able to upgrade most of the switch software without any trouble, but there is only that one bad apple!
The culprit switch started acting odd after I copied the current software image (which was stable for months) from primary to secondary flash. After doing so, the option to download a new image from TFTP was not available. A reboot left me with a switch that was still moving traffic and showed as “Up” in our NMS, but I was unable to remotely manage the switch via SSH or Telnet.
On my way home, I stopped by the building where the trouble switch was located thinking I could fix the issue quickly. After about 15 minutes of trying various methods of transferring a new image onto the switch (including TFTP and USB), I resulted to using Xmodem.
Xmodem is a last resort method of bringing a switch back from a usually inoperable state. The process below details a few ways to use Xmodem with an HP Procurve 5400zl switch.
The first topic you need to know is baud rate, and what type of impact it has on your transfer speeds when using Xmodem. The console port on most network equipment is set to a baud rate of 9600. This is fine for most normal console management needs. However, if you try to transfer an image using that standard baud rate, you are going to be waiting for a while!
In both scenarios below, I set the baud on the console port of the switch to 115200 (the maximum in this case of the switch I was using). The difference it made was clear by the transfer time estimates. At 9600 baud, it was estimated that the 10MB image would take 3.5 hours to transfer. At 115200 baud the same image only took 40 minutes. 40 minutes is still a long time compared to the transfer times of TFTP or SCP, but it is the lesser of two evils in this case.
Xmodem within Software
Your first option for transferring a software image is to use Xmodem after the switch has fully booted the current software image. The image on my switch was in a broken but semi-functional state, so I was able to attempt this.
First enter configuration mode and set the baud rate on the console port.
configure terminal
console baud-rate 115200
Save the configuration and reboot the switch (This is required for the baud rate change to take effect).
write memory
reload
While the switch begins to reboot, terminate your current console session and start a new one using the new baud rate (115200 in this case). Don’t be alarmed if you do not see the usual information scrolling across the screen as your switch boots. Eventually you will again be presented with your usual login prompt.
Once you have logged into the switch issue the copy command. The command below tells the switch to download the image from Xmodem and write it to the primary flash storage.
copy xmodem flash primary
If this is successful, reboot your switch and ensure it boots the new image properly. To ensure your switch boots from primary flash storage, issue the following command:
boot system flash primary
After you are done, be sure to reset the baud rate on the console to 9600 and then reboot the switch again.
configure terminal
console baud-rate 9600
write memory
reload
Xmodem from RoMon
In my case, I was not able to successfully transfer an image using the previous method because of the broken state of the software image. For this reason, I resorted to using RoMon.
RoMon mode must be selected before your switch begins to boot the software image. In the case of the 5400zl RoMon mode is option “0” on the boot screen.
Once you enter RoMon mode, you will be presented with a prompt. The first thing you want to do is set the baud rate on the console port using the sp command.
sp 115200
After doing this, you will need to restart your console session using the new baud rate.
Now, issue the “do” command to initiate the download utility (you will be prompted to confirm).
do to start download utility
After you confirm, you can initiate the Xmodem transfer using your console program of choice. Since I was using SecureCRT used the “Transfer” menu to select “Send Xmodem”. After doing so, the transfer process will begin. Once the transfer completes, the image will be verified and then saved to the flash location you choose. If everything works, the switch will reboot using the new image.