DNS errors and secure DNS
Separate a DNS failure from an application failure
If a fictional application cannot open a named service, first identify the exact name, record type, expected resolver and network view. Check the client settings supplied by DHCP or other configuration. A DNS response containing the expected IP does not prove routing, TCP connectivity, TLS or application health. Conversely, an application that works using an address may suggest a naming problem, but virtual hosting and certificate checks can make IP-based access misleading. Use only approved lab data and recorded output.
Read the response, not just success or failure
RCODE is the response code. NXDOMAIN (3) means the queried name does not exist in the relevant DNS result; NOERROR (0) with a genuine NODATA answer means the name exists but the requested type is absent. An empty answer alone could also be a referral. SERVFAIL (2) means the server could not complete the request, for example because of upstream failure or DNSSEC validation failure. REFUSED (5) indicates refusal to perform the operation, often policy. A timeout is a client observation, not an RCODE. In case E, success over TCP after truncation is expected and does not establish that UDP is broken.
Case A: RCODE=NXDOMAIN; authority contains SOACase B: RCODE=NOERROR; no AAAA answer; authority contains SOACase C: RCODE=SERVFAILCase D: no response before client deadlineCase E: UDP response TC=1; TCP retry succeedsAsk a specific question with the right tool
This diagnostic topology is separate from the zone example in lesson 2. These are static BIND 9.20.23 command examples for a hypothetical isolated lab: 192.0.2.53 represents a recursive resolver and 192.0.2.54 an authoritative server. They are documentation addresses, not running services; do not execute here. In an authorized lab substitute the actual isolated endpoints. dig displays status, flags, answer, authority and additional data; +tcp selects TCP, +norecurse clears RD. host and nslookup also query DNS. Platform resolver tools may use different local resolution paths (hosts file, cache, per-link DNS); compare the application’s actual resolver before concluding results conflict.
dig @192.0.2.53 www.example.com. Adig @192.0.2.53 www.example.com. A +tcpdig @192.0.2.54 www.example.com. A +norecursehost -t AAAA www.example.com. 192.0.2.53nslookup -type=A www.example.com. 192.0.2.53DNSSEC and encrypted transport solve different problems
DNSSEC uses signed DNS data and a chain of trust to let a validating resolver check origin and integrity, including authenticated denial of existence when applicable. It does not hide the queried name. DNS over TLS (DoT, normally TCP 853) and DNS over HTTPS (DoH, normally HTTPS port 443) protect the transport to the selected resolver when the peer is properly authenticated. They do not automatically validate DNSSEC or conceal queries from that resolver, and they do not encrypt all subsequent DNS hops by themselves. A valid DNSSEC answer does not imply a trustworthy application. Never disable certificate or DNSSEC validation as a generic fix.
Diagnose a split-view incident
A fictional internal resolver answers portal.example.com A with 192.0.2.40; the external view returns NXDOMAIN by design. Split-horizon DNS serves different data depending on the intended view. Compare the configured resolver, query type, cache TTL and authoritative view with the expected policy. For SERVFAIL, inspect approved resolver logs for upstream reachability or validation errors; for timeout, check reachability and transport policy before assuming missing records. For a wrong cached answer, verify the current authoritative record and remaining TTL. Document the evidence and recheck after an authorized correction. Baselines: RFC 4033, RFC 7858, RFC 8484, RFC 9520 and BIND 9.20.23 manual. Next: NAT and port translation.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
DNS errors and secure DNS — knowledge check
Apply DNS concepts to synthetic records and recorded scenarios.
A server returns NOERROR with a genuine NODATA answer to an AAAA query. What follows?
The client receives no response before its deadline. What is directly observed?
What does DNSSEC validation primarily check?
An authenticated DoT session protects which part of the resolution path?
Internal DNS returns a private-view record while external DNS intentionally returns NXDOMAIN. What should you check first?