fredag 25. juli 2014

Cisco RJ45 Console Port to Moxa NPort RJ45

So what exactly is this adapter for?

Cisco, and plenty of other network equipment manufacturers, tend to use the RJ45 form factor instead of DE-9 for their RS232 console ports. RJ45 is the standard used in most computer networks while DE-9 is usually known as a “serial” or “COM” port. DE-9 ports used to come standard on most PCs, but nowadays they are more of a legacy connector and are rare on desktop computers and pretty much non-existent on laptops. USB adapters with one or more DE-9 ports are cheap and easily available, though.

Equipment that has an RJ45 console port will usually come with an RJ45-to-DE-9 cable so that the equipment can be managed from a PC or laptop with a DE-9 port. The cable simply maps the active pins in the RJ45 port to the correct pins in the DE-9 plug (transmit to receive, receive to transmit, ground to ground and so on).

Moxa’s NPort product range allows you to transport RS232 signals over an IP network. You simply plug RS232-enabled equipment into to an NPort device, install the NPort software on a computer and communicate with the RS232-enabled equipment through virtual serial ports.

Moxa refers to their NPort devices as serial-to-ethernet device servers, but other terms are also used, including serial-to-IP or just device servers. While the NPort range is Moxa proprietary, other vendors offer their own product ranges with similar functionality.

Some time ago I got hold of a decommissioned NPort 5610, an 8-port serial device server with RJ45-type RS232 ports. I wanted to use this device to access the console ports of the equipment in my home lab, but I didn’t have any cables that properly mapped the RJ45 pinout on my network equipment to the RJ45 pinout of the NPort device. I could order some, but that would take a while and I wanted to get started with the NPort as soon as possible. Also, I had some time to kill.

I knew that Cisco and HP RJ45-to-DE-9 cables were cross compatible and worked with all the other equipment I had, so all the RJ45 console ports had to have the same pinout. Cisco has a great description of their console port pinouts here, and the NPort 5610 pinout is detailed in the Quick Installation Guide. Other RJ45 NPort devices use the same pinout.
Now I could make a TP cable with the correct pin mapping and male RJ45 plugs in both ends, but then I’d have to make new cables or use female-to-female adapters if I wanted different lengths. I move stuff in my home lab around a lot, so that would be kinda inconvenient.

Instead, I decided to make a short adapter cable with a male RJ45 plug on the NPort end and a female RJ45 plug on the console port end. That way I could plug the adapter cable into the NPort and run a straight-through TP cable to the console port that I wanted to hook up to.

The basic procedure outlined in this post would also apply to serial-to-IP devices from other manufactures than Moxa, but if the pinout is different you’d need to change the pin mapping in the cable reflect this.

As for the console port end, I have never come across equipment with a different RJ45 console port pinout than the one described in the Cisco article. All Cisco, HP, MikroTik, Huawei and Juniper gear I’ve tried used the same pinout. Your mileage may vary though, so try Googling the pinout for your equipment if you run into problems.

Tools and parts

  • Crimping tool
  • Some TP cable (I used about 10” or 25cm for each adapter cable)
  • Male RJ45 crimp plug
  • Female RJ45 connector(the kind that plugs into empty patch panels are nicely suited for this)

Pinout and pin mapping

Note: The DSR and DTR pins are not actually used, at least not by any of the equipment I’ve tested with. You can snip them and only terminate the send, receive and ground pins. Also, keep in mind that the adapter is not unidirectional. The male end must connect to the NPort device, otherwise the pin mapping will be incorrect and you won't get a connection.
Shown below are the console port and NPort pinouts mapped to the colors of a T568B terminated TP cable. The last table shows which color wires from the NPort map to which wires going to the console port.

Cisco console pinout

Pin Color Signal
1 W-ORG Not used
2 ORG DTR
3 W-GRN TxD
4 BLU GND
5 W-BLU GND
6 GRN RxD
7 W-BRW DSR
8 BRW Not used

Moxa NPort RJ45 pinout

Pin Color Signal
1 W-ORG DSR
2 ORG RTS
3 W-GRN GND
4 BLU TxD
5 W-BLU RxD
6 GRN DCD
7 W-BRW CTS
8 BRW DTR

NPort-to-console pin mapping

NPort Console
W-ORG ORG
W-BLU W-GRN
W-GRN BLU
BLU GRN
BRW W-BRW

Making the adapter

  1. Crimp the RJ45 plug onto one end of the TP cable. Use T568B termination.
  2. On the other end of the cable, strip back as much of the jacket as is needed to terminate the cable in the female plug.
  3. Cut off the orange, green and white-brown wires so they're about level with the jacket.
  4. Map the remaining wires coming from the male (NPort) end of the cable to the correct slits in the female (console end) connector. Use the mapping shown in the table above and make sure that you're looking at the T568B color coding in the female connector.
  5. Assemble/push together the female connector as you would with a normal cable.
NPort wires mapped to the correct slits in the female connector

A completed adapter
Adapters in use with my NPort

Ingen kommentarer:

Legg inn en kommentar