DNS Tools
Note
Machine translation from the German version. In case of doubt, the content of the German version shall prevail.
dig (Linux/macOS)
dig (Domain Information Groper) is a powerful command-line tool for querying DNS name servers. It is considered the standard replacement for older tools like nslookup.
Basic query
To query the A record (IP address) of a domain, the following command can be used:
Query specific record types
Specific MX, TXT or other records can be queried.
# Mailserver abfragen
dig ruhr-uni-bochum.de MX
# TXT-Records (z.B. für SPF) abfragen
dig ruhr-uni-bochum.de TXT
# IPv6-Adresse (AAAA) abfragen
dig ruhr-uni-bochum.de AAAA
Reverse search
To determine the assignment of a hostname to an IP address, the option -x is used.
DNSSEC query
To request DNSSEC records (e.g., RRSIG), the +dnssec option is used:
Query specific nameserver
If the query is to be made via a specific server (e.g., a name server of the RUB), the @ symbol is used:
Trace the path of dissolution
To troubleshoot, the resolution path can be traced from the root servers to the authoritative server:
Resolve-DnsName
Under Windows, Resolve-DnsName is the modern PowerShell cmdlet for DNS queries. It provides more detailed information than the classic nslookup.
Basic query
The standard query for a domain is done via the parameter -Name.
Query specific record types
Via the -Type parameter, specific entries can be requested:
# Mailserver abfragen
Resolve-DnsName -Name ruhr-uni-bochum.de -Type MX
# TXT-Records abfragen
Resolve-DnsName -Name ruhr-uni-bochum.de -Type TXT
Query specific nameserver
To use a specific DNS server for the query, the -Server parameter is used:
Ignore hosts file
To ensure that the result comes from the DNS server and not from the local hosts file:
DNSSEC query
The query of DNSSEC information is done via the parameter -DnssecOk.