You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tailscale0 MTU seems to be set at a static 1420 bytes. This works fine on clouds that give customers 1500 bytes of MTU, but GCP only gives customers 1460 bytes. So, pings work, but anything more hefty (e.g. SSH) either times out, or takes an eternity to function.
Fixing is a bit tricky, since by definition we don't quite know which path we might be using to peer with people. We could set an ultra conservative 1280b everywhere, but blerg. We could set min(mtus)-wireguard_overhead. Or we could handle PMTU discovery and packet fragmentation in tailscaled.
We've been lucky so far, because most places where folks use Tailscale have 1500b base MTUs. However, this probably explains a couple of mystery "can't connect" bugs we have (e.g. DSL boxes squashing the MTU a little, telcos with weird cell network MTUs, ...).
We probably need explicit PMTUd probing to get 100% (similar to what QUIC had to do), but we can likely get a 90% fix with slightly smarter MTU selection at startup, or forcing a 1280b MTU at the cost of efficiency.
I think @danderson "fixed" this (hardcoded MTU, but to something a bit bigger than 1280) a while back. The real fix is PMTU, so I don't think we should spend time adding config options for it (which people will probably also end up setting wrong and creating hard-to-debug problems; MTU can be constrained by either end of a link).
PMTU isn't exactly a protocol, it's a concept :) There should always be
some way to auto-detect the PMTU, especially if we control the outer
protocol (which we do). With plain TCP (the usual PMTU story) it isn't
always possible to do all the necessary hacks.
ᐧ
Yeah, we run our own NAT traversal logic alongside WireGuard, so we can
leverage that to do "active PMTUd", without relying on intermediate routers
to respond correctly with ICMP. It's the same technique that QUIC uses for
PMTU discovery, and empirically it works well. Then, once we've discovered
a per-peer path, we can synthesize the appropriate ICMP chatter locally to
make things work out.
That's fine, just there should always be a manual switch. I've been working with similar product from another vendor, and all the fancy auto stuff invariably breaks down and some point you just need to set a value and have it be done and working for customers/clients/workers. And yes they swear up and down it does till they find out it doesn't.
I know what you're saying, and it's likely we'll have a manual switch.
On the other hand, tailscale already does a lot of things right that
other VPNs don't do, so I think we have a better chance of getting it
right than most :)
A hardcoded MTU setting is almost never the right answer - the reason
PMTU is a thing, is that the correct MTU is different for every pair
of hosts, and on a mesh network, the hosts move around.
On Tue, Dec 22, 2020 at 12:12 PM Daniel ***@***.***> wrote:
That's fine, just there should always been a manual switch. I've been working with similar product from another vendor, and all the fancy auto stuff invariably breaks down and some point you just need to set a value and have it be done and working for customers/clients/workers. And yes they swear up and down it does till they find out it doesn't.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
Activity
danderson commentedon Apr 4, 2020
wgengine/userspace.go:83: tundev, err := tun.CreateTUN(tunname, device.DefaultMTU)We've been lucky so far, because most places where folks use Tailscale have 1500b base MTUs. However, this probably explains a couple of mystery "can't connect" bugs we have (e.g. DSL boxes squashing the MTU a little, telcos with weird cell network MTUs, ...).
We probably need explicit PMTUd probing to get 100% (similar to what QUIC had to do), but we can likely get a 90% fix with slightly smarter MTU selection at startup, or forcing a 1280b MTU at the cost of efficiency.
bradfitz commentedon Apr 4, 2020
I think forcing 1280 for now is what we need to do, even if it's a little sad. It'll be more motivation to do PMTU.
danderson commentedon Apr 4, 2020
Yeah, much as I dislike that, it's the right call for now.
bradfitz commentedon Apr 5, 2020
Objections, @apenwarr?
sylr commentedon Apr 8, 2020
If this is defaulted to 1280, could this be overriden by an option,
--mtu?apenwarr commentedon Apr 22, 2020
I think @danderson "fixed" this (hardcoded MTU, but to something a bit bigger than 1280) a while back. The real fix is PMTU, so I don't think we should spend time adding config options for it (which people will probably also end up setting wrong and creating hard-to-debug problems; MTU can be constrained by either end of a link).
apenwarr commentedon Apr 22, 2020
Added #311 to properly fix this.
DanielJoyce commentedon Dec 21, 2020
PMTU isn't fully supported, and breaks down if not every router between supports the process. Sometimes you need manual MTU
apenwarr commentedon Dec 22, 2020
danderson commentedon Dec 22, 2020
DanielJoyce commentedon Dec 22, 2020
That's fine, just there should always be a manual switch. I've been working with similar product from another vendor, and all the fancy auto stuff invariably breaks down and some point you just need to set a value and have it be done and working for customers/clients/workers. And yes they swear up and down it does till they find out it doesn't.
Hope for the best, plan for the worst.
apenwarr commentedon Dec 24, 2020
michaelglass commentedon Mar 17, 2022
@sylr as of 1.1.0 you can use the environmental variable
TS_DEBUG_MTUas a workaround.