dig Resolver Options (init, defnam and dnsrch)
Mark_Andrews at isc.org
Mark_Andrews at isc.org
Thu Oct 23 22:18:18 UTC 2003
> I've been playing around with dig's resolver options. I'm particularly
> interested in dig's 2nd line of output...
>
> ;; res options: init recurs defnam dnsrch
RES_INIT
RES_RECURSE
RES_DEFNAMES
RES_DNSRCH
>
> 1. What does init mean? I can't find any definition of it. I've read
> dig(1), hostname(7) and resolver(3) and searched Google.
>
> My 2nd problem is that, while I understand the defnam and dnsrch flags
> theoretically, it never seems to matter whether they're set or not.
>
> I thought defnam (+[no]defname) determined whether my domain name,
> markhawkes.com, would be appended to whatever host I queried. Thus...
dig doesn't use the resolver routines that use these flags.
> $ dig pluto
>
> ....would actually be...
>
> $ dig pluto.markhawkes.com
>
> Instead, I get a nonexistent domain error...
>
> $ dig pluto
>
> ; <<>> DiG 8.2 <<>> pluto
> ;; res options: init recurs defnam dnsrch
> ;; got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 4
> ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
> ;; QUERY SECTION:
> ;; pluto, type = A, class = IN
>
> ;; AUTHORITY SECTION:
> .. 2h51m5s IN SOA a.root-servers.net. nstld.verisign-grs.com. (
> 2003102201 ; serial
> 30M ; refresh
> 15M ; retry
> 1W ; expiry
> 1D ) ; minimum
>
> ;; Total query time: 14 msec
> ;; FROM: mercury to SERVER: default -- 192.168.0.1
> ;; WHEN: Thu Oct 23 09:39:07 2003
> ;; MSG SIZE sent: 23 rcvd: 98
>
>
> I have to specify the FQDN to make it work...
>
>
> $ dig pluto.markhawkes.com +noauthor +nostats +noaddit
>
> ; <<>> DiG 8.2 <<>> pluto.markhawkes.com +noauthor +noaddit +nostats
> ;; res options: init recurs defnam dnsrch
> ;; got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57895
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
> ;; QUERY SECTION:
> ;; pluto.markhawkes.com, type = A, class = IN
>
> ;; ANSWER SECTION:
> pluto.markhawkes.com. 3D IN A 192.168.0.6
>
>
> Here's my resolv.conf, just FYI...
>
> $ cat /etc/resolv.conf
> domain markhawkes.com
> nameserver 192.168.0.1
>
> Can anyone show a dig example where +[no]defname and +[no]search
> actually make a difference?
>
> Many thanks,
> Marco
>
--
Mark Andrews, Internet Software Consortium
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: Mark.Andrews at isc.org
More information about the bind-users
mailing list