How I Learned To Avoid USB Ethernet Adapters the Hard Way
Background
I recetly decided to setup a small server running IPFire on the edge of my network so I could easily host a secure DMZ. I didnāt have any hardware lying around that could run it so I put together the following requirements:
- Small: I wanted to stash this thing away like a cable modem
- Energy Efficient: Itās important to me to limit my computer power usage as much as possible
- Relatively Recent CPU: This is important on an edge router for security reasons. Please note that I donāt need a particularly fast processor. I need one that is well supported by itās vendor with security patches.
- Brand Name: Thereās a lot of tiny computers available from no-name vendors with no-name parts. I didnāt want to risk ordering something from one of those vendors that may contain gray-market parts.
- Cheap: One of the reasons Iām building a home DMZ is to save money over the long term on hosting costs. Spending $400 on a router (which is quite cheap for a good one) makes that much more difficult.
- 3 Ethernet Ports or 4 USB 3 Ports: Ideally the device would have 3 ethernet ports but that addition usually adds at least a couple hundred dollars to the price. The next best thing, which has worked very well for me in the past. was to use USB3->ethernet adapters. I even had a few lying around the house already.
I ended up getitng a great deal on Ebay on a used HP EliteDesk 705 G3 Desktop Mini:
I plugged in my two USB3->ethernet adapters, installed and configured IPFire, and in about an hour I had an excellent router/firewall/IPS/whatever system on the edge of my network. Thank goodness Iām so smart and really knocked this one out of the park, right?
Anatomy of an Outage
Things worked oh-so-well for about 3 weeks but then something funny happened.
First, I discovered a super-cool media server call Jellyfin. I have a large media library on my home file server and have been using Kodi for a while to access it of CIFS. This worked fairly well but I didnāt like that Kodi a) didnāt have a great web client for watching movies and b) wasnāt able to transcode videos on-the-fly. Jellyfin solves both of these problems and after a few days of poking around I was hooked.
So one day I was watching Rick and Morty in my kitchen for about 90 minutes when suddenly the video just froze. I wasnāt able to ping the file server or router from my laptop, all of which were on my private, non-DMZ network. After a little troubleshooting I discovered that even when I plgged my laptop directly into the USB->ethernet adapter for my private network I wasnāt able to talk to the router. Luckily I had another, unused USB->ethernet adapter so I just replaced the ābrokenā one with that. Thank goodness I never throw anything away š¼
After a few reboots everything worked again and I went right back to my video streaming. And then it happened again 20 minutes later.
āOh, I know, it must be the USB portā I thought, so I chose a different one. After a few more reboots everything worked again for a couple of hours but it failed again. Rinse and repeat anothe 3 times. Every outage was a little longer and required more reboots and swap-outs and praying to the gods of flaky computer problems.
The last outage (hopefully!) was so bad that I ended up re-installing IPFire. Thankfully that is very simple but good lord itās not something I want to do every couple of days. Itās been about a week since I did that and so far, so good.
Solutions
Iām very fortunate to have many good friends, and some of those friends know a heckuva lot more about networking and hardware than I do. After discussing this very strange issue with them we basically theorized that Jellyfin is probably putting a lot of strain on the network adapter. That strain was causing a relatively large amount of power to be drawn or heat to be created and that was causing the either USB->ethernet adapter or the USB bus to stop working for one reason or another.
To avoid the problem Iāve done the following:
- Since I have 2 USB3->ethernet adapters (1 for the DMZ network and 1 for the private network) I now split them between the two USB3 buses on the computer.
- The Jellyfin client appears to try and use as much bandwidth as possible by default. I configured all of the clients that I have to use no more than 1 Mb/s of bandwidth.
Now I appear to be in much better shape. Iāve watched a ton of video using Jellyfin over the last week and I havenāt seen any problems.
Lessons Learned
If youāre reading this you proabably are like me: a cheap bastard.You want to really maximize what you get for what you spend and you donāt mind doing a little more work in the short term to make that happen. This is an admirable trait.
What I have learned from this experience is that you are very likely to not save money on a custom home router by using USB3->ethernet adapters. They work great if you want to plug your laptop into a wired network connection during the day, but I just havenāt had a good experience with running them on a router that has to work 99.99% of the time.
The good news is, you donāt have to buy gray market hardware or spends big buck on niche network hardware. All you need to do is buy the smallest, cheapest computer that you can afford that includes at least one PCIe interface. You can then add an inexpensive 2-port gigabit ethernet card to the device to give yourself enough ports to run both private and DMZ networks.
In my case, I wouldnāt even need to find a different computer model. I would just need to buy the ānext size upā of the 705 G3, which is the āsmall form factor (SFF)ā model.
Itās a little bigger and it uses a little more power, but itās still a nice, small computer. And itās not even that much more expensive.
Hereās my costs for my current rig:
Part | Price | Already owned? |
---|---|---|
Used G3 Mini | $110 | No |
USB3->Ethernet Adapter 1 | $25 | Yes |
USB3->Ethernet Adapter 2 | $25 | Yes |
$160 |
Hereās current prices for the alternative
Part | Price | Already owned? |
---|---|---|
Used G3 SFF | $160 | No |
2-port PCIe Ethernet Adapter | $22 | No |
$182 |
If I could go back I would definitely redo things with the G3 SFF and save myself and my family a ton of hassle. And who knows? If the USB adapters issues continue this is a relatively cheap and easy solution.
Please learn from my mistakes. You can build a powerful, flexible and low-powered router for less than $200 without rolling the dice on flaky USB->ethernet adapters.
Tags: #networking, #security, #hardware