BaudBuddy

How to console into a switch from a MacBook

No serial port, one cable that is not Ethernet, and a choice between screen and something better. What to buy, what to plug where, and what to type.

Nobody ships a laptop with a serial port any more, and switches are still built as though everyone has one. Bridging that gap needs one adapter and one cable, and knowing which is most of the difficulty.

Look at the switch first

Three possibilities, and they need different things.

An RJ45 socket labelled CONSOLE. Looks like Ethernet, is not. You need a rollover cable, the pale blue one Cisco has shipped for decades, which reverses the pin order. Then a DB9 to USB adapter on the other end, or a lead that does both in one. A normal patch cable will not work and will give you no indication why.

A USB mini-B or micro-B port labelled CONSOLE. Common on gear from roughly 2012 onward. Plug a normal USB cable straight in, no adapter, no rollover. The switch appears on your Mac as a serial device by itself.

A USB-C port. Newer again, and the same story: a plain USB-C cable and nothing else.

Where a device has both RJ45 and USB console ports, plugging into USB usually disables the RJ45 one. Worth knowing when a colleague is already on the other end wondering why their session died.

What to buy

If you are starting from nothing, one cable covers the common case: a USB to RJ45 rollover console cable with an FTDI chip. It is the RJ45 lead and the adapter combined, and it is the thing to keep in the bag.

The FTDI part is not fussiness. FTDI chips work on macOS without installing anything, they can assert a break, which you need for password recovery, and they carry a serial number so software can tell two of them apart. Adapters built on cloned Prolific chips are the ones that either do nothing or produce nonsense, and that whole problem is covered in the adapter guide.

You will also want a USB-C to USB-A adapter, because the console cable will be USB-A and your MacBook will not be.

Then the settings

9600, 8 data bits, no parity, 1 stop bit, no flow control. That is Cisco and most other network equipment. Some newer platforms use 115200.

Flow control set to anything other than none, on a three wire console cable, is the classic way to get a connection that looks fine and stays silent forever.

Doing it with screen

macOS has screen, and for a five minute job it is fine:

ls /dev/cu.*
screen /dev/cu.usbserial-FTE07VR1 9600

Use the cu device rather than the tty one. Opening tty waits for carrier detect, which a console cable never asserts, and hangs with no error.

To leave: Ctrl-a then k, then y. To send a break: Ctrl-a then b.

Two things about screen worth knowing before you rely on it. It leaves sessions running if you close the window instead of quitting, and the next time you connect the port is busy with no explanation of what has it. And its idea of logging is a flat file with no timestamps, which is fine until you need to correlate what you saw with when.

Why the answer is often something else

For occasional use, screen is genuinely adequate and free. The case for a dedicated terminal is not that screen cannot connect. It is the things around the connection.

Saved connections. The switch is 9600, the firewall next to it is 115200, the PDU below wants 7E1. Re-entering that each time is how you end up staring at silence for ten minutes.

Pasting a config without losing characters. A console has no flow control, so a long paste overruns the switch’s buffer and characters vanish. Not an error, just a config with three mangled lines somewhere in the middle. Paced paste solves it.

A break that works. Needed for password recovery, and screen sends one, but whether it arrives depends on the adapter, and screen will not tell you if the adapter cannot.

Logs you can use afterwards. Timestamps beside the output rather than inserted into it, and a byte exact copy alongside the readable one.

The BaudBuddy device list showing serial adapters by name, with a Bluetooth port and a debug console alongside

Adapters identified by manufacturer and serial number instead of a device path. The path changes when you move USB ports; the serial number does not, so a saved connection still finds the right cable.

A first session, end to end

  1. Plug the console cable into the switch, and into your Mac through the USB-C adapter.
  2. Check it appeared: ls /dev/cu.* should show something new.
  3. Connect at 9600 8N1, no flow control.
  4. Press Enter twice. A running switch says nothing until you ask.
  5. enable, then the password.
  6. terminal length 0 to stop the pager interrupting long output.
  7. show running-config with logging on, and you have a backup.

If step 4 gives you nothing, do not immediately assume the cable. Work through the silent console guide: the usual answer is flow control or another program holding the port, and neither has anything to do with the hardware you just bought.