Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
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, 01:29 PM
|
#1
|
LQ Newbie
Registered: Feb 2003
Posts: 19
Rep:
|
Can't ping linux machine by hostname
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 DI-713P wireless router.
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, 01:48 PM
|
#2
|
Member
Registered: Oct 2001
Location: Columbus, Ohio
Distribution: all.. but mainly SuSe--- looks like it changing to Red Hat
Posts: 119
Rep:
|
Yes, this is a DNS issue..
Are you running a DNS.. if you are, then you would need to enter the info for your linux1 box, and have all the compuers look to the same DNS server.
Im going to assume your not running your own DNS..
Theirfore, you would need to modify the hosts file on your Windows box...
on my (at work) Win 2k box its located at:
c:\WINNT\system32\drivers\etc\hosts
It may be someplace else on other version of Windows..
and it may have a .sam at the end (for sample)
copy it and rename it to "hosts"
It should look something simular to this:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
just add the following to the end of the file:
192.168.0.169 linux1
ping something stupid...
ping lkjljlkjlh
then ping linux1
and it should work.
|
|
|
02-26-2003, 01:48 PM
|
#3
|
Member
Registered: Nov 2002
Location: Chicago, IL
Distribution: Rasbian, Debian, Gentoo, RHEL
Posts: 65
Rep:
|
The reason your Windows machines work is because they are probably using netbios to resolve names. This, it itself, has nothing to do with DNS. Unfortunately, you do need to tell the windows machines about non netbios names, either through DNS or with a hostfile. If it's just one or two machines, you can add an entry to %systemroot%\system32\drivers\etc\hosts (this path varies sightly depending on the version of Windows) on the windows machine to tell it about linux1, otherwise, you will need to add it to DNS somewhere.
You do have an option to use netbios with samba and wins if you REALLY want to use the Windows based name resolution, but I would recommend against it if at all possible.
|
|
|
02-26-2003, 01:49 PM
|
#4
|
Member
Registered: Nov 2002
Distribution: Debian testing.
Posts: 143
Rep:
|
windows (xp/2k at least) maintains a list similar to /etc/resolv.conf on linux, named lmhosts...
this can be found in c:\windows\system32\drivers\etc, iirc.
add your linux box's netbios name there, and see if it works
HTH,
Duncan
|
|
|
All times are GMT -5. The time now is 08:52 AM.
|
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
|
|