LAN-Priority-Switch - Ethernet switching for two exclusive members

Today's DSL-modem-routers for home appliance, offered by providers at favourable package pricing, can do a lot of things, yet sometimes featuring only one wired LAN port for internet connectivity. Instead of adding a Network Hub or Switch to multiply ports, we may find, that the two stationary computers in our setup do not even need to go online at the same time. Could be a rewarding application for some manually operated LAN changeover switch. This project suggests a more comfortable switching method, that will also help enforcing priorities.

Concept | Circuit | Construction | Commissioning | Comments | CC | Links | Index


Right here, we will not discuss, why anybody would or would not want or need all that wireless stuff in their private life. In this scenario we got:
  1. One Cable/DSL-Modem-Router featuring exactly one LAN port that provides WAN access.
  2. Two computers supposed to go online via wired LAN, but don't have to get it at the same time.
  3. We wish to avoid any uncontrolled data exchange between these two computers.
  4. The main computer must always get LAN access as soon as being switched on.
  5. The secondary computer is granted LAN access as long as the main computer is not in operation.
Looks like we're best off with an old-school Ethernet Switch that is literally a switch, being operated by buttons or rotary knob. With such device, allocation of networking resources is done in a pretty simple and exclusive way. In fact, only one party will be electrically connected to the LAN port at a given time. The other party is technically disconnected from the LAN, same as if its network cable was physically plugged out of the LAN port.

The disconnected party can not communicate with other computers on the LAN and, of course, it won't get WAN access by means of the LAN gateway. If this is exactly the way we wish to separate our computers from the network and from each other (i.e. no "home-networking"), then this hardware-based approach is a clear benefit in terms of security and privacy. For instance, it prevents notorious networking protocols on a "Windows" machine from stalking and spying other network participants and infecting them with malware (like "WannaCry"). It also limits potential damage that could arise from any external attack only to the one computer that is actually online.

That manual switching could be annoying and lots of legwork, if we repeatedly forget to operate that anachronistic switch... Why not making the LAN switching and priority directly depend on the operational state of the privileged (Master) computer! That's whole of the idea in this little project: Let's build an electrically operated LAN changeover switch!

Top | Index


Schematics: J. Thomas

The circuit is supposed to replace a mechanical LAN switch for two parties. For 10/100BASE-T Ethernet, the two line pairs Tx and Rx are to be switched.

Instead of a quadrupolar mechanical switch, we make use of two relays, each featuring two sets of changeover contacts. These are ordinary mono-stable and non-polarized miniature relays, designed for switching delicate signals. Contact set of Re1 is switching the Tx lines (1+2), contacts of Re2 switching the Rx lines (3+6) from the LAN Router (connecting to modular socket X1) to one of the two target ports (X2 or X3). Note, that by leading the signal paths over physically separated relays, crosstalk between Rx+Tx is no issue at all.

Operating voltage for the relays is provided by any USB port of the privileged computer and leads to connections X4, which will feed both coils of Re1 and Re2 with 5 volts from the computer's power supply. As soon as the computer gets energized, it also energizes these relays and their normally-open contact sets will forward LAN signals from the Router (X1) to the LAN socket for Master (X3).

When Master is shut down, USB voltage will drop and relays fall off again. Then the LAN connection from the Router is being forwarded by the normally-closed contact sets to the LAN socket for the secondary computer, the Subordinate (X2).

D1 is the obligatory "flyback" diode that will eliminate voltage spikes that can occur when switching off relay's inductivity. (Normally, USB should be robust enough to cope with that, but of course it's better to eliminate this effect right at the source.)
The little ceramic capacitor C1 is a precautionary measure that will block spurios radio frequency that might have been coupled/radiated  from or into the "hot" end of relay coils. (Note: more of a theoretic consideration. Even using quite sensitive RF probes on open coil ends, any undesired RF-breakthrough could never be detected when 100-Mbit/s Ethernet was running permanently. This is due to the differential nature of twisted Ethernet, but also giving indication that the chosen relays feature fairly good symmetry and RF properties. According to the data sheet, the capacitance between open contacts and any contact-set vs coil is rated less than 2 pF - which is in fact negligible for this application.)

Thus we get a fully automatic LAN switch with priority for the Master member!

Top | Index


High-quality components, cleanly manufactured PCB, solid workmanship. Refrain from lead-free solder.

Do not forget about the wire bridge under Re1, which must be set at the very first. Aside from that, no specific sequence of assembly is required.

These Relays in a DIL formfactor are not too much of a miniaturized itsy-bitsy, thus could be handled without a microscope.

Regarding the 8P Modular Sockets (RJ45 connectors), there are differences in quality, so it is not recommended to pick the cheapest model. When mounting through-hole mountable modular sockets, take care for a good fixing, i.e. that mechanical stresses are not being forwarded by the solder pins to the PCB. Otherwise there will be hairline cracks in the area of solder joints sooner or later, which behave like cold solder joints and cause malfunction that is sometimes hard to reproduce and eliminate. After mounting of the three RJ-sockets, re-heat all solders to release mechanical stresses.

EMC: On a simple circuit board, differential signals can hardly be routed in perfect symmetry, so we would expect minor attenuation losses in such a passive switching appliance. Also radio interference from external transmitters is possible. For good practice, i always recommend to apply basic means of electromagnetic shielding. This could be a double-sided PCB with ground layer, a conductive base plate in a plastic case or, the more consequent way, a full-metal case like this .

Grounding: Reference ground of this LAN-Priority-Switch is USB-GND, which more or less directly refers to PC-GND (and on a stationary PC it should also be mains earthing). The supposed PCB-layout provides sufficient ground connection via one fixing screw. Additionally, we may connect USB cable's mesh directly to the side frame of chassis.
Note: As you may have noticed, there is no LAN-cable shields considered. It is my conviction, that a shield grounding of Twisted-Ethernet cables is not needed in a small network and must be chosen very carefully; otherwise it will create more problems that it will solve, giving rise to ground loop effects, degraded symmetry of signal transmission etc.

For the feed of control signal we need a USB-type-A cable with two open wires on the other end connecting USB power (VBUS, pin 1) and USB ground (GND, pin 4) to X4 on the circuit board. Length of such cable should not exceed 2 meters according to USB-specs. If we have separate USB-Type-A-connector, of course we can make a tailored two-wired cable.

Using any standard USB-Cable with Type-A connector is also a good option. Cut off the Mini- or Micro-connector from the other end and expose the wires. We'd only need +5V (red) and GND (black). Data lines D-/+ (white and green) may be cut short and isolated. Though we should keep in mind, that the colours mentioned (and carelessly parrotted in many diy instructibles), only refer to the recommendations of USB consortium. In reality, we may find strange deviations of colours and (even more malicious) completely random assignments! So, it's always a good idea to countercheck EVERY SINGLE WIRE electrically against the expected connection scheme, BEFORE actually connecting any homebrew USB cable to real hardware...

USB cabling for this appliance does not really need a ferrite bead (sheath current filter). With one present, it won't hurt either.

Component costs for this project without PCB, housing and cabling will be less than 10 Euros.

The download contains PDF worksheet with site plan, component listing and circuit plan, as well as the PCB layout in a high-resolution bitmap.

Top | Index


All network cables should be "Cat.5" or higher, resp. EIA/TIA-568A, type straight-through.

The LAN-Priority-Switch must be placed somewhere around the Master station for obvious reasons, yet it does not necessarily have to be near the LAN-Router. Network cable's allowable length is up to 100 metres according to T-Ethernet LAN specs, so we should have enough flexibility to lay out our LAN cables in a usual home environment...

Troubleshooting: Should there be connection problems that do not occur with a direct connection of similar length, then we shall check the PCB for craze interruptions, "cold solders", especially around the RJ-terminals. And, believe it or not, dirty LAN sockets and plugs may actually cause network problems, too.

After the LAN-Priority-Switch has proven to be reliable for us, it is recommended to conserve the PCB's bottom side by means of some protective coating. Make sure not to spill over the RJ45 contacts.

Have fun!

Top | Index


Top | Index

License note

All documents regarding this little project of LAN-Priority-Switch (LAN-Prioritätsschalter) are being released to the Public Domain under the most liberal Creative Commons Zero license, which means there is no restriction at all for private, scientific or commercial purposes. Use at your own risk. Support my work in the form of constructive criticism or donations.

Top | Index


Top | Index


Top | Index

07/2017, 08/2017