Tony Bourke

Site Map


Load Balancing Resources:

Database Resources

Serial Madness

Table of Contents

Page 1: Introduction
Page 2: How To Wire The Kits
Page 3: Wiring Guide

Note: This article originally appeared in HostingTech Magazine, which has since ceased operations (including web-based), so I've published it here. It is based on a two previously published online guides. The version I'm publishing here is the final draft I submitted to my editor, so it may (likely) contain grammatical errors that I'm incapable of catching.

Most networking devices such as routers and switches, as well as most UNIX servers, can be managed and configured via a serial port console. It's how most of these devices are configured initially, and offer a way to access them when normal networking is either not functioning or not available. The problem with serial consoles, however, is the multitude of serial interface types, cable-wiring configurations, and adapters, makes it extremely unlikely you'll have the right cable at the right time. Well I've found a way to greatly simplify console access, and I'll share it with you in this article.

There are many advantages of using serial management over the management and console access of Wintel devices, which require an often times bulky VGA monitor and keyboard. Serial console access can be used with a variety of equipment, such as a small terminal or laptop. They are easy to connect, and since they are extremely low bandwidth (serial speeds rarely go over 9600 baud), with the addition of a terminal server or other networked device, console access can be done remotely from great distances with little more than a modem's access.

The problem with serial consoles, however, is the multitude of serial interface types, cable-wiring configurations, and adapters, makes it extremely unlikely you'll have the right cable at the right time. To illustrate this point, let's take a look at the most common interfaces and cables:

Physical Connection

  • DB-25 (Sun systems, terminal connectors)
  • DB-9 (Some network devices, serial connections on PCs)
  • RJ-45 (Some network devices)

    Cable Wiring

  • Straight-through
  • Null modem
  • Cisco rollover

    Given two types of connection genders (I don't have to explain to birds and bees to you on why they are called male and female), three types of connections, three types of wiring, two ends of a connection, and the boundless adaptors converting one type to another, the possible combinations can get into the hundreds. It's hard enough trying to keep a null-modem adaptor around, let alone the other types of adaptors and cables. It's difficult to manage, and during a crisis situation invariably kicks in and makes you waste precious time hunting and foraging through the data center for the right connection. It's enough to drive a sysadmin, NOC worker, or any kind of techie mad.

    Thankfully, there is a solution available. Over the years I've learned a good way to manage serial console connections, a method which scales easily from one or two serial devices to hundreds of connections with no problem. The method involves converting all serial cabling to RJ-45 and using Cat 5 cable connections. To convert these serial connections to RJ-45, there are a variety of RJ-45 modular adaptor kits.

    Using this method of RJ45 adaptors and Cat 5 cabling will create a standard type of cable to carry console connections, using cable, which is usually plentiful and easy to manage. It allows the usage of standard Cat 5 infrastructure, including cable management and patch panels, and makes it easy to run serial connections over long distances, such as from one end of a data center to another.

    The kits come in 4 main varieties: DB25 Male, DB25 Female, DB9 Male, and DB9 Female. All have a female RJ45 connector to plug in one end of a Cat 5-type cable. The kits come unwired (hence they are called kits), and you can wire them in any way that is required. There are three basic types of cabling that you would see in a data center environment, which would include servers, routers, switches, and more.

  • Straight through: Often referred to simply as "straight", this type of connection is the basis for all other serial connections.

  • Null modem: Or "null" for short, this is a type of connection that is expecting another type of device on the other end. In a null connection, the TX and RX cables are reversed on one end.

  • Cisco roll-over: A Cisco rollover connection takes pins 1 through 8 of an RF-45 cable and flips them, so that 1 is 8, 2 is 7, 3 is 6, and 4 is 5. The flat noodle-like RJ-45 cables that come with most Cisco gear is wired in this manner. Cisco console connections on their equipment expect to have some type of rollover cable somewhere between it and a terminal.

    By wiring RJ-45 modular adaptor kits, you can create any of the three main types of pin-out configuration, straight through, null, or Cisco rollover. The trick is to have one end as a wired straight, and the other ends as whatever types you require, straight, null, or rollover. Two null connectors at each end will make a straight connection; two rollover connections will make a straight connection. One null and one rollover will make a connection that won't work for anything.

    For instance, let's take the a fairly common serial console connection, such as a laptop with a DB-9 male serial connection trying to get to a Sun server's console DB-25 female console port. This type of connection requires a null setup. Normally, it would be difficult to find the right type of cable, with the right type of gender, as well as making the connection null. With RJ-45, it's much easier. All we need is a DB-25 male adaptor, sufficient Cat 5 cable length, and a DB-9 female adaptor, with one of the adaptors wired as null.

    Figure 1: DB-25 male to DB-9 female null serial connection

    In figure 1, the adaptor connected to the sun is wired null, making the entire connection the required null. The laptop will now be able to connect via a terminal program as needed.

    Just about the only thing universal when dealing with serial console connections is the speed settings. They are almost always 9600 baud, 8 bit, no parity, and 1 stop bit, commonly referred to as 9600-8N1. I've not yet come across a device with any other type or speed of serial connection.

    Next Page: How To Wire The Adapters