Some Bits: Nelson's log

63 posts about starlink

BBR, Proxmox containers, and Starlink

I tried to sync a bunch of big data last night and only got 5MBytes/s despite 30MBytes/s being expected. The fix turned out to be enabling BBR congestion control on the Proxmox host and container I was syncing from.

In detail... I first learned about BBR congestion control three years ago. It’s an alternative TCP congestion control algorithm you enable on a server. It greatly improves performance for Starlink clients connecting to that server. Enabling BBR instantly boosted rsync performance from 5MB/s to 30MB/s for me: that is expected. It’s so extreme because of the high packet loss of Starlink. It’s probably the same for clients on cellular links.

To enable BBR in a container, the easiest way is just to enable BBR in the Proxmox host and then restart the container. On Proxmox:

# Load and enable BBR right now without reboot
modprobe tcp_bbr
sysctl -w net.ipv4.tcp_congestion_control=bbr

# Enable BBR on reboot
echo tcp_bbr >| /etc/modules-load.d/bbr.conf
echo 'net.ipv4.tcp_congestion_control = bbr' >| /etc/sysctl.d/90-bbr.conf

It is not necessary to explicitly enable BBR in containers. They will pick up the Proxmox host’s congestion control algorithm on restart. However any existing containers won’t switch immediately. You can run this in the container to switch without restarting:

sysctl -w net.ipv4.tcp_congestion_control=bbr

It is probably necessary to enable BBR in any VMs you have. I haven’t tested this but it must be this way since the VM has its own kernel and TCP/IP stack.

It is possible to have containers have different algorithms than the Proxmox server or each other. I didn’t test this but Claude Code was telling me I needed to load the modules in the Proxmox server and then set net.ipv4.tcp_allowed_congestion_control= reno cubic bbr. After than containers can choose their own algorithm.

(Claude Code was a big help in diagnosing and fixing this problem. I understand all the commands above and tested them myself.)

I continue to wonder why BBR isn’t the default on Linux. Apparently it can cause contention problems if every server isn’t using BBR. Also so much server traffic these days is QUIC and it has its own congestion control. The TCP setting doesn’t matter to a lot of servers.

Starlink handoff latency

Starlink has a core design of changing to new satellites potentially every 15 seconds, exactly at 12, 27, 42, 57 seconds into the minute. Globally. Weird, huh?

That pattern shows up in this ping tool. The yellow smears occur every 15 seconds and indicate brief periods of higher latency, like 200ms instead of 30ms. I’m surprised this is every 15 seconds, I thought the dish mostly stayed locked on one satellite for a few minutes at a time.

Starlink latency got worse, then better

Interesting change in my Starlink performance August 30 - September 7. The jitter on latency went significantly up, as did max latency and average. I think the packet loss also went up a bit but I’m less certain.

This change was noticed by other users, particularly gamers. Some users also reported seeing higher speeds in this interval: I don’t think I did.

Picking random days...

2025-09-02: average latency 30ms, packet loss 0.09%
2025-09-11: average latency 27ms, packet loss 0.06%

But the big thing is how the blue line jumps around so much more in those days. I don’t have a numerical measure of standard deviation but you can eyeball it.

Overall I’d prefer more predictable latency and less pocket loss even if it costs a little throughput. Starlink regularly exceeds the 100 Mbps I think of as “good enough” but I sure wish the transport was a little more reliable and predictable.

Starlink latencies 2021-2025

I’ve been pinging 8.8.8.8 via Starlink for four years now. Here’s a graph of average and minimum ping times. The average this last week has been 29ms. The minimum I’ve ever seen is 14ms. This pings through to Google DNS and is generally 1-2ms slower than the Starlink diagnostic.

What really impresses me are the systemic improvements. Things were bad in 2022 and 2023 when they added too many customers in my area (Grass Valley, CA) but then they fixed that. And average latency keeps going down. There’s also been a couple of steps down in the minimum as they’ve improved some things.

(You’ll see some anomalies in my graph of very high latencies. That’s usually when something failed and I switched to my backup ISP.)

(this is a copy of a comment on Reddit)

IPv6 for first time (Ubiquiti USG, Starlink)

I finally decided to enable IPv6 on my Starlink network. And it seems to work? Ran into a lot of confusion with Ubiquiti Unifi OS, maybe also my Windows client. Still tinkering but some notes. Highlights of things I learned:

  • Prefix Delegation Size: 56
  • Prefix Delegation ID: 1
  • Try an Android phone first as a test client
  • Reboot Windows before it will work with IPv6

The big question is: what’s going to break now that I’ve enabled this? I think all my devices are now magically IPv6 and I just can’t wait to find out what changes. I enabled this because Starlink’s CGNAT means I often get blamed as if I’m a bot, maybe the IPv6 sites will work better. Already anticipating Youtube TV or Netflix or something pitching a fit though.

Starlink ISP

Starlink operates DHCPv6 and hands out /56 addresses. These are rumored to be dynamic and changing at least occasionally: Starlink doesn’t promise fixed IPs for residential users. Given they move me between Seattle and Los Angeles POPs with some regularity I’m not entirely surprised they aren’t maintaining a dynamic routing infrastructure for all users. (There’s a business level service with static IPs.)

Starlink didn’t initially offer IPv6. And for awhile they did but had some problems with their DHCP implementation. Internet searches often find old out of date info. Starlink does now document they offer IPv6. Also more info in this FAQ.

Unifi OS router

I had a hell of a time making sense of what my Ubiquiti Security Gateway (USG-3P) was doing. Some notes.

USG Internet configuration

The first part is getting the USG router to talk to the IPv6 Internet. The main configuration for this is in Settings / Internet / Primary (WAN1). You have to set “Advanced” to “Manual” and then enable “DHCPv6”. Also you have to type in a “Prefix Delegation Size”. 56 works for Starlink and most ISPs, that means you get a /56 address allocation from DHCP. That’s a very large address space.

There’s no indication this configuration works when you do it. The Unifi web UI still shows “IPv6 Address” as blank. If you log in to the USG command line and run ip a or ip 6 a, nothing will show up, it looks like there is no IPv6 address assigned to eth0 (the WAN). Well not entirely: you’ll find an address like fe80::e263:daff:fec4:19ff/64 which is the link-local address, but not an routable Internet address.

The way I realized it was working was running grep dhcp6c /var/log/messages on the USG shell. That shows me a message about IA_PD prefix which contains the actual IPv6 lease assignment from Starlink. Yay! Starlink’s block seems to be 2605:59C0::/28, customers are getting a /56 block from there.

The other way I realized it was working was running ping6 2001:4860:4860::8888 in the USG shell to ping Google DNS via IPv6. Actual IPv6 packets! There’s a traceroute6 that is fun to try too.

The confusing thing is my router still has no IPv6 address assigned to the WAN. Apparently this is expected. ip route is no help for how things are working either. But ip -6 route does show a route for default via fe80::200:5eff:fe00:101. I presume that fe80 address identifies the Starlink dish or the ethernet port it’s plugged in to. I can’t ping6 it, maybe it doesn’t make sense to ping a link local address.

Anyway, the router is on the IPv6 Internet. Now what about the rest of my clients on my LAN?

USG LAN configuration

Once the router is talking to the IPv6 Internet, the other part is convincing the DHCP server the router is running to give out IPv6 addresses to clients. This setting is in Settings / Networks / Default. There’s an IPv6 button. You set the radio button to “Prefix Delegation” to enable it. You’re also forced to set a “Prefix Delegation ID”, a decimal number. I still have no idea what this really means but the number “1” seems to work. Update: this explanation seems right. I’m given a /56 block from the ISP but internally I’m using a /64 subset. The extra 8 bits are the prefix deligation ID: I chose 01. That probably explains why my IPv6 address block given by Starlink has a :de00 in it but my machines have :de01: in the address, the 01 I picked was ORed in.

Note there’s an “Advanced” box. I left that to Auto which means it does SLAAC address assignment which is the simple thing you probably want.

After this is configured there is no indication in the Unifi web UI that it worked. But clients doing DHCP will now get v6 addresses if they ask for them. See below for testing clients.

The part of IPv6 I don’t understand is exactly how exposed my network is. AFAICT every device on my LAN is now potentially globally routable with a unique IPv6 address. So what’s keeping me safe? I think the answer is the default IPv6 firewall rules that Ubiquiti has but I really ought to learn more about that. (Update: yes, default firewall rules are “allow inbound traffic associated with existing connections that were made outbound” followed by “drop everything else”. That’s similar to the implicit firewall of IPv4 NAT routing. This port scanner plausibly confirms that my LAN machines have all their inbound ports filtered.)

Client: Android

My Pixel phone seems to work with IPv6 with no effort at all. https://test-ipv6.com/ shows 10/10 everything working. Various “what is my IP” services all show an IPv6 address. All just happened automatically, no reboot or reconfiguration required. Sadly this was the last client I tried but I should have tried it first.

Client: Alpine Linux

I fired up a quick Alpine VM to manually test IPv6. The default installer doesn’t enable IPv6, you have to add it with iface eth0 inet6 auto to the networking config. But doing that everything else works flawlessly. I can ping Google DNS via IPv6. curl https://api6.ipify.org shows me my IPv6 address. Nice!

Client: Windows

So those two clients were easy. Unfortunately the very first client I tried was my Windows 11 desktop. Once I enabled IPv6 the networking interface picked up an IPv6 address via DHCP. Two of them actually, both in 2605:59c8. One of them actually works! From a DOS command line I can ping my router’s IPv6 address. And from the router I can ping6 the one working Windows address.

However nothing else worked. I couldn’t ping Google DNS via IPv6. The browser test at https://test-ipv6.com/ didn’t work, shows nothing at all. Neither did the test at https://whatismyv6.com/.

I finally gave up and rebooted. And presto, now IPv6 is working fully on my Windows machine.

Client: Ubuntu 23.04 VM

An existing workhorse Linux box I had just started working fine on IPv6, no reconfiguration required. May have not started working until I happened to reboot it.

Client: Proxmox Virtual Environment

My Proxmox server does not seem to have IPv6 enabled by default. The docs indicate IPv6 is supported so it’s probably something with how I configured the server with a static IPv4 address at setup. Guest VMs can access IPv6 no problem (see above), not sure about containers. The default bridge (vmbr0) has some IPv6 stuff I didn’t configure so it probably won’t work. Actually a little confused, since that bridge is also used for the VM networking.

Starlink adds an NTP server

This is very cool: Starlink’s dish now has an NTP server serving GPS time. That should be highly accurate. If they implemented it right, it’s going to be your best source of time short of specialty hardware you installed yourself. Certainly better than anything you’ll get from the Internet. See discussion here.

The server advertises itself as stratum 1. Thta’s a bold promise of high accuracy but is appropriate for a GPS receiver. It also means most NTP clients will prefer it as the time source to anything from the Internet. Which seems right to me.

(FWIW, I’ve synced hosts with chrony for years now over Starlink using the default Ubuntu pool config. Despite the high jitter Chrony does a good job synchronizing, it estimates it’s got accurate time to within 2ms despite 50ms of root delay. )

I added the server a few minutes ago and my machine is already syncing to it. Will update new stats after it has run awhile.

Update 1

3 hours later and it’s definitely running nicely. Here’s a graph of root mean square offset, a measure of clock accuracy. Over the last month, setting clocks over Starlink Internet with the Ubuntu pool got me an RMS of about 275µs ... Now it’s more like 100 µs since using Starlink. Here’s a graph of the last 24 hours, the line is where I switched to Starlink’s clock.

Honestly I’m surprised at how well chronyc synced time over Starlink Internet. The servers are all 40-80ms away varying every few minutes, a huge amount of jitter. I think chronyc has special algorithms to estimate that kind of thing.

Also impressed with how Starlink has improved. A year ago, before the latency improvements, my RMS averaged 427µs. Here’s a graph of the RMS for the last two years, mostly on Starlink ISP.

Honestly all this stuff is astonishingly good timekeeping. 1ms accuracy with consumer parts and slightly wonky Internet connections. It’s nice now to have access to GPS time though!

Update 2

running for about 24 hours now and doing well. One issue with Dishy as a time server is it often reboots around 3am. Mine rebooted last night and while Chrony coped it definitely threw off time accuracy. The offset went from under 100µs to fluctuating between -1ms and 2ms. The RMS had converged as low as 30µs (very impressive) but reset to 800µs after the 3am reboot. Oddly I don’t see any evidence Chrony gave up on syncing to the clock entirely, but the root delay to it stopped being a steady 2ms and spiked up to 4ms for a couple of hours after the reboot. All of this is well within the bounds of an NTP client to cope but is an example of how it’s not quite as good as having a fully dedicated GPS time receiver. OTOH it’s free!

Some stats after a few hours

chronyc> tracking
Reference ID    : C0A86401 (192.168.100.1)
Stratum         : 2
Ref time (UTC)  : Tue Sep 17 20:16:58 2024
System time     : 0.000011511 seconds slow of NTP time
Last offset     : +0.000012743 seconds
RMS offset      : 0.000090009 seconds
Frequency       : 30.078 ppm slow
Residual freq   : +0.000 ppm
Skew            : 0.121 ppm
Root delay      : 0.001979256 seconds
Root dispersion : 0.002787174 seconds
Update interval : 512.1 seconds
Leap status     : Normal
chronyc> sourcestats
Name/IP Address            NP  NR  Span  Frequency  Freq Skew  Offset  Std Dev
==============================================================================
alphyn.canonical.com       48  28   13h     -0.020      0.111  +2013us  3097us
prod-ntp-3.ntp1.ps5.cano>  55  28   15h     -0.080      0.080    +66us  2833us
prod-ntp-4.ntp1.ps5.cano>  18   8  293m     +0.090      0.651  +2919us  3553us
prod-ntp-5.ntp4.ps5.cano>  64  30   18h     -0.053      0.069   +946us  2962us
ntp3.radio-sunshine.org    64  35   18h     -0.082      0.054  -2298us  2382us
rn5.quickhost.hk           18   8  310m     +0.075      0.326  +2550us  1875us
LAX.CALTICK.NET            34  22  569m     +0.051      0.100   +934us  1678us
time.cloudflare.com        24  17  413m     +0.103      0.153  +1269us  1407us
192.168.100.1              15  10  103m     +0.000      0.118   +173ns   167us

Persistent connections failing: tn3270 and TradeStation

I have a weird networking problem with persistent sessions that I think may be related to Starlink but I’m not sure. Informed troubleshooting advice welcome.

My partner uses a Windows machine running a couple of particular network apps. One is the TradeStation app, a commercial program that gets constant updates of stock prices, many times a second. Another is Host on Demand, a clunky Java app that provides tn3270 terminal sessions. It’s a little like ssh or telnet but its own thing.

The problem is both applications mostly work but their connections break many times a day. They reconnect immediately but it’s manual and disruptive. The TradeStation connection should be long lived and with frequent traffic. Host on Demand sessions are mostly idle although we have configured keep-alives.

FWIW my own computers don’t see any problems, but I don’t use that software. I run long-lived ssh connections all the time and they’re fine. I just tested with netcat and can keep a TCP connection open for over twenty hours to a server sending a short message every 15 seconds. So I don’t have a general problem with persistent connections.

Here’s the kicker: the disconnects only happen in the house with Starlink. He also uses the same software in a place with a fiber ISP that has no problems. Both places have a Ubiquiti router I configured, nothing unusual. Sometimes he uses a VPN with Starlink and still sees disconnects but fewer of them. This makes me think it’s something special about Starlink that’s causing the issue.

My first thought was our IP address changing on Starlink but that only happens every couple of days, not many times a day. A second thought is maybe whatever session state Starlink’s CGNAT is keeping is expiring? But my ssh sessions are fine. Maybe Starlink has something special to protect ssh but not other long lived sessions? Seems unlikely.

Another possible theory is he’s connected via WiFi in the problem house. The WiFi is quite reliable, Unifi characterizes it as 100% excellent and it’s less than 1 packet lost in 10,000 when pinging the LAN. But I can’t fully rule it out.

Welcome any informed ideas on how to figure out what’s going wrong. I’m not certain it’s actually Starlink to blame here. I wish I knew more about the apps that are failing and why they may be different from my ssh or netcat. I’ve tried using a packet sniffer but didn’t see anything clearly wrong.

Reddit discussion

I posted this on Reddit and got almost no engagement. One reply that suggested some TN3270 alternatives and one good idea, which is to run the netcat client on the Windows machine and see if it works.

Starlink, from LA to Seattle

Starlink has moved me back to Seattle, some two years after June 2022 when Starlink moved my POP from Seattle to Los Angeles. I’m in Grass Valley, CA somewhere inbetween. In the very early days back in January 2022 I was at a POP near Winters, CA; I think that went away when SpaceX consolidated ground operations. Anyway, now my packets go through Seattle again.

The move has hurt bandwidth enormously. Download speeds of 10-70Mbps (average 22), compare 110-267 (average 128) two weeks ago in LA. Those numbers from my hourly Ookla speedtests (graph below), confirmed with a manual browser speed test and a simple remote file copy from my own server. Something is wrong.

UPDATE: these bandwidth reports were wrong. My router had dropped the WAN port down to 100Mbit, I think I have a loose cable. I wiggled the cable and got back to gigabit and my first download test was 220Mbps. Starlink and Seattle are just fine, this is user error. (I should have realized this: the switch to Seattle was around 2023-05-30 22:00 but I was getting fast downloads until 2023-05-31 22:00, a day later.)

Latency and packet loss seem fine though, just the same as before the move. Using Starlink’s gRPC stats my Seattle latency is 25-55ms, mean of 35ms. Drops are very low. Compare 23-93ms, mean of 38ms for an LA period two weeks ago. Starlink’s measured packet drops are about the same, total of 148 (LA) vs 177 (Seattle).

IRTT latency and packet loss monitoring

Unfortunately my own IRTT stats of are no longer valid, or at least no longer the same thing. I’m measuring round trips to a server I run in LA in the same datacenter as the LAX Starlink POP or very very close to it. So that used to be a test of basically Starlink’s infrastructure. Now my latency is much higher because the packets have to go over the terrestrial Internet from Seattle to LA.

I could set up a new IRTT server in Seattle but I will probably just drop the IRTT monitoring project instead. It’s been quite helpful and I’ve learned a lot from it but I don’t know that I’ll learn much new going forward. I’ll keep it running for now, it’s harmless and maybe will be interesting. I turned off my monitoring.

Starlink: fewer obstructions? Not really.

Interesting change in Starlink: fewer reported Obstructions starting around April 29. But it looks like they just fixed a bug where outages from Reboots were being called Obstructions.

Outages

Here’s a graph of obstruction outages for the last 90 days. It’s a graph of the gRPC outage stats from Dishy, the same thing the mobile app shows.

Sure looks like an improvement! In the past week I’ve had 7.4s obstructions and about 6 minutes of total outages. In a week a month ago I had 176s of obstructions and 386s of total outages.

Unfortunately this improvement seems to just be a recategorization. One cause of Starlink outages is rebooting for firmware upgrades, around 30 seconds a few times a week at 3am. Last month those outages were sometimes categorized as “obstructions”. Now they’re properly marked as “booting”. Here’s a week from last month showing these 3am false “obstructions”: in the most recent graph these now show as “booting”.

Here’s a graph of all the outage types for 90 days all together. You can see the red booting is more common than before.

Packet loss

Unfortunately this lowering of obstructions doesn’t seem to be affecting overall packet loss. Below is a graph of Starlink’s own stats on “drops” for 90 days followed by my own IRTT monitoring which also shows dropped packets.

No clear change, so maybe things aren’t really better. No visible change in the graph and doing the math, last week I had 0.63% packet loss and a week a month ago had 0.50% packet loss. Packet loss might have even gotten worse but I wouldn’t read too much into that without closer look.

Starlink bandwidth over 3+ years

I was surprised in my last post about how I was getting 25 Mbps upload speeds. So that had me looking again at my bandwidth tests since I got Starlink. These are tested with the Ookla Speedtest CLI tool. They are a test of my house’s network connection, so occasionally speeds are slower than real because I’m using the network or I’ve temporarily failed over to my backup ISP (not Starlink). But overall these reflect Starlink performance.

Fine grained graph

The main trend that interest me is in 2023 and 2024, the steady improvement of speeds. Particularly upload speed. This is a great trend to see in your ISP!

It’s also interesting to see those halcyon days of 2021 before Starlink got heavily subscribed. That’s a suggestion of what the maximum radio throughput service is. Service was worse then: more outages, higher latency, more variability. But download bandwidth was same-ish for a lot of this period. Upload has definitely gone up.

Monthly average

The graph above is some fine-grained reporting interval that Grafana selected, probably a few hours per point. The graph below is an average of every 30 days. The same trend is more clearly visible but of course it doesn’t capture the variance.

Starlink 7 days stats April 2024

This blog post contains screenshots of my monitoring dashboards for my residential Starlink node in Grass Valley, CA. Bottom line: the service is quite good these days.

  • Average speeds: 150Mbps down / 25Mbps up
  • Average latency: 36ms
  • Average packet loss: 0.6%

I do a lot of careful client-side monitoring. Used to pay more attention when the service was new and had some problems. But since January 2023 it’s worked very well for me, when their major over-capacity problem was solved at least for my area. And it got better in January 2024 when they started to improve latency. Mostly now I don’t pay attention to it very closely because it works fine.

The downsides are the median packet loss is high enough to matter. And performance is variable, it gets noticeably worse in evenings presumably because of congestion. But it’s pretty good always. FWIW I think Starlink’s behavior is more like a cellular ISP than wired or geosync satellite. Better quality in general than overloaded American cellular but similarly unpredictable packet loss and jitter.

I still have my dashboards and monitors running and they give very detailed client-side views of performance. Here’s screenshots of my 4 separate dashboards, all data for the last week (April 22 to 29). I think this week was mostly unremarkable and typical. First couple are basic ISP monitoring; the other two are more specific and unique to me or Starlink.

FWIW I have a gen 1 Dishy with ordinary residential service.

Ookla speed tests

This graph shows results from hourly speedtests using Ookla’s command line tool. Main results:

  • highly variable download and upload speeds with a mean of 150Mbps down and 25Mbps up.
  • few hours under 20 Mbps download speed

Compared to the old days, overall speeds are better. I used to be more like 100 / 15. Even better, the “hours under 20 Mbps” is greatly improved; that used to be 8 or more hours a day.

ICMP Ping tests

Using telegraf to send 5 pings every 15s to 8.8.8.8 and measure round trip time and packet loss. See below for the better IRTT tests showing similar data; starting here because pings are familiar to everyone.

  • average latency around 36ms
  • 0.58% mean packet loss
  • fairly stable throughout the day but there’s some visible daily pattern

IRTT latency tests

These are much more detailed results using the IRTT tool to test latency and packet loss with UDP packets to a server I run in a datacenter at or very near the Starlink LA POP.

  • 0.61% mean packet loss
  • 36ms mean latency.
  • Several incidents a day of 20% or more packet loss. (You see this pattern in applications too; the network goes away for a few seconds).
  • Clear pattern of higher packet loss during evenings. 30 minute average gets as bad as 2% or so occasionally.

Starlink monitoring

Starlink’s own monitoring data, using their gRPC endpoint to pull data from the dish.

  • two 30s+ outages around 3am. these seem to be related to firmware upgrades
  • 36ms mean latency
  • 0.6% “obstruction fraction”. It’s unclear what the dish reports as obstructions; at least some of it is packet loss unrelated to my antenna. I have a very clear but not 100% perfect view where Dishy is pointed.

Starlink latency improvement

Interesting trend here; starting around the first of the year the latency of my Starlink connection has gone down, as measured by IRTT pings to a server I run at BlueVPS in LA very close to my Starlink’s terrestrial egress.

IRTT latency measurement

I think this effect is real. Comparing the week starting 2023-12-11 to the week starting 2024-01-08, the mean went from 47ms to 39ms. That’s 8ms or almost 20%! I think worst case performance is better too, I can’t quite quantify it but the 99% is a lot less spikey and the maximums are lower. (See graphs at bottom) Looking at data for a year this is a major new change; it was steady at about 47ms for a whole year.

Update: a tweet from the SpaceX CEO: “Significant improvements have been made to @Starlink latency (ping) & many more to come. Target is <20ms.” Guess that confirms what I observed.

I don’t see any corresponding change in packet loss. Averaged about 0.56% packet loss in both weeks.

I don’t have a good way to guess why this might have improved. There’s basically no measureable latency between the first hop I can see after Starlink and my monitoring host at LABlue; I’ve always assumed they’re in the same datacenter. My memory is it was never more than 2-3ms at most.

There’s a similar effect visible in Starlink’s own reported latency number (from the gRPC debug data). That should rule out any question of my IRTT monitoring, Starlink’s own numbers show the same pattern.

Starlink gRPC latency

A simple explanation is improvements to Starlink itself. Either they’ve lowered the latency of their infrastructure or they have more capacity and so my packets are getting buffered less. Possibly the improved 95% performance suggests less buffering but I wouldn’t bet heavily on that guess.

Interesting that it’s a downward trend over a week, not a drop in one day. That suggests it’s maybe a gradual change in capacity rather than a step function change in routing setup.

Here’s detailed graphs of before and after.

Before, 2023-12-11
After, 2024-01-08

And a graph of a whole year:

(For completeness, I should note I changed my IRTT monitoring setup around December 10 when I migrated the server from a physical machine to a virtual machine inside Proxmox. But this change clearly post-dates it. Also if anything the virtualization should cause more latency or packet loss although I’ve seen no evidence of that.

Global Starlink outage for hours

There was a major outage yesterday across all of the Starlink ISP. Mine went down at 4:38pm California time. I don’t know when it came back (I swapped to my backup Internet.) This article says Starlink acknowledged the problem via a tweet at 5:33pm and that it was fixed at 6:33pm. So that’s two hours, with an hour to acknowledge the problem. Comcastic!

Starlink has no public monitoring page, no online status. There’s nowhere to go to find out what’s happening. Hour late tweets are not sufficient. DownDetector was surprisingly useful but all that does is count how many people are clicking a button that says “something is wrong”. Better than nothing but it’d be nice if Starlink did something real.

I continue to be mostly happy with Starlink service, particularly since the improvement early this year. I respect the complexity of what they’re doing with a satellite network. But some aspects of the product are not very good, particularly customer contact. I’m just grateful I’ve never needed to do a real support request; the experiences reported on Reddit vary wildly.

Starlink publishes performance maps

This is really great; Starlink is publishing performance metrics on a map. Download, upload, and latency. Per-state in the US, per-country in smaller places. “Metrics range from 20th to 80th percentile for the “Standard” service plan only, during local peak hours, and are refreshed monthly. Map coloring is based on the median for each metric”. That’s pretty useful and way better than I’ve seen any other ISP do.

Download speeds, darker is slower

In California they report 44–139 Mbps down, 8–17 up, and 39–52ms latency. That’s pretty well in line with what I measure (over the whole day, not just peak hours). My latency at 51ms is on the worse edge of that.

Not sure I can draw many conclusions from the map coloring. Some broad regional patterns, but nothing specific. The per-state binning is pretty coarse.

Starlink vs Hurricane Hilary

I’m wondering if Starlink service was affected by the hurricane? I’m in Grass Valley where we got some clouds but no significant rain. But my packets are routed through Los Angeles. I don’t know if that’s entirely in space or if they go to earth in some invisible relay closer to me, but LA is definitely where the packets first appear in traceroutes.

Anyway, coincidentally I noticed an unusual service degradation yesterday around 9am to 6pm, about when the storm was passing through. Sort of? It’s not exactly time-correlated but The effect was worst around 4pm. Hurricane Hilary passed closest to Los Angeles at just about that same time.

Honestly I thought it was congestion-related but the effect is much larger than usual. Packet loss went up to 4% (typically 1%), round trip time up to 100ms (typically 50ms). Speed tests don’t show anything obvious, maybe throughput is a little worse.

It’s plausible there’d be an effect. The satellites are well above any weather but I’ve seen rain fade impact signal quality in the past when I’ve had strong local storms. (By far the biggest risk of hurricanes is the wind and your local antenna mount.)

There’s a discussion of a related observation on Reddit.

Here’s a graph of the last two days.

Starlink detailed timings

Over on Reddit user panuvic is posting a series of interesting timing graphs from Starlink packets. Most recent post here. I have no idea who this is or what they’re doing but it’s very interesting. Some of their posts make it sound like they’re measuring with independent radio gear listening in on the transmissions.

Some things I noticed, using his graphs.

Above is a graph of round trip times over a few minutes. Handoffs to a new satellite are typically multiples of 15 seconds. What’s interesting is the highly variable latency between satellites, like 20-70ms. That’s way more time than can be accounted for by radio propagation delay and physical distance. Maybe it’s queueing, some satellites are busier than others?

This is handoffs for two different locations. The two graphs are synced in time. If you look closely, so are the handoffs. They both occur at the same second, despite being two completely different installs at different locations 2400 miles apart. Isn’t that strange? I’ve heard other people speculate that every Starlink dish in the world schedules handoffs at 12, 27, 42, and 57 seconds after the minute. That seems wild to me!

Graphs of latency measured asymmetrically; bottom graph is one way delay from the Internet to the customer, middle is one way from the customer to the Internet, and top is two way. What’s interesting here is the banding in the receive timings, it looks like 4 or 5ms jumps in latency. I’m wondering if that’s some sort of time division multiplexing in action. Miss your transmit window on the satellite and have to wait for the next one?

Starlink dropouts

Ever since I started using Starlink I noticed that sometimes it drops out for 100-1000ms, maybe a couple of times an hour? I used to think it was just my site (I have some very minor obstructions, well under 1%) but enough other folks complain online about it now that I think these microoutages are just a weakness of Starlink’s Internet service.

That’s a graph of 24 hours of outages data, as reported via Dishy’s gRPC. It’s the same thing Starlink shows textually in its “Outages” mobile app tab. From what I’ve read the “Obstructed” tag doesn’t necessarily mean obstructed; it’s a catch all for “unexplained outage”. This graph shows 59s of obstructed, 30s of no pings, 50s of no downlink, and 12s of “no schedule” which is Starlink’s semi-regular 4am outage.

All told it adds up to 151 seconds of outages, or 99.8% uptime. Over a month I measured 99.3% uptime.

Two nines isn’t very impressive for an ISP, in my opinion, although it’s within the parameters promised by Starlink. Maybe it is impressive for a wireless ISP though, or a satellite one. I hope it improves but it’s not awful now.

The main way I notice is if I’m playing an online game; I’ll get a lag spike until the game recovers. Fortunately the outages don’t break TCP connections, either the packet shows up eventually or else TCP retransmits fix it. It also causes problem with live video and audio streams, like a Zoom call. But it’s only a second or two every 30 minutes, not terrible. You won’t notice it at all with web browsing and it will hardly affect bulk download speeds.

I have no idea what’s going wrong but could imagine many explanations. One common theory that seems wrong is that Starlink drops out every time it hands off satellites. I don’t think that’s the case. It’s potentially doing a handoff every 15 seconds, and seems to be every 5-10 minutes in ordinary usage. It’d be intolerable if every time it did that the Internet went away for a quarter second. Actual performance is much better than that. (IIRC Dishy is able to track a primary satellite and a backup, which probably helps with a smooth handoff.)

Starlink 50 Mbit/s throttling

Not my own data, but a couple of Reddit threads (also) are users reporting being throttled to 50Mbps download after using a certain amount of bandwidth in a short time. I think I’ve seen this myself but haven’t tried to measure it. One user’s guess:

This is 100% a hard throttle that can be triggered at will and is repeatable. It slows entire starlink service down to 50mbit. Even if it’s middle of the night!!! It then resets after the hour and the cycle repeats as follows.
-Start download -download at 120 for 15 mins -drops to 50 for remaining 45 minutes -returns to full speed for 15 mins -drops to 50 for remaining 45 minutes.
Seems to be 1 hour cycles, 15 mins of full speed followed by the remaining 45 throttled.

A lot of folks are pointing out how clumsy this is, particularly at 2am when there’s spare capacity. I don’t think this explains the better performance I’ve been seeing since March. I think it was added newer and isn’t the most effective of measures they’re using. But I’m totally guessing here.

Update: I haven’t seen any evidence of this at my own site but I would have only noticed around June 12/13 when I did some big downloads. Diablo 4 downloaded 85GB at an average speed of 150Mbps, no evidence of throttling. (at 8am Tuesday the 13th, a quiet time). Some of the reports on Reddit have definitely looked like a 50Mbps cap, I believe them, but the reports aren’t consistent. Maybe it’s something they’re testing or only doing to some users.

Update 2: a Reddit thread of someone getting a response from Starlink Support (in Poland) saying they are throttled because they used too much data, over 1TB.

Starlink stays improved

A couple of months ago I noted that Starlink had recently improved during nightly congestion. Glad to say that trend has continued. It’s not gotten any better but it hasn’t gotten worse either. Even more important I’d say it’s “pretty good” now whereas before it was “really bad every evening”. I actually managed to watch a video stream over the Internet at 9pm last night, something I wasn’t able to do for the last year reliably.

Here’s a couple of graphs showing the change around April 1. I’m on residential service (ie, higher priority than best effort) Note there’s some bad data mid-march (I was on my backup ISP because of something unrelated).

This is my best measure; how many hours a day do I get under the advertised 20 Mbps download speed, based on an hourly Ookla speed test. Before the fix this was regularly 4+ hours a night, every night. Now it’s typically 1 or 2 hours. The nice thing about this measure is it highlights what I really care about, which is degraded service for part of the day.

And here’s a simple packet loss graph based on pings to 8.8.8.8. Before the fix I was averaging 1% packet loss for the whole day. Now it’s 0.5%. Still pretty high but not terrible. This doesn’t highlight the nightly congestion very well, I should do something showing “hours with over 1%” or something. Eyeballing a graph I have this steady 0.5% packet loss most of the day, it’s nothing like the bad old days of 5%+ packet loss in the evening.

This last graph is not useful, only including it for its obviousness. That’s average daily bandwidth (again, measured hourly at Ookla). The average may have gone up a tiny bit since the April improvement. But it’s not noticeable because the 3am periods of 250+Mbps swamp the hour or two of unacceptable 5Mbps service. Just an example where simplistic measures don’t capture what you care about.

I still don’t know what changed at Starlink. But my money is on them improving their traffic shaping and load balancing algorithms. It’s also possible this was a fix just for me, maybe I was incorrectly classified as a best effort customer and that got fixed? I have no reason to think that though. I think they improved their technology at the same time they dropped their soft data cap plan.

Starlink residential improvements

Starlink has changed their service plans, at least in the US. For once it’s a small improvement for me, specifically the drop of a 1TB soft data cap on residential plans. They also raised documented download speeds to 25-100Mbps (from 20-100) although upload speeds are now listed as 5-10Mbps (from 5-15). See the new service specification that I assume replaces the old one for details.

I wonder what changed that caused them to drop the soft data cap? I posted a month ago about a performance improvement during evening congestion; maybe they’ve improved their resource sharing enough they didn’t need a formal cap? Service is definitely improved for me, the change I documented a month ago has held steady.

Update: the “fair use policy” indicates they might still throttle only on terms less clear than the planned 1TB soft cap. So this seems a step backwards, not forwards.

If bandwidth patterns consistently exceed what is allocated to a typical residential user, Starlink may take network management measures, such as temporarily reducing a customer’s speeds, to prevent or mitigate congestion of the Services

Starlink improvements during evening congestion

After collecting a week+ of data I think Starlink’s service has genuinely improved for me in Grass Valley, CA (residential service). The ISP had gotten very congested in the evenings; 5% packet loss, speeds under 10Mbps, games and streaming video not working well. Really frustrating. I first noticed this in February 2022. But sometime in the past few weeks it got better.

Measuring the improvement

Some basic stats comparing the last week (Mar 31 - Apr 7) to a typical week in February (Feb 7 - 14):

  • Average packet loss around 9pm: 1% vs 4%
  • Average packet loss for a week: 0.5% vs 1%
  • Latency around 9pm: 53ms vs 65ms
  • Average latency for a week: 50ms vs 50ms
  • Hours of download under 20Mbps: 3 vs 16
  • Average download: 115Mbps vs 105Mbps
  • Min download: 7.5Mbps vs 0.9Mbps

They key pattern here is that worst-case performance during the evenings is much, much better. Packet loss is the biggest change: Starlink has gone from 4% (with peaks of 10%) to 1%. But that shows up also as improved latencies. And maybe improved download speeds although that’s harder to measure accurately; the “bad hours” statistic I list first seems real though.

It’s interesting that average performance over a whole week didn’t improve much, just the worst-case performance in the busy evenings.

Thoughts on what it means

I’m thrilled with the improvement; things had gotten so bad in the evenings I couldn’t reliably use the Internet. Great job, Starlink! And well timed; they just opened up the area to more customers, i was afraid it was going to get even worse. It might still get worse again, and I don’t love Starlink’s pattern of degrading service and increasing prices. But this change here is a real improvement.

So what changed? I don’t know. But my guess is they deployed a better traffic shaping system. So that individual users are getting fairer sharing than they used to. That would be nicely in-line with their announced plans to add soft data caps. They’ve supposedly been throttling best effort customers all along but I wonder if the initial implementation wasn’t as good as what I’m seeing this last week.

The other possible explanation is more capacity. But I think that’s unlikely. They’ve launched more satellites in the past two months but not enough to explain this change. I don’t think they increased their satellite link capacity (or did they?). It’s possible they improved the infrastructure on the ground between the station and the rest of the Internet, but I don’t see much evidence of that.

I don’t really know what changed, but as a customer of Starlink I’m very happy to see the improvement.

Some graphs

Here’s a graph of packet loss and latency over the week in February, from before the change. The peaks every evening are evidence of a congestion problem.

And here’s a graph of the same data for the last week. See how much smoother it is? What an improvement!

Notes on measurement

All data comes from my automated test setup. Download speeds come from an hourly Ookla speed test. Latency and packet loss come from IRTT, a ping-like tool. I think they’re both reasonably accurate measures but I’m just doing some simple testing with basic tools. These are all scripts and graphs I’ve set up myself, using Telegraf and Grafana for data collection and a cheap VPN server in LA for the other end of the IRTT testing. I also have a second measure of latency and packet loss from pings to Google DNS; it confirms this pattern.

Starlink; improved latency and packet loss during congestion?

Not positive about this, but I’m seeing evidence that Starlink has improved performance in the evening congestion. Back in February packet loss would go up to about 5% and latency would jump from 50ms to 70ms during the evening hours, particularly 7pm-9pm. Now it’s only going to 1.5% and latency is staying steady around 50ms. There’s maybe a small increase in packet loss and latency in the evening but nothing nearly as bad as before.

I might also be seeing an improvement in my hourly Ookla speed tests. Feb 17 I got 9.3Mbps and 1.5Mbps at the worst hours (9pm and 10pm). April 3 it was 30Mbps and 27Mbps. Speed tests are so random I’m not confident about this.

I’m in Grass Valley, CA with residential service. It’s a congested area. Testing with IRTT, a ping-like tool. if I had to guess I’d say this improvement is recent, like in the last week or two. I don’t have good data because we’ve had a lot of snow-related outages here.

Here’s snapshots of before and after, from 2pm to 2am on Feb 17 and Apr 3.

February 17
April 3

That’s latencies and packet loss. For download speed, here is a 90 day graph of number of hours a day under 20Mbps. (Ignore the big red block of 24 hours; that was my backup ISP). These past few days have been really good; 0! This data is noisy enough I don’t want to read too much trend into it.

Starlink as missile guidance

Interesting bit from a recent Economist article about Ukranian attack drones.

At an early stage the Ukrainians appeared to pin hopes for controlling drones behind Russian lines on Elon Musk’s Starlink satellites, which work at frequencies and in numbers that Russian systems struggle to jam. A naval-drone attack on Russia’s Black Sea fleet in October reportedly made good use of this gap. But Mr Musk, apparently worried about the escalatory effect of such moves, has stepped in where Russian technology proved unable to. Starlink now uses geofencing to block the use of its terminals—not only above Russian-occupied territory inside Ukraine, but also, according to a Ukrainian military intelligence source, over water and when the receiver is moving at speeds above 100km per hour. “You put it on a boat at sea and it will simply stop working,” he says. So Ukraine’s drone developers now use a range of other, more expensive communication systems, with multiple systems often on the same vehicle.

Starlink v1 vs. an inch of snow

Snowing in Grass Valley (again). Last two times it’s done this Ken had to switch us to our backup fixed wireless Internet. I wasn’t home to look at it. This time around I am home. I was able to confirm Dishy says it’s heating (in the mobile app, also alert_is_heating: True in the gRPC). But flaky connection that became progressively useless. Starlink’s not supposed to have this hard a time with snow but it sure seems to. I’m glad I have a backup.

Here’s some network diagnostic graphs, both from Starlink’s gRPC status and from my own IRTT ping tests. Starlink shows definite problems with a sort of random assortment of statuses that all boil down to “no signal”. My pings show much higher latencies and periods of very high packet loss. All consistent with “shit’s broke, yo.”

I can’t easily access the dish (it’s on the roof) so wasn’t able to try to brush snow off. Or get a good photo, but what I could do suggests there’s a layer of snow + ice maybe half the thickness of what’s on the roof. I’m guessing we’ve gotten an honest inch of snow here, two at the most. Note I have an O.G. round dish v1; no idea if the newer v2 ones handle snow better.

Update: an hour or two later and we’ve gotten a proper.. 4 inches? Not sure. I happened outside to see the dish pointing straight up (recovery mode) and then watch it tilt to its new normal position. And a bunch of water run off. So the melting is working. OTOH there was still a bit of snow there, so it’s not working very well. Or maybe the signal is being blocked by snow in the atmosphere?

Either way I recall this working better in last year’s snow.

Update 2: Starlink was working again when I tried it about 3 hours after I posted this. The snow had slowed down and the face of the dish was completely free of snow, so the melting did end up working. The obstruction log did show 1.48 hours of “No Schedule” though so it was truly out for quite awhile.

Nightly congestion: Starlink vs local WISP

I’ve complained a few times about Starlinks congestion. This past week we switched over to my local WISP (snow outage, then I’m not there to switch it back). Here’s IRTT measuring packet loss and latency, you can clearly see the change around March 4/5.

The WISP is also congested, I think probably worse than Starlink. During congestion it has lower packet loss but then higher latencies, and for longer periods of time. I assume that means the WISP is doing more buffering. My WISP connection is 2 radio links from the wired infrastructure (I think).

Starlink: snow outage

We got a lot of snow in Grass Valley, maybe 12 inches? Starlink works well in snow in general; not much signal fade, even has a heater to melt snow. But it stopped working last night around 5:25pm, just as the snow was stopping. I don’t exactly know why or if the heater was engaged. But it fixed itself in the morning.

My monitoring shows the dish started reporting “no downlink”. After a couple of minutes of that the dish started reporting azimuth and altitude of 0/0. Exactly 0/0, so I think that’s an error state and not a real measurement. (Also 0 is the horizon?) We unplugged it from our monitoring system so I don’t have any further info. After we plugged it in again this morning it’s working normally. It’s 30°F outside and it does not say it’s heating itself; I imagine the system only heats when it detects signal degradation, not just that it’s cold.

Starlink: worse service, higher prices

Starlink has announced a $10 price hike ($15 for some), the second in less than a year. Meanwhile in that time service has significantly degraded: cutting speeds from 100 Mbps to 20 Mbps, adding a data cap, increasing packet loss and evening congestion, and an SLA that promises as much as 15 minutes of downtime a day. It’s all kind of dismal.

But it also is a successful product because for many in the US, including me, Starlink is the best option they have. Years of not investing in broadband infrastructure left many of us with no good Internet option. Starlink is truly better in many ways. The main mistake they made was wildly overpromising before launch. I’m glad the FCC figured out they couldn’t deliver before handing them $900M based on their promises.

Weirdly the company announced tiered pricing: $120/mo for customers in heavily subscribed areas, but a discount to $90 in sparse areas. On Reddit it looked like about 10% of customers got a discount, so this is basically a price hike for almost all of the US.

I fear the Starlink product is going to keep getting worse; they keep adding customers. They are adding satellite capacity too but it hasn’t been keeping up in the US. Meanwhile they have way more capacity than customers in most of the rest of the world. It’s a difficult business.

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.

Starlink and BBR congestion control

I improved my download throughput with a simple change, enabling TCP BBR on the server. This all from a tip from an online friend who I’ve been sharing technical Starlink info with, I’ve been learning a lot from him. There’s a guide here.

I didn’t test this very carefully but casually observing an rsync transfer at 8am, when Starlink is quiet... With the default cubic congestion algorithm the transfer was bouncing around between 5 MBytes/s and 12 MBps. After enabling BBR I got more like a steady 12 MBps. Eyeballing it, I got 2x the throughput! Could be coincidence though, Starlink performance is so variable. I should test more carefully with iperf3 -C but am too lazy.

Ubuntu 22.10 by default uses the cubic congestion algorithm, use sysctl net.ipv4.tcp_congestion_control to verify. Enabling BBR is as simple as running sysctl -w net.ipv4.tcp_congestion_control=bbr. This will load the tcp_bbr kernel module and enable it. You can edit /etc/sysctl.conf to make it permanent.

Worth noting BBR is a change you need to make on the high bandwidth sender, typically the server. It can’t hurt on the receiver but I don’t think it will help either. There doesn’t seem to be an easily installable BBR for Windows. But it’s very easy to enable on a Linux server!

The guide I linked also suggests using FQ queueing and considers TCP window scaling. I didn’t change those. FQ has a good reputation on a router device.

What is TCP BBR?

TCP congestion control is one of the more important parts of Internet magic that makes things work. Basically it detects when a network link is getting overloaded and slows down transmits, trying to find the optimal throughput. The details of how it does that are remarkably subtle and have changed over the years. I’ve often wondered if Starlink’s wildly variable throughput and ambient packet loss were bad for existing algorithms. Maybe so, and maybe BBR is better?

TCP BBR is a Google innovation dating to 2016 or so on its way to becoming an IETF standard. They reported a 4-14% improvement after deploying it on YouTube. An analysis here shows the improvements are not big for a high quality link but are enormous at 1.5% and 3% packet loss; that’s more like my Starlink situation. Classic TCP congestion control interpreted packet loss as a sign of congestion. But it could also just be a flaky wireless medium. A modern algorithm designed to do more subtle modelling of the connection could definitely improve things, particularly for a Starlink client with 1%+ packet loss, 100% jitter, and varying maximum throughput.

I didn’t do a deep dive into understanding all of TCP BBR. Geoff Huston has a great writeup. And there’s Neal Cardwell’s formal paper and this video about the paper. The gloss I got from looking at these is that BBR is explicitly building up a model of the link characteristics and testing to update or revalidate it frequently. That’s a good deal more complex than “react to lost packets by halving the rate”, the core of the classical algorithm. It’s no surprise that as computers have gotten better there’s more room for doing more sophisticated traffic shaping.

Starlink outages

Starlink has a nice outage report. I got the data off the dish via gRPC and have been logging it. It’s interesting. There sure are a lot of outages. The service description says “99% uptime” which is not a very ambitious goal; 1% downtime is nearly a quarter hour a day. In practice I have several minutes of outages a day, although some may be specific to my site.

That’s about 105 hours of outage data. Total of 11.7 minutes of outages, or about 99.8% uptime.

About 40% are attributed to obstructions; I do legitimately have a minor obstruction. But there’s something like 10 satellites in view of my house at all times now and in theory Starlink is supposed to switch away anticipating an obstruction. Not sure why that doesn’t just give me no obstructions in practice but I think the switching is not as robust as I’d like.

The other 60% are about half “No Pings” and half “No Downlink”: the mobile app calls these “Network Issue” and “No Signal Received”. I have no idea what causes these or how the dish knows that “No Signal” is not “Obstruction”. They all seem to be failures of the medium though.

My main question is whether these obstructions are legitimately obstructions and cutting down a tree would make a difference. A friend has an install with a full clear view and he tells me he still gets obstructions logged but “not often”.

The mobile app (wisely) divides up outages into categories: 0.1s+, 2s+, and 5s+., Even an 0.1s outage is noticeable to a video stream or gaming session but eh, it’s pretty minor. 2s+ is a significant problem. I didn’t measure how many of my outages were 2s+ but you can kind of eyeball it in the graph above.

Below is a screenshot from the mobile app’s outage log. I’ve highlighted two outages: a 15s “network issue” at 9:32am and an 8s “obstructed” at 9:48am. The second one terminated an open TCP session I had, I think the first one might have also. Both are accompanied by at least a little “no signal received”. My take on this is Starlink’s satellites failed entirely twice this morning, at least for several seconds.

ISP connection monitoring with IRTT

I’ve set up some new monitoring for my Starlink residential connection recently, using IRTT as a sort of very fancy ping tool to measure latency and packet loss. Here’s a couple of screenshots

24 hours
1 hour

IRTT is a carefully written round trip measurement tool. I have it set up to send a small UDP packet every 100ms to a server in an LA data center at 45.66.249.240, very near where my Starlink connection goes after the satellite hop. The IRTT server responds immediately with a reply and the software records the round trip time and packet loss. (It also records asymmetric delays and other things that I’m skipping over.) I do these requests for 58 seconds once a minute and record the results for the last minute in the graph above.

The top graph is for a full 24 hours. Packet loss first, then round trip time, and finally a graph of Starlink’s data traffic. From 13:00 to 15:00 I downloaded something big (a game from Playstation). You can also see the evening congestion around 18:00 to 22:00.

The bottom graph (in green) is also packet loss and RTT but for one specific hour, the busiest 19:00 to 20:00 hour. The third IPDV graph is more or less a measure of jitter in RTT.

Interpreting

So what does this all mean?

First I want to highlight a top line number: my average packet loss is 1.5% for the whole day. That’s horrible. My packet loss on a great fiber ISP like Sonic is essentially zero. Even at very quiet times like 5am, Starlink packet loss is still around 0.5%. I realize satellite radio is inherently unreliable but I’d have expected with enough capacity that retransmits in the link layer should paper over most of that. Then again Starlink reports an “obstruction fraction” of 0.6% with obstruction duration of about 800ms every 20 minutes. So maybe this is related to my particular site. At a busy time, like 19:00 to 20:00, I’m at 5% packet loss when some minutes at 10% or more. I can definitely feel those using the Internet, it’s not good.

Another thing to highlight is the jitter in round trip times. At the busy 19:00 hour it’s 44-86ms RTT with 10ms standard deviation. Note these are min/max based on averages over one minute; individual packets can take as long as 400ms to get a reply (or maybe more?) The quiet hour is surprisingly bad too, 33-75ms with 8ms SD. The per-packet variance isn’t as bad as during a busy hour but it’s still notable. (I don’t have great visualizations of this data, I should focus more on it.)

One big pattern is a jump in packet loss and round trip during my download around 13:00. This is expected for a typical Internet node. It’d be nice if some traffic shaping lowered the RTT hit from the download but that’s hard and this basic behavior is is pretty common for an ISP. I’m OK with that.

The second big pattern, and much more problematic, is the increase in packet loss and RTT during the evening hours even though I’m not using my link myself. This is the #1 evidence of Starlink’s congestion and is getting worse over the months by every measure. They are overselling their capacity.

More Work

So that’s some preliminary results. Lots more to do. As I said above, I should do more to characterize the extremes of behavior; the 400ms round trips, the strings of 15 lost packets in a row. Those are more important to user experience than hour-long averages; you notice when the video pauses or the game disconnects you.

IRTT also logs details on every single packet and I should do more with that information. Someone I’m chatting with has some very interesting visualizations showing millisecond-scale phenomena in the connection, including visible changes in latency when the connection hops to a new satellite. Neat stuff!

IRTT is a good tool but not ideally suited for continuous monitoring. It wants to run to completion and then produce a report of summary stats like average RTT. (I run it every minute; for 58 seconds to give the last run time to finish before the next starts.) I’d rather have something running continuously and reporting exponentially weighted moving averages or the like.

I should get more serious about measuring my obstructions; they are certainly the cause of some of the packet loss I see, but not much. The Starlink app shows a log of obstruction events but I haven’t figured out how to get at it in my own code, it must be in the gRPC data somewhere.

A Note on Correctness

Trying to measure this stuff in a consumer setting is difficult. I am not running a lab here. But I do try to get it right. Everything is wired ethernet. My network connection is mostly pretty quiet. I did this testing with three different servers, the data above is from the best one. (A second server in LA showed occasional transient packet loss spikes; I suspect the cheap VM I’m on gets deprived of network or CPU occasionally.)

BTW one nice thing about these tools is they don’t use a lot of bandwidth, like 6 Kbps each way. It’s a much nicer way to measure connection health than speed tests. And the continuous UDP stream seems a better measure of real application experience than ICMP pings.

My Starlink rotated

My Starlink dish moved itself in the past week or two. It was pointing due north, azimuth about 1-2° east of north according to old data. Now it’s visibly pointing a bit west and the software tells me it’s at -19.7°. It’s visible in the cool 3d view of obstructions in the mobile app, too. Elevation is currently 64.0; it used to be 65.

For the past month or two there’s been reports of dishes pointing themselves towards the oceans for coastal users. The speculation is they’re trying to squeeze out more capacity, getting folks who can to use previously unused bandwidth over the oceans. That seems like a good change to me!

The one downside is some folks report how they had a clear view to the north and now the dish is pointing itself straight at a tree. That seems avoidable, the firmware knows where obstructions are. Maybe they haven’t gotten to it yet. In my case the westerly view is actually a little better than due north; I have one tall tree in the north east that was obstructing about 1-2% of the view. Now it’s a little less although I can’t quite prove that out with numeric data. See the tiny smidge of red here; it used to be more.

More Starlink product failures

Been a bad month for Starlink.

The ISP service had a meltdown a week or two ago, see my previous blog posts. For a week+ there were a lot more dropouts. Then there was a 12 hour period of massive packet loss. My connection fixed itself 2023-01-22 at 22:40 (California time). My guess is they were doing experiments with traffic shaping that failed badly.

Starlink announced last fall they were imposing data caps in December. Then they pushed it back to February. Today, Jan 31, we learn it’s now “April at the earliest”. They don’t actually communicate these slipped deadlines to customers; the only way to learn about it is to read the terms of service document and see if they changed it.

A lot of Starlink v2 folks are finding their dishes are failing this winter. Best guess is it’s the cable connector at the antenna. (It’s a proprietary cable, costs $60-$100, and may not ship for a month+). There’s a lot of suspicion it’s related to dish heating in winter.

Starlink support has never been great but recently got much worse. I submitted a ticket complaining about service quality and it took 13 days to get a response. Lots of reports on the Reddit of a month+ without a response to things like “you said you shipped equipment and didn’t” or “the dish arrived but doesn’t work” or “I’ve been offline for 6 weeks now”. Here’s someone billed for service they haven’t received yet. Folks are starting to file FTC and FCC complaints; those do get a swift reply.

It’s just not going very well over at the Starlink division. It’s so frustrating. The service is an amazing engineering accomplishment. It worked great the first year until the company decided to sell to more customers than they have capacity for. Now it’s nearly unusable in the evenings. And all the execution around the product that you need in a consumer business is just terrible.

Not clear it’s going to improve either. From what I’ve seen they can only find a market in the US with our far-flung lousy Internet infrastructure. Other rich countries in Europe and Asia don’t need satellite Internet because local infrastructure is better. And the places that do need it, most customers can’t afford $100/mo for Internet. They have far too many customers for their capacity in the US and nowhere near enough customers where they have excess capacity. I wonder how much money they’re losing.

UDP metronome vs. Starlink

I created a custom tool for monitoring network connections. Here’s some notes on what I learned from it and what I plan next.

I wrote the tool in a couple of hours. It uses aioudp to send a UDP packet to a server every 100ms or so, the server reflects it back. This very vaguely mimics application traffic. I then log back whether the reply came back in order and how long it took. Data is sent to influx and graphed with Grafana. 1 second timeouts or packets out of order are marked as “errors”.

I left this running with the client behind Starlink and the server on my lightly loaded reliable machine in a datacenter. Quick and dirty and there’s some things I’d improve in the timing of packet sends (it only sends after it receives the last one, so slow RTT means fewer packets), but it got me some data pretty quick. However I’m going to stop running it because it’s kinda sloppy.

Going forward I am going to look at irtt for the network testing. It’s a ~5 year old program that does something similar with UDP to monitor connection latency. But written and tested much more carefully than mine. I haven’t dug into what all it can do but it seems to the task. This experiment made me realize it’s much more useful to graph anomalies and shifts in the general trend, not the basic sequence of successes you expect.

I was a little worried about this high frequency testing but the volume isn’t so bad. My data packets are about 20 bytes, so call it 50 bytes total for the packet (including headers) or 0.5 kbytes/sec or 43 megabytes a day. It’s negligible.

Starlink on a normal day

Here’s a graph of the data after a full day. For each slot I’m graphing the mean RTT and the max/min for the time interval. The scale here is about 1 minute a pixel, so there’s up to 600 packets being measured. Errors peak at about 10, or under 2% packet loss.

I like how this shows the daily congestion so clearly. The heavy line of mean RTT in the second graph is very clear; you can see the latency creep up from 100ms to 150ms in the busy times of day. The max/min also spreads significantly, showing the jitter. (Standard deviation just follows the same trend as mean.) The error rate graph at the top is also illuminating. Unfortunately I screwed up here because most errors are timeouts (1 second) and that delays my dumb code from sending another packet, so at 100% packet loss I’m only possibly getting 60 packets a minute through, not the 600 I intended.

For comparison here is a graph from ICMP pings in the same time interval. This shows roughly the same pattern of evening congestion, particularly in the packet loss red dots. But the picture with mean RTT isn’t nearly so clear. Not sure why that is but I think it’s because of my higher frequency sampling with the metronome; 600 a minute vs. 4 x 5 packets a minute with the pings.

One thing that’s instructive with this high frequency data is to graph every single packet. Here’s 1 minute worth of data representing 400-600 packets during a bad time when 11 of those packets got lost. You can see the spread of latencies is just all over. It should be 100ms but some packets are taking 4x as long.

Starlink’s bad day

I lucked out and got this monitoring running on 2023-01-22 when Starlink was having a bad day. I managed to capture the bad behavior and its fix pretty clearly.

You can see a radical change around 22:40 (22:41:27, precisely). Before then error rates were very high and latency was all over the map. Suddenly it smooths out; almost no lost packets, steady latency, and a lower minimum latency. Starlink changed something. FWIW here’s a closeup of the transition.

Starlink nearly unusable for real time apps

My Starlink connection has tipped over to being unusable for real time apps. It’s still OK for loading web pages although slower than the minimal 20 Mbps service level. But real time apps like gaming are completely broken right now. This is in addition to the weird DHCP problem I blogged about earlier today.

The main overriding problem with Starlink is still congestion. The service gets very slow every evening, bad enough I can’t reliably watch a single TV show on Amazon, Netflix, or Plex. They have oversold their capacity.

The new problem is some weird thing where the whole connection drops out for 1-2 seconds. Lots of reports on Reddit summarized here. It’s mostly gamers who notice this but it must affect video calls too. This feels like a new significant problem and it’s hard to guess what it might be.

I should add that Starlink’s support is terrible. Many folks on Reddit report going weeks with no response. To big simple things like “you said you shipped me hardware but it did not arrive” or “my service has been entirely offline for a week and I suspect my hardware is broken how do I get a replacement?”

Here’s some data monitoring. First a basic ping graph of the particularly bad last hour.

Look at that; 5% packet loss over an hour. Latencies all over the place from 50 to 200ms when it is working. Outages of minutes at a time. It’s not even prime time for congestion yet, still 5-6pm.

Today I wrote a new custom monitoring app I’m calling “metronome”. It sends a UDP packet to a server every 100ms. The server reflects it, the monitor measure round trip time. I wrote this to more closely monitor something like a game application; I don’t love using ICMP ping for connection monitoring. Also it’s nice to have something so high frequency. It’s still a little buggy but giving some useful results. Here’s a graph of that same hour; see those clusters of 200+ms? Ping to that server is about 100ms.

A change?

Edit: woke up this morning to 12 hours of data. Something changed abruptly at about 22:40 (local time); packet loss went way down both on my UDP metronome and my old reliable ping graph. There’s still a wide spread of jitter in the metronome but that slowly improves as it gets towards midnight and later, which is consistent with residential user congestion. The download speed graph at bottom (once an hour) confirms the usual nighttime congestion pattern.

Total guess here but I suspect Starlink is experimenting with traffic shaping algorithms and whatever they were doing before 22:40 was really not working. Either that or something was just broken. Glad to see basically no errors though. There’s no evidence of the 1-2 second microoutages I was seeing this last week. Need to try my game or something to confirm at an application level.

BTW this visualization is very sensitive to how I graph it in Grafana. The green graph at top is drawing max(rtt) every 200ms and leaving it blank / white if there’s no data (the jankiness before 22:40). My app logs data about every 100ms when the network is working, which results in a nice smooth green area after 22:40. I like this but it’s pretty slow & demanding on the graphing software. The usual Grafana graphs average on a time-scale appropriate level, like every 5s in this graph, but then all that averaging gives a very smooth picture that hides the packet loss and jitter. I need more direct visualizations of the variance. The error graph is one measure (it’s just a count of errors per time interval). I should try graphing the literal variance or SD.

Starlink vs Ubiquiti OS: outages with WAN failover

I’ve got a problem that’s recently gotten worse on my LAN. Starlink will stop working and my Ubiquiti router fails over to the backup. But then it never switches back even though it looks like Starlink is up. It appears to be a DHCP failure; my router can’t get an address for the Dishy interface.

Sometimes rebooting the router fixes it; that suggests it’s a UnifiOS problem. Sometimes I have to turn Dishy off for 10+ minutes and then it starts working again, suggesting it’s a Starlink problem. Or maybe it’s more complicated. Today when this happen I rebooted the router but not Dishy. It started working after a minute or three.

This problem has occurred off and on for two years but is now happening about once a day. Rebooting the router seems the best way to get it working again. But I think the problem has fixed itself at least once (after several hours). I may also have had to turn Dishy off entirely for awhile to get things working.

I know from other sources that Starlink’s ground infrastructure has some sort of reset that happens if Dishy is offline for a few minutes, so often unplugging for awhile fixes things. I also know DHCP has to go all the way through the satellite to the Starlink ground station, so if the network is overloaded it’s not as reliable. But this big failure happens at quiet times too, like just now at 7am.. Finally I know UnifiOS also has bugs in its failover system. So many bugs; I probably won’t buy another Ubiquiti product.

An idea for a fix.

I’m trying a fix right now, putting a Netgear ethernet switch between my router and the Dishy PoE injector. I’ve seen signs in the logs that maybe the ethernet link is failing. And coming back, but maybe that’s not working right? I’ve heard other folks suggest a switch may help smooth out problems.

DHCP Logs

I’ve got logs from the router. They are spammy so I’m narrowing in on just the DHCP part like this. grep DHCP *.1.log | grep -v eth1. Here’s what it looks like when things are going well:

2023-01-22T15:02:21,354 <30>Jan 22 07:02:21 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2023-01-22T15:02:21,440 <30>Jan 22 07:02:21 ubnt dhclient: DHCPACK from 100.64.0.1

2023-01-22T15:04:34,843 <30>Jan 22 07:04:34 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2023-01-22T15:04:34,918 <30>Jan 22 07:04:34 ubnt dhclient: DHCPACK from 100.64.0.1

2023-01-22T15:07:03,124 <30>Jan 22 07:07:03 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2023-01-22T15:07:03,208 <30>Jan 22 07:07:03 ubnt dhclient: DHCPACK from 100.64.0.1

Starlink leases are 5 minutes. So the router requests a new address from the 100.64.0.1 endpoint it knows about every 2.5 minutes and all is well.

Here’s what it looks like when it fails:

2023-01-22T15:07:03,124 <30>Jan 22 07:07:03 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2023-01-22T15:07:03,208 <30>Jan 22 07:07:03 ubnt dhclient: DHCPACK from 100.64.0.1

2023-01-22T15:08:37,364 <30>Jan 22 07:08:37 ubnt dhclient: DHCPRELEASE on eth0 to 100.64.0.1 port 67

2023-01-22T15:08:45,935 <30>Jan 22 07:08:45 ubnt dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
2023-01-22T15:08:45,988 <30>Jan 22 07:08:45 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2023-01-22T15:08:45,988 <30>Jan 22 07:08:45 ubnt dhclient: DHCPOFFER from 100.64.0.1

2023-01-22T15:08:52,524 <30>Jan 22 07:08:52 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67

2023-01-22T15:09:07,104 <30>Jan 22 07:09:07 ubnt dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
2023-01-22T15:09:07,171 <30>Jan 22 07:09:07 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2023-01-22T15:09:07,171 <30>Jan 22 07:09:07 ubnt dhclient: DHCPOFFER from 100.64.0.1

2023-01-22T15:09:14,163 <30>Jan 22 07:09:14 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67

2023-01-22T15:09:25,674 <30>Jan 22 07:09:25 ubnt dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
2023-01-22T15:09:25,766 <30>Jan 22 07:09:25 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2023-01-22T15:09:25,767 <30>Jan 22 07:09:25 ubnt dhclient: DHCPOFFER from 100.64.0.1

The log starts with one working exchange. Then 1.5 minutes later my router spontaneously sent a DHCPRELEASE out to Starlink. Um, why? After that my router starts DHCP from ground zero, broadcasting DHCPDISCOVER and DHCPREQUEST on the link to 255.255.255.255. It’s lost all DHCP state. It logs that it got a DHCPOFFER from 100.64.0.1 and that’s good, right? But apparently Ubiquiti didn’t like the offer or ignored it because it just tries again in a few seconds. It gets stuck in this state, sending DISCOVER several times a minute, getting offers, and never working.

Here’s what happens after I reboot the router. Starlink didn’t come back right away after the reboot but did start working pretty quickly, within a minute or so.

2023-01-22T16:10:58,089 <13>Jan 22 08:10:58 ubnt shutdown[3967]: shutting down for system reboot

2023-01-22T16:13:28,518 <86>Jan 22 08:13:01 ubnt sudo: pam_unix(sudo:session): session closed for user root
2023-01-22T16:13:28,567 <86>Jan 22 08:13:01 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/sh -c echo \"LAN\" >/sys/class/net/eth1/ifalias

...

2023-01-22T16:13:34,806 <30>Jan 22 08:13:08 ubnt dhclient: DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 6
2023-01-22T16:13:34,809 <30>Jan 22 08:13:08 ubnt dhclient: DHCPREQUEST on eth2 to 255.255.255.255 port 67
2023-01-22T16:13:34,809 <30>Jan 22 08:13:08 ubnt dhclient: DHCPOFFER from 10.33.1.1
2023-01-22T16:13:34,811 <30>Jan 22 08:13:08 ubnt dhclient: DHCPACK from 10.33.1.1

2023-01-22T16:14:16,367 <30>Jan 22 08:13:49 ubnt dhclient: DHCPREQUEST on eth2 to 255.255.255.255 port 67
2023-01-22T16:14:16,381 <30>Jan 22 08:13:49 ubnt dhclient: DHCPACK from 10.33.1.1

2023-01-22T16:14:16,408 <30>Jan 22 08:13:49 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2023-01-22T16:14:16,470 <30>Jan 22 08:13:49 ubnt dhclient: DHCPACK from 100.64.0.1

2023-01-22T16:16:14,856 <30>Jan 22 08:16:14 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2023-01-22T16:16:14,912 <30>Jan 22 08:16:14 ubnt dhclient: DHCPACK from 100.64.0.1

So the system requests reboot at 08:10:58 and finally reboots at 08:13:01. 7 seconds later it makes a DHCP request on eth2; that’s my backup WAN. It works. No hint of anything on eth0, the primary WAN which Dishy is plugged into. Why? But it gets around to asking for eth0 at 08:13:49, 41 seconds later, and it works. Another routine request succeeds at 08:16:14. We’re back online with Starlink.

More logs

Those samples above are all logs filtered on “DHCP”, but maybe important stuff is hiding in the other log spam. Here’s more detailed logs of the failure around 07:08:37 when the mystery DHCPRELEASE happened. Still doing a bit of filtering egrep -v 'mcad|ipsec|pam_unix' *.1.log

2023-01-22T15:07:03,124 <30>Jan 22 07:07:03 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2023-01-22T15:07:03,208 <30>Jan 22 07:07:03 ubnt dhclient: DHCPACK from 100.64.0.1
2023-01-22T15:07:07,613 <30>Jan 22 07:07:07 ubnt dhclient: bound to 100.103.201.245 -- renewal in 115 seconds.

2023-01-22T15:08:35,284 <30>Jan 22 07:08:35 ubnt netplugd[3542]: eth0: state ACTIVE flags 0x00011043 UP,BROADCAST,RUNNING,MULTICAST,10000 -> 0x00001003 UP,BROADCAST,MULTICAST
2023-01-22T15:08:35,284 <190>Jan 22 07:08:35 ubnt zebra[753]: interface eth0 index 2 changed <UP,BROADCAST,MULTICAST>.
2023-01-22T15:08:35,284 <30>Jan 22 07:08:35 ubnt netplugd[25603]: /etc/netplug/netplug eth0 out -> pid 25603
2023-01-22T15:08:35,293 <5>Jan 22 07:08:35 ubnt kernel: eth0: Link down

2023-01-22T15:08:35,951 <181>Jan 22 07:08:35 ubnt wlb: wlb-wan_failover-eth0 wlb-wan_failover-eth0 reachability failed, failover
2023-01-22T15:08:35,951 <181>Jan 22 07:08:35 ubnt wlb: group wan_failover, interface eth0 going Inactive
2023-01-22T15:08:36,211 <181>Jan 22 07:08:36 ubnt wlb: group wan_failover, interface eth2 going Active
2023-01-22T15:08:36,258 <13>Jan 22 07:08:36 ubnt wan-event: [WAN Transition] eth0 to state inactive
2023-01-22T15:08:36,659 <13>Jan 22 07:08:36 ubnt wan-event: [WAN Transition] eth2 to state active
2023-01-22T15:08:36,671 <86>Jan 22 07:08:36 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/sbin/conntrack -F

2023-01-22T15:08:37,260 <86>Jan 22 07:08:37 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/dhclient -q -cf /var/run/dhclient_eth0.conf -pf /var/run/dhclient_eth0.pid -lf /var/run/dhclient_eth0.leases -r eth0
2023-01-22T15:08:37,324 <30>Jan 22 07:08:37 ubnt netplugd[3542]: eth0: state OUTING flags 0x00001003 UP,BROADCAST,MULTICAST -> 0x00011043 UP,BROADCAST,RUNNING,MULTICAST,10000
2023-01-22T15:08:37,324 <190>Jan 22 07:08:37 ubnt zebra[753]: interface eth0 index 2 changed <UP,BROADCAST,RUNNING,MULTICAST>.
2023-01-22T15:08:37,333 <5>Jan 22 07:08:37 ubnt kernel: eth0: 1000 Mbps Full duplex, port 0
2023-01-22T15:08:37,364 <30>Jan 22 07:08:37 ubnt dhclient: DHCPRELEASE on eth0 to 100.64.0.1 port 67

2023-01-22T15:08:38,875 <86>Jan 22 07:08:38 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/ip route add 0.0.0.0/0 via 100.64.0.1 table 201
2023-01-22T15:08:38,965 <86>Jan 22 07:08:38 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/ip route add blackhole 0.0.0.0/0 table 201 metric 256
2023-01-22T15:08:39,707 <30>Jan 22 07:08:39 ubnt ntpd[2874]: Deleting interface #36 eth0, 100.103.201.245#123, interface stats: received=58, sent=58, dropped=0, active_time=6861 secs
2023-01-22T15:08:39,708 <30>Jan 22 07:08:39 ubnt ntpd[2874]: 65.108.121.104 interface 100.103.201.245 -> (null)
2023-01-22T15:08:39,708 <30>Jan 22 07:08:39 ubnt ntpd[2874]: 205.206.70.42 interface 100.103.201.245 -> (null)
2023-01-22T15:08:39,708 <30>Jan 22 07:08:39 ubnt ntpd[2874]: 103.242.68.69 interface 100.103.201.245 -> (null)
2023-01-22T15:08:39,708 <30>Jan 22 07:08:39 ubnt ntpd[2874]: 144.76.76.107 interface 100.103.201.245 -> (null)

2023-01-22T15:08:41,079 <86>Jan 22 07:08:41 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/sbin/ubnt-add-connected.pl
2023-01-22T15:08:41,610 <86>Jan 22 07:08:41 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/rm -f /var/run/dhclient_eth0.pid
2023-01-22T15:08:42,643 <86>Jan 22 07:08:42 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/opt/vyatta/sbin/vyatta-interfaces.pl --dev eth0 --restore-ipv6
2023-01-22T15:08:44,308 <30>Jan 22 07:08:44 ubnt netplugd[3542]: eth0: state OUTING pid 25603 exited status 0
2023-01-22T15:08:44,309 <30>Jan 22 07:08:44 ubnt netplugd[25761]: /etc/netplug/netplug eth0 in -> pid 25761
2023-01-22T15:08:45,718 <86>Jan 22 07:08:45 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/sh -c /sbin/dhclient -q -nw -cf /var/run/dhclient_eth0.conf -pf /var/run/dhclient_eth0.pid  -lf /var/run/dhclient_eth0.leases eth0  2> /dev/null &
2023-01-22T15:08:45,935 <30>Jan 22 07:08:45 ubnt dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
2023-01-22T15:08:45,988 <30>Jan 22 07:08:45 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2023-01-22T15:08:45,988 <30>Jan 22 07:08:45 ubnt dhclient: DHCPOFFER from 100.64.0.1

I’ve put line breaks in logical groupings. Group 1 is a normal good DHCP exchange. Group 2 is 90 seconds later and looks like eth0 spontaneously went down. There’s nothing in the logs to explain why that might have happened. Group 3 is the failover system correctly realizing eth0 isn’t working and switching me to my backup WAN, eth2. Group 4 is eth0 coming back up just about 2 seconds after it went down. Note that the router sends the DHCPRELEASE at the end of this little group.

It then takes a good 7 seconds until the last group when the router sends a DHCPDISCOVER out the Dishy interface. Why so long? And even though it gets a DHCPOFFER reply immediately the router doesn’t seem to use it. And then we’re back to the logfile above; there’s no extra info in the extended logs to shed light on why it’s not accepting the offer.

So my guess of what’s going on based on these logs is..

  • Hardware gremlins cause eth0 to fail
  • The router correctly shuts down the eth0 interface and fails over
  • eth0 comes back up 2 seconds later
  • The router correctly releases the DHCP lease, then tries to get a new one
  • Starlink ?correctly? sends a DHCP offer as soon as asked
  • The router bugs out and fails to use the lease. It keeps trying several times a minute.
  • I have to reboot the router to fix it, or it magically fixes itself after minutes / hours.

These are all pretty rough guesses though. I’m poking at two black boxes with one crappy logfile as my only evidence. Anyway I put a switch in the path to maybe help defend against hardware gremlins. We’ll see. Update: so far so good, 7 days without a disconnect. OTOH the old setup used to go a week+ without a problem too so not certain. I’ve seen other failovers but nothing related to eth0 going down.

eth0 goes down a lot

I should note that eth0 seems to go down a lot; several times a day. But not every day? There’s a gap of a whole week where it never once went down, then another gap of a day+. Super weird. Anyway the DHCP failure doesn’t happen every single time eth0 goes down.

# grep -h 'eth0: Link down' *.1.log* | sort -n

2023-01-10T11:27:19,663 <5>Jan 10 03:27:19 ubnt kernel: eth0: Link down
2023-01-10T11:27:36,793 <5>Jan 10 03:27:36 ubnt kernel: eth0: Link down
2023-01-10T13:22:33,664 <5>Jan 10 05:22:33 ubnt kernel: eth0: Link down
2023-01-10T15:17:28,666 <5>Jan 10 07:17:28 ubnt kernel: eth0: Link down
2023-01-10T17:12:23,981 <5>Jan 10 09:12:23 ubnt kernel: eth0: Link down

2023-01-18T02:22:33,753 <5>Jan 17 18:22:33 ubnt kernel: eth0: Link down
2023-01-18T04:52:05,885 <5>Jan 17 20:52:05 ubnt kernel: eth0: Link down
2023-01-18T05:02:24,905 <5>Jan 17 21:02:24 ubnt kernel: eth0: Link down
2023-01-18T07:48:57,901 <5>Jan 17 23:48:57 ubnt kernel: eth0: Link down
2023-01-18T09:43:53,337 <5>Jan 18 01:43:53 ubnt kernel: eth0: Link down
2023-01-18T11:38:48,875 <5>Jan 18 03:38:48 ubnt kernel: eth0: Link down
2023-01-18T13:33:44,726 <5>Jan 18 05:33:44 ubnt kernel: eth0: Link down
2023-01-18T14:58:30,367 <5>Jan 18 06:58:30 ubnt kernel: eth0: Link down
2023-01-18T14:59:01,387 <5>Jan 18 06:59:01 ubnt kernel: eth0: Link down
2023-01-18T16:53:56,208 <5>Jan 18 08:53:56 ubnt kernel: eth0: Link down
2023-01-18T17:02:20,938 <5>Jan 18 09:02:20 ubnt kernel: eth0: Link down
2023-01-18T19:29:46,174 <5>Jan 18 11:29:46 ubnt kernel: eth0: Link down
2023-01-18T21:24:42,410 <5>Jan 18 13:24:42 ubnt kernel: eth0: Link down
2023-01-18T23:19:38,480 <5>Jan 18 15:19:38 ubnt kernel: eth0: Link down
2023-01-19T01:14:34,209 <5>Jan 18 17:14:34 ubnt kernel: eth0: Link down
2023-01-19T03:09:29,842 <5>Jan 18 19:09:29 ubnt kernel: eth0: Link down
2023-01-19T05:04:25,189 <5>Jan 18 21:04:25 ubnt kernel: eth0: Link down
2023-01-19T06:59:19,270 <5>Jan 18 22:59:19 ubnt kernel: eth0: Link down
2023-01-19T08:54:14,486 <5>Jan 19 00:54:14 ubnt kernel: eth0: Link down
2023-01-19T10:49:11,733 <5>Jan 19 02:49:11 ubnt kernel: eth0: Link down
2023-01-19T12:44:05,754 <5>Jan 19 04:44:05 ubnt kernel: eth0: Link down
2023-01-19T14:39:02,849 <5>Jan 19 06:39:02 ubnt kernel: eth0: Link down

2023-01-21T11:04:04,617 <5>Jan 21 03:04:04 ubnt kernel: eth0: Link down
2023-01-21T12:59:17,757 <5>Jan 21 04:59:17 ubnt kernel: eth0: Link down
2023-01-21T14:54:11,780 <5>Jan 21 06:54:11 ubnt kernel: eth0: Link down
2023-01-21T16:49:09,336 <5>Jan 21 08:49:09 ubnt kernel: eth0: Link down
2023-01-22T11:18:27,227 <5>Jan 22 03:18:27 ubnt kernel: eth0: Link down
2023-01-22T11:18:44,227 <5>Jan 22 03:18:44 ubnt kernel: eth0: Link down
2023-01-22T13:13:40,293 <5>Jan 22 05:13:40 ubnt kernel: eth0: Link down
2023-01-22T15:08:35,293 <5>Jan 22 07:08:35 ubnt kernel: eth0: Link down
2023-01-22T15:59:57,613 <5>Jan 22 07:59:57 ubnt kernel: eth0: Link down

Starlink’s bad hours

Starlink performance continues to degrade. They’ve gone from promising 100 Mbps to 50 Mbps to now 20 Mbps. And they can’t even deliver that.

I run a speed test every hour. Graphing the average for the day is misleading because the service runs very well at 3am, often 200 Mbps! What I care about is the bad hours which are pretty much every evening. To that end I have a new graph, a count of the number of hours where the download speed measured is under 20 Mbps.

Those two bad days around 11/19 are an anomaly; my router had failed over to my slower backup connection and didn’t switch back (a router bug). The rest of the data is good. For comparison, here are graphs of minimum daily bandwidth (ie: the worst hour) and average.

This is what an overloaded ISP looks like.

I have data going back almost two years. Not confident this is correct; I used to do more speedtests a day so my naive count means that numbers are overreported a year+ ago, particularly last December. Here’s a graph of 10 months which shows an increasing trend of bad hours. (I suspect 4 or 5 of the worst days here are during failover to backup.)

Starlink dishes reorienting

Starlink seems to be re-orienting dishes on the US coasts to point somewhat over the ocean.

Starlink’s dish has motors for self-orienting. Typically it’s pretty static; mine oriented once at startup and I don’t think moved for over a year. Due north or south seemed optimal.

But recently on Reddit a lot of people are reporting that their dishes are now pointing somewhat to the west or east. No reliable reports on how much. But the pattern looks like it’s US folks, and Dishy is now trying to get a view over the oceans. Presumably as a congestion avoidance mechanism; there should be more unused capacity out there. I can’t imagine it makes a huge difference but I don’t really know.

The problem is Dishy seems to be choosing a new orientation without regard to obstructions. Many reports that their install used to work fine and now is pointing at a tree and has outages. Some very annoyed folks who spent real money mounting the thing or removing trees. There’s no way to override where it points, either, short of breaking the motors. What’s weird is Dishy has a map of obstructions; it knows there’s a tree there. Maybe they’ll eventually get to optimizing with that data too.

I thought my own dish moved to point to the west. But now I’m not sure; I just measured with a compass and it may be pointing at 355 degrees instead of 0, but not much. Unfortunately I can’t access the Dishy diagnostic data at 192.168.100.100 because I can’t get my stupid Ubiquiti router to add the static route. There’s been a bug for years where static routes don’t work with WAN failover. But that static route used to at least work for a few hours, now it’s entirely broken.

Starlink terrible customer communications

I realized at some point my primary gripe with Starlink is how bad they are at communicating with customers. I actually like my service. It’s not delivering to the level they promise but it’s still pretty good and better than my other options. It’s a freakin’ technical marvel, too. I’d be a lot more understanding if they just communicated. But they are terrible at that; no proactive communication with customers, no information on the website, and famously no press department. It’s very hard to know what’s going on.

The latest snafu is the data caps. After announcing they’d go into effect in December, the rumor on Reddit is that they’ve changed the plan and now it’s February 2023. Several folks have reported emails saying as much. I never got one. I got an email Nov 4 saying the caps would go into effect in December. That’s it.

The cap announcement was botched. After a year+ of promising 100 Mbps service and no caps, suddenly they quietly updated the TOS on the site to indicate only 20 Mbps and a 1TB cap. No proactive communication. A week or two later they emailed The New Arrangement to us. Lower service promise, same price, take it or leave it. Then they had to email a bunch of people a second time to say “oh we made a mistake and we were wrong about your previous usage”. Oops.

Starlink’s website says literally nothing about IPv6 support. It doesn’t support it. Or at least, it hasn’t; but recently there’s evidence that a good chunk of Starlink customers now have IPv6 enabled. But absolutely not a whisper about it to the customers.

Customer support is notoriously awful. There’s no phone number or email address. You used to be able to submit a request in the mobile app reasonably easily. Now it’s apparently hidden behind you having to read a bunch of FAQ entries and then pressing a thumbs down “this doesn’t help me” before you’re allowed to make a request. Customers report very mixed results. Sometimes great instant service. Sometimes a week + before any reply and then the reply is low quality. Not for complicated questions, basic things like “why did you not ship my order?” or “my dish arrived dead on arrival”.

All this is basic “tell your customers what their service is” stuff. It’s remarkable how bad they’re failing at it. Not to mention anything forward-looking like plans for improved service in the future.

PS: I should add that I helped start a community list of firmware versions because there was zero info on software versions. Honestly all we can track is version IDs and dates released but at least it’s something.

Starlink performance last week: 5mbps

Just making a note of a recent performance graph.

Nothing new here, this congestion pattern has been happening for months. But it gets worse and worse. There’s some tiny hope that the new throttling system will help free up some bandwidth for me, at least until I myself am throttled. That was supposed to launch early December but now apparently is pushed back to February.

Starlink service degraded: 20Mbps, 1TB data cap

Ugly changes in the Terms of Service for Starlink: residential customers have been degraded to 20-100Mbps expected download (from 50-200). Uploads are now 5-15, down from 10-20. Latency has also crept up: 25-50ms now, not 20-40. And a new unwelcome feature, a 1TB / month soft data cap before speeds are further degraded.

Starlink sure has fallen a long way from “no data caps! great latency for gaming! 100+Mbps!”. OTOH this new service level is at least closer to what they actually deliver. Over the last 90 days I’ve been getting 90Mbps average download speed with nightly slowdowns to 10Mbps. Uploads of 6.6Mbps and latency 55ms.

TBH the data cap is not a disaster; the average American household uses 513GB / mo although 15% use 1TB or more. It’s a soft cap, you get degraded to 5-50Mbps if you go over (or you can buy more). And the 1TB cap is defined in terms of “peak hours” but then that’s 7am to 11pm, or the 16 hours people are awake. I can make good use of the uncapped hours though with automated downloads.

What I don’t like about caps is how opaque they are to users. Starlink has added a daily usage graph so you can at least see what you’re using. But there’s no way to see what is using your data. And ordinary users don’t have tools to manage data usage; there’s no good way to use less.

Starlink still hasn’t communicated anything to its customers, we only know about this change from a TOS update. It seems unlikely we’ll get any sort of price break, just expected to accept the degraded service. Update now there’s an email to customers over the cap. Also a link to their so-called “Fair Use Policy” which explains the throttling.

Update 2: they sure botched this rollout. They emailed customers whether they had been over cap in the past but told a bunch of people the wrong thing, so sent a second email correcting it. They also told business users they would be throttled to 1 Mbps; obvious nonsense, but again required a correction. And all that on top of the original, probably mistaken quiet non-announcement via a TOS update.

For the record: archive links for Oct 6 2022 (pre-cap) and Nov 4 2022 (with cap).

My recent Starlink POPs and IP address changes

A thrilling list of my Starlink ISP’s point of presence, where my packets come out to the Internet. Looking at this because this past week a bunch of users including me have had a problem where their TCP sockets won’t stay open for more than a few minutes, breaking all sorts of stuff. Each date is when my IP address changed.

  • 2022-05-29: Seattle
  • 2022-06-01: Los Angeles
  • 2022-06-04: period of instability
  • 2022-06-04: LA
  • 2022-06-06: LA
  • 2022-06-07: instability
  • 2022-06-07: LA
  • 2022-06-10: LA
  • 2022-06-11: LA

I first noticed my TCP connection problem on 2022-06-07, about the time of that period of instability. It’s mostly been gone since 2022-06-08 but it came back at least a little bit today and is gone again.

The command to do this is

grep '^2022' homeip.log | fgrep -v '157.131' | fgrep -v 173.195 | uniq -c -f 2

Starlink stats for a year

Some data from my automated monitoring. Speed is measured with an Ookla speed test every 15 minutes or (now) every hour: daily min, max, and average. Latency is measured with telegraf native pings to 8.8.8.8: daily min, average. Packet loss is the daily average percentage of ping packets lost. There’s some messy data here; sometimes my house fails over to a 12Mbps fixed wireless link which pollutes these measurements (but only a little). And there’s a suspiciously low bandwidth stretch in December and January that could well be a monitoring bug.

Download speeds
Latencies
Packet loss

Important to read these right. These are daily average statistics: the min/avg/max bandwidth for each day, the min/avg ping time for each day. Each latency measurement is actually several pings sent at once, so I’m taking the average of the average and the min of the min.

The primary pattern that jumps out here is the increase in latency starting in January. That coincides with when I got moved from a Northern California POP up to the Seattle POP (I think via a satellite relay near Winters, CA). Although note the change is gradual; this isn’t a one-off bump in path length. Another possible explanation is that’s the period Starlink started adding a lot more users and I’m seeing buffering.

The min bandwidth graph does not bear out my perception, which is that congestion is getting worse. It’s definitely getting slower every night. Below is a graph of average download speed for 15 minute samples over a week in January; the pattern now is about the same. But the minimum daily I’m getting is still in the 10-20Mbps range just like it’s always been.

OpenWRT (RPi4): giving up

I’m giving up on OpenWRT on my RPi4. I’ve spent the last few days getting it working and while it’s mostly good, I don’t trust it. I’m about to go out of town for awhile and I can’t leave my partner with a possibly flaky router, so I’m back to the Ubiquiti router. It’s buggy but I understand what the bugs are and can live with them. OpenWRT is very impressive and would probably work for me, but it requires more tinkering than I want to do. It does not spark joy in me.

The main problem with my OpenWRT setup is the mwan3 failover isn’t working for me. I got woken up by my alarm system loudly beeping, the stupid thing it does when there’s no Internet for a few hours. Starlink had gone down again. That’s not OpenWRTs fault, Dishy itself was out. But the mwan3 failover in OpenWRT didn’t work like it should have.

I could probably diagnose or fix this if I wanted to spend the time. The permission denied error in my logs is probably a good place to start. But I just don’t want to bother. (FWIW failover works if I disable one interface entirely. But that may just be Linux routing working, it has both WAN interfaces as routes. mwan3 is pinging interfaces and logging errors but I’ve never seen it actually mark one bad and switch.)

More generally there’s a bunch of rough edges in OpenWRT. The lack of persistent USB device naming is awkward, and potentially a source of a hard to diagnose problem in the future. The way package upgrades work (or don’t work) makes me nervous. I don’t trust that a full system upgrade will work when the time comes. I don’t like that I had to spend 5-10 hours reading docs and tinkering to get the things set up I want. All in all I want a router to just be an appliance, something I don’t spend time thinking about. OpenWRT is more of a firmware for hackers who want to be thinking about their routers.

I’ve said this before, I’d love something with the ease of use of the old Tomato firmware that’s based on OpenWRT. OpenWRT has improved a lot since 2015, LuCI is a very nice UI. Back then I got a comment that Gargoyle might fit the bill; I see that project is still getting updated, so maybe it’s worth a try. Also maybe my expectations are unreasonable. There’s lots of consumer routers out there that do a basic home LAN just fine, Starlink even gives you one. But I want more; I want multi-wan failover, I want VPN tunneling, I want detailed diagnostic data. It’s asking a lot.

Still I’m glad I spent the time with OpenWRT. I’d definitely reach for it again if I had specialist needs or was in a mindset to be more patient with the tinkering required. It’d also make a fantastic foundation for derived products. I think several commercial routers are sold with some variant of OpenWRT pre-loaded. Rumor has it Starlink’s own router is based on OpenWRT.

Starlink DHCP vs UnifiOS

My Starlink connection will work for days, then get in a mode where every 5 minutes the connection will fail for 30 seconds before it comes back. Long story short it looks like Starlink has a problem where it’s not responding to DHCP address renewals sometime.

Complicating matters; this is a Ubiquiti USG-3P router running UnifiOS and I have a backup WAN configured. Ubiquiti’s backup WAN stuff is a bit flaky, and also the failover does tend to both hide connection problems (when it fails over) and cause some (the failover itself breaks existing sessions.)

I’ve opened a support ticket for this, TIK-213261-55007-82. And I got two replies!

Apr 12: our engineering team is aware of cases where customers are having WAN DHCP renewal issues and the 5 minute lease expires. Our DHCP server engineers are actively working on this and I did send a link to the blog post to the lead engineer, appreciate the write up. Apologies for the issues and please bear with us.

Apr 15: our network software team deployed two fixes last night to hopefully resolve the DHCP renew issue

I finally got some DHCP logging set up to understand what’s going on at the router when the problem happens. Details below, mostly for my own troubleshooting.

The USG-3P has three ethernet ports. They are

  • Starlink, the primary WAN: on eth0, typically at an IP like 100.74.162.37.
  • My LAN: on eth1, 192.168.3.1
  • SmarterBroadband, the backup WAN2: on eth2, 10.33.1.1

My understanding of the DHCP behavior is that when connected, Starlink gives out an IP address in the CGNAT block 100.64.0.0/10 with an expiration of 5 minutes. Ubiquiti’s DHCP client accepts this address and binds to it. It also renews it every 2.5 minutes, half the lease time. If the renewal doesn’t happen in that 2.5 minutes then the link is effectively dead, packets to it fail, and the WAN failover process starts. (DHCP clients are not allowed to keep using an address past the lease expiration!) I’m not certain how the DHCP request is answered by Starlink, but my guess is the DHCP request goes up to the satellite and down to a ground station in Seattle where Starlink answers it. My working theory is those DHCP requests aren’t getting answered.

Update: there are reports that Starlink is starting to serve 1 hour DHCP leases. (Later they say it went back to 5 minutes; maybe a temporary change?)

Observed

When things are going well, every 2-3 minutes there’s an entry like this in the log:

2022-04-09T20:30:07,108 <30>Apr  9 13:30:07 ubnt dhclient: bound to 100.74.162.37 -- renewal in 138 seconds.
2022-04-09T20:32:25,233 <30>Apr  9 13:32:25 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2022-04-09T20:32:25,292 <30>Apr  9 13:32:25 ubnt dhclient: DHCPACK from 100.64.0.1
2022-04-09T20:32:29,566 <30>Apr  9 13:32:29 ubnt dhclient: bound to 100.74.162.37 -- renewal in 142 seconds.

I believe this is an ordinary DHCP renewal process. The router has an address so it just sends a DHCPREQUEST to request the address again. The server answers back with a DHCPACK and everyone continues along.

When things are going badly, it looks like this:

2022-04-12T15:22:11,377 <30>Apr 12 08:22:11 ubnt dhclient: bound to 100.74.162.37 -- renewal in 117 seconds.
2022-04-12T15:24:08,373 <30>Apr 12 08:24:08 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2022-04-12T15:24:19,743 <30>Apr 12 08:24:12 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2022-04-12T15:24:20,862 <30>Apr 12 08:24:20 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2022-04-12T15:24:39,539 <30>Apr 12 08:24:27 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2022-04-12T15:24:47,472 <30>Apr 12 08:24:47 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2022-04-12T15:24:59,338 <30>Apr 12 08:24:57 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2022-04-12T15:25:07,502 <30>Apr 12 08:25:07 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2022-04-12T15:25:23,323 <30>Apr 12 08:25:23 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2022-04-12T15:25:43,693 <30>Apr 12 08:25:43 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2022-04-12T15:25:57,522 <30>Apr 12 08:25:57 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2022-04-12T15:26:12,669 <30>Apr 12 08:26:07 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2022-04-12T15:26:17,713 <30>Apr 12 08:26:17 ubnt dhclient: DHCPREQUEST on eth0 to 100.64.0.1 port 67
2022-04-12T15:26:28,982 <30>Apr 12 08:26:28 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2022-04-12T15:26:39,022 <30>Apr 12 08:26:39 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2022-04-12T15:26:56,422 <30>Apr 12 08:26:56 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2022-04-12T15:27:10,770 <30>Apr 12 08:27:10 ubnt dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
2022-04-12T15:27:10,835 <30>Apr 12 08:27:10 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2022-04-12T15:27:10,835 <30>Apr 12 08:27:10 ubnt dhclient: DHCPOFFER from 100.64.0.1
2022-04-12T15:27:10,910 <30>Apr 12 08:27:10 ubnt dhclient: DHCPACK from 100.64.0.1
2022-04-12T15:27:16,963 <30>Apr 12 08:27:16 ubnt dhclient: bound to 100.74.162.37 -- renewal in 134 seconds.

That sure looks to me like Starlink is just not answering the DHCP request. An abbreviated timeline:

  • 15:22:11,377: the router thinks it has a valid address. It should have an expiration of 300 seconds and therefore be renewed in 150 seconds. But it takes awhile for it to arrive, so the actual renewal is scheduled for 117 seconds. (This delay seems normal.) The router should send a DHCPREQUEST to renew the address at 15:24:08. The address will expire around 15:26:38 or maybe a little earlier.
  • 15:24:08,373: the router sends the first DHCPREQUEST to renew its address. It sends it to 100.64.0.1, presumably the IP address at the other end of the Starlink connection.
  • 15:24:08,373 to 15:26:17,713: the router hasn’t gotten a DHCPACK reply. So it keeps sending requests every 10-20 seconds.
  • 15:26:28,982 to 15:26:56,422: still no reply. Now the router starts sending DHCPREQUEST to 255.255.255.255. I think that’s likely because the 100.74.162.37 lease expired and so the router now has no idea what address is at the other end and it’s starting over with a broadcast.
  • 15:27:10,770: the router sends a DHCPDISCOVER. I’m not certain but I think this means the router has given up on the old address entirely and is starting over as if it has never heard of the network.
  • 15:27:10,835: the router receives a DHCPOFFER from Starlink. We’re back in contact! This took 65ms, or just about one round trip on the satellite link.
  • 15:27:10,835: the router sends a DHCPREQUEST, presumably securing the address it was just offered. (Note the log has the request coming before the offer, but I think the log messages just got swapped. They have the same millisecond timestamp.)
  • 15:27:10,910: the router receives a DHCPACK from Starlink, 75ms after the request. We’re connected again!
  • 15:27:16,963: the router logs that the IP address is bound. Not sure why this takes 6 seconds to announce, but that’s all happening inside UnifiOS.

I should note that in all 6 failures I’ve had this morning (once every 5 minutes), only one DHCPDISCOVER has been needed to get the connection going again. Each time one is sent it gets immediately answered. There’s a different kind of outage I’ve seen on previous days, where the router eventually does a DHCPDISCOVER and gets back the address 192.168.100.100 with a very short 5 second lease. That’s Dishy’s internal DHCP server answering with a local only address, a mode it gets into when it loses its link to Starlink’s ground station entirely. That’s a very old behavior I’ve discussed on this blog before. This every-5-minutes outage is relatively new, a few months old.

Interpretation

My interpretation of this is Starlink’s DHCP server has forgotten we had a lease. My router keeps trying to renew the lease with DHCPREQUEST and gets no answer. Finally the router starts over wtih a DHCPDISCOVER and Starlink responds immediately. That’s consistent with the satellite link basically working but Starlink’s DHCP server failing to renew my address. But I’m guessing here.

What I do know is it’s really annoying having your connection drop every 5 minutes. The WAN failover is kind of making things worse; it takes UnifiOS about 30 seconds to decide to failover. By the time it’s done that Starlink has come back up and so the router switches back to it. Basically every 5 minutes the network is down for about 30 seconds. Any TCP sessions with activity during the failover period get reset.

But the failover isn’t causing the problem, the lack of DHCP response is the real problem.

Updates / notes

A useful command for checking the logs for Starlink-related DHCP stuff

grep dhclient 192.168.3.1.log | grep -v eth2 | fgrep -v 10.33.1.1

Just saw a bizarre failure that I think must be a Unifi OS bug.

2022-04-12T23:54:16,623 <30>Apr 12 16:54:16 ubnt dhclient: bound to 100.74.162.37 -- renewal in 117 seconds.
2022-04-12T23:55:40,224 <86>Apr 12 16:55:40 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/dhclient -q -cf /var/run/dhclient_eth0.conf -pf /var/run/dhclient_eth0.pid -lf /var/run/dhclient_eth0.leases -r eth0
2022-04-12T23:55:40,292 <30>Apr 12 16:55:40 ubnt dhclient: DHCPRELEASE on eth0 to 100.64.0.1 port 67
2022-04-12T23:55:44,280 <86>Apr 12 16:55:44 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/rm -f /var/run/dhclient_eth0.pid
2022-04-12T23:55:48,006 <86>Apr 12 16:55:47 ubnt sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/sh -c /sbin/dhclient -q -nw -cf /var/run/dhclient_eth0.conf -pf /var/run/dhclient_eth0.pid  -lf /var/run/dhclient_eth0.leases eth0  2> /dev/null &
2022-04-12T23:55:48,213 <30>Apr 12 16:55:48 ubnt dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
2022-04-12T23:55:48,242 <30>Apr 12 16:55:48 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2022-04-12T23:55:48,242 <30>Apr 12 16:55:48 ubnt dhclient: DHCPOFFER from 100.64.0.1
2022-04-12T23:55:55,691 <30>Apr 12 16:55:55 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2022-04-12T23:56:04,640 <30>Apr 12 16:56:04 ubnt dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
2022-04-12T23:56:11,101 <30>Apr 12 16:56:11 ubnt dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
2022-04-12T23:56:11,164 <30>Apr 12 16:56:11 ubnt dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
2022-04-12T23:56:11,164 <30>Apr 12 16:56:11 ubnt dhclient: DHCPOFFER from 100.64.0.1
2022-04-12T23:56:11,219 <30>Apr 12 16:56:11 ubnt dhclient: DHCPACK from 100.64.0.1
2022-04-12T23:56:17,169 <30>Apr 12 16:56:17 ubnt dhclient: bound to 100.74.162.37 -- renewal in 134 seconds.

This looks like the router just decided to restart dhclient. And the first thing it did was a DHCPRELEASE, breaking my connection. I have no idea why the router did this but it looks like Starlink responded quickly to the requests the router was making.

Faking Geolocation in Firefox

One mild annoyance with Starlink is geolocation doesn’t work very well. A lot of sites identify me by my IP address, which is the satellite base station somewhere near Winters, CA 100 miles from me. Even if they use the browser’s geolocation API to get my location my computer, since I don’t have a WiFi connection Firefox seems to fall back on that same IP based location.

Anyway, there’s a simple solution in Firefox. Open the URL about:config and search for “geo”. Edit the value of geo.provider.network.url and change it from the default (a Google service) to a static answer. Here’s what I use, for Grass Valley:

data:application/json,{"location": {"lat": 39.22, "lng": -121.06}, "accuracy": 1000.0}

Note this JSON blob is not a Javascript Geolocation API response; it must be some special backend API. Mozilla has their own location API, I wonder why they use Google’s in Firefox?

It’d be nicer to have a browser extension to manage this for me. There used to be a consensus open source choice, Location Guard, but it hasn’t gotten an update for two years. There’s a bunch of spammy looking clones on the Firefox store I won’t trust. Location Guard might still work but when I briefly tried it I couldn’t see how to give out a specific location, only enable their privacy fuzzing.

Note that browser location spoofing won’t be good enough to fake out sites that really care what your location is. They’re probably using your IP address to locate you, or some other more devious means. But it’s a nice solution for ordinary apps that are just trying to do something simple.

Also note setting a single static location is probably a bad idea for a mobile device like a laptop or phone.

Gaming: Starlink vs Path of Exile

I’ve been using Starlink since March. I’m also a gamer. While Starlink has gotten a lot better for gaming it’s still not perfect. See this lag graph for an example. Basically every few minutes the game freezes for a second or so and I’m 95% sure it’s Starlink packet loss. It doesn’t make the game unplayable but it is annoying.

https://i.imgur.com/6Xi4Xk8.png

Path of Exile is unusual in that the default network mode is lockstep. It only draws a frame if it receives a network packet from the TCP stream, so any packet loss and retransmit delays is immediately visible. Most games compensate for network flakiness by guessing at what probably should have happened and then catching up once the network resumes again. PoE has the option to do that too, but by default they show you exactly what’s coming in on the network. No packets, no updates.

So it’s a nice example of how Starlink’s momentary outages can cause problems. You won’t notice it streaming a video or loading web pages. You’ll see occasional hiccups in a live videoconference. In PoE you see little lag spikes.

I have more proper monitoring for similar loss: see my latency graph based on sending 5 pings at once every 5 seconds. Each red dot is packet loss. It’s really quite good but you see some latency spikes and a few lost packets here and there.

https://i.imgur.com/fNh1BVP.png

(I also posted this to Reddit.)

Starlink improvements

I’ve been running the TIG stack monitoring my Starlink connection for about 3 months now. I made a couple of posts to Reddit recently about the results of that. Bottom line: both latency and packet loss have improved significantly. Latency to 8.8.8.8 dropped from 44ms to 37ms average around July 15. And in the last month or so packet loss dropped from 2.1% to 0.6%.

Here’s a copy of the two reddit posts.

Latency improvement around July 15: 44ms to 37ms.

Noticed something interesting in my automated monitoring; my latency has improved. I’m measuring with pings to 8.8.8.8 every few seconds using Telegraf. The average has been about 44ms for a long time, dropped to about 42ms starting July 9, and starting July 15 dropped to 37ms.

It’s hard to accurately measure performance with a connection as variable as Starlink, but I have enough consistent data I think this is a real trend. Graph is here: https://i.imgur.com/fwuG2Yc.png

https://i.imgur.com/fwuG2Yc.png

I don’t know where latency improved. The changes in the graph don’t seem correlated to firmware updates. There’s no obvious change in bandwidth, although measuring that accurately is really hard. The latency improvement could well be in the terrestrial links between Starlink ground stations and Google DNS; that’s not very interesting. Or maybe it’s in the satellite network itself. No way of really figuring it out from here I think. But FWIW I’ll append a current MTR.

 Host                   Loss%   Snt   Last   Avg  Best  Wrst StDev 
 1. 192.168.3.233        0.0%   189    0.5   0.4   0.2   0.6   0.1 
 2. 136.22.110.161       0.0%   188   35.9  31.1  21.2  55.4   6.6 
 3. 142.250.163.162      0.5%   188   33.2  30.8  19.5 141.2  10.5 
 4. 108.170.242.225      0.0%   188   33.5  30.3  19.8  50.4   6.2 
 5. 108.170.236.61       0.0%   188   34.5  31.4  21.5  59.8   7.7 
 6. 8.8.8.8              0.0%   188   35.1  30.6  19.2  56.8   7.4

Packet loss improvement: 2.1% to 0.6% over three months

My packet loss has improved over the last three months: from about 2% to 0.6% by my measurement. Don’t get hung up on the absolute number but I think the improvement trend is real. See below for more numbers and the graph here: https://i.imgur.com/RCqI6mp.png

https://i.imgur.com/RCqI6mp.png

Nothing significant has changed at my site. What I’m seeing is consistent with what Starlink has been telling us: reliability should be improving as they fill out the constellation. My antenna is mounted on a roof in Grass Valley, CA with some minor tree obstructions. I’ve been hoping with more satellites that Starlink could work around the obstructions; there was a promise a few months ago of a firmware update to do that.

https://i.imgur.com/ju86o54.png

Anecdotally I’ve been using Starlink exclusively on my desktop computer for about 8 weeks now. It used to be annoying about 10 times a day to have to wait for 5-10 seconds for the network to respond again. Now it feels like 2 times a day. But that’s just perception, the numbers in my report say more.

Unfortunately I’m having a hard time getting a great graph of the trend but it should be visible in the graph linked above. I’m also seeing a similar trend in Dishy’s own reported drop rate. Here’s the average packet loss percentage from my pings along with Dishy’s average drop rate over 7 day periods starting at various times:

  • Week starting 5/1: 2.1% / 0.024
  • Week starting 6/1: 2.0% / 0.027
  • Week starting 7/1: 1.0% / 0.008
  • Week starting 7/13: 0.6% / 0.006

FWIW the same ping tests with my old fixed wireless WISP was about 1% packet loss. But those were just one-off lost packets. Starlink’s multi-second outages have been annoying. They’re getting better!

Appendix: my ping data comes from Telegraf’s ping plugin. I’ve got it configured to send 5 pings at a time, every second. As always, when measuring with ICMP ping all sorts of other things could explain changes in behavior. But in this case the ping data confirms my general perception and also Dishy’s own reported drop rate.

Obstruction improvement: 0.7% to 0.07% in the last month

The recent info email update got me looking closely at my obstruction reporting stats. Historically I’ve had about an 0.74% obstruction rate thanks to a few trees. In the last 7 days it’s been 0.070%, or 1/10th the rate. You can see the graph of Percent Obstructed here: https://i.imgur.com/tJmK04q.png. A second related graph is Seconds Obstructed: https://i.imgur.com/LjcQWvE.png

Note these are Dishy’s own reported numbers, similar to the graph you get in the app. This trend is entirely consistent with my own monitoring with pings. I think in the last month the planed “Connecting to the Best Satellite” has finally come to full usage.

(One in a series; I’ve recently posted other posts here on packet loss and latency improvements. I’d like to do one more post measuring lengths of outages, those 10 second failures we used to get. I think that’s also improved significantly but they haven’t gone away entirely.)

https://i.imgur.com/ygfFagX.png

A false bandwidth result

I noticed the following graph (that is false) of Speedtest by Ookla results showing bandwidth decreased around August 1.

I wrote a whole long ass exploration of why my Starlink bandwidth might have decreased. It’s all wrong! Turns out somehow Speedify got re-enabled on my server August 1, I don’t know how. And Speedify’s VPN servers typically cap out about 120 Mbps for me. That’s it, that’s why my bandwidth went down.

Unfortunately this invalidates all my network monitoring data from August 1 to August 6. Doesn’t invalidate any of the data posted above, that was all in July before this change. But I will need to remember going forward to ignore all the weird changes I started seeing August 1.

I’ve removed Speedify entirely from the Linux box.

Starlink Dishy: getting some deeper status

This blog post contains details on some hidden status method from Starlink’s user terminal, including what satellite it’s currently talking to.

I’ve been hacking around a bit with Dishy, the Starlink user satellite terminal. They provide some nice consumer tools for basic status: am I connected, what kind of bandwidth am I getting, a basic graph of history of outages. And a new feature, a fancy 2d map of where it thinks obstructions are (ie: the trees around you).

Behind the scenes Dishy implements a gRPC server with lots and lots of data. And happily the server supports reflection, so you can interrogate it for features. They keep adding new features! Mostly I’ve interacted with this using the starlink-grpc-tools package; it hides all the gRPC and just provides some command line programs for dumping data to CSV, InfluxDB, whatever. It’s quite nice! But it’s limited in that it only supports some of Dishy’s methods. There are others!

gRPC software

Ironically I have no experience working with gRPC. The hacking tool of choice seems to be grpcurl which lets you invoke methods via the command line. That’s a little low level so I am using grpcui which gives a simple web UI to gRPC servers that support reflection. There’s lots of other options for a tool like that btw.

So, what other gRPC methods are hiding in there?

dish_get_context

First try is a jackpot; dishGetContext. It mostly returns some stuff in other methods; device_info, obstructions, etc.

Update: lol that didn’t last long. Now when I call the method I get “PermissionDenied”, I think because of a firmware update. It was working on firmware a4908729. It’s now failing on firmware 4990ce8d.

But it also returns a bunch of information that looks to be about which satellite Dishy is currently talking to! It will tell me my cell ID (shouldn’t change?), a satellite ID, a gateway ID, and a “seconds to slot end”. It looks like Dishy swaps satellites every 15 seconds. The satellite IDs correlate pretty well with what a satellite tracker says. There’s also a “backup beam” that turns on sometimes after packet loss. It’s all super cool!

device_info	
id	ut01000000-00000000-000XXXXX
hardware_version	rev1_pre_production
software_version	990b956d-a7fc-4c9b-a3ab-c09a309ac425.uterm.release
country_code	US
utc_offset_s	-28799
obstruction_fraction	0.0064355433
obstruction_valid_s	178496
cell_id	1142511
pop_rack_id	38
seconds_to_slot_end	3.531043
device_state	
uptime_s	178780
initial_satellite_id	1186
initial_gateway_id	544
on_backup_beam	true

Here’s a quick little shell script to monitor cell, satellite, gateway, and also a ping to 8.8.8.8 once a second.

while :; do
  grpcurl -plaintext -d '{ "dishGetContext": {} }' 192.168.100.1:9200 SpaceX.API.Device.Device/Handle | 
    jq  '.dishGetContext|.cellId,.initialSatelliteId,.initialGatewayId,.onBackupBeam,.secondsToSlotEnd' | tr '\n' ' '; 
  ping -c 1 -W 1 8.8.8.8 | awk -F/ '/^rtt/ { print $5 }' ; 
  sleep 1;
done   

Unimplemented methods

I went through all the other methods in the gRPC stuff. I skipped the ones that starlink-grpc-tools already supports like “status”, etc. Sorry to anyone else but for me I already knew what those did.

Unfortunately all the other interesting looking methods I could find returned errors suggesting they aren’t implemented. get_next_id, get_location, a bunch of wifi_ methods I suspect are in the router (not Dishy).

dish_emc: Fast Switching

One last method looked interesting, dish_emc. That API call seems mostly to be about RF radio state; channels, modulation details, etc. But there’s a fast_switching flag. Maybe fast switching is a frequency thing. But my hope is that it’s related to a promised feature where Dishy predicts obstructions and switches to new satellites to avoid them. My real hope is that this feature isn’t yet turned on and turning it on will magically make my Internet better.

So I turned it on: "dish_emc":{"fast_switching": true}}. I did that today around 11am on 2021-06-27. It didn’t immediately break my Internet so.. good? I’ll check back in 24 hours to see if it had any change. It may amount to nothing though.

Update: after 24 hours I think making this API call did nothing. Either the API isn’t implemented at all, or fast_switching was already on, or it doesn’t make a difference whatever it does. My money is on the “not implemented at all”. Here’s a graph of drop rate; I made the change right about the middle of the time axis here.

dish_emc looks like it returns status data too. But calling it, all the results are 0 or false. Maybe it’s not implemented or has some lockout. Here’s the result from that set call:

is_test_device	false
uuid	
timestamp	0
state	
sky_search_state	
snr	0
seconds_until_schedule	0
snr_uptime	0
cplane_uptime	0
percent_scheduled	0
cplane_updates	0
downlink_throughput	0
uplink_throughput	0
connected	false
sys_uptime	0
gps_latitude	0
gps_longitude	0
gps_pdop	0
rf_mode	0
phi	0
theta	0
rx_channel	0
tx_channel	0
t_dbf_max	0
t_center	0
baseline_heating	0
additional_heating	0
total_heating	0
target_total_heating	0
auto_power_snow_melt_enabled	false
voltage	0
rx_beam_state	0
tx_beam_state	0
half_duplex_state	0
manual_tilt_enabled	false
tilt_angle	0
pll_tx_lock_detected	0
eirp_exceeded_threshold	false
eirp_scale_override	0
idle_override_enabled	false
theta_override_enabled	false
theta_override_value	0
phi_override_enabled	false
phi_override_value	0
rx_chan_override_value	0
tx_chan_override_value	0
sky_search_override_enabled	false
fast_switching_enabled	false
modulation_override_value	0
force_eirp_failure	false
force_pll_unlock	false
ut_ine_success	0
rf_ready	false

Starlink obstruction map

Sometime around June 3 Starlink pushed a handy new feature, a full map of obstructions in Dishy’s view. Previously it only told you about obstructions in each of 12 slices of the circle; now it’s got a two dimensional map.

That corresponds to what I expected; I have a tall tree to the Northeast. Not sure about the lesser blob to the north but presumably it’s a second tree. Unfortunately while these obstructions look small they really do affect my connection meaningfully. Dishy spends most of its time looking to the north so that side matters more.

FWIW the way this feature seems to work is a new gRPC endpoint in Dishy itself called dish_get_obstruction_map. The older 1752790c firmware doesn’t support it; I only started seeing the map when I upgraded to db6b5d22. That was release about June 3.

(Vaguely related; I maintain a crowdsourced list of Dishy firmware revisions.)

My Grafana / Starlink setup

I did a bunch of work setting up Grafana to track my Starlink system and promptly forgot about it! Documenting it now.

I’m graphing Starlink stats using InfluxDB and Grafana. Telegraf is not involved.

The data collector is from starlink-gprc-tools. It runs as a background process and writes data in to InfluxDB. I haven’t changed the code from sparky8512’s repo, although I do have my own fork on Github.

I’ve installed a frozen copy in /usr/local/src on my Grafana server. Here’s the “collect” script that fires off the background process. This runs forever, no need for cron:

#!/bin/bash
stats="status usage obstruction_detail alert_detail ping_drop ping_run_length ping_latency"
interval=60

cd /usr/local/src/starlink-grpc-tools
source venv/bin/activate

python ./dish_grpc_influx.py -U starlinkstats -P PASSWORD -t $interval $stats

I haven’t really configured Grafana yet. I found some stock dashboard (in the repo?) that looks like the screenshot below. But it’s storing a lot more stats and I should drill into it at some point.

24 hours of Starlink ping performance

I finally got my TIG monitoring stuff to do a useful ping test of Starlink performance. See the graph below; it’s the result of sending 5 pings a second to 8.8.8.8 and measuring average response, packet loss, etc. I’m not positive but I believe the scale of this is 1 pixel = 60 seconds, or 60 samples. The way Grafana works, any time you see a red dot indicates there was some packet loss in that interval.

That’s an average of 45ms and 1.4% packet loss. 8.8.8.8 is just about next to the ground station at the other end of the satellite; if anything it responds faster to pings than the ground station that’s hop #2 on my traceroute.

Here’s a similar graph for the last 30 minutes, with 1 pixel = 1 second.

Within the 5 pings sent in one sample there’s not much variance in latency. But there is latency on the scale of minutes. Not sure if that’s me switching satellites, or me being buffered because of time division multiplexing, or what.

The really annoying thing is the packet loss, the red dots, particularly in an outage like at 18:30. Those correspond to real noticeable ISP outages of 5-20 seconds at a time. They seem to mostly happen when there are no satellites in view or when the only one is hiding behind a tree that’s in the way. That should get better as they add more satellites to the constellation.

45ms is pretty good for space based Internet! Sonic.net gets me 5ms on their fiber network, but they are astonishingly great. My fixed wireless WISP is more like 70ms.

ISP data usage pre-Starlink

Before I had Starlink, I was downloading about 175 GB a month via my WISP. My data cap is just about double that, 350 GB, although I’m not sure they enforce it. Note this isn’t really all the Internet I would like to use; because it’s only 12 Mbps and I have the cap in the back of my mind, I avoid making really big downloads and truck files in with a hard drive sometimes instead.

As you can see from the months of March and April my usage of the WISP is way down now that I have Starlink. No surprise; I’ve shifted my heaviest uses of traffic (game console, TV, my desktop) over to it.

I’m stuck paying for both ISPs for awhile; Starlink isn’t quite reliable enough.

Starlink bandwidth in practice

I’m downloading a big PS5 game right now (Returnal) which seems like a reasonable practical bandwidth test for Starlink. Here’s the router’s graph of throughput

Average: 123 Mbit/sec

So there you have it. An average of 120 Mbit/sec over 3 minutes, The graph shows throughput every 3 seconds so you can see the extreme variability; moment to moment the bandwidth swings between 20 Mbit/sec to 300 MBit/sec. Honestly I’m surprised TCP can cope with this kind of variance and converge to a reasonable speed! Other tests suggest there’s not a lot of buffering in Starlink’s infrastructure, so I don’t think that’s smoothing anything out.

Note the gap where bandwidth fell to zero at the start; that’s a legit failure and occurred several minutes after the download started.

And here’s a graph of the whole 56GB download period; average 160 Mbit/sec, took just about an hour. On my old 12 Mbit/sec WISP this would take about 13 hours (and possible cost me $1/GB in data overage fees).

161 Mbit/sec

OpenWRT vs Starlink: DHCP leases

Finally captured a rumored bug as it was happening. After Starlink Dishy resets itself, the home router can’t get a working Internet connection. (Note: this is not using Starlink’s router). Folks report various ways to fix it, often by plugging in Starlink’s router temporarily. I think resetting your home router alone is sufficient. Or even less intrusive; resetting the WAN port. Some folks on Reddit call this the “DHCP loop” behavior.

In summary; Dishy hands out a temporary IP address 192.168.100.100 with a very short DHCP lease. This seems to confuse routers which keep renewing the temporary address rather than getting a permanent 100.64.*.*/10 address.

Dishy behavior

Dishy is itself a DHCP server; it acts more or less similar to a cable modem. The reported behavior of Dishy is that right after it reboots and before its acquired satellites, the DHCP server hands out an address of 192.168.100.100 to any router that asks as a temporary address. Crucially, the DHCP lease on this is a tiny 5 seconds. It also has a gateway of 192.168.100.1 (Dishy itself) but this gateway doesn’t really work.

Once Dishy configures itself with Starlink it changes and instead gives out a semi-permanent CgNAT address like 100.71.6.46. It expects the router to switch to this new address, the published final gateway is something like 100.127.255.3. This DHCP lease is for 5 minutes.

Everything about what Dishy is doing makes sense to me and seems reasonable. The only slightly odd thing is the 5 second DHCP lease on the temporary, but presumably that’s set because Dishy knows it wants to swap the temporary address out quickly.

OpenWRT behavior

Unfortunately OpenWRT doesn’t react well to Dishy’s DHCP hijinx. In practice what happens is OpenWRT stays stuck at the old 192.168.100.100 address and never switches over. here’s a screenshot of the bad state in OpenWRT’s status panel:

I tried prying in to OpenWRT a little more closely to see what was going on. I’m fairly ignorant of how it works though, so didn’t get far.

The router is running a persistent process to maintain this DHCP lease:

udhcpc -p /var/run/udhcpc-eth0.pid -s /lib/netifd/dhcp.script -f -t 0 -i eth0 -x hostname:OpenWrt -C -O 121

That all looks normal enough. Unfortunately I wasn’t able to capture the DHCP traffic or otherwise debug the request/responses that were going on. However, syslogging was helpful:

Logs for normal operation, once every 2.5 minutes:
Apr 7 18:05:16 OpenWrt netifd: wan (1527): udhcpc: lease of 100.71.0.14 obtained, lease time 300
Apr 7 18:07:46 OpenWrt netifd: wan (1527): udhcpc: sending renew to 100.127.255.3

First DHCP success after router reboots:
Apr 7 18:15:15 OpenWrt netifd: wan (1527): udhcpc: sending select for 192.168.100.100
Apr 7 18:15:15 OpenWrt netifd: wan (1527): udhcpc: lease of 192.168.100.100 obtained, lease time 122
Apr 7 18:15:15 OpenWrt netifd: Interface ‘wan’ is now up

Afterwards, once a minute:
Apr 7 18:35:37 OpenWrt netifd: wan (1527): udhcpc: lease of 192.168.100.100 obtained, lease time 122
Apr 7 18:36:38 OpenWrt netifd: wan (1527): udhcpc: sending renew to 192.168.100.1

So here’s the weird thing. The router was given a lease of only 5 seconds. But it seems to be ignoring that and just blindly renewing the lease every minute, pretending it’s a 122 second lease. Worse it’s asking to renew the existing address and Dishy is gamely letting it. What we want is for the router to get a new address, not perpetually renew the old one.

I suspect all this buggy behavior is triggered by Dishy’s slightly odd short DHCP lease. But without digging in to OpenWRT’s code I don’t really know.

Update: the 122 seconds comes from Busybox/udhcpc’s code.

/* paranoia: must not be too small and not prone to overflows */
/* timeout > 60 - ensures at least one unicast renew attempt */
if (lease_seconds < 2 * 61)
	lease_seconds = 2 * 61;

I first tried to fix this by sending SIGUSR2 to udhcpc; that signals it to release the address. The release went through but OpenWRT wasn’t smart enough to then decide to get a new address. (Reading the udhcpc docs, I should not be surprised this did not work). I finally just clicked the “reset” button next to the WAN port in the OpenWRT UI; that caused it to fully reset the link and get a new working address via DHCP. And all is well.

Bottom line: something needs to convince OpenWRT to get a new IP address after Dishy is fully configured. That should be automatic but it’s not working. Manually forcing a new IP address fixes it.

Updates

Currently running busybox 1.30.1-6 (for udhcpc) and netifd 2021-01-09-753c351b-1.

Someone on Reddit with the same problem.

I posted to OpenWRT forums about the problem.

Telegraf / InfluxDB / Grafana

For years and years and years I’ve been using Munin to monitor servers. Sure it’s old and limited but it still worked reliably and simply without too much software to install. But I’ve finally modernized, mostly so I could collect more data off my Starlink satellite.

I went with the combination of Telegraf, InfluxDB, and Grafana. The so called “TIG stack”. The end result is a system that works remarkably like Munin. Only instead of crappy Perl scripts there’s a clean fast Telegraf agent collecting data. The simple MTRR databases are replaced with InfluxDB, which seems a bit complicated for the purpose but works well. And rrdtool’s old busted graphs are replaced by Grafana, a very fancy enterprise-level dashboard construction system.

I followed a couple of guides for installing stuff: this one and this one. The install breaks down to “install some packages from third party repos” followed by “configure Telegraf and Grafana”.

The configuration is.. not simple. First you have to set up the database with a user, etc. Use the default names! They are baked in to things you will be using either. Then you have to set up Telegraf to log what you need. You can do this incrementally, you don’t have to get it all right at once, but there’s a whole lot of options and things to learn about. I think it took me almost two hours to tweak to what I wanted.

Grafana’s the real monster though. One nice thing about Munin is if you started logging a new number with a plug, the rest of the system would automatically figure out it should graph that number and show you. Not so with Grafana; instead you have to go through a very powerful but complicated web configuration to develop your systems. Fortunately Grafana is pretty good at auto-detecting variables and making some suggestions. The Explore query system is also good at figuring out what you might have in the database.

But the real win with Grafana is you can load other people’s dashboard designs from a community sharing site. For instance, I’m graphing most of my Telegraf system data using this dashboard. Notice how they helpfully supply a Telegraf config too; you can just copy and paste that stuff in and it will probably work.

Anyway, now I finally have some Starlink monitoring using sparky8512’s tools. It doesn’t use Telegraf but has its own little agent to log to InfluxDB directly, plus a sample Grafana dashboard. The dashboard is pretty limited, I’ll probably spend some time configuring my own eventually. But what’s there works for now.

Grafana Starlink screenshot

I was inspired by this Starlink enthusiast and his speedtest charts. Ironically the Starlink setup doesn’t give any speed tests, but I’ve added that using this telegraf plugin. Note if you use that you must install SpeedTest.net’s own client, not the one in the default Ubuntu repos.

All in all I’m pretty happy with the TIG stack. Despite (or maybe because of) all the complexity the new system consumes a lot less CPU than Munin did. And it’s way more flexible and modern. Sometimes it’s good to update to new things. It’s a shame it’s so complicated to configure though; it’s hard to imagine how Ubuntu could ship this as an easy turnkey install.

Starlink firmware revisions

Starlink doesn’t publish any sort of patch notes or update log. It’d be nice to have a community maintained list of firmware releases with whatever notes we can figure out.

Update: there’s now an editable spreadsheet of firmware revisions that should be updated in the future. The list below will not be updated.

See above; this data will go out of date.
4/1/2021   3912b4a3-9eaf-4f9e-81a3-18d8c837a26e.release
3/26/2021  b44f4294-6a78-4a57-b41c-5b613617086a.release
3/24/2021  bbd50ae9-da59-4f1d-b0e4-57c776b31ad1.release
3/22/2021  5f1ea9d9-7896-44da-821a-7a1ab07e78b9.release
3/21/2021  39d476b5-2102-44ec-bb7e-e526cc8f94f8.release
3/18/2021  d61f015c-556a-42b4-ac91-d8e41d157871.release
3/17/2021  19f05dfc-9d07-4989-b47f-87c8f87b0a25.release
3/09/2021  a8a9195a-8258-4dfc-8b5e-15f272cc2436.release
3/3/2021   848e54d2-015a-49cb-a814-34d7c5fc7e1a.release
2/19/2021  a95d0312-a6de-412e-9379-c6bee964f9e0.release Added mastNotNearVertical, slowEthernetSpeeds
2/15/2021  7db91a39-b61e-43fe-8bbe-ecb570197cae.release
2/9/2021   e68dfc80-fa1a-4fa4-9b21-d7ee2a918496.release
2/1/2021   3a1d5d0c-c93b-40b8-a884-021a9c1da1dc.release
1/24/2021  d9aff5fa-0334-49bc-b69d-b92a9c7871fa.release
1/9/2021   48b97eee-bda8-4593-b1d2-785ad4e493de.release (100 ms spikes gone)
12/19/2020 0a3e5881-1312-453f-9c97-8aa7fa2abb89.release
12/11/2020 e09928da-4e31-4040-a34e-61d38c10b37f.release
12/6/2020  5eb22757-5bc1-440f-ab64-9d5053986827.release
11/29/2020 37f8cd77-1e7c-47ea-b1a5-de99ebf16dee.release
11/23/2020 56d5e0aa-c1e8-4d25-aa65-dd8699aaaf62.release (SNR capped at 9)
11/20/2020 e2447448-74b0-42f7-b6c8-2bb5a608871a.release
11/10/2020 New version: ____758.release
11/?/2020  Old version: ____654.release
10/26/2020 ???

Sources:
https://www.reddit.com/r/Starlink/comments/lww8xx/starlink_firmware_update_on_332021/
https://www.reddit.com/r/Starlink/comments/m49cte/new_firmware_had_to_use_starlink_router_to/gqtbp7t/?utm_source=reddit&utm_medium=web2x&context=3
https://www.reddit.com/r/Starlink/comments/m8fpi3/starlink_version/grhaoa2/?utm_source=reddit&utm_medium=web2x&context=3

Starlink: router required?

Woke up this morning to my fancy new Starlink system not working. The culprit seems to have been the new firmware update. It applied but Dishy wasn’t working; lots of details in this Reddit post.

Annoyingly, the fix was to plug Dishy into Starlink’s router. It started working immediately. It’s still working, too, even though I plugged it back into my own router. (I haven’t tried rebooting Dishy yet.. I wonder if it will keep working?)

I sure hope Starlink doesn’t make their router mandatory. It’s really not suitable for anything other than the simplest home networks. It’s fixed at 192.168.1.*, has literally no configuration options other than the wifi password. I guess worst case I could put a second router in front of it and it’d be mostly harmless but it’ll add yet another layer of unnecessary NAT.

Update: a couple of Reddit commentors have said the real problem isn’t Dishy needing some magic config from the Starlink router, it’s that routers aren’t handling DHCP right. Read that linked post for a nice description of what Dishy is doing on startup. Before it’s got satellite lock it sends out the not-useful 192.168.100.100 IP address with a 5 second DHCP lease (very short!). Then it switches to a second IP useful 172.16.*.* IP address once it’s set up, with a 5 minute lease. The theory is some routers fail to update DHCP and switch to the new good address. I’m a little skeptical OpenWRT is doing something so dumb but since a couple of folks have offered it as an explanation I’d have to test it to be sure. Just have to wait for the next failure.

Speedify and multipath

Trying to make my Starlink setup reliable enough to use regularly, I think I hit on a good consumer solution: Speedify. It’s a VPN service whose client on your desktop / laptop computer is smart enough to bond two Internet links. It can use extra links to boost speed or reliabilty or both. It seems to work. I’m using this to paper over Starlink’s unreliability. I imagine it’s particularly useful to bond crappy hotel wifi with a cellular hotspot (assuming you have two wifi adapters.)

Before I go on about Speedify I want to mention Multipath TCP. That’s a general technology for doing something similar. The Linux kernel has support and there’s various implementations but I can’t tell if any of them are really usable; a lot look like research projects. The emphasis on TCP is also a limitation, I’d like a redundancy solution for all IP not just TCP. Kind of a different problem though.

The main thing I know about Speedify is I was watching a Youtube video and had an open ssh session and unplugged my ethernet cable that connects me to Starlink. But the video never stopped and the ssh session stayed alive, presumably using the Wifi backup to my other ISP. That’s neat! Also speed tests show I’m getting the full speed of my Starlink, at least sometimes, so it’s not constrained to the lowest common denominator. So far I’ve lost 0.4% of pings to 8.8.8.8 over most of an hour; that’s better than I see using either ISP alone.

The Windows install experience is a dream. Installs smoothly, autodetects your links, sets it all up and you’re running on Speedify in seconds. There’s a free no-account-required option for initial testing, limited to 2GB. The UI is pretty slick too, with decent monitoring and configurability.

One drawback is that Speedify seems to require different actual network devices to bond. What I’d like to do is use a single ethernet adapter for both my ISPs and have Speedify bond two separate gateways. It doesn’t have the UI to do this. (Maybe there’s a way to set up a virtual ethernet device in Windows? Dunno.) I’m working around this by having plugged in a separate WiFi adapter that’s connected to one ISP, with the ethernet to the other. That works fine actually.

Another drawback is that Speedify is a VPN service terminated in a data center. In my case, Fremont CA. That adds latency. Also a bunch of video services like Netflix and Amazon now refuse to serve video to VPN datacenters because they’re so often used to work around country restrictions, etc. Speedify has a special “turn this off for video” feature, but of course video is exactly when you might most want to have Speedify. Finally some folks complain that Speedify makes their links slower than necessary. Speedify, for their part, says you should expect 200-300Mbps.

A final limitation is that Speedify doesn’t give a lot of control over what it’s doing. The user can choose the bonding mode: speed, streaming, or redundant mode. Speed and redundant seem to be two extremes: either maximize performance (but no redundancy) or maximize reliability. Streaming mode is a “smart” middle ground; it monitors each stream and decides when you need more redundancy. Mostly they’re talking about audio and video streams but the marketing copy mentions gaming, too, so presumably that’s also covered. There’s some more technical details here.

Here’s a couple of DSL reports speed tests. These aren’t the best I’ve seen; I’ve gotten 150/20 through Speedify, which is about the limit of my Starlink throughput. (Although I’d expected 50Mbps on the uplink, needs further testing.) I noticed on the download speed test it was only using the Starlink whereas on upload it saturated both my Starlink and my WISP. I think that makes sense. First, redundancy seems more important on the uplink than the downlink. Second, my upload was really limited during these tests and so the WiFi meaningfully could supplement it.

I wish they had a whole-network product! You can probably hack something up using their Linux support and a clever router, their product page indicates they indicate they’re sort of OK with you doing that but might charge you accordingly. That’s what got me interested more generally in multipath technologies for Linux; it’d be nice to have a router designed to do this. I think the easiest way forward with what Speedify has right now is to set up a Raspberry Pi with three ethernet ports; two for inputs from ISPs, one for output to a regular router. You might be throughput limited by USB speeds (for the extra ethernet ports) or encryption speed, but I’m not sure what the limit would be.

I’m really impressed with Speedify so far. I’ll probably sign up for a plan ($3 to $6 a month) for at least a year, to tide me over with Starlink. Gonna run out my free trial here first though.

Update: after most of a day of using it I bought a year of Speedify. $65 with the coupon DEAL10. It really does work as advertised. None of my sessions dropped; World of Warcraft, persistent TCP sockets, two hour idle ssh sessions all stayed open and working. Really solid.

I’m not positive the performance is great but I may be overanalyzing. I’m in Streaming mode and I should be getting at least my Starlink speed, if not better. In practice the speed tests tell me I get about 100/15. Peak is 190/22. Then again that’s just about the average Starlink performance now, so maybe it’s right. It seems pretty smart about using my slower WISP link a lot less but the backup has been there for me every time I needed it. Latency seems fairly variable too, seeing 20-80ms where I’d expect 20-50ms from Starlink. None of this is bad and compared to an unreliable link, it’s terrific. But it does make me think if Starlink gets to 100% reliability I may stop using Speedify.

Now I want a little 4 ethernet port Linux box to run as a Speedify bonding appliance in front of my router! That, or Speedify built right into a router. That should be doable in theory. For some reason Speedify has positioned itself as not a router; they’re real clear it’s a client product.

Update 2: OpenMPTCrouter looks like a plausible base for a roll-your-own alternative to Speedify.

Starlink monitoring and hacking notes

Some collected information and what I’m doing about monitoring Starlink / Dishy’s performance. Note most of this stuff works with just Dishy, not the Starlink-supplied router.

Some facts

  • Dishy listens at 192.168.100.1 on ports 22, 80, and 9200. ssh, http, and gRPC. It also uses port 9201 for a different flavor of gPRC HTTP (for Android?)
  • The mobile app works by fetching web pages and/or gRPC data from Dishy.
  • Starlink’s router does gRPC on port 9000 and is the preferred source for the mobile app. It implements the ping interface, the thing that tells you your Fortnite lag.
  • You can view the stats direct from Dishy in any browser at http://192.168.100.1/support/statistics
    Note you have to open the browser window to max width; it’s formatting for the screen size, not window size.
  • Another Dishy URL: http://192.168.100.1/support/debug

Docs

Software

  • pinginfoview: nice lightweight Windows tool for testing if the connection is down
  • Starlink gRPC tools: Python code for reading gRPC stats off Dishy
    This seems to give very complete data from Dishy, including the history of dropped packets
  • dishyworld: a working dashboard based on Prometheus and Grafana.
    Has ambitious goals of collecting data from many users.
  • starlink-cli: Go code for getting Starlink data. I think it’s the base for dishyworld?
    This seems to give less data than the Python library above, at least by default
  • Better than Nothing Web Interface: a PHP dashboard
  • Better than Nothing stats: a mockup of a planned Javascript dashboard, successor to above
  • Obstruction view. Takes the debug info from Dishy about obstructions and draws it. I know the mobile app can do this but I can’t figure out how to do it again!
My obstructions

Starlink gRPC tools

This Python library seems to give more useful output than the other command line tool I could find so I’m pursuing it.
The full list of commands:
status, obstruction_detail, alert_detail, usage, bulk_history
ping_drop, ping_run_length, ping_latency, ping_loaded_latency

Be sure to read the code / docs for detailed notes on what all the fields mean. There’s some surprisingly sophisticated analysis going on when it’s looking at data samples to, say, characterize the latency of the last 5 minutes.

Some useful examples:

$ python dish_grpc_text.py -v status
id:                    ut01000000-00000000-000353f7
hardware_version:      rev1_pre_production
software_version:      848e54d2-015a-49cb-a814-34d7c5fc7e1a.release
state:                 CONNECTED
uptime:                130100
snr:                   9.0
seconds_to_first_nonempty_slot: 0.0
pop_ping_drop_rate:    0.0625
downlink_throughput_bps: 9143.5830078125
uplink_throughput_bps: 4387.2421875
pop_ping_latency_ms:   29.5
Alerts bit field:      0
fraction_obstructed:   0.006759106181561947
currently_obstructed:  False
seconds_obstructed:    266.0

# Dropped pings over the last hour
$ python dish_grpc_text.py -v ping_drop
current counter:       130202
All samples:           43200
Valid samples:         43200
Parsed samples:        3600
Sample counter:        130202
Total ping drop:       48.06441651657224
Count of drop == 1:    26
Obstructed:            23
Obstructed ping drop:  19.7899159938097
Obstructed drop == 1:  19
Unscheduled:           0
Unscheduled ping drop: 0.0
Unscheduled drop == 1: 0

# Bandwidth used for last 5 minutes
$ python dish_grpc_text.py -v usage -s 300
current counter:       131151
All samples:           43200
Valid samples:         43200
Parsed samples:        300
Sample counter:        131151
Bytes downloaded:      1327843
Bytes uploaded:        813427

Some of the ping_drop statistics are confusing; this github issue has notes on what they mean. “Unscheduled drop == 1” seems to exactly correlate to the stats UI’s “No Satellites” display, and “Obstructed drop == 1” is the Obstructed count. It’s less clear to me how to reconstruct the beta downtime statistics.

Starlink for real, LAN notes

March 9 is the first day I use Starlink for real for a whole day from my desktop computer. I’m writing this blog post VIA SPACE.

I mounted Dishy on a J-mount that was already installed at my house. (An adventure in itself. Had to drill some holes in the mount’s pipe, then figure out how to lift Dishy up 15 feet on a ladder and place it in the mount. Then hold it in place, some 20 pounds, with one hand while trying to thread through the bolt with the other. I am not good at this kind of thing.)

After my ground experiments I was worried there’d be too many obstructions. Glad I tried it anyway; turns out to be fine. On the ground I think at worst it reported 1 hour of obstructions in 12 hours of operation and in general it was complaining things weren’t right. Up on the mount it’s reported 2-4 minutes of obstructions in 12 hours. That may still be unacceptable; if those 2-4 minutes are actual outages it will be quite disruptive. But it seems to be working well right now.

Optional Gateway setup

The network setup has been tricky. I got some good advice on Reddit about how to set up the Starlink as a secondary Internet gateway. I want most of my house to keep using my old ISP but have Starlink as an option on the LAN while I test it. Turns out to be relatively simple to set that up, the basic idea is to set up a router for the Starlink without DHCP and then manually choose to use that as your Internet gateway. But it does require a second router and some manual fiddling on the clients you want to use Starlink. Note the router Starlink sends you is not flexible enough to do this; you need something more hacker friendly. I’m using an old TP-Link Archer C7 running OpenWRT.

(Fun side fact; this old OpenWRT I have has a funky configuration on sshd. To talk to it I have to do this
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 root@192.168.3.233)

My regular LAN is 192.168.3.* with a router running on 3.1 serving DHCP in the range of 3.6-3.223. Dishy is plugged into the WAN port on a second router with DHCP and WiFi turned off. The router is configured with a static IP address of 192.168.3.233 and the LAN side of the router is plugged into the LAN ethernet switch with everything else. So other computers on my LAN work just like normal and are mostly unaware of the Starlink and its router. However if I want I can statically configure a machine to use 192.168.3.233 as its Internet gateway instead of the DHCP default of 192.168.3.1 and now it’ll be using Starlink. It’s a bit of a PITA; in most operating systems if you want to change any network parameters you have to go full static config. But that’s not too hard.

My current static config:
192.168.3.233: the Starlink router
192.168.3.230: my desktop PC
192.168.3.213: my phone

The first setup I had for Starlink was even simpler; I just used their router and gave it a different WiFi SSID. Didn’t plug it into the LAN at all. That meant any wireless device could choose to use Starlink in my house just by choosing the other SSID. But that doesn’t give my full LAN access. Handy hack, not a great long term solution. (I sure wish I could tell OpenWRT to run DHCP on the wireless network only, though.

A hilarious mistake the first time I set up the second router; the Starlink router had DHCPv6 turned on in a hidden setting I didn’t notice. All the Windows machines in the house noticed the new option and switched to IPv6 preferentially. Amazingly that all worked and all my PCs were suddenly about to talk to the IPv6 net via Starlink! Google worked great, but I think sites that were IPv4 only weren’t working in this Frankenstein configuration. I don’t normally use IPv6 ever.

The public address the rest of the Internet sees when I’m on Starlink is 206.214.236.64 at the moment. That’s a tiny little block that belongs to SpaceX: 206.214.236.64/27, or 32 addresses. Presumably they have more blocks?

I think I’m going to be living with this opt-in configuration for awhile. Right now I have to go statically configure every device I want to swap over; my desktop, my game console, my Roku... It’d be better if I had a smarter DHCP server that I could direct to give out a different gateway depending on who is asking. Pretty sure Ubiquiti’s DHCP server can’t do that, but I bet some Linux option is flexible enough.

Alternately I wonder if there’s a way to leverage VLANs to do this. Have one VLAN use one gateway, the other use the other. But I want my devices to all mostly be on the same LAN regardless, so that doesn’t make a lot of sense.

Static route for Dishy at 192.168.100.1

Dishy itself is set up kind of like a cable modem. It runs DHCP on its output port (the one plugged into the WAN) and is handing out an address like 100.65.6.117 with a big fat netmask of 255.192.0.0. Gateway is 100.127.255.0. Turns out that’s a reserved shared address space, a special IP block kind of like 10.* or 192.168.* but reserved specifically for the needs of carrier grade NAT. Yup, Starlink is CGNAT, in addition to your home NAT. (But see also IPv6).

Dishy also is listening on 192.168.100.1; that’s where all the diagnostic services live. (More on that later). That means it’s handy to set up a static route for that. Here’s how I set it up in OpenWRT on the Starlink router at 192.168.3.233 so that any device using that as its gateway could talk to Dishy.

Static route on OpenWRT

I tried adding a similar static route for 192.168.100.1 on my Ubiquiti main house router (with a gateway of 192.168.3.233). But while that route works locally on the Ubiquiti machine itself, nothing else in the house seemed to work right with it. Not sure what’s going on; packets for 192.168.*.* seem to be routed out my WAN interface and into my ISP! That’s not right and I have no idea why it’s happening.

On my Linux server I managed to connect directly to the Dishy diagnostics by doing this:

ip route add 192.168.3.0/24 dev eno1
ip route add 192.168.100.1/32 via 192.168.3.233

Weird I had to add the ethernet route for my subnet first! If I didn’t do that I got “Error: Nexthop has invalid gateway” because the routing table had no idea how to get to 192.168.3.233. This was the routing table my Linux box had before I touched it:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.3.1     0.0.0.0         UG    0      0        0 eno1
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0

If I read that right all packets out of the Linux box were sent to the router, even for other hosts on the same LAN. Ping timings confirm that. That’s unnecessary, right? Adding an interface route for the LAN seems the right thing. I didn’t make any of this permanent; doing so is going to require messing with Ubuntu’s hideous network config mess.

Performance

Overall speed is highly variable; sometimes I see 20 Mbps, sometimes I see 150 Mbps. I don’t have a good feel for what’s causing that yet, need to collect more data. Here’s a DSL reports speed test I ran just now. (Hilariously you have to lie and say you’re on a WISP; it refuses to believe something this low latency is satellite). Note the upload speed was 40Mbps for the first half of the test.

153 Mbps down, 15Mbps up

Latency is also very good, better than my ISP. I left a ping to 8.8.8.8 running for about 3 hours last evening and got these results”

N: 11482
Total: 406168.800000
Average: 35.374395
StdDev: 35.046247
Median: 30.800000
Min: 19.800000
Max: 2088.000000

However.. I sent 11758 ping packets and only got back 11482 responses. That’s 276 lost packets, or 2.3%, or about one a minute. That’s not great. Using my desktop interactively I’ve noticed a few small periods of the network not working, web page loads failing. The Starlink mobile app shows little outages in that period too. So that’s no good. I have yet to determine if TCP connections break in these outages or if they just get paused for a few seconds.

Update: see below about TCP connections. More testing reveals a packet loss of about 1-2% over long period of time. Compare 1.2% for my WISP during the busy evening when it’s congested. The difference with Starlink is when there’s an outage it’s typically like 5 seconds, not just a single packet.

There were 21 pings that took longer than 100ms, and 5 that took longer than 1 second. Worst was 2088ms.

Histogram of ping times

So that’s some preliminary stats; I’m very impressed. We’ll see how it feels after a few days of regular use. I also have a whole ‘nother blog post coming with more detailed information gathered from Dishy’s own diagnostics. Apparently there’s a whole gRPC server there folks have reverse engineered, so you can get the same data the mobile app shows.

Speaking of which, here are some screenshots from the mobile app:

Bottom Line

(Update after most of a day of using Starlink as my ISP)

It’s impressive. It works well. It definitely has some outages right now that make it not suitable today for a 100% reliable Internet connection. I trust these will be fixed in the next few months as they launch more satellites. Web surfing, etc mostly worked fine; occasionally I’d get an error that a page couldn’t be loaded and then when I reloaded a few seconds later it worked fine. Continuous sessions did not work well; I got booted out of World of Warcraft like 4 times in an hour. Unacceptable. I also couldn’t keep an idle ssh session open, probably because of aggressive NAT connection expiration but maybe for other reasons. I haven’t tried Zoom yet but I’m guessing it’ll will have to reconnect.

Update 2: continuous sessions work better than I thought. Idle ssh connections drop after 10 minutes, but put even modest trafficon them and they last hours. So do unadorned netcat client/server connections with traffic. WoW does disconnect when there’s momentary Starlink outages but that may well be WoW’s doing, deciding if it hears nothing after a few seconds the game is down. Zoom worked fine through the outages; I’d get a few second hang but the call would resume immediately with no trouble.

I ran a naive ping monitor to 8.8.8.8, 1 ping a second. Over 5 hours I sent about 18,000 pings and 126 failed; 0.7% rate. That doesn’t sound bad except the failures correspond to outages where the whole network seemed down, it wasn’t just a hiccup.

Bottom line; it works great for streaming media and loading web pages. Real time interactive stuff suffers a bit. Latency is excellent, it really is the 20-50ms advertised. But occasionally the link goes down for 4 seconds and sessions fail.

Why does the link go down? It’s the beta period; Starlink says this is expected behavior. Dishy’s stats says I’ve had 3 minutes downtime from obstructions, 45 seconds because of lack of satellites, and 3 minutes “beta downtime”. Looking closer I think all of that downtime will stop happening once there’s more satellite coverage. At least, I hope so. I’ve been following along on https://satellitemap.space/ and every outage I’ve experienced is correlated with a gap overhead.

I’m a little less clear why sessions go down. TCP is designed to handle packet loss, but his is acting like the TCP sockets are actively terminated when the link is down for just a few seconds. That seems completely unnecessary! I’d love to talk to a Starlink engineer to understand why. Update: after some more experimenting, basic TCP sessions don’t go down. Idle TCP sessions get cancelled after 10 minutes, a common NAT problem. And some applications like World of Warcraft seem to decide the link is dead when Starlink has a 5 second outage. But active ssh sessions and simple netcat servers persist through the short Starlink outages.

I’m super excited about this new service. I’ll keep using it daily for awhile and see how it feels. Also curious now about bonding with another ISP link for more reliability. Speedify looks promising.

My house is just east of the Arbuckle ground station

Updates (March 18)

Since writing this post I’ve been using Starlink more and more and made some changes to make it easier.

My Linux server and my Windows desktop now route through the Speedify VPN. This bonds Starlink with my second ISP link to make a more reliable Internet connection.

I’ve set up isc-dhcp-server on my Ubuntu box to serve DHCP and have it handing out special Starlink gateways to hosts based on MAC address. No more manual configuration of each machine! (Fun fact: Roku devices are incapable of having their network adapters configured without DHCP.) There are more sophisticated ways to do this using the “class” configs, but this works for something simple.

group {
option routers 192.168.3.233;
host ps5 { hardware ethernet 78:c8:81:bb:65:15; }
host roku-office { hardware ethernet cc:a1:2b:93:b6:1f; }
}

Starlink install notes

Thinking seriously where I will install my Starlink. I have an existing antenna mount that was for an old fixed wireless system that’d’ be perfect. But it has some obstructions to the north. From what I’ve read on /r/starlink obstructions are definitely a problem. They translate into short outages where you have no Internet. It’s still OK for bulk downloads, they just resume after the 15s outage. But I’d find that absolutely intolerable myself, particularly for anything interactive. That’s been my experience so far with a temporary ground installation. The roof mount will be better but not a lot; the ground install is experiencing 2 minutes of obstruction outages frequently.

The obstruction cone is going to get smaller over time as they add more satellites. I expect it’s worse down where I am at 39N, which is about as far south as they advertise service right now.

Here’s the worst of the obstructions. These trees will be good and leafy in a few months. And they’re right to the north, the worst place to be. Note the stuff in the dark grey area isn’t a problem, that’s below Dishy’s field of view. But everything above is.

The existing antenna mount. The pipe facing up is between 1 1/2″ and 2″ in diameter (it’s no longer round).

And a fun photo of my old 1 Mbps fixed wireless link (that was on that mount) with Dishy.

The flat platform that the bottom half of that mount is welded to is 5″ x 7″. The bolt holes are inset a small amount, roughly half an inch? I was wondering if I could use Starlink’s Volcano mount to mount to it. Their plate is bigger, 6″ x 9″. But I think I can drill holes to match my 5x7 mount; the plate bulges out to meet the pipe but it looks like there’s enough room. Willing to take the $24 risk at least.

BTW SpaceX is not providing detailed engineering drawings of all this mounting stuff. Dumb! There’s some fairly precise measurements of the pole in this reddit post. Here’s some dimensions on the Volcano mount. Also a popular photo set, someone measuring the stuff with calipers and displaying all the measurements upside down.

Starlink first impressions

I got into the Starlink beta!

First impression on setup is mixed. The unboxing experience is fantastic. Setup is super easy; it’s all pre-plugged in, you just power it all up, wait for Dishy to acquire a connection in a few minutes, and connect to Starlink’s router. That all kinda worked for me. In reality though I had trouble finding satellites the first time, so after 10 minutes I moved it. While I moved it Dishy got unhappy and rehomed the dish. Fair enough, but then it stopped responding entirely. So I power cycled it and let it do its thing and ignored it for awhile. It told me it had an hour of uninterrupted decent connection. Great! First speed test on their suggestion of fast.com was 150/? Mbps, but second speed test on DSL Reports was more like 60/30. Fast again was 75. I looked and now Dishy was telling me there were obstructions. Given the obstruction is a tree with no leaves, I can imagine why it’d be inconsistent. Anyway, it all left me feeling like I can’t quite trust it. Then again I don’t trust anything wireless.

Speaking of wireless, Dishy has one big wire. A heavy shielded ethernet cable coming out of it, 100 feet. And it is hardwired, you cannot remove it. That needs to be plugged into a special PoE injector that has AC power. That injector has an ordinary jack for the second cable, the one that goes to the router. (Although apparently it is also PoE). The crazy thing is Dishy is drawing 100 watts; it’s a heavy thing and it has a motor to tilt. 100 watts is an awful lot for Power-over-Ethernet! The subreddit discussion says it’s a proprietary thing too, not like any other PoE.

Starlink ships a router device which by all accounts is not very good. It’s only minimally configurable. Apparently it also isn’t up to routing traffic as fast as you’d like; folks report their networks are faster without it. The good news is there’s no need to use their router. Dishy works more or less like a cable modem; it has a little DHCP server handing out a 100.78.*.* address (subnet mask 255.192.0.0). Most any router can use this if you plug Dishy into your WAN port on a regular router. Note that Starlink is using carrier grade NAT inside their own network, so most situations are double NAT.

The beta reality today is not great. They just opened up to Northern California (I’m at 39N) and coverage is not perfect, so you have a few minutes downtime a day. Maybe more because of system maintenance. So you can’t really use it as your primary ISP 24/7. I’m currently planning on hacking up some networking config so I can use it as an opt-in basis when I’m willing to put up with the unreliability. All this is promised to improve in just a few months as they launch more satellites.

Obstructions are a real problem for a proper installation. You have to put the dish somewhere with an unobstructed view of the north sky. That’s a 100 degree cone, so even though the tall trees are 20+ feet north of me they’re somewhat in the way. I imagine most rooftops in suburban areas will be OK, but now you’re mounting a dish on the roof. And Starlink has no installation support; you’re on your own. They do have a mobile app with an augmented reality camera display telling you whether your chosen spot is OK. (It’s confusing; wave it around to where it shows you errors like “turn left”, then start looking for the dark grey areas in the AR view. It doesn’t care about those. You want all the non-greyed-out areas in the AR display to be clear of obstructions. You need to move a lot to test everything.) The good news is the device will still work with some obstructions and the obstruction story is getting better as they add more satellites. The bad news is obstructions near the horizon are the worst, which is of course exactly where they are most likely to be.

I think it’s real strange they’re selling this service without any sort of support. They just ship you the dish in the box and say “good luck”. It’s mostly easy enough but mounting that dish with a good clear view is not something most homeowners are going to know how to do. I hope they have some sort of service or reseller program for ordinary folks who don’t know about dish mounts and running cable through their walls. I’m going to hire someone local who has experience installing WISP antennas and/or satellite dishes.

Overall despite a little rockiness at first I’m pretty excited about Starlink. I’m thrilled to finally have an alternative to fixed wireless in Grass Valley. The service plan on paper is good: 100 Mbps or more down, 50 Mbpsish up, 20ms latency, no data cap. $100/mo with a $500 initial cost. Compare to my WISP which is 12/2, 50ms latency, and also $100/mo. Looking forward to the competition!