LAN-Priority-Switch - Ethernet Switching for two Exclusive Members


Today's DSL-modem-routers for home appliance, offered by providers at favourable pricing, can do a lot of things, yet sometimes feature only one LAN port for wired Internet connectivity. Instead of adding a Network Hub or Switch to multiply ports, we may find, that the two stationary computers in our shack do not really need to go online at the same time. So, the switching could be done by a literal switch. There are manually operated LAN changeover switches available. This article suggests a more comfortable switching method, that will also help enforcing priorities.


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




Concept

Right here, we will not discuss, why anybody would or would not want all that wireless stuff in their private life. In this scenario:
  1. We have one Cable/DSL-Router featuring exactly one LAN port providing Internet connectivity.
  2. Two computers are supposed to go online via wired LAN, but not necessarily at the same time.
  3. We wish to avoid any uncontrolled data exchange between these two computers.
  4. The main computer must always gain LAN access when 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 a literal electric switch for the LAN signals, operated by buttons or rotary knob. With such device, allocation of network resources is done in a pretty simple and exclusive way. In fact, only the one party that is electrically connected to the LAN can have any network access. The other party is disconnected from the LAN, same as if its network cable was physically unplugged.

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

Manual switching could be annoying and quite inconvenient. Why not make a relay-operated LAN switch that simply depends on the operational state of a privileged (Master) computer! That's whole of the idea in this little project: Let's build an automatic LAN changeover switch!

Top | Index


Circuit

Schematics: J. Thomas

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

Instead of a quadrupolar mechanical switch, we use two relays with two sets of changeover contacts each. These are ordinary mono-stable 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 routing these signals over physically separated relay contact sets, no crosstalk between Rx+Tx will occur.

Operating voltage for the relays is coming from the USB port of the privileged computer. It is led to connection X4, feeding both coils of Re1 and Re2 with 5 volts. As soon as this computer is switched on, it also energises these two relays and their contact sets will forward LAN from the Router (X1) to the LAN socket for Master (X3).

When the Master is shut down, USB voltage will drop and relays fall off again. Now their normally-closed contact sets will forward LAN signals to the secondary computer, the Subordinate (X2).

D1 is the obligatory "flyback" diode that will eliminate inductive voltage spikes which can occur when switching off relay coils. Normally, USB should be robust enough to cope with that, but of course it's better to compensate right at the source.
Ceramic capacitor C1 is also just a precautionary measure. It blocks spurios radio frequency that might have been coupled/induced from or into the "hot" end of relay coils. (Again, more of a theoretic consideration. Never observed any RF-breakthrough at the side of relay coils while 100-Mbit/s-Ethernet was active. This is due to the differential nature of twisted Ethernet, but also gives indication that the chosen relays feature good symmetry and RF properties. According to the data sheet, cross-capacitance between contacts, contact-sets and coil set is less than 2 pF, which is quite negligible in this application.)


Top | Index


Construction

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

Don't miss 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 miniaturised 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 recommend 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 cost for this project, without PCB, housing and cabling, is 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


Commissioning

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 nearby the Router. Cable's allowable length is up to 100 metres according to T-Ethernet LAN specs, so we should have plenty of flexibility to lay out our LAN cables as needed 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 reliable to 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


Comments


Top | Index


License note

All documents regarding this little project of LAN-Priority-Switch (LAN-Prioritätsschalter) are 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


Download


Top | Index


Links


Top | Index


07/2017, 08/2017