Benjamin Lutz wrote:
> Specifically, I've been sending IP packets to broadcast addresses, once to 
>, which is the local subnet's broadcast address, and once to 
>, which as I understand it, is a general broadcast address. 
> The first broadcast (to works, the second (to 
> doesn't.

Hey, if you're trying to ping the whole internet, then it's only logical to
send the packet out via the default gateway...

Seriously though, this is a difference in routing implementations.
FreeBSD seems to be treating the address just like any
other IP address, matching it against the networks and masks it has in
its routing table, and from that deducing that the default route is the
appropriate destination.

Linux on the other hand seems to have code to special case the all-ones
address. Or perhaps it simply recognises as the broadcast
address complementary to the default network, which is

I have no idea if the all-ones IP address is meant to be special or not.
It wouldn't surprise me if treating it that way was a Linux specific
extension.  The sort of case where this sort of thing would be appropriate
-- such as dhcp clients needing to communicate on a network before knowing
what the local IP network number is -- is handled perfectly well under
FreeBSD using layer 2 (ethernet) broadcasts, plus there is already a
reserved IP range specifically intended for contacting DHCP severs in
situations where layer 2 alone won't cut it.



Dr Matthew J Seaman MA, D.Phil.                       7 Priory Courtyard
                                                      Flat 3
PGP:         Ramsgate
                                                      Kent, CT11 9PW

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to