01 Read02 Apply03 Complete

Build the idea first, then use the next activity to check it.

Records, resolvers and the order of lookups

What a resolver actually consults and in what order, which record types you will meet, and why a name can resolve on one host and fail on the next.

10 min readServices

What you will be able to do

  • Name the common record types and what each one answers
  • Trace a lookup through cache, hosts file and configured resolver
  • Explain why two hosts can disagree about the same name

Before this: You need "DNS - names instead of addresses" for the basic idea, and the DHCP lesson, since the resolver a host uses usually arrives in its lease.

Why it matters: "It works from my machine" is nearly always a DNS answer that differs between two hosts - a cached record, a hosts-file entry, or a different resolver handed out by a different scope. Knowing the lookup order turns that from a mystery into three things to check.

A resolver does not go straight to a DNS server. It works through a short list of places, in order, and stops at the first answer. Almost every confusing DNS fault is really a disagreement about which of those places answered.

The record types worth knowing

TypeAnswersTypical use
AName to IPv4 addressThe everyday lookup
AAAAName to IPv6 addressThe same, over IPv6
CNAMEName to another nameAn alias that follows a move
MXDomain to mail hostWhere to deliver mail
PTRAddress back to a nameReverse lookups, logging
NSZone to its serversDelegation between zones

The order a lookup takes

  1. The application's own cache, if it keeps one.
  2. The operating system's resolver cache - a previous answer that has not yet expired.
  3. The hosts file, which is local, static, and beats the network.
  4. The configured resolver, usually the one handed out in the DHCP lease.

Two of those four are per-host state. That is the whole reason one machine resolves a name and its neighbour does not: the cache still holds an old answer, or someone put a line in the hosts file two years ago and forgot.

Two hosts, one name, two answers

The stock system moves to a new address on schedule and the A record is updated. A host that has never looked the name up gets the new address immediately. 's machine looked it up an hour before the cutover, under a one-day TTL, so it keeps using the old address for the rest of the day - and he reports the stock system as down while everyone around him is working normally.

TTL is a promise about staleness

Every record carries a time to live: how long a resolver may keep the answer before asking again. A long TTL reduces query load and makes changes slow to take effect. A short one does the opposite. Before a planned change, lowering the TTL in advance is what makes the cutover quick when it happens.

Key takeaways

  • A resolver stops at the first answer from cache, hosts file, then the configured server.
  • Two of those are per-host state, which is why hosts disagree.
  • A CNAME answers with a name, not an address, and that indirection is what makes cutovers cheap.
  • TTL decides how long a stale answer survives; lower it before a planned change, not during one.

Ready to keep going?

Create a free account to save your progress and take the knowledge check.

subnetica© 2026 · Learn, practice, retain.
AboutFAQPrivacy PolicyTerms & Acceptable UseAccessibilitycontact@subneti.ca
CCNA is a registered trademark of Cisco Systems, Inc. CompTIA Network+ and CompTIA Security+ are registered trademarks of CompTIA, Inc. Subnetica is an independent learning platform and is not affiliated with, endorsed by, or sponsored by Cisco Systems, Inc. or CompTIA, Inc.