This toy response shows one compression pointer, not a full DNS parser.

highlighted = computed this step

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
DNS pointer honesty boundaryThe toy response has a header, one question, and one compressed answer.Response header96 bits / 12 bytes0x123481800001000100000000byte 0byte 1byte 2byte 300010010001101001000000110000000byte 4byte 5byte 6byte 700000000000000010000000000000001byte 8byte 9byte 10byte 1100000000000000000000000000000000id0x1234flags0x8180qdcount1ancount1nscount0arcount0Answer record112 bits / 14 bytes0x000100010000012c00045db8d822byte 0byte 1byte 2byte 300000000000000010000000000000001byte 4byte 5byte 6byte 700000000000000000000000100101100byte 8byte 9byte 10byte 1100000000000001000101110110111000byte 12byte 131101100000100010type0x0001class0x0001ttl300rdlength4rdata93.184.216.34(cont.)

Checked values

Pointer 0xc00c targets offset 12, and the answer address is 93.184.216.34.

0xc00c→120xc00c\to12
DNS pointer honesty boundaryThe toy response has a header, one question, and one compressed answer.Response header96 bits / 12 bytes0x123481800001000100000000byte 0byte 1byte 2byte 300010010001101001000000110000000byte 4byte 5byte 6byte 700000000000000010000000000000001byte 8byte 9byte 10byte 1100000000000000000000000000000000id0x1234flags0x8180qdcount1ancount1nscount0arcount0Answer record112 bits / 14 bytes0x000100010000012c00045db8d822byte 0byte 1byte 2byte 300000000000000010000000000000001byte 4byte 5byte 6byte 700000000000000000000000100101100byte 8byte 9byte 10byte 1100000000000001000101110110111000byte 12byte 131101100000100010type0x0001class0x0001ttl300rdlength4rdata93.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
DNS pointer honesty boundaryThe toy response has a header, one question, and one compressed answer.Response header96 bits / 12 bytes0x123481800001000100000000byte 0byte 1byte 2byte 300010010001101001000000110000000byte 4byte 5byte 6byte 700000000000000010000000000000001byte 8byte 9byte 10byte 1100000000000000000000000000000000id0x1234flags0x8180qdcount1ancount1nscount0arcount0Answer record112 bits / 14 bytes0x000100010000012c00045db8d822byte 0byte 1byte 2byte 300000000000000010000000000000001byte 4byte 5byte 6byte 700000000000000000000000100101100byte 8byte 9byte 10byte 1100000000000001000101110110111000byte 12byte 131101100000100010type0x0001class0x0001ttl300rdlength4rdata93.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
DNS pointer honesty boundaryThe toy response has a header, one question, and one compressed answer.Response header96 bits / 12 bytes0x123481800001000100000000byte 0byte 1byte 2byte 300010010001101001000000110000000byte 4byte 5byte 6byte 700000000000000010000000000000001byte 8byte 9byte 10byte 1100000000000000000000000000000000id0x1234flags0x8180qdcount1ancount1nscount0arcount0Answer record112 bits / 14 bytes0x000100010000012c00045db8d822byte 0byte 1byte 2byte 300000000000000010000000000000001byte 4byte 5byte 6byte 700000000000000000000000100101100byte 8byte 9byte 10byte 1100000000000001000101110110111000byte 12byte 131101100000100010type0x0001class0x0001ttl300rdlength4rdata93.184.216.34(cont.)