LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 09-26-2003, 10:48 AM   #1
cornellS
LQ Newbie
 
Registered: Jun 2003
Location: Central Pa
Distribution: Mandrake 9
Posts: 11

Rep: Reputation: 0
Linux can't find other hosts, by name, on LAN


Hi

Short version:
I can't ping my windows machines, or the Linux machine by hostname, but I can by (dynamically assigned) IP. I've forgotten what I need to do to get Linux to find the hostnames of the other machines on the LAN.

Long version:
I have a LAN with a Linux (Mandrake 9.0) fileserver and Windows workstations (Win98SE and Wn2K). I go through a D-Link DI-704 Gateway/Router to get to a cable modem to get to the Internet. Everything was alive and well.

Had a power outage that exceeded my UPS's capabilities, machines went down hard and Linux "broke". Eventually re-installed Mandrake 9.0 with formatting native Linux partition (root) but not EXT3 partition (/home). My data's fine, but my "setups" are lost.

The IP addresses are assigned dynamically, presumably by the D-Link (whose address is 192.168.0.1) I've configured the Linux to use that address as a gateway.

The linux box can ping the Internet (like yahoo) and can ping the windows boxes on the LAN by IP. Pings to thier hostnames, or even the linux box hostname, fail: "Hostname not found", as I recall. I've tried hostname and hostname.workgroup, as:
ping fs
ping fs.myworkgroup.com

I've no addresses/hosts in /etc/hosts. I understand that that's for static IP addresses.

I note that in /etc/resolve.conf (as I recall) there are three entries:
nameserver #.#.#.#1
nameserver #.#.#.#2
search myworkgroup.com

The nameserver ip addresses are, I believe, the same as the one's I'd used for a DNS when setting up my cable modem.

I tried adding:
nameserver 192.168.0.1
to resolve.conf, but it seems to get overwritten during shut-down/reboot.

I tried adding via the Mandrake Control Center, and it gets added to resolve.conf, but doesn't solve my problem.

I can't find "DHCP" or "dynamic" in the indices of the two huuuuge Linux books I have. And I'm lost.

What tools/programs/commands do I need to run, or files to look at, to see what my current configuration is? What should I look for in that information? Does anybody have a magic wand? :-)


Thanks in advance
Cornell
rsternberg@state.pa.us
 
Old 09-26-2003, 01:11 PM   #2
mrtwice
Member
 
Registered: Feb 2002
Distribution: xubuntu 8.10
Posts: 225

Rep: Reputation: 31
With windows, name resolution is done through netbios I believe. Most of the time we don't even realize it is taking place.

With Linux, you have to be a little more adapt at configuring things. Since you only have two hosts and a router, I would use the /etc/hosts file. You are wondering how you are supposed to do that with dynamic dhcp right? Two options:

1) setup your router to give out the same address to a computer every time. Then add their assisgned ip to your /etc/hosts file and you are ready to go. You don't need to worry abou the ips changing because you are the network admin. This has the advantage of being both dynamic and static
2) setup the machines with static ips and can dhcp. Probably just as easy since you don't have a very big network.
 
Old 09-26-2003, 04:39 PM   #3
Faecal
Member
 
Registered: Sep 2002
Location: York, UK
Distribution: Debian Sid
Posts: 215

Rep: Reputation: 30
It is possible that your DHCP server is also running a DNS server. In this case, you could simply include a line such as "nameserver 192.168.0.1" in /etc/resolv.conf". If not, find out where the DNS server is and point resolv.conf to that. I'm surprised that dhcpcd hasn't automagically setup name resolution for you, if it's being done by the same machine that's doing the DHCP service.
 
  


Reply



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
Modifying /etc/hosts globally (All LAN users) for loopbacking. How? ambayah Linux - General 4 08-28-2004 11:08 AM
Accessing MY virtual hosts from MY Lan. TheSwine Linux - Networking 2 03-02-2004 02:41 PM
Win XP client on LAN can't find Linux server mournblade Linux - Networking 10 06-26-2003 03:54 PM
Access apache virtual hosts from lan te_conway Linux - Networking 2 07-16-2002 09:20 AM
How to access hosts from LAN through public ip? mkostrze Linux - Security 4 04-26-2002 09:34 AM

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

All times are GMT -5. The time now is 08:21 PM.

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