ping question

Lothar Braun mail at
Wed Nov 22 15:18:11 UTC 2006

Hi Waqas,

On Tuesday 21 November 2006 19:14, Waqas Toor wrote:
> may be its a simple question to post here,
> what is the difference between ping -b and arp ... both are for
> broadcasting over the network

"ping -b" will send out an ICMP echo request on the broadcast address. Every 
host on the subnet that has the same broadcast address responds with an ICMP 
echo reply.

arp, on the other hand, will broacast a request for a MAC addresson the 
network. If a host has the requested ip address, then it will send an arp 
reply which contains its MAC address. It should not be possible to make an 
arp request on the broadcast address because the broadcast address doesn't 
belong to a specific host.

> 2nd question is
> how can i retrieve the hostnames by broadcastring over the network
> my broadcast address is
> ???
> i need results in the form of
> hostname1
> hostname2
> hostname3
> so on
> any suggestions

You could write a script that loops through all ip-addresses within your 
subnet and makes a DNS lookup using host.

Best regards,

Verschiebe nicht auf morgen, was du auch übermorgen besorgen kannst
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the ubuntu-users mailing list