in reply to Re: Same multicast packet received by multiple NICs
in thread Same multicast packet received by multiple NICs

Thanks but I don't think the interface device name or IP matters here. Actually I'm using the workaround to use Perl sockets to listen to the mcast from the NICs then create additional threads to monitor the traffic with tcpdump. It looks clumsy but it works. However, I still have no clue why recv() of a socket mapped to a particular NIC can receives data from ALL NICs listening to the same mcast address:port.

  • Comment on Re^2: Same multicast packet received by multiple NICs

Replies are listed 'Best First'.
Re^3: Same multicast packet received by multiple NICs
by Illuminatus (Curate) on Jun 02, 2012 at 00:42 UTC
    It may depend on your OS. This module creates a socket of type SOCK_DGRAM. These route at the IP/UDP level. I know the module says it can limit you to what's on one NIC, but I'm pretty sure on Linux there's no way to enforce this. The point of multicast is to deliver to every endpoint using that destination address. Maybe the Windows stack has hooks to limit this. I am curious as to why you need to listen for the mcast traffic on a socket if you're using tcpdump to see them as well. You can pass a filter to tcpdump to only see what you're looking for.

    fnord

      Hi, the socket is actually for joining the mcast group to draw the traffic into the NIC. Tcpdump is just for watching if there are any packets flowing through the NIC. Correct me if I'm wrong, I can't join a mcast group with just topdump :-)