the 5-in-1 network admin's cable

ethernet / crossover / modem / null modem / Cisco console

featured in the premiere edition of Make

There is nothing worse than showing up for an on-site visit without the correct cable you need for a job. So what is a network admin to do, carry around several bulky cables everywhere?

For quite some time I've been carrying a single CAT5 ethernet cable in my laptop bag along with "the world's shortest crossover cable" and an RJ45 coupler. This allows me to turn my ethernet cable into a crossover cable and eliminates the need to carry around a second lengthy cable. Handy, but nothing to write home about. More recently I have been working with a lot of network devices with serial console ports, including Cisco routers and various other things. This means lugging around a null modem cable in addition to the non-standard RJ-45 to DB-9 console cable required by most Cisco equipment.

But after putting together four simple custom adapters, I now have an ethernet cable, a crossover ethernet cable, a modem cable, a null modem cable, and a Cisco console cable all by carrying around just one standard ethernet cable. An added benefit is that I can always extend my cable by finding a longer ethernet cable than the one I carry in my bag. It is usually pretty easy to locate a long ethernet cable but not so easy to locate a long null modem cable.

Do you find yourself toting several of these cables everywhere you go? Do you often wish you had brought a different cable with you after you have arrived on-site? Are you as geeky as me and think that this is just plain cool even if you never expect to configure a router in your lifetime? Then you need the 5-in-1 network admin's cable!

Here's how to make your own:

Buy, beg, borrow or steal the tools and materials you will need: 2 DB9 female to RJ45 female modular adapters These are the kind which you can pin however you want.

8 extra female pins for the DB9 connectors Plus have a few extras on hand unless you are much more dextrous than me.

4 RJ45 modular plugs Ditto on the extras just in case.

2 short lengths of CAT5 cable, preferably of different colors You can cut up existing cables.

1 RJ45 coupler The coupler must have all eight conductors. Be aware that many ethernet couplers, such as the one shown here, only have four.

1 straight-through ethernet cable It must be an eight conductor cable, not a four conductor cable.

a pair of RJ45 crimpers, wire strippers, and some kind of crimper for the DB9 pins (needle nosed pliers would probably work) Make "the world's shortest crossover cable" Note that this cable must cross the pairs that are not used by ethernet in addition to the pairs that are. This is why you must perform this critical step and cannot use a standard crossover cable you may already own. You can actually make this as long as you want, but the longer you make it the more you have to carry around. The pinout looks like: 1 -> 3 2 -> 6 3 -> 1 4 -> 7 5 -> 8 6 -> 2 7 -> 4 8 -> 5 Crimp one of the RJ45 plugs on each end. Order the wires on one end according to the 568B standard: white/orange orange white/green blue white/blue green white/brown brown This is the most common order for ethernet cables, so you could get a head start by snipping off the end of an existing cable and then you only have to do the other end. The other end should like like: white/green green white/orange white/brown brown orange blue white/blue If you are as geeky as me, you'll make sure that each pair has at least one twist. Then you can prove people wrong if they scoff, "That's not the world's shortest crossover cable, that's just an adapter!" (optional) Make the Cisco console adapter: This adapter works with the RJ45 serial port found on most Cisco routers. It also works on some Sun servers. This is pretty much just like the crossover cable but with a different pinout: 1 -> 6 2 -> 5 3 -> 3 4 -> 8 5 -> 7 6 -> 4 7 -> 1 8 -> 2 Make the first end according to 568B again: white/orange orange white/green blue white/blue green white/brown brown And the other end: white/brown brown white/green green orange white/orange white/blue blue It is important to note that this is not a symmetric adapter. The 568B end will point away from the router and the other end will be inserted into the router. I marked the router end of mine with a sharpie so I wouldn't forget. Cisco's (otherwise very helpful) cabling page has RTS and CTS reversed on the DB9/RJ45 console cable, which I verified by inspecting an actual Cisco cable. They don't really care anyway because their console ports do not use flow control, but doing it the right way enables interoperability with Sun servers and perhaps some other things. Make two DB9/RJ45 adapters: This is the trickiest part. In order to make your cable compatible with the largest number of serial devices possible, you need to combine a couple pins and split another one. Here is the pinout: DB9 pin signal RJ45 pin color * ------- ------ -------- ----- 1 DCD 8 white 2 RxD 3 black 3 TxD 1 blue 4 DTR 5 green 5 SG 2 and 6 orange and yellow 6 DSR 8 white 7 RTS 4 red 8 CTS 7 brown 9 RI none So our ethernet turned serial cable will be pinned: 1 TxD pair one 2 SG pair one 3 RxD pair two 4 RTS pair three 5 DTR pair three 6 SG pair two 7 CTS pair four 8 DSR/DCD pair four * My DB9F/RJ45F modular adapters are colored blue, orange, black, red, green, yellow, brown, white (RJ45 1-8), but yours may not be. If yours are different, ignore the colors in the above pinout. DB9 pins 2, 3, 4, 7, and 8 are easy. Just push the appropriate pin in the back of the DB9 connector until it snaps. Be careful not to get any of the pins mixed up because errors are a bit difficult to fix. I seem to remember having a skinny little tool to pop the pins back out again some years back, but I can't find it anymore. :-( DB9 pin 5 needs two wires connected to it. Snip the pins off of the wires coming from RJ45 pins 2 and 6 (orange and yellow on mine), strip about 3 mm off the end of each, and crimp them together onto one of your spare pins. RJ45 pin 8 has to connect to both 1 and 6 on the DB9 connector. Snip the pin off of the white wire, strip the end, cut about an inch of scrap CAT5 and pull out two of the white wires, strip both ends off of them, crimp a pin on each one, and splice all three loose ends together. You can break the end off of a spare pin and use it to crimp the three wires together. You can use the other two white wires from the inch of CAT5 for the second adapter. Both of the DB9/RJ45 adapters should be wired exactly the same way, regardless of whether they will be used for DTE or DCE devices.

Here's how to use it:

straight-through ethernet cable: no adapters needed crossover ethernet cable: ethernet - coupler - crossover modem cable: DB9/RJ45 - ethernet - DB9/RJ45 null modem cable: DB9/RJ45 - ethernet - coupler - crossover - DB9/RJ45 Cisco console cable: DB9/RJ45 - ethernet - coupler - Cisco adapter Remember that the Cisco adapter is not reversible.

Notes:

This solution is somewhat similar to the Yost wiring standard which I have long found to be quite useful. The only reason that I did not use the Yost standard for my DB9/RJ45 adapters is that I wanted mine to work with any standard ethernet cable. I didn't use Cisco's pinout for the same reason. Plus, Cisco generally irritates me. I wanted the serial Transmit and Receive conductors each twisted with ground rather than with each other, which should cut down on cross-talk and allow longer cable lengths. (I also think it is nifty to be able to use the same crossover cable for both ethernet and serial.) I haven't done any length or reliability testing, but so far everything I have tried has worked just fine.

If you need a DB9/RJ45 serial cable with different pinouts than the Cisco one, all you have to do is make another little CAT5 adapter. Cable ends are cheap and plentiful.

When used as a serial cable, this is a hardware flow control (CTS/RTS) cable. If you are using devices which both require hardware flow control, it should work. If neither of your devices require hardware flow control, it should still work. However, if one of your devices requires hardware flow control and the other does not support hardware flow control, then you need a cable that fakes flow control. This could be done with an additional DB9/RJ45 adapter or with another CAT5 adapter and some creative crimping (my preference), both of which are left as exercises for the reader.

If you grab a random ethernet cable to use with your serial adapters, remember to make sure that it has all eight conductors. Also keep in mind that most ethernet cables have only been tested for connectivity on four conductors (1, 2, 3, and 6) if they have been tested at all. I used those conductors for the most important serial signals (Transmit, Receive, and Ground) just in case, but some serial devices won't talk without all eight working.

Extras:

Many additional adapters could easily be added to this set. A few that leap to mind would be for other kinds of serial ports such as DB-25 and various DIN and miniDIN ports for Macintoshes and other things. If you come up with a useful one, send me the pinout (as well as a link to an authoritative source regarding your device's pinout if possible) and I will post it here.

DB25 serial: DB25 pin signal RJ45 pin -------- ------ -------- 8 DCD 8 3 RxD 3 2 TxD 1 20 DTR 5 7 SG 2 and 6 6 DSR 8 4 RTS 4 5 CTS 7 loopback plug You can use the leftover wires in that inch of CAT5 that you cut when making the DB9 adapters. Pull four of them out and crimp both ends (in little loops) in a single RJ45 plug as follows: 1 TxD wire one 2 SG wire two 3 RxD wire one 4 RTS wire three 5 DTR wire four 6 SG wire two 7 CTS wire three 8 DSR/DCD wire four The photograph depicts a three-wire RS-232 loopback plug, not the four wire combination plug. This works for RS-232 loopback. Alert reader, Bruce Bannach, pointed out that it also works for ethernet and that popping it into an ethernet port fools Windows into thinking it is attached to a network. According to some Windows administrator friends of mine, this could be quite handy for things such as installing Windows 2000 Server. Note that only wires one, three, and four are necessary for RS232, and only wires one and two are required for ethernet. I prefer to have them all for maximal multifunctionality. :-) A handy use for this plug is to perform rudimentary cable testing. To test an ethernet cable, for example, you can attach the loopback plug to one end of the cable with your coupler. Then plug the other end of the cable into an ethernet port and see if you get link. If you plug it into a Windows 2000 or XP box, it will notify you if there is link. With Linux you can use mii-tool or mii-diag. This works for both straight-through and crossover cables. receive-only ethernet sniffer cable photo coming soon! With a couple of splices, you can make the world's shortest receive-only cable: target end: 1 wire one 2 wire two 3 wire one 4 5 6 wire two 7 8 sniffer end: 1 2 3 wire one 4 5 6 wire two 7 8 This cable provides loopback link (just like the loopback adapter) to a hub or other device while allowing a sniffer on the other end with 100% assurance that no return traffic will be transmitted. This follows the "Model B" design as described in Receive-only UTP cables and Network Taps. the "throwing star" LAN tap You can buy a clunky box for $100 or more that does nothing more than this simple and ultra-portable network tap. Just use a coupler to insert the tap in-line on the end of an existing ethernet cable carrying the traffic that interests you, and then you can sniff one direction of traffic from one of the sniffer ends or the other direction of traffic from the other sniffer end. You'll need an extra coupler or two for this. normal end one: 1 wire one 2 wire two 3 wire three 4 5 6 wire four 7 8 normal end two: 1 wire one 2 wire two 3 wire three 4 5 6 wire four 7 8 sniffer end one: 1 2 3 wire one 4 5 6 wire two 7 8 sniffer end two: 1 2 3 wire three 4 5 6 wire four 7 8 Like the sniffer cable above, the throwing star LAN tap provides receive-only sniffing, guaranteed to not interfere with network traffic. This is great for inserting into crossover cable connections, such as a link between a firewall and a router. This follows the basic design described in Receive-only UTP cables and Network Taps. Some of the commercial alternatives have nice additional features but none is more portable. See my blog for an even better version. Ethernet and RS-232 combination tap If you like the throwing star LAN tap, you'll love the Ethernet and RS-232 tap. Exercise for the reader: adapt this design to the throwing star form factor.

If all you ever use is an ethernet cable, everything starts to look like an RJ45 jack.

Text and diagrams copyright 2004-2011 Michael Ossmann, http://www.ossmann.com/mike/.

Most of the photos are copyright 2004 Dan Gottesman, http://dangottesman.com/.



This work is licensed under a Creative Commons License. Please include the URL http://www.ossmann.com/5-in-1.html when giving credit to the authors.