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 14 min to read

Play it as a journeyTutor comes with a plan

DNS 05: Compressed Names

DNS Wire Format
DNS Wire Format · Open board

A real answer record with the name field C0 0C circled: “a pointer: the name is at byte 12 - the question’s name, not repeated”. This lesson is that circle, taken apart.

Before you start. DNS 03 and 04: The Question and the Answer wrote names as length-prefixed labels (03 www 07 example 04 test 00) and built answers whose name field was an unexplained c0 0c. A pointer is a number that says where something is instead of containing it. This stage teaches the server to read names written as pointers, and builds a small dig of our own to do it on real replies from the internet.

Lesson 41 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

  • September 1981: every host must accept 576 bytes
  • A pointer: two bytes, top bits 11
  • A real packet, decoded
  • Reading a name: follow, but remember where you were
  • The danger: a pointer that points back
  • A dig of our own

Terms it explains: pointer, first, `readName`, `parseMessage`, `rdataText`, Mistakes this stage invites.

Review From Scratch