RJ45-wiring-order

Wiring a CAT5 RJ45 ethernet cable

Why wire your own Ethernet cable?

To finish installing my security camera, I need to drill a hole through a 9-inch wall.  I happen to have a long 8 mm masonry drill, and some ‘CAT 5e’ cable, but there’s no way that an Ethernet (RJ45) plug will go through an 8 mm hole, so I will have to fit plugs on each end.

How do you wire an RJ45 plug?

Well if you think about it, in theory there will be a correct electrical connection as long as you connect the same colours to the same pins at both ends.  But that won’t be satisfactory for high-speed data transfer.  A Cat 5e cable contains 4 ‘twisted pairs’, i.e. eight wires, for a reason.  Each pair carries a different part of the Ethernet signal and each pair of wires is twisted together because this helps to reduce the pick up of electrical ‘noise’ from stray signals.  This includes pick-up of signals from the other pairs (called ‘cross-talk’), and electric fields from nearby mains cables, radio signals, noisy electric motors and the like.  So the first thing is to ensure that you keep the pairs together.  They are easy to identify as each pair consists of one wire with a ‘solid’ colour and one white wire with that solid colour striped along it.

Now, you might think that in the plug, the pairs would be laid in the sequence solid colour/ dotted colour side by side.  But they’re not.  It seems that the original sequence was arranged so that you could use plugs with just one pair, with two pairs and so on.  So the first pair occupies the central two pins, and the next pair takes the next two pins outside the central two, and so on.  This is called ‘USOC’ and is convenient where you often don’t need many pairs.  But it resulted in the ‘positive’ connections being on one side of the plug and the ‘negative’ connections being on the other side of the plug, which is not ideal for rejection of stray signal pickup, because the pairs of wires are separated in the plug.  So they came up with a system that kept the primary pair in the centre of the plug, the second pair straddling each side of the first pair (so the same as the original USOC wiring) and the other two pairs are kept together each side of the central two pairs.  Quite logical.  This is called T568-A and was used for ISDN (telephone) wiring.  Indeed a small (two-pair RJ11) jack plug can plug into an RJ45 4-pair socket and will work if it is wired for a telephone.

However, it discovered that there is less cross-talk between the data pairs when pairs 2 and 3 are swapped in the plug.  This is called T568-B.  Pair 3 now straddles the central pair 1, pair 2 is on pins 1 & 2, and pair 4 is on pins 7 and 8.  To ensure that the colours alternate across the plug, the white stripy one of the pair is first and the solid colour is second. Except for pair 1 where the solid colour is first.

The T568-B arrangement should now be used for new data cabling for this reason.

Ethernet Wiring Pairs
Ethernet Wiring Pairs (not the wiring order in the plug)

As an aside, going back to the telephone jack-plug days, in each pair the white stripy wire is the ‘tip’ and is positive, and the solid colour is the ‘ring’ and is negative.  USOC stands for ‘Universal Service Ordering Code’.  It was originally developed by Bell Telephones in the 1970s and used in the RJ-11 (two-pair) jack plug for example, to connect telephones to the network.

Which Ethernet pair is which?
  1. Pair 1 is blue
  2. Pair 2 is orange
  3. Pair 3 is green
  4. Pair 4 is brown

This does not follow the resistor colour code, sadly!

What are the pairs used for?

This depends on the system that they are connected to.  For Ethernet up to 100 Mbps, then using the abbreviation Tx for Transmit and Rx for Receive:

  • Pair 2 (orange) is Rx at the Modem and Tx at the computer
  • Pair 3 (green) is the Tx at the Modem and Rx at the computer
  • The other pairs are spare (but may be used for power)

As previously mentioned, the plugs at both ends are normally wired identically: the distinction between transmit and receive pairs is handled within the devices – the modem or switch can automatically detect which pair is Rx and which is Tx.  However, when connecting two computers directly by a single cable, they might both try to transmit on one pair and to receive on the other pair.  This won’t work, so you might need a ‘crossover’ cable to fix this.

For Gigabit Ethernet, all four pairs are used.  Each pair carries a bi-directional signal.  Gigabit Ethernet does not require a higher operating frequency – it transmits more data by using all four pairs bi-directionally (to send and receive). This needs a much more sophisticated modulation system.

It also means that you can’t mix Ethernet systems connected on a single cable –many Ethernet switches will revert to the slowest system on the network, although ‘smart’ switches contain additional electronics to ‘buffer’ data when connecting from a slow system to a fast system, and thus don’t slow everything down.  One of the easiest ways to speed up a network is to install a ‘smart switch’.

[I will need to write separately about network switches – these are clever boxes for connecting devices on the same network.]

Power over Ethernet (PoE)

Devices using the Ethernet will need some sort of power for their electronic circuits.  For peripheral devices that don’t need much power, such as security cameras and telephones, it makes sense to supply the power via the Ethernet cable.  For speeds up to 100 Mbps, the spare pairs can be used for power, but for Gigabit, power is supplied on the data pairs.    For this reason, care is needed when supplying PoE as this might cause an issue with an old device that doesn’t expect it.  The PoE voltage is 48 v and usually limited to around 10 w per device.  However, ‘intelligent’ switches can adapt between various modes of operation.

Types of Ethernet cable

There are several different types of Ethernet cable.  The most usual is UTP cable, standing for ‘Unshielded Twisted Pair’. FTP cable has each pair shielded by a metal foil.  It is also possible that the whole cable is shielded by braiding or a foil.  If the whole cable is unshielded, this is designated as U/UTP.  If each pair and the whole cable is shielded with metal foil, this is shown as F/FTP.  S/FTP is even better protected with a braided sheath around the cable.

CAT5e vs CAT6

Why bother with CAT5e when you can have CAT6?  The wiring of the cables is identical, but CAT6 is designed to have lower cross-talk and less signal loss, so it can work at higher frequencies.  A CAT6 cable often has an internal PVC separator to keep the pairs correctly positioned.   However a CAT5e cable is fine for Gigabit Ethernet.  A CAT6 cable can support 10 Gigabit Ethernet, which is more than common network hardware can use, although it might be more future-proof, especially in office environments.

It’s worth noting that you can’t always tell the effective transmission rate of a network – if the network is noisy or lossy, then it has to keep resending ‘messages’ and if this gets excessive, it will become too slow to be useful.  In this case, a slower transmission rate will be much more effective.  Some smart switches have network analysis capabilities which can help with troubleshooting network bottlenecks.

How long can an Ethernet cable be?

Generally speaking, a Cat5e twisted pair cable can run at 100 Mbps over lengths of up to 100 m.  Different cable designs or signal repeaters can be used for greater distances.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.