Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Networking the lesson

DNS Resolution a show in 8 chapters

Goal: turn any name into its address with no master list, fast

1 of 8 Your guess

Before we start

You type example.com and a page appears. That is a name. Before anything is sent, your computer needs a number, an address like 104.20.23.154, because the wires deliver only to numbers.

Which picture is closest to how your computer finds that number?

Pick the closest. You find out which fits at the end.

HOSTS.TXTmaster copyMenlo Park8 machines, each fetching it

8lines in the file

one line per machine: its name and its address

64lines copied for one new machine

8 machines × 8 lines each = 64

1phone call to Menlo Park

business hours only, and a person types the line in

Example sizes. The lesson says one file worked at a few hundred machines.

2 of 8 The problem

1970s: one file for the whole network

Before the early 1980s, every computer on the ARPANET, the network the internet grew from, kept the same copy of one file: HOSTS.TXT. Its only job was saying which name belonged to which machine.

To add a computer, you phoned the Network Information Center at the Stanford Research Institute in Menlo Park, in business hours. A person typed your line into the master copy. Every other machine then fetched the whole file again to see it.

8 machines. Double the network and watch the copying.

Why multiply?

Every machine fetches the whole file, and the file has one line per machine. So each of the machines copies that many lines.

example.coma name: what you type, chosen by a person?104.20.23.154an address: the number wires deliver to

3 of 8 The idea

1983: a system with no list at all

The fix landed on Paul Mockapetris, at the University of Southern California's Information Sciences Institute. Not a bigger, faster list. No complete list anywhere.

First, the two things it connects. A name is chosen by a person and can point somewhere new tomorrow. An address belongs to whoever rents that slice of the network right now.

Step 1 of 3

Your laptopexample.com?Concierge(the resolver)no root listRoot list13 root namesUsually built in. Here it was fetched.The root13 machines.com registryevery .com nameexample.com'sown server

time so far: 0 ms

Measured once in the lesson, on a real lookup of example.com.

4 of 8 Try it

Be the concierge

A hotel concierge makes however many calls it takes and comes back with one answer. In DNS that is the resolver, usually run by your internet provider, or a public one like 8.8.8.8. You are the concierge now.

Times are in ms, milliseconds: a thousandth of a second each. The button below makes one call at a time.

Your laptop asks the concierge one thing: example.com? The concierge doesn't know. It needs somewhere to start.

Step 1 of 8

The lesson asked 1.1.1.1 for openbsd.org, three times in a row

1st asknot asked yet

2nd asknot asked yet

3rd asknot asked yet

5 of 8 The fix

The sticky note

A full walk took 27 + 51 + 84 + 18 = 180 ms in chapter 4, and one page can touch a dozen names. So the concierge writes each answer on a sticky note before handing it back. The next person asking the same question gets the note.

The lesson asked a public concierge, 1.1.1.1, for openbsd.org three times in a row.

Press Play to ask three times.

Step 1 of 4

wikipedia.org's TTL from 1.1.1.1, asked once a second

0501000s1s2s3s4s5s6s7sseconds left, as askedone clock: 1 less each second

6 of 8 The cost

Many notes, many clocks

A note's time left should fall by 1 every second. The lesson asked for the same name's TTL once a second, eight times. Watch it count down.

Press Play to ask once a second.

Step 1 of 5

7 of 8 Your guess

Your picture now

Goal met: no master list anywhere. A full walk is 180 ms, a note is 14 ms, and on a busy name with a 300 second TTL only 1 ask in 300 walks. Which picture is closest now?

Pick one.

DNS resolutionNo list anywhere. Each office knows one piece, and who to ask next.1231970s: one list, a copyon every machinen × nlines copied per new machineroot › .com › example.comAsk one concierge. Each officesays "ask them", down the chain.180 ms27 + 51 + 84 + 18, the full walkexample.com→ 104.20.23.154keep 300 s (the TTL)Write the answer on a note.14 msfrom the note, not 435 msmeasured in the lessonchalkbrain.com
DNS resolutionNo list anywhere. Each office knowsone piece, and who to ask next.11970s: one list, a copy onevery machinen × nlines copied per new machine2Ask one concierge. Each officesays "ask them", down the chain.180 ms27 + 51 + 84 + 18, the full walk3Write the answer on a note,keep it for its TTL (300 s).14 msfrom the note, not 435 mschalkbrain.com

8 of 8 Keep this

Keep this

Nobody keeps the whole list. You ask one concierge, who follows referrals from the root down to the name's own server, then keeps the answer on a note for its TTL.

The price: a change reaches people only as their notes run out, each on its own clock. Lower the TTL a day before a move.

Read the full lesson