Troubleshoot DNS Client Issues

General Information

Client perspective checking DNS configuration.

Lab Setup

The following virtual machines will be used:

  • ( → Perform all connectivity tests from here
  • ( → Install DNS caching here

Troubleshooting: Unbound

View (dump) the current contents of the unbound cache

unbound-control dump_cache
  • This can be also redirected to a file to make edits and load back into cache

Purge the cache: Single record

unbound-control flush

Purge the cache: Entire Zone

unbound-control flush

Load cache from a file (dumped there previously)

unbound-control load_cache < cache.txt

Troubleshoot DNS From a Client

Check to see what DNS servers are configured

cat /etc/resolv.conf
  • Take note of whether the file is controlled via NetworkManager. If so, then the DNS servers are set via that service/from /etc/sysconfig/network-scripts/

Ensure a route exists to the DNS server

ip route sh

Ping the DNS server

ping -c4 <ip-of-dns>

Check to see if you can connect to port 53

telnet <ip-of-dns> 53
nc -v -w 3 <ip-of-dns> 53

Test a domain lookup against the DNS server directly

dig @<ip-of-dns>

Dig returns a status indicator in the “Got Answer” section. Values can be:

  • NOERROR - DNS resolve was successful
  • NXDOMAIN - DNS info requested could not be found
  • SERVFAIL - Error contacting a DNS server

  • linux_wiki/troubleshoot_dns_client_issues.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)