Sunday, July 3, 2011

Cisco Catalyst 2960 switch IOS recovery


Sometimes in my lab happens that students delete IOS of the switch from its flash. Unfortunately switches does not have rommon to realize quick IOS recovery over tftp. Only one way is over Xmodem.

Cat 2960 switchIOS recovery

To speed up the process of the recovery we may setup Xmodem speed to higher rate as default 9600 bits:
Set the speed rate to 115200 baud on the switch prompt of the switch:
switch: set BAUD 115200
Of course we lose our console session and therefore we need to restart it with the correct speed settings. Then  we may realize the recovery.
Enter copy command:
copy xmodem: flash:filename
for our Cat2960-24TTL:
switch:copy xmodem: flash:c2960-lanbasek9-mz.122-52.SE.bin
Begin the Xmodem or Xmodem-1K transfer now...
CCC
and start sending of the file over console Xmodem software.

Recovery over HyperTerminal

Choose Transfer > Send File.
 
and than we choose as protocol the Xmodem and in filename click Browse and select the Cisco IOS image (.bin file) from the disk to be uploaded.
and click Send to send the file,

Recovery over Putty

Putty does not support Xmodem protocol, tears.

Final steps

To boot the new image that we just copied over with the Xmodem procedure issue the boot flash:filename command, as the example shows:
switch: boot flash:c2960-lanbasek9-mz.122-52.SE.bin
After the Xmodem recovery, we set the BAUD rate back to 9600. If the set BAUD 9600 command does not bring the baud rate to 9600, issue the unset BAUD command in order to bring the baud rate to a default value of 9600 bps.