Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jan 2007 14:34:42 +0300
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        LI Xin <delphij@delphij.net>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Different behavior of ping'ing INADDR_BROADCAST?
Message-ID:  <20070105113442.GH37482@codelabs.ru>
In-Reply-To: <459D4D88.2030708@delphij.net>
References:  <459D4D88.2030708@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Li, good day!

> By ping'ing 255.255.255.255 from FreeBSD (mostly RELENG_6 with some
> unrelated patches) or Mac OS X, I got response from another subnet (I
> guess that there is some configuration problem in the network, though),
> but no boxes (running various operating systems) on local network
> responds the ping.
> 
> However, with OpenBSD, Linux and Windows, ping'ing 255.255.255.255 would
> get response from local network.

<disclaimer>
I can provide an insight into the packets seen, but no real explanation
if thigs should go that way at this time.
</disclaimer>

When FBSD is pinging 0xffffffff it does not use the Ethernet broadcasts,
when the link-level destination MAC is set to 0xffffffffffff, using some
'known MAC' instead. For the network broadcast address -- it does use
link-level broadcasts.

For me the 'known MAC' is that of our border router that serves as
the default destination. And my box doing the ARP request for the
precisely the IP of the router before pinging 255.255.255.255. You can
try to empty your ARP table and then ping 255.255.255.255 watching
for the ARP requests and the link-level header of the ICMP packets.

> Just curious why there is such difference.  Literally, I think
> INADDR_BROADCAST is supposed to reach local network nodes, no?

I should have a look into the sources -- may be there are some hints
why it works this way.
-- 
Eygene



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