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

Best MTU for L2TPv3 mode with kernel offload? #32

Open
stevefan1999-personal opened this issue Sep 6, 2023 · 1 comment
Open

Best MTU for L2TPv3 mode with kernel offload? #32

stevefan1999-personal opened this issue Sep 6, 2023 · 1 comment

Comments

@stevefan1999-personal
Copy link

If my calculations are correct, this is the best base MTU: Visual packet size calculator — Daniil Baturin

If I want to add batman futher, I have to add another ethernet frame and IP on top of it, so the new MTU would be like this: Visual packet size calculator — Daniil Baturin

I'm not sure if I made the calculations wrong

@neocturne
Copy link
Owner

neocturne commented Sep 7, 2023

I believe there are some issues in the setup you linked (and both links you posted are the same?):

  • An MTU describes the maximum packet size including the inner IP header, so it should not be subtracted
  • A VLAN header should only be included if you intend to run VLANs over fastd

Without VLAN, this results in a total overhead of 50 bytes for L2TP tunnels over IPv4; 54 bytes with VLAN. The overhead without VLAN is also described in the docs: https://fastd.readthedocs.io/en/stable/manual/mtu.html

I assume you intend to run batman(-adv?) inside fastd. As this is another inner layers inside the tunnel interface, it doesn't affect the MTU of the fastd interface - instead, it would have to be the bat0 MTU. bat0 is often bridged with other interfaces though, so reducing bat0's MTU is usually impractical. More commonly, bat0 is left on 1500, and MSS clamping is applied instead to avoid fragmentation by batman-adv.

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

2 participants