-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
NAT problem with different mtu #19
Comments
So the PMTU discovery is not working in your setup, thus resulting fragmentation failure in the sending end? I manually set MTU of WAN ethernet(not ppp) interface to smaller than LAN interface and the ICMP PMTU error packet is correctly send back to the sending end by Linux kernel on gateway.
Or you are expecting packets larger than 1492 without "Don't Fragment" set to be fragemented regardless while forwarding from lan to ppp interface? If that is the case, unfortunately einat is not able/very difficult to implement IP fragmentation due to limitation of eBPF. If the kernel or LAN interface is not fragmenting packets, than it would be remain unfragmented regardless the packet would be forwarded to einat hooked WAN interface or not. And einat only alters L3 IP fileds and L4 port fileds in IP packets without incresing packet size, so it should be transparent to kernel network stack. So I guess it's more like a problem of PMTU error message not being received by sending end in your setup? Could you detail the problems you encountered more? Also maybe aligning the MTU to the minimum of all interfaces helps, e.g. set MTU of your LAN interfaces to |
Also try TCP MSS Clamping, https://wiki.nftables.org/wiki-nftables/index.php/Mangling_packet_headers#Mangling_TCP_options Seems like it's the exact solution to mitigate PPPoE MTU problem if PMTUD was indeed working there. This was configured by default on OpenWrt, so I guess that's why there was no such report from OpenWrt user. |
It is true that there is a problem with the remote server replying to mss, after configuring |
Describe the bug
Is there any way to solve the mtu problem?
When using the pppoe network in a conventional router scenario, the pppoe interface requires mtu 1492 or less, and the network interface is usually 1500. This results in that when acting as a ppp <-> lan nat gateway, the gateway will not split the packets, and there will be no pmtu. As a result, the lan interface mtu cannot be used normally when it exceeds 1492.
Expected behavior
A clear and concise description of what you expected to happen.
Configuration
Command-line options:
Target Machine (please complete the following information):
Additional context
Add any other context about the problem here, e.g. network interface information, firewall(iptables/nftables) configuration.
The text was updated successfully, but these errors were encountered: