Octet

How do you tell a DNS problem from a network problem?

Show the answer

Say this first

I test by address and by name separately. If ping 198.51.100.10 works but the same test by name fails, the path is fine and resolution is broken. Then I run nslookup against the configured resolver and against another known-good one. If the other one answers, the configured resolver is the problem. If none answer, I check reachability to port 53. I also check that the name resolves to the right address, because a wrong answer looks exactly like a network outage.

Go deeper

The split

TestIf it worksIf it fails
ping 198.51.100.10the IP path is finea network problem: routing, filtering
ping app.example.comresolution and path are fineDNS, or the name points at a wrong address
nslookup app.example.comshows the server used and the answertimed out: server unreachable; NXDOMAIN: name does not exist there; SERVFAIL: the resolver could not get an answer

Common DNS faults

  • Clients point at a wrong or dead resolver, from a bad DHCP option 6 or a static setting.
  • A firewall allows UDP 53 but blocks TCP 53, so large answers fail. Resolvers retry over TCP when a UDP answer is truncated, and zone transfers always use TCP.
  • Split DNS: an internal name resolves to the external address, or VPN users get the wrong view.
  • Stale records after a migration, cached for the record's TTL.
  • Negative caching: an NXDOMAIN stays cached for the zone's negative TTL after a record was briefly missing.
  • Search suffixes: a short name like crm resolves only when the suffix list is right.

Host-side checks

Windows: ipconfig /all for the DNS servers in use, ipconfig /flushdns, Resolve-DnsName. Linux: resolvectl status with systemd-resolved, /etc/resolv.conf, and dig.

Traps

  • Saying DNS only uses UDP. Truncated answers retry over TCP 53, and blocking it breaks large responses.
How did you do?Book 9.3 Infrastructure Applications