Some Bits: Nelson's log

Ubiquiti, RFC3442, and Starlink routes

I’m still trying to find a solution for the problem I have with a router bug and Starlink. First, a meta commentary. A friend teased me for all this writing about Starlink and routers. Let me just say it sucks. Trying to understand a broken Internet connection without the means to really fix it is intensely frustrating. The router is a bit more in my control and I’ve come to the conclusion Ubiquiti’s newer routers just have bad software. Next time I work on this I’m going to try an OpenWRT router again, maybe the SmoothWAN variant with channel bonding.

I have a USG 3P router. Ubiquiti has a router bug where static routes don’t work with WAN failover. Starlink looks like a normal ISP gateway, with DHCP advertising a route to the internet. But it also has a special hidden route for 192.168.100.1 so you can access Dishy’s stats. The easy thing to do is add a static route. This works fine on the Ubiquiti router unless you have WAN failover enabled (a backup Internet). Then the static route breaks. This is a known bug discussed for many years now.

(An added complication; Starlink’s dish also listens at http://34.120.255.244/. Not sure why but I’d hoped maybe this would work even without a special route for it, since it’s a public IP address. No such luck.)

My reader Daniel Y wrote in to suggest an interesting fix: install this rfc3442-classless-routes script to run as a DHCP exit hook. Starlink advertises the extra routes via a DHCP option. Which Ubiquiti apparently ignores? It’s apparently necessary for some European ISPs, and it’d sure be handy for Starlink. This script will set them. As a side effect Daniel said this also fixed the other bug I was talking about, where the router just ignores the DHCP lease in certain scenarios. I worked around that bug by inserting an ethernet switch between Dishy and the router so the ethernet link stopped going down.

Anyway, I tried the RFC 3442 script and it didn’t work for me. I did some debugging... First, it looks like my USG 3P has the RFC3442 routes even without this script. Maybe Ubiquiti did implement it afterall? (Daniel has the older EdgeRouter, most discussion is about those.) Second, the script gets invoked in a way it doesn’t seem to be expecting; there’s no $reason environment variable set so it doesn’t work. I hacked around this and tried adding routes with ip route add like the script would and nothing worked.

It’s a weird failure. Here’s the routing table according to ip route or Ubiquiti’s show ip route

default via 100.64.0.1 dev eth0  proto zebra
10.33.1.0/24 dev eth2  proto kernel  scope link  src 10.33.1.31
34.120.255.244 dev eth0  scope link
100.64.0.0/10 dev eth0  proto kernel  scope link  src 100.103.201.245
127.0.0.0/8 dev lo  proto kernel  scope link  src 127.0.0.1
192.168.3.0/24 dev eth1  proto kernel  scope link  src 192.168.3.1
192.168.100.1 dev eth0  scope link

That sure looks good to me! So why can’t I reach 192.168.100.1? Even explicitly doing ping -I eth0 192.168.100.1 doesn’t work.

My suspicion, without evidence, is that failover on the USG 3P is implemented in some complicated way that totally bypasses normal IP routing. That the routing table I see there doesn’t work. That doesn’t explain why the explicit ping-through-an-interface also fails. Honestly it’s all just such a black box. A broken black box. Ugh.

Random other Ubiquiti bug: their UI only supports RSA ssh keys. Can’t use Ed25519 or the other newer key types. Crap like that makes me cranky.