Multicasting / .NET / Windows XP



Windows seems to only allow itself to enroll in a multicast group once,
irrespective of how many NICs are on a given Windows machine.

For example, say I have three NICs on a machine (separate NICs, not just
three overloaded IPs on one NIC), as follows:
192.168.0.100 255.255.255.0
192.168.0.101 255.255.255.0
192.169.0.102 255.255.255.0

No gateways set up on any of these so weird routing issues should not be
relevant. Also, I can see that all three NICs are physically getting the
multicast packet from the switch, so the packet is being physically sent to
the NICs from the network.

Now, if I then have three separate C# programs, and each creates a socket,
binds to one of the three addresses above (none overlapping, obviously, or
I'd get a socket exception), and all three then enroll themselves in a
multicast group (say 224.2.3.4), why is it that only one address will be able
to receive multicast packets?

Even worse, whatever NIC got the first bind to that group, holds it forever
(or at least until the box is rebooted). Say Process B is using
192.168.0.101, and I boot up and start that process. It receives multicasts
fine. but starting the processes A on 192.168.0.100 and and Process C on
192.168.0.102 gives no exceptions on either process, both bind successfully
and successfully enroll in the multicast group, but neither receives
multicasts.

If I then stop all the processes, and reassign process B to 192.168.0.100
and process A to 192.168.0.101 and start them up, process B will receive
multicast packets fine but A and C will not.

I wonder if the .NET runtime is getting in the way of socket ownership, or
is this a Windows limitation?

When I get the time to build some virtual machines, I'll try running each
process in a separate VM and look at the behaviour to see if is any different.

Thanks for any assistance.

Phil
.



Relevant Pages

  • Re: Socket Bind question
    ... To get multicast, many cards filter out multicast in hardware, simply ... vendor; explain ... must one of the NICs, thus the other one blocks any multicast receipts. ...
    (microsoft.public.vc.mfc)
  • Re: Maximum MAC multicast filters? --clarified--
    ... > I want to subscribe to lots of layer 3 multicast groups. ... many NICs use an imperfect hash to filter ...
    (comp.dcom.lans.ethernet)
  • Re: Socket Bind question
    ... must one of the NICs, thus the other one blocks any multicast receipts. ... connected to a different network. ... My understanding of Bind was that if you passed NULL for the IP address ...
    (microsoft.public.vc.mfc)
  • Re: Socket Bind question
    ... Note that multicasting requires that you enable the multicast group, ... if the NICs are on separate cards (as opposed to multiple ... stack, and you can pursue it in one of the network groups, or report it as a bug. ... My understanding of Bind was that if you passed NULL for the IP address then ...
    (microsoft.public.vc.mfc)
  • multicast reception with multiple NICs
    ... Windows seems to only allow itself to enroll in a multicast group once, ... For example, say I have three NICs on a machine (separate NICs, not just ...
    (microsoft.public.dotnet.general)

Quantcast