LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-26-2003, 01:29 PM   #1
jdklein1975
LQ Newbie
 
Registered: Feb 2003
Posts: 19

Rep: Reputation: 0
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.
 
Old 02-26-2003, 01:48 PM   #2
BaerRS
Member
 
Registered: Oct 2001
Location: Columbus, Ohio
Distribution: all.. but mainly SuSe--- looks like it changing to Red Hat
Posts: 119

Rep: Reputation: 15
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.
 
Old 02-26-2003, 01:48 PM   #3
rockdw
Member
 
Registered: Nov 2002
Location: Chicago, IL
Distribution: Rasbian, Debian, Gentoo, RHEL
Posts: 65

Rep: Reputation: 21
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.
 
Old 02-26-2003, 01:49 PM   #4
dunkyb
Member
 
Registered: Nov 2002
Distribution: Debian testing.
Posts: 143

Rep: Reputation: 15
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
 
  


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
Can't ping linux machine from windows Drunkalot Linux - General 1 10-14-2005 08:53 AM
Linux clients in AD, can't ping hostname pingu Linux - Networking 2 06-08-2005 03:14 AM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 04:57 AM
can ping by IP but not by hostname al contado Linux - Networking 6 03-16-2003 03:06 AM
Can't ping my linux machine by hostaname jdklein1975 Linux - Newbie 5 02-26-2003 05:58 PM

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

All times are GMT -5. The time now is 08:52 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
Open Source Consulting | Domain Registration