MTU probing? #76
|
Any plans to implement Path MTU discovery? At the moment the default value is 1280 (which is the minimum for IPv6 according to RFC8200) and setting a higher value results in this warning: Line 163 in d0eb96e ..yet setting it to a higher value seems to be working fine in my case (just tried 1400). Theoretically we should strive to set the maximum possible MTU for performance reasons. Finding out the maximum value could only be done empirically(?). Other similar software implements this (e.g. ocserv https://gitlab.com/openconnect/ocserv/-/blob/master/src/worker-vpn.c#L1184) - any plans to do something similar? Thanks. |
Replies: 3 comments 1 reply
|
Hey. If you check my profile, I recently released a Rust version for the nativetun mode which does PMTU discovery. Also, increased MTU on the tun interface never worked for me, only increasing the initial packet size had some success. If I ever have the free time for Thanks for the idea! |
|
Hi guys, For MASQUE protocol, Cloudflare recommends 1361 bytes IPv4 and 1381 bytes IPv6 for full functionality. The 1361 minimum is specifically because IPv6 inner traffic requires 1280 bytes minimum packet size + 53 bytes MASQUE encapsulation + 28 bytes IP/UDP headers. --mtu 1419 = maximum inner MTU for standard 1500-byte Ethernet, zero fragmentation risk, I suppose. My tests indicate that there is no packet loss with this value. |
|
I completely forget to mention that |
Hey. If you check my profile, I recently released a Rust version for the nativetun mode which does PMTU discovery.
usquewas primarily a proof of concept/research client and I never got to implement these features myself. On my residential home internet anything over the initial hardcoded value introduced dropped pkts, so I wouldn't want to increase the defaults, but PMTU discovery sounds like a good idea.Also, increased MTU on the tun interface never worked for me, only increasing the initial packet size had some success.
If I ever have the free time for
usqueagain, I will definitely add this too.Thanks for the idea!