Benjamin Lutz wrote: > Specifically, I've been sending IP packets to broadcast addresses, once to > 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 address. > The first broadcast (to 10.0.0.255) works, the second (to 255.255.255.255) > 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 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. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW
Description: OpenPGP digital signature