ping question

Lothar Braun mail at lobraun.de
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 192.168.1.225
> ???
> 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,
  Lothar

-- 
Verschiebe nicht auf morgen, was du auch übermorgen besorgen kannst

http://const-cast.blogspot.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20061122/d7d8197d/attachment.pgp>


More information about the ubuntu-users mailing list