My DNS configuration looks like this:
$ systemd-resolve --status
Global DNS Servers: 192.168.1.1 DNS Domain: house.lan
...
Link 2 (enp11s0) Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6 LLMNR setting: yes
MulticastDNS setting: no DNSSEC setting: no DNSSEC supported: no DNS Servers: 192.168.1.1 2001:xxxx:xxxx:xxxx::1 DNS Domain: house.lanenp11s0 is NetworkManager-managed. The DNS server IPs are both correct, and are the LAN IPs of the router. I'm not sure why only the v4 IP is global.
When I specifically dig a host using the v6 IP, it works:
$ dig -6 @2001:xxxx:xxxx:xxxx::1 google.com AAAA
; <<>> DiG 9.10.3-P4-Ubuntu <<>> -6 @2001:xxxx:xxxx:xxxx::1 google.com AAAA
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19546
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.com. IN AAAA
;; ANSWER SECTION:
google.com. 99 IN AAAA 2607:f8b0:4009:810::200e
;; Query time: 18 msec
;; SERVER: 2001:xxxx:xxxx:xxxx::1#53(2001:xxxx:xxxx:xxxx::1)
;; WHEN: Mon Aug 21 19:05:03 EDT 2017
;; MSG SIZE rcvd: 67However, attempting to use defaults results in a timeout:
$ dig -6 google.com AAAA
; <<>> DiG 9.10.3-P4-Ubuntu <<>> -6 google.com AAAA
;; global options: +cmd
;; connection timed out; no servers could be reachedWhat gives? Does the v6 server need to be somehow marked global?
1 Answer
This is not working because there are no IPv6 nameservers defined in /etc/resolv.conf. In case of Ubuntu 16.04.3 the only entry in this file is
nameserver 127.0.1.1and maybe a search domain.
As "dig -6" only uses IPv6, there is simply no nameserver to ask. An easy fix would be to let the dnsmasqd which is listening on port 53 on localhost IPv4 also listen on the IPv6 localhost address "::1/128" and add the IPv6 localhost address also to /etc/resolv.conf.