brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: advertise the more specific route too when subnet routes overlap

Network and access
~/tips/tip-tailscale-overlap-routes

sudo tailscale set --advertise-routes=10.0.0.0/16,10.0.0.0/24

Keeps traffic flowing when the router with the more specific subnet route goes offline.

Overlapping subnet routes have a trap that only shows when a router goes down.

Tailscale picks the most specific matching route, with longest-prefix matching. If the router with the more specific route goes offline, it does not fall back to the broader one. Traffic to those addresses is dropped.

The docs give the fix. Let the broader router advertise the specific prefix as well:

sudo tailscale set --advertise-routes=10.0.0.0/16,10.0.0.0/24

Now both routers cover 10.0.0.0/24, so one of them can take over.

It is a quiet failure. Nothing errors, the traffic just goes nowhere, and it looks like the target host is dead. I would write the advertised routes down next to the network diagram, since this is the kind of thing nobody remembers a year later.

Caveat: new routes still need approval, in the admin console or through autoApprovers. And the same advice on SNAT applies: leave --snat-subnet-routes at its default unless you know why you want source addresses preserved.

It costs one extra prefix in a command and removes a failure that is very hard to spot.

Further reading: Subnet routers, On this site: Linux needs tailscale set –accept-routes to use subnet routes, On this site: autoApprovers saves you the clicks in the admin console

More Network and access tips scp -3 alice@server-a:/var/backups/db.sql.gz bob@server-b:/srv/restore/ tailscale exit-node suggest tailscale lock sign nodekey:1abddef1 tlpub:abcdef12 wg genpsk > peer1.psk Table = off All Network and access tips (163) All topics

Link