How to build a DB9-to-RJ45 serial cable
📅 May 25, 2009
⌛ 1 minute
This type of cable has a female DB9 connector on one end and a male RJ45 plug on the other. It is used to connect to the serial console of older Cisco devices and Sun gear, among others.
RJ45 pin | RJ45 color | DB9 pin |
---|---|---|
1 | Blue | 8 |
2 | Orange | 6 |
3 | Black | 2 |
4 | Red | 5 |
5 | Green | 5* |
6 | Yellow | 3 |
7 | Brown | 4 |
8 | White/gray | 7 |
* According to official Sun manuals this pin ALSO needs to be connected to pin 5 on the DB9 end. According to some other documentation I found it is not necessary to connect it at all. I didn’t connect it and the cable works fine for me.
For the ethernet cable, it is important to use a regular one. This is also called a patch cable or straight-through cable. It is the type you would usually use between a server and a switch, for example.