8000 Set correct vxlan0 MTU according to vpn interface by samos667 · Pull Request #34 · angelnu/pod-gateway · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Set correct vxlan0 MTU according to vpn interface #34

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

Merged
merged 1 commit into from
Dec 3, 2023

Conversation

samos667
Copy link
@samos667 samos667 commented Jun 18, 2023

Old PR

It's maybe necessary to add example of usage of "VPN_INTERFACE_MTU" var in values.yaml.
Commented by default with explanation of use case.

@samos667
Copy link
Author

related issue #33

@samip5
Copy link
samip5 commented Jul 3, 2023

Is that -50 only VXLAN overhead or IP too?

@samos667
Copy link
Author
samos667 commented Aug 6, 2023

Is that -50 only VXLAN overhead or IP too?

Sorry I didn't understand the question.
The -50 of MTU is due to the usage of a vxlan tunnel https://dave.dev/blog/2014/06/vxlan-mtu-vs-ip-mtu-consideration/

@samip5
Copy link

samip5 commented Aug 6, 2023

Is that -50 only VXLAN overhead or IP too?

Sorry I didn't understand the question.
The -50 of MTU is due to the usage of a vxlan tunnel https://dave.dev/blog/2014/06/vxlan-mtu-vs-ip-mtu-consideration/

"If the packet contains both IPv4 and IPv6 headers, along with VXLAN encapsulation, the MTU considerations become even more important. When VXLAN is used over an IPv4 network, the VXLAN header adds 50-54 bytes of overhead to the original packet. In the case of IPv6, the VXLAN header adds 54-58 bytes of overhead.

To calculate the required MTU for such packets, you need to take into account the overhead from both the IPv4/IPv6 headers and the VXLAN header. For example:

  1. If the original MTU is 1500 bytes and you're using IPv4 with VXLAN, the VXLAN-compatible MTU would be 1500 - (20 (IPv4 header) + 8 (UDP header) + 50-54 (VXLAN header)) = 1418-1422 bytes.

  2. If you're using IPv6 with VXLAN and the original MTU is 1500 bytes, the VXLAN-compatible MTU would be 1500 - (40 (IPv6 header) + 8 (UDP header) + 54-58 (VXLAN header)) = 1388-1392 bytes.

@angelnu
Copy link
Owner
angelnu commented Dec 3, 2023

Thanks @samos667 - I will also add the new setting to the settings file

@angelnu angelnu merged commit 44dc0b7 into angelnu:main Dec 3, 2023
@samos667 samos667 mentioned this pull request Dec 3, 2023
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

Successfully merging this pull request may close these issues.

3 participants
0