Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jul 2003 19:58:34 -0400
From:      Chuck Swiger <cswiger@mac.com>
To:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Re: broadcast udp packets ...
Message-ID:  <3F0F4F2A.7040206@mac.com>
In-Reply-To: <200307111407.04591.wes@softweyr.com>
References:  <200307011800.h61I0MOW001329@hole.shrew.net> <3F01DA79.4080709@mac.com> <200307111407.04591.wes@softweyr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Wes Peters wrote:
> On Tuesday 01 July 2003 12:01, Chuck Swiger wrote:
>> If you have multiple interfaces, a broadcast to 255.255.255.255
>> should go out on all of them.  That being said, the all-ones
>> broadcast address means "all local networks", and most routers will
>> block such traffic from passing on in any event.
[ ... ]
> What we observed on our embedded system is the packet gets sent on all 
> attached interfaces, with dest IP 255.255.255.255, and a src IP of the 
> local address that has the default route.  If there isn't a default 
> route, sending to 255.255.255.255 fails with "no route to host."

Thank you for looking into this.

> This is bogus, so I propose to change it to a special case, where 
> packets sent to 255.255.255.255 will be sent on each attached 
> interface, with src IP of the interface "primary" address.  Does this 
> sound reasonable?  Should it work without a default route?  (I think it 
> should, the special case of the all-call broadcast shouldn't even go 
> into rtalloc.)

Your suggestions sound good.  Sending to an all-ones address should work without 
a default route, so that 'dhclient' and the like can _obtain_ a default router 
by asking via this mechanism.

While it may be the case that implementations of 'dhclient' (or bootpd, NetInfo, 
NIS, SLP, or other form of network autoconfiguration) continue to iterate over 
all of the interfaces explicitly in the code, they shouldn't have to do that to 
work.

Is there a need to consider bridging as a special case, specificly bridged 
interfaces which were not ifconfig'ed with an IP address of their own?

-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F0F4F2A.7040206>