Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower ZT_MIN_PHYSMTU #2361

Open
laduke opened this issue Sep 12, 2024 · 2 comments
Open

Lower ZT_MIN_PHYSMTU #2361

laduke opened this issue Sep 12, 2024 · 2 comments

Comments

@laduke
Copy link
Contributor

laduke commented Sep 12, 2024

ZeroTierOne.h

#define ZT_DEFAULT_PHYSMTU 1432

-#define ZT_MIN_PHYSMTU 1400
+#define ZT_MIN_PHYSMTU 576

This seems to work, with a local.conf like this:

{ "physical": {"192.168.82.0/24": { "mtu": 789 } } }

576 is allegedly the minumum for ipv4.

If I set MTU to 510, the real packets are 576 in tcpdump, so maybe 510 is the right minimum.

Was looking at this because people on cell connections get stuck sometimes.
They lower the virtual mtu and that works by side effect.

This way users can set the MTU based on the physical connection.

They could use a different value for IPv6 traffic also.

The constant is used in only 1 place.

@laduke laduke changed the title Physical MTU from local.conf not respected Lower ZT_MIN_PHYSMTU Sep 12, 2024
laduke added a commit that referenced this issue Sep 13, 2024
laduke added a commit that referenced this issue Sep 13, 2024
laduke added a commit that referenced this issue Sep 13, 2024
@pjkundert
Copy link

This seems like something that must be auto-configured. I just had to compute the MTU was 1194 (manually, using ping -M do -s $(( <MTU> - 28 )) <host>) and then set it using ifconfig <interface> mtu 1194.

It is unlikely that 100% of ZeroTier users are going to be able to A) determine that this is necessary, and B) figure out how to do it, and B) repeat the process each time every ZeroTier interface is dynamically re-created!

What's the right solution?

@destroyer5656
Copy link

Yeah I also ran into this issue.

laduke added a commit that referenced this issue Sep 23, 2024
laduke added a commit that referenced this issue Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants