LinuxQuestions.org
Review your favorite Linux distribution.
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 03-29-2005, 04:05 AM   #1
bruse
Member
 
Registered: Feb 2005
Location: internet
Distribution: Debian
Posts: 821

Rep: Reputation: 30
hostname to IP address


i am using mandrake 10.0.
there are 12 computers connected in my network.
is there any way to find the IP address of the system using their hostname?

i know the hostname. with this how to find a IP address? and vice versa.

and from this IP address how to find the hostname?

please help me...
 
Old 03-29-2005, 04:19 AM   #2
zeropash
Member
 
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208

Rep: Reputation: 30
host <machinename>
nslookup <machinename>
 
Old 03-29-2005, 04:30 AM   #3
bruse
Member
 
Registered: Feb 2005
Location: internet
Distribution: Debian
Posts: 821

Original Poster
Rep: Reputation: 30
using that, is it possible for my system also?

because see the result..

[staff@Simlab-node5 staff]$ hostname
Simlab-node5.mit
[staff@Simlab-node5 staff]$ nslookup Simlab-node5.mit
;; connection timed out; no servers could be reached

[staff@Simlab-node5 staff]$


can u please help me..
 
Old 03-29-2005, 07:05 AM   #4
zeropash
Member
 
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208

Rep: Reputation: 30
have you set up your DNS properly?
check the /etc/resolv.conf file
it should ahve some entry like
nameserver <ip_address>

if not find your DNS server and put the ip address there.

if that seems ok then have you set this machine up new?
i mean is this hostname new?
if so you need to put that entry into the DNS server.
 
Old 03-29-2005, 09:55 AM   #5
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
user@mybox:~$ ping mybox
PING mybox.my.dyndns.org (192.168.0.1) 56(84) bytes of data.
64 bytes from mybox.my.dyndns.org (192.168.0.1): icmp_seq=1 ttl=64 time=0.21
8 ms
64 bytes from mybox.my.dyndns.org (192.168.0.1): icmp_seq=2 ttl=64 time=0.15
0 ms
...

dig [hostname]
and
dig -x [IP address]
work also, but they, like nslookup, require a functioning DNS server.
 
Old 03-30-2005, 12:21 AM   #6
zeropash
Member
 
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208

Rep: Reputation: 30
even ping (or for that matter any program that can take a hostname) requires a DNS server (unless those hostname->ip translations are already present in the /etc/hosts file.)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
MAC Address based hostname hogg85 Linux - Networking 2 06-13-2005 01:51 PM
changing IP address and hostname ashley75 Linux - General 7 05-19-2005 11:26 AM
hostname-------->ip address bruse Linux - Networking 2 04-18-2005 06:08 AM
how to use the hostname instead of ip address? tuxtamer Linux - Newbie 1 04-15-2005 08:29 AM
From IP address to hostname swmok Linux - Networking 1 08-22-2003 08:26 AM


All times are GMT -5. The time now is 11:31 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration