Search code examples
c#igmp

How to get System.ServiceModel.DiscoveryClient to use IGMP?


I have a D-Link DGS-1210-10P with two VLAN's (10.104.. and 192.168..) I have a video camera on each network, and two NIC's in my computer on each network.

With IGMP off on the D-Link, I can discover both cameras using Microsoft DiscoveryClient, and some custom endpoint that allows me to specify which NIC to send the mutlicast message out. With IGMP turned on, I only see the 10.104 network.

foreach (string id in getAdapterIds())
{
   DiscoveryClient dc = new DiscoveryClient(new UdpDiscoveryEndpointByNIC(DiscoveryVersion.WSDiscoveryApril2005, id));
   dc.FindProgressChanged += _real_FindProgressChanged;
   dc.FindAsync();
}

I do see IGMP messages in Wireshark (both sources are my computer, and the destination is the correct multicast address)

Source        Destination     Protocol Length Info
10.104.128.37 239.255.255.250 IGMPv2   60     Membership Report Group
192.168.1.1   239.255.255.250 IGMPv2   60     Membership Report Group

My question boils down to: Does DiscoveryClient automatically join IGMP groups and should just work? I'm suspecting that there is just some fundamental IGMP understanding I'm missing, or some D-Link router setting.


Solution

  • As usual, I find answers right after I ask questions:

    The problem was that IGMP on the router was not set up correctly.

    So,

    Corporate VLAN

    1) Disable "Querier State", because the corporate switch is already a querier

    2) Enable "Fast Leave"

    Isolated VLAN

    1) Enable "Querier State", because each VLAN needs a querier

    2) Enable "Fast Leave"