Re: Why does sending multicast UDP require a gateway?

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

On 2011-03-30, Grant Edwards <grant.b.edwards@xxxxxxxxx> wrote:
> On 2011-03-30, Andrew Lunn <andrew@xxxxxxx> wrote:
>>> It's being sent via a socket that's bound to a specific interface, so
>>> I wouldn't think that would be a problem.
>> Ah, O.K. 
>> Maybe try it anyway?
>>> I can see that if you're sending from an unbound socket, you might
>>> want a way to specify which interface to use for sending multicast
>>> packets.  But without such a route, the only thing that makes sense to
>>> me is "send it out all of them".
>> And on a multi homed machine that might result in the group receiving
>> two copies of the packet when both multicast routers pick it up and
>> send to the RP.
> True.
> According to RFC1112, you only send a multicast packet on one
> interface. If the application doesn't specify an interface, a default
> interface is used.  IOW, discarding the packet is not correct:
>    Second, for hosts that may be attached to more than one network,
>    the service interface should provide a way for the upper-layer
>    protocol to identify which network interface is be used for the
>    multicast transmission.  Only one interface is used for the initial
>    transmission; multicast routers are responsible for forwarding to
>    any other networks, if necessary.  If the upper-layer protocol
>    chooses not to identify an outgoing interface, a default interface
>    should be used, preferably under the control of system management.
> It turns out this was fixed in the FreeBSD sources in 2001:
> I'll work up a patch...

It turns out that doesn't fix the problem.  That only handles the case
where you've explicitly asked the multicast packets to go out a
specific interface.  Binding a socket to an interface and sending
multicast packets still doesn't work unless there's a route to the

One would think that binding the socket to a particular interface
would cause sent packets to go out that interface, but I guess not...

Grant Edwards               grant.b.edwards        Yow! Here I am in 53
                                  at               B.C. and all I want is a
                                dill pickle!!

Before posting, please read the FAQ:
and search the list archive:

[Index of Archives]     [Linux Embedded]     [U-Boot V2]     [Linux Kernel]     [Linux MIPS]     [Linux ARM]     [Linux for the Blind]     [Linux Resources]     [Photo]     [Yosemite]     [ISDN Cause Codes]     [eCos Home]

  Powered by Linux