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

Module 06 · From Scratch · DNS Server · with code: Go · about 13 min to read

Play it as a journeyTutor comes with a plan

DNS 06: A Forwarding Resolver

DNS Resolution
DNS Resolution · Open board

The concierge who does not know the answer and walks the directory for you. A forwarder is the concierge who instead phones a bigger concierge, and passes on what they say.

Before you start. DNS 05: Compressed Names taught the server to read names written as pointers, and gave it a small client that decodes any reply. Until now the server answered only for the names in its own map, and said NXDOMAIN for everything else, even www.github.com. A resolver is a server that finds answers for names it does not own. A forwarder is the simplest kind: it asks one bigger resolver and relays the reply. This lesson builds it, and the result is a server you could set as your computer’s DNS.

Lesson 42 of 117 in From Scratch

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 1 April 2018: whoever resolves your names knows every site you visit
  • What the forwarder does with one question
  • Why so careful? Sixteen bits is a small number
  • Relaying the reply without opening it
  • Seeing it work
  • When the upstream fails

Terms it explains: resolver, forwarder, `forward`, `handle`, `main.go`, Mistakes this stage invites.

Lab

You changed the address. How long until the world stops sending people to the old one?

Set Seconds the concierge keeps the note to 300, press Add next question through the run, and watch the stranded count in The tally.

Open The TTL dial

Review From Scratch