openSUSE 11.0 nslookup works ping does not

I have an openSUSE 11.0 box that can not resolve url addresses for xxxxxx.local domain with ping, but can do a nslookup. The box can ping url addresses that are external to the domain no problem:
suserad:/etc # ping www.google.com
PING www.l.google.com (74.125.93.104) 56(84) bytes of data.
64 bytes from qw-in-f104.google.com (74.125.93.104): icmp_seq=1 ttl=246 time=39.1 ms
64 bytes from qw-in-f104.google.com (74.125.93.104): icmp_seq=2 ttl=246 time=88.1 ms
64 bytes from qw-in-f104.google.com (74.125.93.104): icmp_seq=3 ttl=246 time=40.1 ms
suserad:/etc # nslookup mail02
Server:         192.168.1.7
Address:        192.168.1.7#53

Name:   mail02.precision.local
Address: 192.168.1.8

suserad:/etc # ping mail02
ping: unknown host mail02
JimNadeauAsked:
Who is Participating?
 
Morne LateganCommented:
from here:

http://www.novell.com/coolsolutions/tip/15248.html

It seems:

"you will need to edit the /etc/host.conf file. There you will need to add the parameter

mdns off

to the bottom of the file."

0
 
Morne LateganCommented:
Can you post your /etc/resolv.conf file, your /etc/nsswitch file and your /etc/hosts file, please?
0
 
Morne LateganCommented:
Also the output of hostname -f
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
JimNadeauAuthor Commented:
suserad:/etc # cat resolv.conf
### BEGIN INFO
#
#
### END INFO
#
nameserver 192.168.1.7
nameserver 192.168.1.6
search precision.local
suserad:/ # hostname -f
suserad.workgroup
suserad:/ #
0
 
Morne LateganCommented:
And nsswitch?
0
 
JimNadeauAuthor Commented:
suserad:/etc # cat nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
#       compat                  Use compatibility setup
#       nisplus                 Use NIS+ (NIS version 3)
#       nis                     Use NIS (NIS version 2), also called YP
#       dns                     Use DNS (Domain Name Service)
#       files                   Use the local files
#       [NOTFOUND=return]       Stop searching if not found so far
#
# For more information, please read the nsswitch.conf.5 manual page.
#

# passwd: files nis
# shadow: files nis
# group:  files nis

passwd: compat
group:  compat

hosts:          files mdns4_minimal [NOTFOUND=return] dns
networks:       files dns

services:       files
protocols:      files
rpc:            files
ethers:         files
netmasks:       files
netgroup:       files nis
publickey:      files

bootparams:     files
automount:      files nis
aliases:        files


suserad:/etc # cat hosts
#
# hosts         This file describes a number of hostname-to-address
#               mappings for the TCP/IP subsystem.  It is mostly
#               used at boot time, when no name servers are running.
#               On small systems, this file can be used instead of a
#               "named" name server.
# Syntax:
#
# IP-Address  Full-Qualified-Hostname  Short-Hostname
#

127.0.0.1       localhost

# special IPv6 addresses
::1             localhost ipv6-localhost ipv6-loopback

fe00::0         ipv6-localnet

ff00::0         ipv6-mcastprefix
ff02::1         ipv6-allnodes
ff02::2         ipv6-allrouters
ff02::3         ipv6-allhosts
127.0.0.2       suserad.workgroup suserad
192.168.0.5     suserad suserad
suserad:/etc #
0
 
Morne LateganCommented:
127.0.0.2       suserad.workgroup suserad
192.168.0.5     suserad suserad

Change that in hosts to read only:

192.168.0.5  suserad.workgroup suserad

Hash out the 127 line.

Also try changing the line in nsswitch:

hosts:          files mdns4_minimal [NOTFOUND=return] dns

To just:

hosts:          files dns

for a test.
0
 
Morne LateganCommented:
I thing nslookup uses /etc/resolv.conf directly, and ping uses the specification in /etc/nsswitch, so it will check:

1) files: /etc/hosts
2) mdns4_minimal <- which i suspect is failing
3) dns
0
 
JimNadeauAuthor Commented:
Nope:
suserad:/etc # nslookup mail02
Server:         192.168.1.7
Address:        192.168.1.7#53

Name:   mail02.precision.local
Address: 192.168.1.8

suserad:/etc # ping mail02
ping: unknown host mail02


Would a reboot be required?
0
 
JimNadeauAuthor Commented:
nmap works with by hostname.
0
 
Morne LateganCommented:
I don't think so, unless you have a resolver cache. Try logging out, and back in again. If all else fails, reboot and test it again.
0
 
Morne LateganCommented:
/etc/init.d/nscd restart
0
 
JimNadeauAuthor Commented:
Still no go. Just in case I tried ping mail02.precision.local to see if that would help, and it did not.
suserad:/etc # ping mail02
ping: unknown host mail02
suserad:/etc # ping mail02.precision.local
ping: unknown host mail02.precision.local
0
 
Morne LateganCommented:
and if you say:

getent hosts mail02
getent hosts mail02.precision.local

What does it reply with?
0
 
Morne LateganCommented:
Also change:

networks:       files dns

to just:

networks:       files
0
 
JimNadeauAuthor Commented:
getent hosts does not return anything:
suserad:/etc # getent hosts mail02
suserad:/etc # getent hosts mail02.precision.local
suserad:/etc #

Updated the nsswitch.conf so networks would just read files and still nothing.
0
 
Morne LateganCommented:
I'm reading up on this, but it would appear that the linux resolver libraries does not like the domain .local on suse...


0
 
Morne LateganCommented:
0
 
JimNadeauAuthor Commented:
Nice Find!
I put the nsswitch.conf back, and added the mdns off to the host.conf and bingo

suserad:/etc # vi nsswitch.conf
suserad:/etc # vi host.conf
suserad:/etc # init.d/nscd restart
Shutting down Name Service Cache Daemon                               done
Starting Name Service Cache Daemon                                    done
suserad:/etc # ping mail02
PING mail02.precision.local (192.168.1.8) 56(84) bytes of data.
64 bytes from mail02.precision.local (192.168.1.8): icmp_seq=1 ttl=127 time=2.88 ms
64 bytes from mail02.precision.local (192.168.1.8): icmp_seq=2 ttl=127 time=0.331 ms
64 bytes from mail02.precision.local (192.168.1.8): icmp_seq=3 ttl=127 time=0.301 ms
64 bytes from mail02.precision.local (192.168.1.8): icmp_seq=4 ttl=127 time=0.287 ms

In openSUSE 11.0 I could not find the nss_mdns.conf in the ect directory, but it is working.
0
 
Morne LateganCommented:
Note my sarcasm: I LOVE Suse :) Glad it worked.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.