Possible to emulate an IGMP querier in software

igmpipmulticast

I have a L3 switch that does IGMP snooping, but it cannot act as an IGMP querier, and there is no IGMP querier connected to this network.

Would it be possible to implement an IGMP querier in software, so that my L3 switch can snoop on it and route accordingly?

Best Answer

I implemented a proof of concept and found it actually is possible to implement an IGMP querier in software.

My software querier gets treated like the real thing, i.e. clients send their reports when prompted by it, as I could verify with Wireshark, comparing a network with a real IGMP querier, to a network without one but having that software querier running.

The software querier periodically sends "IGMP general queries", and, using WinPCap to capture all IGMP traffic, it is able to send "IGMP specific query" messages in response to "IGMP leave" messages.

N.B. If you want to subscribe to IGMP groups on the same host (and NIC) where you run the software IGMP querier, it seems necessary to use (= spoof) an IP address/MAC address combo different from that of the interface you are using, otherwise my Windows (8.1) e.g. did not properly detect the IGMP version.