← PROTOCOL LIBRARY

DNS

APPLICATION

Turn names into network addresses

LESSON PROGRESS1/3
READ FIRST · 60-SECOND BRIEF

THE PROBLEM

People remember names more easily than numeric IP addresses, but routers need IP addresses to deliver packets.

THE NAIVE APPROACH

Keeping a hand-written list of every name and address would quickly become stale and difficult to share.

THE KEY INSIGHT

DNS delegates naming data across a hierarchy and returns typed records such as A and AAAA.

WHERE YOU MEET IT

  • • Opening a website by domain name
  • • Email servers locating mail exchangers
  • • Apps discovering service endpoints

ANALOGY / HISTORY

A distributed phone directory: ask for a name and receive the number.

Context: Centralized HOSTS.TXT files could not scale with a growing network.

3D NETWORK TOPOLOGY
SIMULATION
3D topologypacket animationlocal simulation
SELECTED NODE · CLIENT
Drag to orbit · packet movement is illustrative
CURRENT EXCHANGE
Client builds a query

client → server · QUERY_READY

CONTROLLED LAB SIM

Client builds a query

The client asks for the IPv4 address associated with example.com. The DNS header is 12 bytes, followed by the encoded question.

Local DNS wire-format query encoder. No request is sent.

BREAK IT · LOCAL ONLY
WHY THIS MATTERS

The dots are not transmitted. Each label is prefixed by its byte length and the name ends with a zero byte.

BYTE INSPECTOR
0000 4a 31 01 00 00 01 00 00 00 00 00 00 07 65 78 61 |J1...........exa| 0010 6d 70 6c 65 03 63 6f 6d 00 00 01 00 01 |mple.com.....|
FIELD EXPLANATION

QNAME is a sequence of length-prefixed labels. QTYPE 0x0001 asks for an A record and QCLASS 0x0001 means Internet.

Educational simulator · Byte examples are labelled by their level of fidelity in the lesson notes.
← Back to protocol library