Subject: host, dig not using the resolver library?
To: None <current-users@netbsd.org>
From: Andrew Reilly <areilly@bigpond.net.au>
List: current-users
Date: 06/29/2004 07:22:14
Hi all,

It's entirely possible that what I'm seeing is intentional, or the 
result of pilot error.  If so, please excuse me and point me in the 
right direction...

Anyway, my router box runs NetBSD 2.0F, and it is also my dns server 
(running DJB's dnscache+tinydns).  Since I am running the dns server on 
this box, I don't have an /etc/resolv.conf file, as the doco suggests 
is reasonable.  I have recently noticed that looking up names with the 
"host" or "dig" commands fail unless the name is fully qualified on the 
command line.  On the other hand, commands such as ping do append the 
local domain name, and successfully find the appropriate addresses.  Is 
this expected behavior?

The manual page for host, specifically the description of the -N 
option, does, in fact, explicitly refer to the search and domain lines 
*in the /etc/resolv.conf file*, whereas the manual for resolv.conf 
itself describes the expected behavior (searching of the local domain, 
according to hostname).

Is host deliberately broken, or does it not perform as resolver(3) 
suggests for a reason?  Or have I just broken something in my setup?

Eg:

other [233]$ hostname
other.reilly.home
other [234]$ host gurney
Host gurney not found: 3(NXDOMAIN)
other [235]$ host gurney.reilly.home
gurney.reilly.home has address 10.0.0.1
other [236]$ ping gurney
PING gurney.reilly.home (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=0.333 ms

Cheers,

-- 
Andrew