LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-26-2003, 12:53 PM   #1
jdklein1975
LQ Newbie
 
Registered: Feb 2003
Posts: 19

Rep: Reputation: 0
Can't ping my linux machine by hostaname


The hostname of my linux machine is 'linux1' and the IP address is 192.168.0.169. From my windows machine, I can ping the IP address successfully but when I try to ping 'linux1' I get a message:

Unknown host linux1

I can ping 'linux1' successfully on the 'linux1' box. Do I need to do something to get the hostname registered with my DNS server?

I am running a wireless network with a DLink 713P wireless router.
 
Old 02-26-2003, 01:17 PM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Yes, you would need to register linux1 with some DNS server. Your windows machine needs to resolve the name into an IP address. Unless it has that information locally, it needs to ask a DNS server for it.

Your linux box can ping itself because you made the appropriate entry in your /etc/hosts file. It sees linux1 associated with an IP address, and therefore, does not need to ask a DNS server.
 
Old 02-26-2003, 01:40 PM   #3
jdklein1975
LQ Newbie
 
Registered: Feb 2003
Posts: 19

Original Poster
Rep: Reputation: 0
Is there an easy way to register the hostname with DNS? I am assuming that Windows does this automatically since I did not take any manual steps to do this on my Windows machines and they can be pinged by hostname on all other machines.
 
Old 02-26-2003, 06:32 PM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
The extent of my knowledge regarding DNS is that there needs to be some mapping somewhere between a host name and IP address. That informatino can be locally or gained from a DNS server.

In linux, that information is provided in the /etc/hosts file.

In Windows, the only thing I'm aware of to do somethign similar is setting up printer/file sharing. In doing that, your machine uses an SMB protocol (I think that's the name). When a machine logs on, and is capable of providing shares to other machines, it broadcasts its name on the network, and each machine receiving that broadcast makes a note of that machine name and its IP address. I don't believe that's a true/proper DNS method, but it's results are similar. If you were to set your linux box with Samba, then I'm pretty sure you'd get the results you're looking for.

You didn't mention in your original post whether you could ping your Windows machine(s) from your linux box. My guess is you can't, unless you have an entry for them in the /etc/hosts file.

I guess what I'm suggesting is to install Samba. It's reasonably simple, and it's typically what people with Win/Linux netwoks want (to share files and printers between OSes).
 
Old 02-26-2003, 06:43 PM   #5
jdklein1975
LQ Newbie
 
Registered: Feb 2003
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks for your help. I went ahead and put an entry in my HOSTS and LMHOSTS files on my Windows machines for the linux box and all is well now.
 
Old 02-26-2003, 06:58 PM   #6
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Wow, I didn't know those kind of files existed on Windows... learn something new everyday.
 
  


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
Cannot ping my Fedora 3 machine Bjorkli Linux - Networking 5 11-14-2005 05:51 AM
Can't ping linux machine from windows Drunkalot Linux - General 1 10-14-2005 09:53 AM
can't ping XP machine using it's netbios name hubabuba Fedora 8 04-30-2005 02:38 PM
RH 7.2 can't ping one XP Pro machine purerory Linux - Networking 7 07-06-2004 03:29 AM
Can't ping linux machine by hostname jdklein1975 Linux - Networking 3 02-26-2003 02:49 PM


All times are GMT -5. The time now is 07:10 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration