-
Notifications
You must be signed in to change notification settings - Fork 830
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
Applications running on host not receiving UDP multicast packets sent from WSL2 #12122
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Open similar issues:
Closed similar issues:
|
Diagnostic information
|
Bump for visibility |
Wonder if could be related to a missing kernel option? CONFIG_IP_MULTICAST=y do you have it enabled? |
By running |
By the way, I tested your app with CONFIG_IP_MULTICAST but I have the same issue as you:
Tested with:
Did you find the issue? |
I did not try any solution that would involve setting CONFIG_IP_MULTICAST (to my knowledge this would require using a new kernel in wsl2). For what I was doing, I created a new distro and set its version number to 1 which allowed wsl to share the network interface of the host and that allowed inbound/outbound multicast traffic. Apart from using a kernel with CONFIG_IP_MULTICAST enabled, I'm not sure what the issue could be. |
Wel,, it seems that CONFIG_IP_MULTICAST (I built a custom kernel with it enabled 5.15.153...) is not enough. However, you're right that using WSL1 makes the app work. But something is missing in WSL2 with mirrored... but what? EDITED: @EliasJRH I made it working in WSL2 using: _networkingMode=bridged Creating VMSwitch External for my Ethernet Windows interface._ Setting up systemd & assigning IP... |
Since months observing the release notes, I would appreciate if UDP Multicast would finally work within a Windows 11/WSL2/DevContainer environment. To give some motivation for roadmap priority:Many machinery/industry protocols use derivates of UDP protocols, using UDP Multicast for fast communication and automated discovery. Examples are GigE for industrial vision or Cyclone DDS used in ROS2. Using those protocols independently from the environment is a missing link in context of DevContainers which becoming best practice meanwhile. While UDP Multicast in Linux<>DevContainer (most often used with "host-networking" works well I found no documented success for Windows<>DevContainer till now. So: congratulations that you finally found this solution (sadly I had no time to validate for me). Generally I look for ways to ease the "entry" into ROS2 programming for students coming with their personal devices. A user-friendly solution by default WSL is sorely missed - or just unknown by the public. |
FYI: Tested with latest 2.4.4 prerelease, just in case. Same result, it does not work. |
multicast between Windows host and WSL2 (mirrored) not need CONFIG_IP_MULTICAST=y |
Windows Version
Microsoft Windows [Version 10.0.22631.4249]
WSL Version
2.0.14.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.133.1-1
Distro Version
Ubuntu 22.04
Other Software
Wireshark Version 4.2.3
Repro Steps
First create a
.wslconfig
config file and setnetworkingMode=mirrored
under[wsl2]
as per https://learn.microsoft.com/en-us/windows/wsl/networking#mirrored-mode-networking. File should look likeShutdown and restart wsl2
In wsl2 run program that sends UDP packets to a valid multicast address. I'm using the following python script:
In separate powershell terminal, run program that reads from the same multicast address. I'm using the following python scripts:
Expected Behavior
Receiving script should correctly read packets from multicast address. When both programs are run on powershell, output of receiving script will look like this:
The source ip address will be the ip address from wsl2
Actual Behavior
Receiving script receives no packets. This behavior is particularly strange as Wireshark is able to see these packets
Note that the source ip address is that of eth1, output of
ip addr
in wsl2:Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: