Random Cisco geekery, issue 4: Some break-sequence madness.

What is this break sequence even for?

The break sequence is a special key combination that is sent to the router its booting sequence. It has to be done at the very beginning, and lets you get access to a special mode called ROMMON. Think about it as a command-line version of the BIOS menu that you access by pressing F2 or DEL on your PC; if you use a Mac, think about OpenFirmware.

Let’s face it: most of the time you won’t need to access ROMMON when working on your Cisco devices, except for a number of cases in which it turns to be really useful:

  1. The flash memory is corrupt, hence the IOS firmware cannot be loaded (in this case you won’t even need the break sequence) or it loads but crashes in the middle of the process;
  2. You were upgrading IOS, but your router got power-cycled by mistake – or, in other words, you “bricked” the router, so to say;
  3. You lost access to the device and you need to reset the password, or you want to be even more brutal and erase the whole configuration from the NVRAM.

How do I send the break sequence?

When you normally work on a computer, you trigger the break sequence by simply pressing Ctrl+Break on your keyboard. Since you don’t connect a keyboard directly to the Cisco device, but you rather use telnet or ssh, we need to do something slightly different.

Although you could send a BREAK signal via telnet or ssh (eg. using PuTTY’s system menu), this kind of connection is available only after the router has passed the boot process, so we can’t grasp those precious early seconds of life of the router.

Fortunately, the Console port helps you, keeping the connection open since the very beginning. I assume that you already know how to get to the Console port of a Cisco device, but to put it short: get a serial port on your computer, connect it to the router using the blue cable, open HyperTerminal and ensure you use a connection with 9600 baud, no parity, 8 data bits, 1 stop bit, and no flow control (9600 8N1).

Once you’re ready, open the connection. If the device is still turned on, try pressing Enter, and you should get something (User Access Verification? A prompt? A reassuring MOTD like “If you got here it means that you did something wrong”?). There’s a number of reason why it could not work – ok, I’m lying, most of the time it’s just that you need to throw that fake USB-to-Serial you’ve just bought and go find another one.

Turn on the router and start pressing Ctrl+Break like you’re possessed by the devil.
You should get a prompt like:

Or just:

The difference matters, because then you’ll need to use different commands, eg. confreg 0x2142 vs. o/r 0x2142. Most of the time you’ll find complete guides on the commands you need to use based on your model, but let me anticipate to you that nowadays you’ll just find the first prompt (2600-ish) most of the time, rather than the second (more for older 2500s).

I dnt use HyperTerminal bcuz M$ suxx

If you’re using Linux, then just use minicom. You might need to install it (eg. sudo apt-get install minicom). You can’t use Ctrl+Break with minicom, instead you’ll need to press Ctrl+A then F and you’ll see “Sending BREAK” printed in the middle of the screen for a moment. It’s not as funny as flooding the line with Ctrl+Break by just keeping them pressed for 10 minutes, but it still does it job pretty well.

No it doesnt wrk!!!!111!!

It can happen. In this case there’s an alternative that I’ve just tried successfully and is documented on the Cisco website:

  • Turn off the router
  • Set your connection to 1200 baud instead of 9600
  • Open the connection
  • Turn on the router
  • Start pressing Spacebar and keep it pressed for 15 seconds
  • Disconnect
  • Set the connection back to 9600 baud
  • Connect again and press Enter

This is for HyperTerminal – with minicom it’s even easier, as you don’t have to do any “connect-disconnect” thing, just set the speeds by pressing Ctrl+A, then P, then B, B and B again, then Enter, do the Spacebar stuff while turning on the router, then again Ctrl+A, P, C, Enter.

Further documentation on what to do after entering ROMMON:

Note something down here. Put some effort into it.