Wait, that’s not right…
Let’s say you have Cisco fixed switch (2960, 3560, etc) and you copied over the tar file with an IOS upgrade, removed the old IOS, and rebooted the switch. Let’s say you forgot to install the new IOS and now you’re at the boot loader because the tar file isn’t bootable, it’s just a container for the IOS bin and the web based device manager. If you don’t grab the version with the web based device manager, you just have the IOS binary and you’re good to go, no install necessary. If you’re smart, you don’t remove the old IOS, but in my case this was for a fresh deployment so I didn’t see the need to hang on to the old IOS. Now you’re at the boot loader “switch:” prompt.
If you have an old switch/doorstop
You may have been to this movie before and been at the rommon of a newer router. The newer routers allow you to get the router onto the network and TFTP a new IOS in. So do the 3560X and 3750X, but I’ll get to that in a moment. If you have an older switch, you get to transfer the IOS image to your switch with xmodem.
There are two things that can be done to make this go a bit faster.
- The big one is to change your serial console speed from 9600bps to 115200bps. For a 14MB IOS image, that takes your transfer time down from over 3 hours to around 30 minutes. At least, that’s what it would be without overhead.
- Reduce your protocol overhead! Basic xmodem uses 128-byte packets. That gives you 40% overhead at 9600bps. Now you are well over 4 hours at 9600bps and closer to 45 minutes at 115000bps. Using xmodem-1k drops you to 19% overhead. That saves about 10 minutes at 115kbps and around 40 minutes at the snail’s pace of 9600bps.
To set your terminal speed to 115200, enter the command:
switch: set BAUD 115200
This takes effect immediately and your terminal will now give you garbage until you set it’s rate to 115200 as well.
Now you can start your xmodem transfer. Don’t forget to make sure your xmodem is using xmodem-1k. Also, make sure you copy over a .bin IOS image and not a .tar, or you’re wasting a lot of time.
switch: copy xmodem flash:c2960-lanbasek9-tar.122-55.SE1.bin
Once it’s done, you can either
boot if you want run the .bin you copied over or you can
reset if you want the system to do a hard reset (similar to a power cycle). Don’t forget to switch back to 9600bps…
If you have a 3560X/3750X
If you have a 3560X/3750X, you are in luck. TFTP is now available to you via the management FastEthernet interface. Set the IP_ADDR variable (the variable names may be case sensitive, depending on your platform) with your IP/netmask and DEFAULT_ROUTER with your default gateway. For example:
switch: set IP_ADDR 192.168.0.99/255.255.255.0 switch: set DEFAULT_ROUTER 192.168.0.1 switch: copy tftp://192.168.1.10/c3560e-universalk9-mz.122-55.SE1.bin flash:c3560e-universalk9-mz.122-55.SE1.bin
If things don’t work, it’ll sit there for a while and reward you with:
tftp://192.168.1.10/c3560e-universalk9-mz.122-55.SE1.bin: connection timed out
If things are working correctly, the screen will fill with periods and you’ll have to wait a couple minutes to be rewarded with something like this:
File "tftp://192.168.1.10/c3560e-universalk9-mz.122-55.SE1.bin" successfully copied to "flash:c3560e-universalk9-mz.122-55.SE1.bin" switch:
Now you can either
boot if you want to just fire up the .bin you copied over or you can
reset if you want the system to do a hard reset (similar to a power cycle).