Protocol flows

DNS iterative resolution

A stub resolver asks a recursive resolver, which walks the root, TLD and authoritative servers and then caches the answer.

Client subnet 192.0.2.0/24DNS hierarchyRecursive queryRecursive queryIterative queryIterative queryIterative queryIterative queryIterative queryIterative queryReferralReferralReferralReferralRecursive queryDNS · 53Stub resolver192.0.2.10Stub resolver — 192.0.2.10Recursive resolver198.51.100.53Recursive resolver — 198.51.100.53Root server198.51.100.1Root server — 198.51.100.1TLD server198.51.100.2TLD server — 198.51.100.2Authoritative server198.51.100.3Authoritative server — 198.51.100.3
Legend

Current step

The stub asks one recursive question

The client asks for a name, not for a server, and sets the recursion-desired flag.

Question
www.example.com
Record type
A
Recursion
Requested
The client asks one question and waits; the resolver does the walking. Each referral moves one level closer to the answer, and the TTL in the final record decides how long the resolver may answer from cache without asking again.

Documentation example: addresses use the RFC 5737 ranges and ASNs use the reserved private range. Nothing here connects to a real network.

Tags

  • protocols
  • dns
  • naming
  • cache

Lessons using this diagram