DNS resolution and caching
Who answers a DNS question?
A DNS resolver obtains records on behalf of an application. For example, an A record for shop.example may give the documentation address 192.0.2.10. The authoritative server serves data for its zone; a recursive resolver obtains an answer using its cache or by following referrals. A device usually asks a configured resolver rather than contacting every authoritative server itself.
Trace a fictional lookup
Assume the cache is empty. The recursive resolver follows referrals from the root toward the relevant zone, obtains the A record and returns it to the client. A later client asking the same resolver for the same record may receive a cached answer. In this example every name and address is fictional; do not make real queries.
Calculate a cache lifetime
TTL (time to live) is expressed in seconds. A fictional resolver stores a record at second 0 with TTL 120. At second 30 it has 90 seconds of ordinary freshness remaining; at second 120 that freshness expires. If the zone changed at second 40, a cached answer at second 60 may still contain the old address. Some resolvers deliberately serve stale answers under documented conditions (RFC 8767); our model disables this behavior.
Separate negative answers from failures
NXDOMAIN means the queried name does not exist according to the response. A name can exist yet lack the requested record type (NODATA). SERVFAIL indicates that the server could not complete the request; it does not prove that the name is absent. Negative results and some failures can be cached under different rules. Record the response type, query name, record type, resolver and time before deciding what went wrong.
Practice: a planned address change
A fictional administrator changes an A record at second 50. A cache entry was acquired at second 10 with TTL 90. Decide whether an ordinary cached answer can still be fresh at seconds 70 and 100. Explain why a successful name lookup does not prove the HTTPS application is healthy. Next: protect DNS data and transport.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
DNS resolution and caching — knowledge check
Reason about fictional DNS and TLS service evidence.
Which server provides zone data as its authority?
A record was cached at t=10 with TTL 90. At t=70 how much ordinary freshness remains?
At t=100, what is true of that record in the no-serve-stale model?
Which response indicates inability to complete a lookup rather than proven absence?
An A lookup succeeds but HTTPS fails. What should you conclude?