The Problem

Ukraine had a lot of power outages due to Putin’s bombing of our power infrastructure, I needed to switch to fiber + battery-backup to continue able to able to work.

I’m at a rental apartment and I’m not allowed to drill walls. The idiot that layed the internet into the apartment used a 4-wire cat5 cable to save a few pennies, then cemented it in.

The Fiber

  1. I called up an internet installer and had fiber running up to my apartment door the next day (ISPs in Ukraine are god-level).

  2. The installer claimed that it’s impossible to provide power and network over a 4 wire cat5. He cut my 4-wire cat5, hardwired it to a 12V power brick

  3. I split the 12v feed cat5 outside the apartment to power both fiber2eithernet converter + small wifi router

  4. Hit up the Lviv Radiorynok(local flea market for aliexpress electronics!) to get some 12V buck-boost converters to run the whole setup off a powerbank.

So within 48 hours of getting annoyed at Putin-caused power/internet outages now I had shitty (cos wireless sucks) always-on internet.

I used to live in California under multi-week PGE power cuts, so I had some time to think on how to setup backup power for everything.

The POE at 100Mbit

Eventually I got some POE hardware.

This clever person came up with how to arrange the 4 wires inside ethernet connectors to combine power and ethernet over 4 wires – exactly the scenario that the internet-installer guy described as impossible.

So now I had wired internet robustness!

The Not-Quite Gigabit

It still morally hurt that I had excellent gigabit fiber on the other side of the apartment.

So I place a wifi6 router outside the apartment so I could atleast get faster internet (200-600Mbit depending on how wifi gods feel at that moment) when I needed to by switching to wifi for throughput. Then when I wanted to have low-latency wired internet I’d switch back to 100mbit ethernet.

I also got a headless desktop for development with ethernet and wifi. Normally I prefer to use ethernet for robustness/latency, but quite often I like to download 30GB LLM models(like WizardCoder) to play with.

It was a royal pain to switch network interfaces on a headless box…

So it took me a total of 45min to do the following:

  1. I asked http://chatcraft.org use ip route command to switch default route from br0(ethernet) to wlan0(wifi)
  2. I then asked to write a python script that can change between 2 interfaces specified on commandline
  3. Then I asked it to figure out the 2 default routes automatically
  4. Asked for various logging improvements

I posted the result to github.

Next steps

4x4 Wifi6 might perform better, 6GHz might also help. Can’t wait to move :)