Re: multicast packet delivery: filtered by interface?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Group membership is per interface, but adds an address for
the entire machine. So, if anybody joins a group on eth0,
everybody with matching binds will receive packets from
eth0 for that group, but nobody will receive any packets for
the same group from eth1, unless someone has also joined
on eth1. Joining a group determines if the machine will receive
packets for that group on that interface (only).

The binding determines packet delivery for a particular
socket. If you bind to INADDR_ANY, you'll receive all
multicast and unicast packets from any interface for that
port. If someone else joins a group and sends a multicast
to that port, you'll receive those multicasts, because the
binding allows it.

If you bind to a particular group address, you'll receive
packets  for that group and port from any interface
where anyone on the machine has joined that group.

If you want a particular socket to receive only multicasts
from a particular group and interface, you need to bind
to that group and use SO_BINDTODEVICE to restrict
it to that interface. You also, of course, need to join the
group on that interface to make sure there is at least one
join for it.

                                +-DLS

--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux