Index

DNS Telegram

100%Open SVG ↗
THE HEADER & FLAG BITS -- the structure behind the telegram (added below; story above unchanged)a DNS message = 5 sections:HEADER (12 bytes)QUESTION (what you asked)ANSWER (the records)AUTHORITY (nameservers)ADDITIONAL (extras)your telegram story lives in QUESTION + ANSWER.the 12-byte HEADER, field by field:ID2 bytesFLAGS2 bytesQDCOUNT2 bytesANCOUNT2 bytesNSCOUNT2 bytesARCOUNT2 bytesthe 2 FLAGS bytes, bit by bit:QROPCODEAATCRDRAZRCODETC = your 'TOO LONG, CALL ME' stamp. RD = 'please recurse'. QR = query(0)/response(1). RCODE = error (0=OK, 3=NXDOMAIN).the 'ditto' on the wire = 0xC0 0x0C: the bits '11' mean 'pointer', the rest = offset 12 -> reuse the name already written in QUESTION.two doors, one shopdoor 1104.20.23.154door 2172.66.147.243handing out two addresses splits the crowd naturally —half the visitors walk to each door. crowd control withzero machinery. big sites do exactly this, at scale.where you feel this: a site that stays up while millionsvisit at once — and gamers switching DNS to 1.1.1.1hoping for "faster internet" (now you know what they mean)the jargon, now that you already own the story:letter-counting = "length-prefixed labels" 〃 ditto mark = "compression pointer" the expiry = "TTL""too long — call me" stamp = the "TC bit" postcard vs phone call = UDP vs TCPwant the actual bytes with these exact values? the x-ray view is one click away: DNS Wire Formatwhat came back:WHO:〃(ditto — same as above. why repeat it?)HOUSE No: 104.20.23.154SPARE DOOR: 172.66.147.243VALID FOR: 32 secondsthe ditto mark is a real trick in the message — repeating nameswastes space, and space is precious (see right →)why so frugal?the whole exchange must fit ONE postcard each way(lesson 3!). small message = one trip = fast internet.and if an answer ever outgrows the postcard?it comes back stamped like this →and your laptop simply redials the samequestion as a phone call instead.TOO LONG —CALL METhe concierge's question travels as a telegramlesson 1's story, one level closer — what's actually written on the note that gets mailed. still no scary bytes.what your laptop wrote:TO: the conciergeEXAMPLE (7 letters) · COM (3 letters) · ENDno dots! the wire spells names like a telegram: say how manyletters are coming, then the chunk, then a full stop.(the dot is for humans — the machines were never told about it)

Lessons that use this board

The concierge's question travels as a telegram lesson 1's story, one level closer — what's actually written on the note that gets mailed. still no scary bytes. what your laptop wrote: TO: the concierge EXAMPLE (7 letters) · COM (3 letters) · END no dots! the wire spells names like a telegram: say how many letters are coming, then the chunk, then a full stop. (the dot is for humans — the machines were never told about it) what came back: WHO: 〃 (ditto — same as above. why repeat it?) HOUSE No: 104.20.23.154 SPARE DOOR: 172.66.147.243 VALID FOR: 32 seconds the ditto mark is a real trick in the message — repeating names wastes space, and space is precious (see right →) why so frugal? the whole exchange must fit ONE postcard each way (lesson 3!). small message = one trip = fast internet. and if an answer ever outgrows the postcard? it comes back stamped like this → and your laptop simply redials the same question as a phone call instead. TOO LONG — CALL ME two doors, one shop door 1 104.20.23.154 door 2 172.66.147.243 handing out two addresses splits the crowd naturally — half the visitors walk to each door. crowd control with zero machinery. big sites do exactly this, at scale. where you feel this: a site that stays up while millions visit at once — and gamers switching DNS to 1.1.1.1 hoping for "faster internet" (now you know what they mean) the jargon, now that you already own the story: letter-counting = "length-prefixed labels" 〃 ditto mark = "compression pointer" the expiry = "TTL" "too long — call me" stamp = the "TC bit" postcard vs phone call = UDP vs TCP want the actual bytes with these exact values? the x-ray view is one click away: DNS Wire Format THE HEADER & FLAG BITS -- the structure behind the telegram a DNS message = 5 sections: HEADER (12 bytes) QUESTION (what you asked) ANSWER (the records) AUTHORITY (nameservers) ADDITIONAL (extras) your telegram story lives in QUESTION + ANSWER. the 12-byte HEADER, field by field: ID 2 bytes FLAGS 2 bytes QDCOUNT 2 bytes ANCOUNT 2 bytes NSCOUNT 2 bytes ARCOUNT 2 bytes the 2 FLAGS bytes, bit by bit: QR OPCODE AA TC RD RA Z RCODE TC = your 'TOO LONG, CALL ME' stamp. RD = 'please recurse'. QR = query(0)/response(1). RCODE = error (0=OK, 3=NXDOMAIN). the 'ditto' on the wire = 0xC0 0x0C: the bits '11' mean 'pointer', the rest = offset 12 -> reuse the name already written in QUESTION.

Saved in this browser only.

← DNS ResolutionPostcards and Phone Calls →