From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 9 21:37:13 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 971B3106566C; Mon, 9 Jul 2012 21:37:13 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 254068FC1C; Mon, 9 Jul 2012 21:37:13 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id B4C63685D; Mon, 9 Jul 2012 21:37:11 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 6A5B487D2; Mon, 9 Jul 2012 23:37:11 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Mark Blackman References: <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> <4FFA7174.7050604@FreeBSD.org> <4FFA7980.4000707@FreeBSD.org> <4FFB46A4.5050504@FreeBSD.org> <1E29121E-62B1-4929-BB7B-4FCA5D893F51@exonetric.com> Date: Mon, 09 Jul 2012 23:37:10 +0200 In-Reply-To: <1E29121E-62B1-4929-BB7B-4FCA5D893F51@exonetric.com> (Mark Blackman's message of "Mon, 9 Jul 2012 22:13:12 +0100") Message-ID: <86a9z8mxa1.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "Bjoern A. Zeeb" , Doug Barton , Garrett Wollman , Avleen Vig , FreeBSD Hackers Subject: Re: Replacing BIND with unbound X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 21:37:13 -0000 Mark Blackman 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