2018-09-22

Gigabit Ethernet Everywhere

What's the purpose ?

Every developer even remotely interested in performance regularly needs multiple physical machines to test the effects of various optimizations. I'm no exception to this, on my desk lie a number of fanless Atom and ARM boards serving as load generators and web servers when I need to validate certain points regarding HAProxy.

The problem is that you don't always have enough network connectivity on the wall. A simple solution consists in buying some external 5-port switches but at some places you then don't have enough power plugs, and having to deal with extra cables and devices at all time for a test once in a while is not always cool.

Additionally when you have to visit customers for some consulting it's commonly problematic not to be able to plug anywhere or directly behind a test machine.

Nowadays there are interesting solutions like this very inexpensive 5 port Gigabit Ethernet switch which I paid less than $13 shipping included. But this one also requires an external power supply.

Very simple solution

One will note that the description mentions a 5V power supply. Thus it can very likely be powered over USB. I bought one and used a USB cable adapter to verify that it worked fine once connected to USB. And indeed, it did.

Thus I opened it, de-soldered the power plug, replaced it with a micro-USB female connector, and that was all. Now I can carry this device in my computer bag every day and if I need to connect it, I can pick whatever micro-USB cable available and connect it to my PC or any other power source.

It would be nice if such low-power switches would ship with micro-USB by default. They would cost even less to produce, and would not need to be shipped with a power adapter.

The modification steps are shown below :

1) open the device by removing the top cover and extract the PCB :

2) desolder the jack plug :


3) prepare a micro-USB connector. This one comes already soldered on a board, I just had to re-cut the PCB a little bit to adapt it to the format of the original jack plug :


4) solder the micro-USB PCB, place a piece of foam on top of it to plug the hole, and put the top cover back. You're done :


That's something very easy to do, which saves you from having to carry an adapter or even a special cable everywhere. I wish the manufacturer will think about it for future versions.

Other thoughts

It's visible on the top right that there's room for an eeprom containing the switch config. The config format is documented in the switch's datasheet. This device is based on a Mediatek MT7530DU. I didn't go into details yet but very commonly this allows to enable VLANs and maybe even port mirroring. For some use cases it can be useful to have a tagged port communicating with each other port via a distinct VLAN. This allows for instance to very easily extend a laptop's interface to 4 ports for routing, firewalling or load-balancing tests. If the device supports port mirroring, it could be even better, supporting being inserted on existing cables and capture the traffic for network troubleshooting purposes.

No comments:

Post a Comment