Open EliasJRH opened 1 month ago
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
Please 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!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Bump for visibility
Wonder if could be related to a missing kernel option? The 5.15. x does not have the option enabled by default, but the 6.6.x
CONFIG_IP_MULTICAST=y
do you have it enabled?
Wonder if could be related to a missing kernel option? The 5.15. x does not have the option enabled by default, but the 6.6.x
CONFIG_IP_MULTICAST=y
do you have it enabled?
By running zcat /proc/config.gz | grep MULTICAST
, I can see that CONFIG_IP_MULTICAST is not set. I'm wondering why this was omitted from the wsl2 documentation if it is required for multicast to work.
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.
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? I'm starting to consider that this issue we're facing could be related... #11966
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.
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.
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