Re: [DNSOP] Unexpected behaviour of dig +trace

Warren Kumari <warren@kumari.net> Wed, 26 March 2014 10:52 UTC

Return-Path: <warren@kumari.net>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 01C0B1A0316 for <dnsop@ietfa.amsl.com>; Wed, 26 Mar 2014 03:52:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.978
X-Spam-Level:
X-Spam-Status: No, score=-1.978 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 86lg9h8pfSnC for <dnsop@ietfa.amsl.com>; Wed, 26 Mar 2014 03:52:47 -0700 (PDT)
Received: from mail-la0-f50.google.com (mail-la0-f50.google.com [209.85.215.50]) by ietfa.amsl.com (Postfix) with ESMTP id 3B39A1A0315 for <dnsop@ietf.org>; Wed, 26 Mar 2014 03:52:46 -0700 (PDT)
Received: by mail-la0-f50.google.com with SMTP id y1so1340005lam.37 for <dnsop@ietf.org>; Wed, 26 Mar 2014 03:52:44 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=J1FNIKoBbTyI0J6WBj5s4e3OC24qWyaAiYa9sDw+G40=; b=cUTpNDAaIvr7/0N3svxx4ilG2B+K4Qt85BQoYMyGOI77d9G71LvuKJY6mAGInfpmM8 MjNnkQJWyHKFMVxmVT4BAc6LO6TsqZEH50Ixd/0ozG4pghV8hPsQLxHFmvn800a/xvZW Mxrbmnx0YHH30pnjngoQqo0DaEt9jkEQDWYF1a5h4zzM4/YUjXjloc9Zu25RVP7rItJA 37CVvYT1I47QJ+RRwGur8xwKV77HP1DoJPwxx6V92FTCeUdsPgHc7EJbt5Voo36h4muJ 05tUUSmGCGh7OqYxYk4Tp4KwNWhhuz/N4RU1a+Ie0EdyzgxuEjt/0KiEcZirt0BNK3yY QogQ==
X-Gm-Message-State: ALoCoQm/GQPgoIVieUfK0NHKk7mSPWFxocOgvecewt9WLoA9FYPjLj5IxrXHaZjL0hkSwHSpgadd
MIME-Version: 1.0
X-Received: by 10.153.4.134 with SMTP id ce6mr53514790lad.21.1395831164770; Wed, 26 Mar 2014 03:52:44 -0700 (PDT)
Received: by 10.114.0.243 with HTTP; Wed, 26 Mar 2014 03:52:44 -0700 (PDT)
X-Originating-IP: [199.91.195.1]
In-Reply-To: <20140326092227.GA6898@inet.tu-berlin.de>
References: <20140326092227.GA6898@inet.tu-berlin.de>
Date: Wed, 26 Mar 2014 18:52:44 +0800
Message-ID: <CAHw9_iKdNWicD+yWDo8+JkBg=8_V4tc=NpWBxtt3Fm8cjK8FCg@mail.gmail.com>
From: Warren Kumari <warren@kumari.net>
To: Florian Streibelt <florian@inet.tu-berlin.de>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Archived-At: http://mailarchive.ietf.org/arch/msg/dnsop/vlGPdDj4CIrcldzoTgIhGqiVbqY
Cc: dnsop <dnsop@ietf.org>
Subject: Re: [DNSOP] Unexpected behaviour of dig +trace
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Mar 2014 10:52:50 -0000

On Wed, Mar 26, 2014 at 5:22 PM, Florian Streibelt
<florian@inet.tu-berlin.de> wrote:
> Hello DNS ops,
>
> last week I discovered something that I personally would consider a bug in
> binds dig utility, at least the behaviour was unexpected for me.
>
> Summary: too many dns requests, using the system resolver although told
> otherwise.
>
> My question now is: bug or feature?

"Feature", but does catch many folk by surprise.
I'd written a patch and given it to someone at ISC that makes dig
output a warning message if you hand it both the "+trace" and
"@server" options. Dunno what happened, but never got integrated...

W


>
>
> Currently I am implementing a little testbed that simulates the DNS
> hiererchy, including root servers, TLD servers and so on.
>
> I thought it would be nice to let the dig utility show me the delegations it
> follows when resolving www.example.org in my testbed, using the +trace option,
> and starting by one of the simulated rootservers. Like so:
>
>
> $ dig +trace www.example.org @10.1.1.1
>
> ; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> +trace www.example.org @10.1.1.1
> ;; global options: +cmd
> .           2   IN  NS  a.root-servers.net.
> .           2   IN  NS  a.root-servers.net.
> ;; Received 77 bytes from 10.1.1.1#53(10.1.1.1) in 5 ms
>
> org.            172800  IN  NS  d0.org.afilias-nst.org.
> org.            172800  IN  NS  b2.org.afilias-nst.org.
> org.            172800  IN  NS  b0.org.afilias-nst.org.
> org.            172800  IN  NS  c0.org.afilias-nst.info.
> org.            172800  IN  NS  a2.org.afilias-nst.info.
> org.            172800  IN  NS  a0.org.afilias-nst.info.
> ;; Received 435 bytes from 198.41.0.4#53(198.41.0.4) in 188 ms
>
> example.org.        86400   IN  NS  a.iana-servers.net.
> example.org.        86400   IN  NS  b.iana-servers.net.
> ;; Received 81 bytes from 199.19.56.1#53(199.19.56.1) in 186 ms
>
> www.example.org.    86400   IN  A   93.184.216.119
> example.org.        172800  IN  NS  b.iana-servers.net.
> example.org.        172800  IN  NS  a.iana-servers.net.
> ;; Received 185 bytes from 199.43.133.53#53(199.43.133.53) in 192 ms
>
>
>
> As you can see, immedeately after the first lookup the dig utility leaves my
> testbed, which consists of a simulated 10/8,  and runs right off the Internet.
>
>
> The reason is that dig uses the system resolver from resolv.conf for all but
> the initial query and the direct queries to the authoritative servers.
>
>
> This can easily by validated when you look at a pcap trace from something like
>
> $ dig +trace www.tu-berlin.de @198.41.0.4
>
> or
>
> $ dig +trace -4 www.tu-berlin.de @198.41.0.4
>
> For reference I attached a plot generated by wireshark for the second command,
> limiting the packet count from 94 to 52 packets.
>
>
> cheers,
>   Florian
>
>
>
> --
> Florian Streibelt, Dipl.-Inf.        building MAR, 4th floor, room 4.004
> Fachgebiet INET - Sekr. MAR 4-4          phone: +49 30 314 757 33
> Technische Universität Berlin           gpg-fp: 5BE7 F008 8B83 9357 1108
> Marchstrasse 23 - 10587 Berlin                  984A 3B8E A41F 82F6 1240
>
> _______________________________________________
> DNSOP mailing list
> DNSOP@ietf.org
> https://www.ietf.org/mailman/listinfo/dnsop
>