1

I'm trying to debug some issues on dns resolving and was trying nslookup (now deprecated) and dig.

I am, however, on a system that uses systemd for configuring /etc/resolv.conf.

~$ cat /etc/resolv.conf 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.

nameserver 127.0.0.53

This seems to render dig useless because all it does is point to the dns server at 127.0.0.53 which is a systemd construct on my machine.

~$ dig www.google.com

; <<>> DiG 9.10.3-P4-Ubuntu <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31247
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;www.google.com.            IN  A

;; ANSWER SECTION:
www.google.com.     54  IN  A   216.58.212.164

;; Query time: 29 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sun Jun 18 10:45:49 CEST 2017
;; MSG SIZE  rcvd: 59

Is this a true claim? If you're on systemd everything else is out?

4

No, for (at least) two reasons:

  1. systemd-resolved is an optional component of systemd. It need not be in use on a machine running systemd.

  2. dig has a lot of options that make it useful even with systemd-resolved (or any other local DNS cache, like dnsmasq) running. For example, you can specify the nameserver to query: dig @8.8.8.8 google.com. or any number of other options useful to debug DNS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.