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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-26-2003, 11:53 AM
|
#1
|
LQ Newbie
Registered: Feb 2003
Posts: 19
Rep:
|
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.
|
|
|
02-26-2003, 12:17 PM
|
#2
|
Senior Member
Registered: Jan 2003
Posts: 2,786
|
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.
|
|
|
02-26-2003, 12:40 PM
|
#3
|
LQ Newbie
Registered: Feb 2003
Posts: 19
Original Poster
Rep:
|
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.
|
|
|
02-26-2003, 05:32 PM
|
#4
|
Senior Member
Registered: Jan 2003
Posts: 2,786
|
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).
|
|
|
02-26-2003, 05:43 PM
|
#5
|
LQ Newbie
Registered: Feb 2003
Posts: 19
Original Poster
Rep:
|
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.
|
|
|
02-26-2003, 05:58 PM
|
#6
|
Senior Member
Registered: Jan 2003
Posts: 2,786
|
Wow, I didn't know those kind of files existed on Windows... learn something new everyday.
|
|
|
All times are GMT -5. The time now is 03:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|