home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] More Name Resolution Head-Scratching...

  • Subject: Re: [OCLUG-Tech] More Name Resolution Head-Scratching...
  • From: "Brenda J. Butler" <bjb [ at ] magma [ dot ] ca>
  • Date: Mon, 16 Jul 2007 19:41:52 -0400
CT,

I think you've eliminated the problem as being DNS, and have narrowed
it down to being in the configuration on your machine.

Names might get resolved to addresses in one of a few different ways,
DNS being one of them.

The nsswitch.conf file tells you where it looks for hostnames first.
In your case, it looks at "files", which is mostly /etc/hosts.

I would have thought that if it failed to find the name in "files", it
would proceed to look for it using the other methods listed in nsswitch.conf
one by one - so after /etc/hosts fails (it should fail, the hostname
isn't there) - it should ask mdns4_minimal, then dns and then
mdns4.

Hmm, there is a NOTFOUND=return ... between mdns4_minimal and dns.

I'm not really that familiar with that - but it looks bad.
Try moving the dns before the NOTFOUND.

I really don't know what it's meant for (I mean, why bother with the
rest of the line if you put that in??? - I probably don't fully
understand it - and that's likely because I haven't read up on it)
and I don't know what will break if you mess with it, but it looks
worth exploring.

You could also try putting dns before files, but that also might break
other things.  Or not.

It might be a good time for someone who really does know DNS and
libresolv to jump in here :-)

Good luck ..

bjb


On Mon, Jul 16, 2007 at 10:40:29AM -0400, C.T. Paterson wrote:
> Hey Brenda,
> 
> Thanks for your help.  Still can't determine an explanation, but
> here's what I found:
> 
> On 13/07/07, Brenda J. Butler <bjb [ at ] magma [ dot ] ca> wrote:
> >
> >I'm not sure of the way all this works, but places to look are:
> >
> >/etc/nsswitch.conf (the hosts and network entries)
> 
> # /etc/nsswitch.conf
> #
> # Example configuration of GNU Name Service Switch functionality.
> # If you have the `glibc-doc-reference' and `info' packages installed, try:
> # `info libc "Name Service Switch"' for information about this file.
> 
> passwd:         compat
> group:          compat
> shadow:         compat
> 
> hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
> networks:       files
> 
> protocols:      db files
> services:       db files
> ethers:         db files
> rpc:            db files
> 
> netgroup:       nis
> 
> 
> >/etc/resolv.conf (do you have a search or domain entry?)
> 
> I do, actually, contents of the resolv.conf are:
> 
> search companysys.local
> nameserver 192.168.0.8
> nameserver 192.168.0.3
> 
> >/etc/hosts
> 
> 127.0.0.1 localhost
> 
> # The following lines are desirable for IPv6 capable hosts
> ::1 ip6-localhost ip6-loopback
> fe00::0 ip6-localnet
> ff00::0 ip6-mcastprefix
> ff02::1 ip6-allnodes
> ff02::2 ip6-allrouters
> ff02::3 ip6-allhosts
> 
> 
> >and of course the bind config.
> 
> I presume you mean on the server?  This, I do not have access to.
> 
> >The dig command with the @server parameter can tell you if dns can
> >resolv the name (cuts out the libresolv stuff) so you can narrow down
> >the problem:
> 
> That's the trouble I've been having.  The name resolves fine; on dig,
> on an nslookup.  The DNS seems to have no trouble resolving
> company-231.companysys.local.  When I ping it though...
> 
> $ ping company-231.companysys.local
> ping: unknown host company-231.companysys.local
> 
> 
> ...and again, only on the Linux machines.  On a windows machine, it
> works fine.  Since the servers show no signs of resolution trouble,
> I'm forced to theorize that it's a local configuration problem - I'm
> just at a loss to know what it might be.
> 
> Cheers.
> 
> -- 
> "My country is the world, and my religion is to do good."
>                                        -- Thomas Paine
> 
---end quoted text---