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

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

On Wed, Jul 18, 2007 at 07:57:06AM -0400, C.T. Paterson wrote:
> 
> I moved "NOTFOUND" to the end of the line (as you say - why have it in
> the middle at all?), and tried again.  server.mynetwork.local is now
> pingable...didn't even have to restart any services.

If I am not mistaken .local is the suffix for Multicast DNS. (I am
just piecing this together now.) Name lookup is performed in the order
specified by nsswitch.conf. I am guessing that the NOTFOUND argument
to mdns4_minimal caused name lookups to fail when searching for a
.local name. Tools like ping use nsswitch.conf. Tools like nslookup
contact the nameservers directly bypassing nsswitch.conf. My guess is:

The command "ping foo" would
    look in /etc/hosts (files) for foo
    search via mdns for foo
    use resolv.conf to contact nameserver for foo
    use resolv.conf to contact nameserver for foo.mynetwork.local

The command "ping foo.mynetwork.local" would
    look in /etc/hosts (files) for foo.mynetwork.local
    search via mdns for foo.mynetwork.local
which fails due to NOTFOUND=RETURN and halts any further lookups.


I would guess that the "NOTFOUND" argument is only needed for
mdns4_minimal. I would swap the order of dns and mdsn4_minimal in
nsswitch.conf so that the line reads:

hosts:          files dns mdns4_minimal [NOTFOUND=return] mdns4

-- 
sg