Networking Forums

Networking Forums > Computer Networking > Linux Networking > how to resolve IP address to hostname

Reply
Thread Tools Display Modes

how to resolve IP address to hostname

 
 
arturo1957
Guest
Posts: n/a

 
      03-08-2007, 09:57 PM
I am a Linux newbie but frequently use "ping -a <IP address>" to
return the hostname or NetBIOS name of a remote computer when I am
using any Windows/DOS machine.
Does "ping" in Linux have a similar switch or is there any Linux tool
with similar function to the Windows/DOS "ping -a" ?
Thanks, arturo1957

 
Reply With Quote
 
 
 
 
Måns Rullgård
Guest
Posts: n/a

 
      03-08-2007, 10:07 PM
"arturo1957" <(E-Mail Removed)> writes:

> I am a Linux newbie but frequently use "ping -a <IP address>" to
> return the hostname or NetBIOS name of a remote computer when I am
> using any Windows/DOS machine.
> Does "ping" in Linux have a similar switch or is there any Linux tool
> with similar function to the Windows/DOS "ping -a" ?


Try "host", comes with bind, sometimes packaged as bind-utils.

--
Måns Rullgård
(E-Mail Removed)
 
Reply With Quote
 
02B12S
Guest
Posts: n/a

 
      03-11-2007, 03:22 AM
try the command "nslookup" instead of "ping"

nslookup <ip address> returns the resolved name.

"man nslookup" for details

JJ
"arturo1957" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>I am a Linux newbie but frequently use "ping -a <IP address>" to
> return the hostname or NetBIOS name of a remote computer when I am
> using any Windows/DOS machine.
> Does "ping" in Linux have a similar switch or is there any Linux tool
> with similar function to the Windows/DOS "ping -a" ?
> Thanks, arturo1957
>



 
Reply With Quote
 
Jukka Aho
Guest
Posts: n/a

 
      03-11-2007, 09:37 AM
arturo1957 wrote:

> I am a Linux newbie but frequently use "ping -a <IP address>" to
> return the hostname or NetBIOS name of a remote computer when I am
> using any Windows/DOS machine.
> Does "ping" in Linux have a similar switch or is there any Linux
> tool with similar function to the Windows/DOS "ping -a" ?


You can use the "host" command:

foo@bar:~$ host 204.152.191.5
Name: zeus-pub1.kernel.org
Address: 204.152.191.5

--
znark

 
Reply With Quote
 
Guest
Posts: n/a

 
      03-11-2007, 10:08 AM
In article <quLIh.8689$(E-Mail Removed) et>,
02B12S <(E-Mail Removed)> wrote:

>try the command "nslookup" instead of "ping"


Try something 21st century like host.

--
http://www.spinics.net/lists/
 
Reply With Quote
 
Bjoern Schliessmann
Guest
Posts: n/a

 
      03-11-2007, 11:42 AM
(E-Mail Removed) wrote:
> 02B12S <(E-Mail Removed)> wrote:
>
>> try the command "nslookup" instead of "ping"

>
> Try something 21st century like host.


If it's got to be new and cool, try dig.

Regards,


Björn

Xpost col.development.apps, col.networking

--
BOFH excuse #142:

new guy cross-connected phone lines with ac power bus.

 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      03-11-2007, 04:54 PM
(E-Mail Removed) () writes:

>In article <quLIh.8689$(E-Mail Removed) et>,
>02B12S <(E-Mail Removed)> wrote:


>>try the command "nslookup" instead of "ping"


>Try something 21st century like host.


What exactly is bad about the 20th century? ls, ping, login, find,..... are
all 20th century commands. Are we to throw them all out and not use them
because of that?


 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      03-11-2007, 06:18 PM
On Sun, 11 Mar 2007, in the Usenet newsgroup comp.os.linux.networking, in
article <(E-Mail Removed)>, Bjoern Schliessmann wrote:

>(E-Mail Removed) wrote:
>> 02B12S <(E-Mail Removed)> wrote:
>>
>>> try the command "nslookup" instead of "ping"

>>
>> Try something 21st century like host.

>
>If it's got to be new and cool, try dig.


Ah, fellows - try to read what the O/P is looking for.

[compton ~]$ whatis dig dnsquery host nslookup
dig (1) - send domain name query packets to name servers
dnsquery (1) - query domain name servers using resolver
host (1) - look up host names using domain server
nslookup (8) - query Internet name servers interactively
[compton ~]$

If you google for 'ping windows+command+reference' you'll find the
windoze man page, where the -a option says

-a : Specifies that reverse name resolution is performed on the
destination IP address. If this is successful, ping displays the
corresponding host name.

The bind tools noted about query a name server. They don't look in the
/etc/hosts file, or at the Samba crap, or even look at using the
microsoft 'multicast-DNS' or the Apple based and therefore incompatible
'mdns' that some distributions include as avahi (both of which are massive
security holes - but what do you expect from microsoft or Apple).

Old guy
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dsn will not resolve address when sing cell modem Jeff Windows Networking 7 07-18-2008 08:03 PM
How to get hostname from IP address??? Neroku Linux Networking 4 04-22-2007 01:04 AM
Nslookup succeeds, but ping fails to resolve hostname Curt McNamee Windows Networking 1 11-07-2006 03:04 PM
Some DNS servers fails to resolve address hackingbear@gmail.com Linux Networking 3 05-28-2006 04:16 AM
Unable to resolve hostname Paul R Windows Networking 0 12-22-2003 07:02 PM



1 2 3 4 5 6 7 8 9 10 11