Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Aug 2006 10:29:19 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Benjamin Lutz <benlutz@datacomm.ch>
Cc:        questions@freebsd.org
Subject:   Re: IP broadcasts
Message-ID:  <44D3136F.6010608@infracaninophile.co.uk>
In-Reply-To: <200608040602.29799.benlutz@datacomm.ch>
References:  <200608040602.29799.benlutz@datacomm.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig6C51B2D2DFF09EFFDAF6FBDF
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

Benjamin Lutz wrote:
> Specifically, I've been sending IP packets to broadcast addresses, once=
 to=20
> 10.0.0.255, which is the local subnet's broadcast address, and once to =

> 255.255.255.255, which as I understand it, is a general broadcast addre=
ss.=20
> The first broadcast (to 10.0.0.255) works, the second (to 255.255.255.2=
55)=20
> 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 255.255.255.255 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 255.255.255.255 as the broadcast=

address complementary to the default network, which is 0.0.0.0/0.

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 appropriat=
e
-- such as dhcp clients needing to communicate on a network before knowin=
g
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.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       7 Priory Courtyard
                                                      Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
                                                      Kent, CT11 9PW


--------------enig6C51B2D2DFF09EFFDAF6FBDF
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE0xN18Mjk52CukIwRCD2eAJ9hlJdVcRH+su2CZIQhLabfXOtH9ACgkXsR
3QIhmG7hve1/DfKuz1vwF88=
=+zdW
-----END PGP SIGNATURE-----

--------------enig6C51B2D2DFF09EFFDAF6FBDF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44D3136F.6010608>