0Pricing
Linux Networking & TCP/IP for Developers · Lesson

DNS Diagnostics with dig and nslookup

Diagnose name-resolution problems on Linux using dig, nslookup, and host to inspect DNS records, trace resolution paths, and spot misconfigurations.

Why DNS Diagnostics Matter

Many 'network is down' reports are really DNS failures. The host is reachable by IP, but the name will not resolve.

Linux ships tools to inspect resolution directly:

  • dig — flexible, scriptable lookups
  • nslookup — classic interactive tool
  • host — quick one-line answers

This lesson focuses on reading their output to find the real problem.

A Basic dig Query

Run dig followed by a hostname to fetch its A record.

The key part of the output is the ANSWER SECTION, which lists the resolved addresses and their TTL.

dig example.com

All lessons in this course

  1. Packet Capture with Wireshark/tcpdump
  2. Network Performance Tools
  3. Linux Firewall (Netfilter/iptables)
  4. DNS Diagnostics with dig and nslookup
← Back to Linux Networking & TCP/IP for Developers