Mark Blackman <m...@exonetric.com> writes:
> my DNS resolution is broken, so my ports can't download any tarballs. 
> In this case, I reach for dig to see which part of the DNS resolution
> chain is failing me. 
>
> At the bare minimum, 'dig' should be an alias for 'drill', which I have 
> to say isn't working brilliantly for me on OS X. It suggests I use '-t' 
> 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  

; <<>> 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.no. 
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 
;; QUESTION SECTION:
;; des.no.      IN      SOA

;; ANSWER SECTION:
des.no. 3600    IN      SOA     ns.des.no. hostmaster.des.no. 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
;; WHEN: Mon Jul  9 23:22:23 2012
;; MSG SIZE  rcvd: 128

DES
-- 
Dag-Erling Smørgrav - d...@des.no
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to