Link to home
Start Free TrialLog in
Avatar of markhargrove
markhargrove

asked on

Cannot resolve local network names - SuSE 10.0

After completing a new installation of SuSE 10.0 (including all YAST updates), I find that I cannot resolve any names on my local network, whether using 'short' or fully qualified hostnames.  I can resolve any names *outside* of my local network on the Internet.  The resolv.conf file is very simple, containing only:

domain elms.local
nameserver 192.168.100.90

The nsswitch.conf files is standard (the hosts line simply specifies 'files dns').

I can reach any host on my local network from the SuSE box by IP address -- but not by name.  I have two other Linux hosts on the home network, one running RHEL 3, and one running FC4 -- both have no problems reaching internal or external names, including the new SuSE box.

tcpdump on the SuSE box ('tcpdump -n port 53') shows no attempt to contact the DNS server when I type a command that needs a name resolution (such as 'ping <host>' or 'ssh <host>') on the local network, but both of the examples work perfectly if <host> is outside my local net (including seeing the DNS query and response in the tcpdump output).  When using a name on the local network, the commands simply hang, eventually reporting (for example) 'ping: unknown host <hostname>'.  This is true whether <hostname> is qualified or not.

I'm baffled.  Any suggestions?
Avatar of owensleftfoot
owensleftfoot

Is /etc/hosts.conf set to hosts and then bind?
Avatar of DonConsolio
1) add a line: "hosts:  files dns" to your nsswitch.conf

2)

the simple way:
==========
add your local host-ip mapping to /etc/hosts (simply
192.168.100.90    myserver myserver.elms.local
192.168.100.91    myhost1 myhost1..elms.local
etc.)

OR

the powerful (but complicated :-) way:
=========================
have your local DNS server (ebviously running on 192.168.100.90)
resolve local hosts (in the "elms.local" domain)

OR BOTH :-)
Avatar of markhargrove

ASKER

Don --

I'm not sure you read my entire message, or (more probably) I didn't explain things clearly.  My nsswitch.conf file already contains the "hosts:  files dns" line.  That's what I tried to say on the third paragraph of my initial question.  

My local DNS server DOES resolve local hosts.  I have both forward and reverse entries for all local hosts in the database, and all of the other computers on my local network (both Windows and Linux) are able to resolve local names.

>> The nsswitch.conf files is standard (the hosts line simply specifies 'files dns').
> add a line: "hosts:  files dns" to your nsswitch.conf
Was just trying to be sure you had the keyword "hosts:" in that line

>> domain elms.local
>> nameserver 192.168.100.90

try testing with "nslookup" or "dig" utility

e.g. "nslookup myserver.elms.local. 192.168.100.90"
<myserver.elms.local.> - mind the dot at the end
<192.168.100.90> - your dns server

does your DNS server at 192.168.100.90 reply ?
is "elms.local." your local domain ?

if not sure please paste results here
nslookup works perfectly and instantly.  Yes, "elms.local" is my local domain.  

I'm working now on doing a complete reinstall of SuSE 10.0 from scratch -- I'll know in a couple of hours if the problem is still present.

-M.
After a complete reinstall, including all updates and the latest kernel (2.6.13-15.70-smp), the problem is still present.  I can resolve external names, but not internal names.   All my other systems can resolve both internal and external names.  

- do you use IPV6 ?
- check the resolver libs - what does "ls -1 /lib/libnss_*" show ?
- post the contents of "/etc/nsswitch.conf" and "/etc/resolv.conf"
- what does "dig @192.168.100.90 myserver.elms.local" / "nslookup myserver.elms.local 192.168.100.90" show
- what does "dig @192.168.100.90 myserver.elms.local." / "nslookup myserver.elms.local. 192.168.100.90" show (mind the dots)
- does "ping myserver.elms.local." work ?
- is any firewall active on "myserver.elms.local" ?
OK, problem is solved now.

It turns out that ".local" as a top-level domain name is treated specially by the kernel!  This is an Apple-ism.  When .local is detected as the TLD, instead of asking for name resolution through regular DNS, multicast DNS (mDNS) is used.  I finally caught this with tcpdump.  My nameserver is running a fairly old build of RHEL3, and doesn't support mDNS.

Multi-cast DNS can be disabled in SuSE 10 by adding:

mdns off

to /etc/host.conf

This immediately solved the problem.  Name resolution was  very slow, but worked now for local network names.  To speed up name resolution to normal, I also had to disable IPV6.  Once this was done, name resolution was completely normal.

Thanks for your suggestions.

-M.
ASKER CERTIFIED SOLUTION
Avatar of DonConsolio
DonConsolio
Flag of Austria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial