LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-14-2005, 07:54 AM   #1
bruse
Member
 
Registered: Feb 2005
Location: internet
Distribution: Debian
Posts: 821

Rep: Reputation: 30
Arrow ip get


mandrake 10.0

how to get a hostname using a Ip address via pinging.
i mean how to ping a system using IP address in such a way that i can get hostname.

thanks for all reply.
 
Old 07-14-2005, 09:29 AM   #2
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
This is so confuse.

You can't translate an ip address into a hostname using "ping". Ping wasn't intended to do so. I have no idea why you would want to use "ping" to do this, is there a reason?

If you just want to translate an ip into an hostname, try "host [your ip]" or "dig [your ip]", as example : " host 216.109.112.135 " . But this will only work if the hostname you are trying to get exist in a reverse zone on a DNS somewhere. as example, this will work on 216.109.112.135 (yahoo.com) but not on 216.239.57.99 (google.com). There isn't much you can do about it.
 
Old 07-15-2005, 03:14 AM   #3
bruse
Member
 
Registered: Feb 2005
Location: internet
Distribution: Debian
Posts: 821

Original Poster
Rep: Reputation: 30
thanks a lot.

because i have lot of problem with DNS and domain name.

i can not setup my named for query.

[staff@Simlab-node3 staff]$ dig yahoo.com

; <<>> DiG 9.2.3 <<>> yahoo.com
;; global options: printcmd
;; connection timed out; no servers could be reached
[staff@Simlab-node3 staff]$


for my IP address.

[root@Simlab-node3 staff]# dig 10.255.240.119

; <<>> DiG 9.2.3 <<>> 10.255.240.119
;; global options: printcmd
;; connection timed out; no servers could be reached
[root@Simlab-node3 staff]#


[root@Simlab-node3 staff]# host 10.255.240.119
;; connection timed out; no servers could be reached
[root@Simlab-node3 staff]#

please help me..
 
Old 07-15-2005, 11:46 AM   #4
Quigi
Member
 
Registered: Mar 2003
Location: Cambridge, MA, USA
Distribution: Ubuntu (Dapper and Heron)
Posts: 377

Rep: Reputation: 31
Question

Key is "no servers could be reached".
Is Simlab-node3 connected to the Internet (or an internet)? If yes, how? (I see you somehow reached linuxquestions.org on the Internet.)

It seems that you want to do a reverse lookup. Why?

The address you're trying to look up, 10.255.240.119, matches the pattern 10.x.x.x. I.e., it looks like a private address. Correct? So if anyone, the person who manages IP addresses internally at your organization should be able to give you the address of a DNS server, which could answer your query.
 
Old 07-15-2005, 12:12 PM   #5
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
There seems to be a problem about your DNS configuration.

look at /etc/resolv.conf and make sure you have a valid DNS server ip in there. If not, edit one ( syntax is like : nameserver 192.168.0.1 )
 
  


Reply



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 Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration