This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Why does sending multicast UDP require a gateway?
- From: Grant Edwards <grant dot b dot edwards at gmail dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Wed, 30 Mar 2011 14:14:23 +0000 (UTC)
- Subject: [ECOS] Re: Why does sending multicast UDP require a gateway?
- References: <imtmn5$n3f$1@dough.gmane.org> <20110330055332.GO17979@lunn.ch>
On 2011-03-30, Andrew Lunn <andrew@lunn.ch> wrote:
> On Tue, Mar 29, 2011 at 10:33:09PM +0000, Grant Edwards wrote:
>> Somebody I work with has spent the last three days trying to send UDP
>> multicast packets using eCos and the FreeBSD network stack.
>>
>> After quite a bit of trial-and-error we've discovered that you can't
>> send UDP multicast packets without configuring a valid gateway
>> address.
>>
>> That seems broken to me.
>>
>> What are you supposed to do if you're on a strictly local network that
>> doesn't _have_ a gateway? [That is the case for many of our products.]
>
> Hi Grant
>
> In the Linux world you have to do something like:
>
> ip route add 224.0.0.0/4 dev eth0
>
> before multicast works. The kernel has no idea which interface to
> send the multicast packet out, unless you add a route like this.
It's being sent via a socket that's bound to a specific interface, so
I wouldn't think that would be a problem.
> Maybe in the BSD world, instead of defining the interface directly,
> you give the local IP address on the interface?
>
> Maybe this helps:
>
> http://www.freebsd.org/doc/handbook/network-routing.html
>
> In the example routing table is:
> 224 link#1 UC 0 0
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".
Perhaps one work-around would be to always configure a "multicast
route" for 224.0.0.0/28.
--
Grant Edwards grant.b.edwards Yow! I need to discuss
at BUY-BACK PROVISIONS
gmail.com with at least six studio
SLEAZEBALLS!!
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss