[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

openSUSE 11.0 nslookup works ping does not

Posted on 2009-03-30
21
Medium Priority
?
1,251 Views
Last Modified: 2012-05-06
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
0
Comment
Question by:JimNadeau
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 14
  • 7
21 Comments
 
LVL 7

Expert Comment

by:Morne Lategan
ID: 24021841
Can you post your /etc/resolv.conf file, your /etc/nsswitch file and your /etc/hosts file, please?
0
 
LVL 7

Expert Comment

by:Morne Lategan
ID: 24021849
Also the output of hostname -f
0
 

Author Comment

by:JimNadeau
ID: 24022104
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 7

Expert Comment

by:Morne Lategan
ID: 24022420
And nsswitch?
0
 

Author Comment

by:JimNadeau
ID: 24022455
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
 
LVL 7

Expert Comment

by:Morne Lategan
ID: 24022501
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
 
LVL 7

Expert Comment

by:Morne Lategan
ID: 24022555
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
 

Author Comment

by:JimNadeau
ID: 24022645
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
 

Author Comment

by:JimNadeau
ID: 24022676
nmap works with by hostname.
0
 
LVL 7

Expert Comment

by:Morne Lategan
ID: 24022682
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
 
LVL 7

Expert Comment

by:Morne Lategan
ID: 24022706
/etc/init.d/nscd restart
0
 

Author Comment

by:JimNadeau
ID: 24022762
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
 
LVL 7

Expert Comment

by:Morne Lategan
ID: 24022784
and if you say:

getent hosts mail02
getent hosts mail02.precision.local

What does it reply with?
0
 
LVL 7

Expert Comment

by:Morne Lategan
ID: 24022809
Also change:

networks:       files dns

to just:

networks:       files
0
 

Author Comment

by:JimNadeau
ID: 24022872
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
 
LVL 7

Expert Comment

by:Morne Lategan
ID: 24023047
I'm reading up on this, but it would appear that the linux resolver libraries does not like the domain .local on suse...


0
 
LVL 7

Accepted Solution

by:
Morne Lategan earned 2000 total points
ID: 24023111
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
 
LVL 7

Expert Comment

by:Morne Lategan
ID: 24023143
0
 

Author Comment

by:JimNadeau
ID: 24023283
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
 
LVL 7

Expert Comment

by:Morne Lategan
ID: 24023334
Note my sarcasm: I LOVE Suse :) Glad it worked.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question