The Main Problem
I'm trying to resolve the domain picard.tn.tinloaf.de
using my home router's DNS resolver. It should resolve to an A
record pointing to 10.17.1.10
(a host in my VPN network). The router sits at 192.168.0.1
and is a cheap-ish thing supplied by my ISP. It would not suprise me to find that its resolver is just broken.
If I use dig
to query for ANY
, this is what I get:
tinloaf@janeway ~ $ dig -t ANY picard.tn.tinloaf.de @192.168.0.1
; <<>> DiG 9.14.4 <<>> -t ANY picard.tn.tinloaf.de @192.168.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52368
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: db6540198fc3d64c316539ba5db350d5ea576f0f0c9323e9 (good)
;; QUESTION SECTION:
;picard.tn.tinloaf.de. IN ANY
;; ANSWER SECTION:
picard.tn.tinloaf.de. 180 IN A 10.17.1.10
;; Query time: 131 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Fri Oct 25 21:47:34 CEST 2019
;; MSG SIZE rcvd: 93
Nice. Not sure about the TTL
in that response (see below for additional shenanigans), but the A
record is there. Let's query with -t A
:
tinloaf@janeway ~ $ dig -t A picard.tn.tinloaf.de @192.168.0.1
; <<>> DiG 9.14.4 <<>> -t A picard.tn.tinloaf.de @192.168.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25118
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: e3d7c44265c696ae29b2bd405db35122345a154db36bffcc (good)
;; QUESTION SECTION:
;picard.tn.tinloaf.de. IN A
;; Query time: 143 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Fri Oct 25 21:48:50 CEST 2019
;; MSG SIZE rcvd: 77
How can that be? Can it be any kind of misconfiguration on my side (I'm managing my DNS zone myself) that makes an A
record appear when I query for ANY
, but disappear when I query for A
? The DNS lookup tool at mxtoolbox.com does not show any errors for that domain.
The TTLs seem bogus, too
If I run multiple -t ANY
queries in rapid succession, this is what happens:
tinloaf@janeway ~ $ dig -t ANY picard.tn.tinloaf.de @192.168.0.1
; <<>> DiG 9.14.4 <<>> -t ANY picard.tn.tinloaf.de @192.168.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22050
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: ea0a9ccb1c56115a19c257145db352208dbc41f9e58cf134 (good)
;; QUESTION SECTION:
;picard.tn.tinloaf.de. IN ANY
;; ANSWER SECTION:
picard.tn.tinloaf.de. 507 IN A 10.17.1.10
;; Query time: 277 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Fri Oct 25 21:53:05 CEST 2019
;; MSG SIZE rcvd: 93
tinloaf@janeway ~ $ dig -t ANY picard.tn.tinloaf.de @192.168.0.1
; <<>> DiG 9.14.4 <<>> -t ANY picard.tn.tinloaf.de @192.168.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56509
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: c642b601eed33f15938e59585db3522167f6c0ab9733d818 (good)
;; QUESTION SECTION:
;picard.tn.tinloaf.de. IN ANY
;; ANSWER SECTION:
picard.tn.tinloaf.de. 494 IN A 10.17.1.10
;; Query time: 159 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Fri Oct 25 21:53:06 CEST 2019
;; MSG SIZE rcvd: 93
tinloaf@janeway ~ $ dig -t ANY picard.tn.tinloaf.de @192.168.0.1
; <<>> DiG 9.14.4 <<>> -t ANY picard.tn.tinloaf.de @192.168.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14446
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: bb9a410f8db063f22d3bb66d5db35223580d725b203cbdfa (good)
;; QUESTION SECTION:
;picard.tn.tinloaf.de. IN ANY
;; ANSWER SECTION:
picard.tn.tinloaf.de. 504 IN A 10.17.1.10
;; Query time: 303 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Fri Oct 25 21:53:07 CEST 2019
;; MSG SIZE rcvd: 93
tinloaf@janeway ~ $ dig -t ANY picard.tn.tinloaf.de @192.168.0.1
; <<>> DiG 9.14.4 <<>> -t ANY picard.tn.tinloaf.de @192.168.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39213
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: eceda0ed18efd5d15e90b7de5db3522584f3b33cf5bbabf8 (good)
;; QUESTION SECTION:
;picard.tn.tinloaf.de. IN ANY
;; ANSWER SECTION:
picard.tn.tinloaf.de. 496 IN A 10.17.1.10
;; Query time: 277 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Fri Oct 25 21:53:09 CEST 2019
;; MSG SIZE rcvd: 93
Note that there are only a couple of seconds between those queries, however the TTL
field seems to be jumping around erratically. Is that normal? I could imagine that the cheap router box does not really run a caching (stub) resolver, but just forwards the requests to resolvers at my ISP, and there's a round robin load balancer there, so I get replies from different servers every time. Is that a realistic scenario?