LinuxQuestions.org
Visit Jeremy's Blog.
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 02-21-2005, 01:06 PM   #1
TiredOfLinux
LQ Newbie
 
Registered: Feb 2005
Posts: 2

Rep: Reputation: 0
Name resolution problem in Debian


I have a problem with host name resolution on my Linux box running Debian 3.0 Woody with KDE. Konqeror (or any browser) returns "unknown host..." while using hostname but works fine using IP address. Ping fails too with "unknown host...".

Still nslookup returns:

Server: 192.168.2.1
Address: 192.168.2.1#53

Non-authoritative answer:
Name: debian.org
Address: 192.25.206.10

My home network consist of one Linux box and two WinXp boxes connected to internet through a DSL modem on a firewall-router which has the address 192.168.2.1. All boxes are configured with static IPs and using netmask 255.255.255.0. Default gateway and nameserver addresses are set to 192.168.2.1. WinXp boxes have no problems to resolve hostnames.

I've read about 45 Faqs, Howtos and forum threads and tried all config combinations I could work out without getting the problem solved or even located.

My current configuration on the Linux box is:

/etc/resolv.conf:
domain myhomenet
search myhomenet
nameserver 192.168.2.1
nameserver 195.54.122.204

(the last one is provided by my ISP and yes I'm able to ping it)

/etc/host.conf:
order hosts,bind
multi on

/etc/hosts:
127.0.0.1 localhost loopback

Code:
# route 
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
myhomenet        *               255.255.255.0   U     0      0        0 eth0
default         192.168.2.1     0.0.0.0         UG    0      0        0 eth0
Most faq's keep telling about running a DNS service using BIND but that is not what I want. My intention is to keep using my ISP's name server for external name resolution.

What am I still missing??
 
Old 02-21-2005, 01:25 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
I've found cases where the "domain" and "search" lines would cause problems with name resolution.
 
Old 02-21-2005, 01:29 PM   #3
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
I'm not sure, but I had the same problem with my first attempt at a Debian Sarge install. The DNS resolution was very, very, very flakey, despite being set up the same way as my other Windows and Linux boxes. I believe it was a problem with my Linksys router being overwhelmed by something. I don't know.

All I know is that my heavy-handed solution worked, and it ended my extreme frustration. I used apt-get to install DNS (I think it was apt-get install bind). In my heated frustration, I simply installed and rebooted without even attempting to configure anything...and it worked! There was a lot of initial sluggishness in domain name resolution, perhaps due to timing out on the router before falling back onto the built in default name-servers...

Whatever. In any case, the problem cleared up after that. I think that it was the router, despite being a well respected name brand Linksys. Since then, I always install a DNS server on every workstation I set up.
 
Old 02-21-2005, 02:31 PM   #4
TiredOfLinux
LQ Newbie
 
Registered: Feb 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Lightbulb

Problem solved!

The cause was the following line in the /etc/nsswich.conf file:

hosts: files wins

should be

hosts: files dns wins

Obvious? NOT! :-/

Probably it got messed up when I installed Samba for a few months ago. I just didn't notice it earlier because I usually don't use my linux box for surfing.

Maybe the wins keyword is not necessary at all but I'll leave it in case Samba needs it.

Also I've cleaned out everything else from the /etc/resolv.conf except one line:

nameserver 192.168.2.1


Thanks to everyone for your time and effort :-)
 
Old 02-21-2005, 02:57 PM   #5
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
No, no, I thank _YOU_!

This /etc/nsswich.conf file is a new one for me, also. I suppose my solution fixed that file, among other things, but my solution was truly a case of swatting a fly with a bazooka. It's rather inconvenient lugging that heavy bazooka around, in case a fly shows up.
 
  


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
Can't get a better resolution than 800X600 on debian bharath144 Linux - General 4 03-12-2006 10:23 AM
Problem with debian based distros(boot resolution) js72 Debian 9 10-03-2005 09:10 AM
Debian/gnome resolution switch007 Linux - General 3 07-11-2005 01:12 PM
Debian resolution Mingthefirst Debian 8 11-06-2004 08:53 PM
Inspiron GeForece 5200 on Debian Problem Setting Resolution apdtech Linux - Laptop and Netbook 2 01-14-2004 01:24 PM

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

All times are GMT -5. The time now is 01:18 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