DNS debug tools

Updated . Posted . Visible to the public. Repeats.

There are several tools for DNS debugging which offer you more or less information. Most of the time the more simple ones, like host oder nslookup will be sufficient.

host

simple DNS lookup utility.

>host heise.de
heise.de has address 193.99.144.80
heise.de has IPv6 address 2a02:2e0:3fe:1001:302::
heise.de mail is handled by 10 relay.heise.de.

nslookup

query Internet domain name servers. Nslookup has two modes: interactive and non-interactive.

>nslookup heise.de
Server:		146.254.160.30
Address:	146.254.160.30#53

Non-authoritative answer:
Name:	heise.de
Address: 193.99.144.80
Name:	heise.de
Address: 2a02:2e0:3fe:1001:302::

When a domain name is given, the non-interactive mode is used. Call nslookup without a url to start interactive mode. With interactive mode you just have to type in domain names and press enter to get the infos.

The Server in the first line is your DNS resolver. To use a specific one, you can call nslookup like this:

>nslookup heise.de 8.8.8.8
Server:		8.8.8.8
Address:	8.8.8.8#53

Non-authoritative answer:
Name:	heise.de
Address: 193.99.144.80
Name:	heise.de
Address: 2a02:2e0:3fe:1001:302::

dig

  • flexible tool for interrogating DNS name servers ( How to use dig Show archive.org snapshot )
  • way more verbose than host and nslookup
  • without further parameters:
    • the "QUESTION SECTION" repeats what you asked for
    • the "ANSWER SECTION" shows the IP
    • the "AUTHORITY SECTION" lists the authoritative names servers, therefore tells you which servers resolve the domain to a IP. It also lists the time to live (TTL), therefore how long that entry will be valid.
    • the "ADDITIONAL SECTION" shows information about the authoritative name servers.
>dig heise.de

; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> heise.de
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38907
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 13, ADDITIONAL: 24

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;heise.de.			IN	A

;; ANSWER SECTION:
heise.de.		2958	IN	A	193.99.144.80

;; AUTHORITY SECTION:
.			34424	IN	NS	k.root-servers.net.
.			34424	IN	NS	e.root-servers.net.
.			34424	IN	NS	a.root-servers.net.
.			34424	IN	NS	m.root-servers.net.
.			34424	IN	NS	i.root-servers.net.
.			34424	IN	NS	j.root-servers.net.
.			34424	IN	NS	b.root-servers.net.
.			34424	IN	NS	d.root-servers.net.
.			34424	IN	NS	l.root-servers.net.
.			34424	IN	NS	c.root-servers.net.
.			34424	IN	NS	f.root-servers.net.
.			34424	IN	NS	h.root-servers.net.
.			34424	IN	NS	g.root-servers.net.

;; ADDITIONAL SECTION:
a.root-servers.net.	125551	IN	A	198.41.0.4
b.root-servers.net.	344076	IN	A	199.9.14.201
b.root-servers.net.	150095	IN	AAAA	2001:500:200::b
c.root-servers.net.	344082	IN	A	192.33.4.12
c.root-servers.net.	344082	IN	AAAA	2001:500:2::c
d.root-servers.net.	344108	IN	A	199.7.91.13
d.root-servers.net.	344108	IN	AAAA	2001:500:2d::d
e.root-servers.net.	433387	IN	A	192.203.230.10
e.root-servers.net.	460740	IN	AAAA	2001:500:a8::e
F.root-servers.net.	344079	IN	A	192.5.5.241
g.root-servers.net.	344065	IN	A	192.112.36.4
g.root-servers.net.	133895	IN	AAAA	2001:500:12::d0d
h.root-servers.net.	344063	IN	A	198.97.190.53
i.root-servers.net.	344189	IN	A	192.36.148.17
i.root-servers.net.	344189	IN	AAAA	2001:7fe::53
J.root-servers.net.	344171	IN	A	192.58.128.30
J.root-servers.net.	134495	IN	AAAA	2001:503:c27::2:30
K.root-servers.net.	344126	IN	A	193.0.14.129
K.root-servers.net.	169296	IN	AAAA	2001:7fd::1
L.root-servers.net.	344217	IN	A	199.7.83.42
L.root-servers.net.	344217	IN	AAAA	2001:500:9f::42
M.root-servers.net.	344098	IN	A	202.12.27.33
M.root-servers.net.	344098	IN	AAAA	2001:dc3::35

;; Query time: 23 msec
;; SERVER: 146.254.160.30#53(146.254.160.30)
;; WHEN: Thu Apr 09 11:37:21 CEST 2020
;; MSG SIZE  rcvd: 762

Judith Roth
Last edit
Emanuel
License
Source code in this card is licensed under the MIT License.
Posted by Judith Roth to makandra dev (2021-01-25 09:05)