Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Jul 2012 23:37:10 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Mark Blackman <mark@exonetric.com>
Cc:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>, Doug Barton <dougb@FreeBSD.org>, Garrett Wollman <wollman@bimajority.org>, Avleen Vig <avleen@gmail.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Replacing BIND with unbound
Message-ID:  <86a9z8mxa1.fsf@ds4.des.no>
In-Reply-To: <1E29121E-62B1-4929-BB7B-4FCA5D893F51@exonetric.com> (Mark Blackman's message of "Mon, 9 Jul 2012 22:13:12 %2B0100")
References:  <CA%2BQLa9B-Dm-=hQCrbEgyfO4sKZ5aG72_PEFF9nLhyoy4GRCGrA@mail.gmail.com> <4FF2E00E.2030502@FreeBSD.org> <86bojxow6x.fsf@ds4.des.no> <89AB703D-E075-4AAC-AC1B-B358CC4E4E7F@lists.zabbadoz.net> <4FF8C3A1.9080805@FreeBSD.org> <20472.51031.308284.775990@hergotha.csail.mit.edu> <4FF8C890.9030408@FreeBSD.org> <CAMjP1KmVDJuKw09UFXb2M6QaL1dD1ocSjMOZLtjKiYFYoF9f4Q@mail.gmail.com> <4FFA7174.7050604@FreeBSD.org> <CAMjP1K=MahXEgHM-gKHFfDpQRDXY_0LGTn0JEE0Zm43%2Bh5jfPA@mail.gmail.com> <4FFA7980.4000707@FreeBSD.org> <CAMjP1K=b8mwqe31m=OqjUV%2BF=B85L4vpfT%2BDj00a1voPB-8TwA@mail.gmail.com> <D49E4B08-AC64-48C0-B918-94A7E30AB981@exonetric.com> <4FFB46A4.5050504@FreeBSD.org> <1E29121E-62B1-4929-BB7B-4FCA5D893F51@exonetric.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Blackman <mark@exonetric.com> writes:
> my DNS resolution is broken, so my ports can't download any tarballs.=20
> In this case, I reach for dig to see which part of the DNS resolution
> chain is failing me.=20
>
> At the bare minimum, 'dig' should be an alias for 'drill', which I have=20
> to say isn't working brilliantly for me on OS X. It suggests I use '-t'=20
> and then keeps suggesting I use '-t' even when I do use it.
>
> drill feels a bit rough around the edges to me.

This reminds me of the (probably apocryphal) American grade school
teacher who complained that the metric system was so inexact; for
instance, a meter is _approximately_ a yard, a kilometer is
_approximately_ two thirds of a kilometer, etc.

By which I mean, of course, that you are blaming drill not for its own
shortcomings, but for those of the wrapper you use to _approximate_ dig
with drill.

The -t option doesn't mean the same for drill as for dig.  A proper dig
wrapper for drill would have to translate one to the other.  However,
you should never need the -t option when using dig; I suspect that it
exists only for people who are so used to host that they want to use the
same command line except for s/host/dig/.

Instead of 'dig -t soa des.no', you should use 'dig des.no soa'.  The
syntax is

  dig [@server] name [type] [class]

I'm not sure why it supports a class argument, since as far as I know,
the only class still in use is IN.

In the most common case, dig and drill are nearly identical; the command
line is exactly the same (except for s/dig/drill/), and the output
nearly so - drill doesn't print a question section.  If that's a problem
for you, it's easily fixed.

% dig @ns.des.no des.no soa=20=20

; <<>> DiG 9.6.-ESV-R5-P1 <<>> @ns.des.no des.no soa
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47226
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;des.no.                                IN      SOA

;; ANSWER SECTION:
des.no.                 3600    IN      SOA     ns.des.no. hostmaster.des.n=
o. 2012042401 3600 900 3600000 3600

;; AUTHORITY SECTION:
des.no.                 3600    IN      NS      ns.des.no.
des.no.                 3600    IN      NS      ns.hyp.net.

;; ADDITIONAL SECTION:
ns.des.no.              3600    IN      A       194.63.250.121

;; Query time: 0 msec
;; SERVER: 194.63.250.121#53(194.63.250.121)
;; WHEN: Mon Jul  9 23:22:05 2012
;; MSG SIZE  rcvd: 128

% drill @ns.des.no des.no soa
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 61642
;; flags: qr aa rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1=20
;; QUESTION SECTION:
;; des.no.      IN      SOA

;; ANSWER SECTION:
des.no. 3600    IN      SOA     ns.des.no. hostmaster.des.no. 2012042401 36=
00 900 3600000 3600

;; AUTHORITY SECTION:
des.no. 3600    IN      NS      ns.des.no.
des.no. 3600    IN      NS      ns.hyp.net.

;; ADDITIONAL SECTION:
ns.des.no.      3600    IN      A       194.63.250.121

;; Query time: 0 msec
;; SERVER: 194.63.250.121
;; WHEN: Mon Jul  9 23:22:23 2012
;; MSG SIZE  rcvd: 128

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86a9z8mxa1.fsf>