-
Notifications
You must be signed in to change notification settings - Fork 823
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
Can't send or receive fragmented UDP packets #6082
Comments
Great analysis, thank-you. Was able to reproduce here. FWIW, Hyper-V with a bridged network is okay. Your step 3 can be quantified with something like the following, for (eg) 5000 'a' characters plus a newline:
It is almost certainly the cause of at least some percentage of people's |
Have experienced the same problem over a long period sending UDP packages from a container in Docker for Windows. This was a problem while running Docker on Hyper-V and still is a problem running Docker in WSL2. Between the Docker containers packages are sent and received correctly. Trying to receive packages from the Docker container at the Windows host, it seems like fragmented UDP packages exceeding MTU are dropped. |
Experiencing the same problem here. I have a service which send stats by UDP and so it's unusable from inside the WSL... |
Until this is fixed, I use
In the following example I forward the 8094 UDP port to the remote server:
Finally open a terminal on the local client machine (WSL) and execute the following command:
Now on the local client machine (WSL) if you push with UDP on |
This still does not work as of |
Any ETA? |
This is a major bummer. Took a long time to figure out what was happening. Running
Any update on this? |
Have the same problem to send WakeOnLan (udp) packets from wsl... Will try the TCP routing workaround! |
As mentioned by jstarks here, there's a workaround that might help you |
Same problem, waiting for solution. |
Just a note that the issue seems to be that all fragmented packets from the wsl2 host are dropped; I first experienced it with icmp, confirmed with udp and now also tcp. An easy to reproduce case is to set the mtu in the WSL host lower, say to 1000; then send packets (icmp, udp or tcp) of size 900 and you will see them go through at various points in the network; then send the same packet of size 1100, so the WSL kernel fragments the packet, and it won't make it past the wsl interface to any other interface on the host nor to the network. As everyone, would sure love a fix. (I'll probably just switch to a vm, as this makes WSL networking pretty flaky.) |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Environment
Steps to reproduce
I only ended up testing this issue with UDP and protocols based on it over IPv4.
8080
on some external host usingnc -ul 8080
.nc -u <remote address> 8080
\n
) line / packet from WSL (doesn't arrive at external)test
from WSL to punch through the NAT for the next step (does arrive at external)External host console:
WSL console:
If instead executed directly (outside of WSL) using a version of
nc
compiled for Windows, all packets arrive as expected.WSL logs: Sadly I am not able to include logs due to Feedback being disabled.
Expected behavior
All packets are received at their respective destinations.
Actual behavior
Long packets are dropped somewhere between the physical NIC and WSL. This appears to happen whenever the IP datagram would exceed 1500 bytes in size. This issue seems related to #4517, however the proposed solution of lowering the MTU on WSL doesn't work for UDP since it disregards the MTU entirely and I am not connected to a VPN or similar. Running
sudo tcpdump
under WSL will produce output similar to the following upon sending these packets:Running Wireshark or
tcpdump
on the Windows host while receiving such long packets will show the fragmented package arriving, and Wireshark succeeds in displaying the reassembled UDP packet. Runningsudo tcpdump
in WSL produces no output related to the large packet.The text was updated successfully, but these errors were encountered: