Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone

I try to use a Multicast Address and port like 224.1.2.3 : 12345.

I manage to create the listener part, to make it worked with the Windows 8 and its multiple network board, I had to specify which network interface is used.
If I try to use the ANYADDR, my program is not receiving the datagram sent by the other PC.

But now, my problem is to send those Datagram from the PC with Windows 8 and with its Hyper-V, I have multiple network interface on that PC.

I already tried to bind my outgoing socket to the local interface before calling sendto without success.

I also tried to set SO_DONTROUTE option, SO_BROADCAST.

Do you have any idea ?
Windows Configuration ?
...

thanks.

Edit: I disabled one of the Hyper-V virtual network interface to keep only the "real" interface, but nothing change, I still cannot send Multicast Datagram to anyone (even itself)
Posted
Updated 4-Aug-14 1:53am
v2

 
Share this answer
 
Comments
Pascal-78 4-Aug-14 14:07pm    
I do not run my program in a VM, Hyper-V is at the same level and add a network interface seen by the host to interact with one of the VM (Windows Phone Emulator) but no VM are activated.
This work-around does not apply to my problem.
My program can add membership to 224.1.2.3 Multicast address and receive datagram sent by other PC. But it cannot send any datagram to those other PC or itself using this multicast address.
[no name] 4-Aug-14 17:51pm    
"I already tried to bind my outgoing socket to the local interface before calling sendto without success."

Did the bind fail? Did SendTo return an error? Or did the packet disappear?
Pascal-78 5-Aug-14 2:54am    
The bind did not fail.
sendto returned the number of bytes emitted.
But the packet did not reach any listener of the Multicast group (over the network) or on the same PC (the same program), and, of course, I already tried deactivating the firewall.
The same program works perfectly on other PC. The main difference is the Operating System : Windows 8.1 (Desktop) fails, Windows 7 (OK), Windows 7 in a VM in the Windows 8.1 (OK !).
While reading this article : Datagram loss when you run a multicast receiver application in Windows 8 and in Windows Server 2012[^]

I found the BFE Service (Base Filter Engine).

Stopping this Service, and all works fine.

Now I need to configure this service to not filter my multicast datagram.

May be by adding (extract from the article):
a REG_MULTI_SZ type registry key named UdpExemptPortRange to configure the port ranges that are exempted from the base filtering engine. To do this, create the registry key in the following path: HKEY_LOCAL_MACHINE\System\CurrentControlSet\services\Tcpip\Parameters\
 
Share this answer
 
Comments
Pascal-78 5-Aug-14 5:37am    
UdpExemptPortRange doesn't work...
To use Multicast, you must have a IGMP Querier somewhere on the network. It can be hardware (included in some switch or router) or software.

I have made my own IGMPQuerier as a Windows Software. an other one is available on google

but sometimes 1 querier is not enough (too short TTL ?). In my case, I put 2 queriers on each side (the PC with the multicast listening group/port, and the PC sending to the multicast group/port) and everything work fine now.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900