Chapter 1 5 questions Graded in-browser Saved locally

Introduction — what DNS does

Think of DNS as a query for "name + type," and as a chain of divided responsibilities.

DNS is not just "turn a name into an IP"

The canonical example of DNS is looking up a name like www.example.com to get an IP address. But if you let your understanding end there, you hit problems in real work. DNS is more broadly "a distributed database where you ask what kind of information for this name is officially held by whom."

For example, you look up A / AAAA for the web, MX for mail delivery, and TXT for ownership verification. In other words, DNS always handles a name and a kind of question together as a pair.

Name
www.example.com
Type
A / AAAA / MX / TXT
Where the authoritative data lives
The authoritative servers of that zone (an authoritative server holds the official, canonical data for the zone)
Check your understanding

0 / 5 correct. Correctness is stored only in this browser's localStorage.

Practice 1-1 — Start from "name + type"

Confirm what a DNS question is built from.

Chapter 1 / Practice 1

Q1. When a browser wants to know the IPv4 address of www.example.com, which is the most correct DNS question?

Show hint

DNS queries consist of a "name" and a "type." Remember which type represents IPv4.

Chapter 1 / Practice 5

Q5. To check both A and AAAA for a single name, what is the minimum number of distinct query types you need?

types
Show hint

A and AAAA are different types.

Four characters you should tell apart first

CharacterWhat they doHow to read them here
Browser / appThe side that wants to use URLs or hostnamesNormally does not walk all the way to root by itself
OS stub resolverThe entry point for queries from appsTypically asks a nearby recursive resolver for help
Recursive resolverGathers the final answer on behalf of the user and returns itBecause it caches, from the user's side it looks like "the source of the answer"
Authoritative serverHolds the authoritative data of a zoneIf it is outside their scope, they send you onward with a referral
A schematic diagram of DNS going from the browser to the stub, the recursive resolver, and then authoritative servers
Through this course, every time you see a returned answer, check "who is the one returning it right now."

Practice 1-2 — Who knows how much

If you mix up the roles, dig output and the meaning of TTL become hard to read.

Chapter 1 / Practice 2

Q2. Which role walks root / TLD / authoritative servers on behalf of the user and gathers the final answer?

Show hint

From the user's perspective, it is "the party that returns the final answer all bundled up."

Chapter 1 / Practice 3

Q3. Based on this chapter's description, select every kind of information you can look up via DNS.

Show hint

Recall A / MX / TXT. The body of HTTP or TLS is not DNS's job.

Chapter 1 / Practice 4

Q4. When you look at a returned DNS response, which axis helps your understanding the most if you become conscious of it first?

Show hint

This is a viewpoint we will return to many times in this course.

Why the hosts file is not enough on its own

The hosts file here means the OS's own static "name ↔ IP" mapping table — for example /etc/hosts on Linux / macOS, or C:\Windows\System32\drivers\etc\hosts on Windows. If every name-to-IP mapping were fixed and you could hand the same table to every machine, DNS would not be needed. In reality, IP addresses change, and you also want to look up information other than IP — mail delivery destinations, ownership-verification tokens, and so on.

On top of that, each organization wants to manage its own namespace, so it is more natural to split management by authority and query as needed than to maintain a single enormous static table in one place.

This chapter's viewpoint:
Do not stop your thinking at the understanding that "the DNS server returned an answer" — always be conscious of whether that answer is authoritative data, a cache, or a referral.

Key takeaways from this chapter

  • DNS is a query for "name + type," which is an easy lens for sorting things out
  • User, stub, recursive resolver, and authoritative server each have different roles
  • From now on, we proceed with who holds the authoritative answer as our axis