This toy response shows one compression pointer, not a full DNS parser.
What this toy response shows
This response has one question and one answer. The answer name points back to the question name.
answers = 1 \text{answers}=1 answers = 1
DNS pointer honesty boundary The toy response has a header, one question, and one compressed answer. Response header 96 bits / 12 bytes 0x123481800001000100000000 byte 0 byte 1 byte 2 byte 3 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 byte 8 byte 9 byte 10 byte 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 id 0x1234 flags 0x8180 qdcount 1 ancount 1 nscount 0 arcount 0 Answer record 112 bits / 14 bytes 0x000100010000012c00045db8d822 byte 0 byte 1 byte 2 byte 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 byte 8 byte 9 byte 10 byte 11 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 1 0 1 1 0 1 1 1 0 0 0 byte 12 byte 13 1 1 0 1 1 0 0 0 0 0 1 0 0 0 1 0 type 0x0001 class 0x0001 ttl 300 rdlength 4 rdata 93.184.216.34 (cont.)
Checked values
Pointer 0xc00c targets offset 12, and the answer address is 93.184.216.34.
0 x c 00 c → 12 0xc00c\to12 0 x c 00 c → 12
DNS pointer honesty boundary The toy response has a header, one question, and one compressed answer. Response header 96 bits / 12 bytes 0x123481800001000100000000 byte 0 byte 1 byte 2 byte 3 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 byte 8 byte 9 byte 10 byte 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 id 0x1234 flags 0x8180 qdcount 1 ancount 1 nscount 0 arcount 0 Answer record 112 bits / 14 bytes 0x000100010000012c00045db8d822 byte 0 byte 1 byte 2 byte 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 byte 8 byte 9 byte 10 byte 11 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 1 0 1 1 0 1 1 1 0 0 0 byte 12 byte 13 1 1 0 1 1 0 0 0 0 0 1 0 0 0 1 0 type 0x0001 class 0x0001 ttl 300 rdlength 4 rdata 93.184.216.34 (cont.)
What this does not model
NOTE: toy DNS compression example only; not full resolver behavior, cache TTL policy, DNSSEC, EDNS, TCP fallback, packet truncation, or production parsing.
toy compression pointer = 1 \text{toy compression pointer}=1 toy compression pointer = 1
DNS pointer honesty boundary The toy response has a header, one question, and one compressed answer. Response header 96 bits / 12 bytes 0x123481800001000100000000 byte 0 byte 1 byte 2 byte 3 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 byte 8 byte 9 byte 10 byte 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 id 0x1234 flags 0x8180 qdcount 1 ancount 1 nscount 0 arcount 0 Answer record 112 bits / 14 bytes 0x000100010000012c00045db8d822 byte 0 byte 1 byte 2 byte 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 byte 8 byte 9 byte 10 byte 11 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 1 0 1 1 0 1 1 1 0 0 0 byte 12 byte 13 1 1 0 1 1 0 0 0 0 0 1 0 0 0 1 0 type 0x0001 class 0x0001 ttl 300 rdlength 4 rdata 93.184.216.34 (cont.)
Summary
The pointer reuses a name already in the message, and the answer data stays explicit and checked.
pointer offset = 12 \text{pointer offset}=12 pointer offset = 12
DNS pointer honesty boundary The toy response has a header, one question, and one compressed answer. Response header 96 bits / 12 bytes 0x123481800001000100000000 byte 0 byte 1 byte 2 byte 3 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 byte 8 byte 9 byte 10 byte 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 id 0x1234 flags 0x8180 qdcount 1 ancount 1 nscount 0 arcount 0 Answer record 112 bits / 14 bytes 0x000100010000012c00045db8d822 byte 0 byte 1 byte 2 byte 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 byte 4 byte 5 byte 6 byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 byte 8 byte 9 byte 10 byte 11 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 1 0 1 1 0 1 1 1 0 0 0 byte 12 byte 13 1 1 0 1 1 0 0 0 0 0 1 0 0 0 1 0 type 0x0001 class 0x0001 ttl 300 rdlength 4 rdata 93.184.216.34 (cont.)