What if the reply will not fit?
04Try a small message envelope, recover over a stream, then break the connection or end it one byte too soon.
The keeper has a text note to return. Its DNS message includes the question, the note and the needed fields; the byte count covers all of them.
One question. One complete text-note reply.
note.example.513 message bytes469 text characters + DNS fieldsWe will change how this same logical reply is carried, not what question it answers.
What happens if you change this?
Make one change, then watch again. Restart restores the original example.
A TCP exchange carries a length-prefixed complete message.
Key idea: A message must fit its delivery method and arrive completely. Complete delivery alone does not check who published the naming facts.
Terms
- DNS message
- One encoded DNS question or reply, including its header and record fields.
- UDP
- A delivery method that carries separate messages called datagrams.
- UDP payload size
- The allowed size of the DNS message inside a UDP datagram; outer IP and UDP headers are separate.
- TC
- A flag marking a DNS reply as cut short.
- EDNS
- A later extension lets a requester advertise a larger UDP message allowance.
- TCP
- A delivery method that presents bytes as an ordered stream.
- DNS length prefix
- Two bytes before a DNS message on TCP that state its length; these two bytes do not count themselves.
- DNSSEC
- Separate extensions can check the source and integrity of DNS data; this delivery experiment does not perform those checks.
Rules & examples
A cut-short reply is a signal to recover the complete answer.
These reference examples may differ from the selected experiment.
- The original UDP message limit is 512 octets; TC indicates truncation.
- Later EDNS signaling can support larger UDP responses; that does not remove path-MTU constraints.
The drawing is a simplified worked example. Follow the linked RFC and its updates for implementation requirements.
Each profile constructs a fresh reply with the selected total message size. Its text is filler for the size experiment: the EDNS examples use11 fewer text characters to make room for the11-byte OPT entry. The selected message is an actual unsigned TXT/IN response to note.example., ID17, with one TXT record, TTL60, QR=1, AA=1, RD=1 and RA=0. Its text consists of ASCII x characters in counted strings of at most255 bytes. A compressed answer owner points to question offset12. In the EDNS fixture, query/response use an empty OPT with a chosen1232-byte UDP allowance. 1232 is an example value, not an RFC1034 or universal EDNS limit. Classic UDP uses512 DNS-message bytes excluding IP/UDP headers. If the required answer cannot fit, this model omits the entire TXT record, sets ANCOUNT=0 and TC=1, and selects a TCP retry; it never treats raw chopped record bytes as a reply. Optional additional-record omission alone need not set TC. RFC7766 requires general-purpose DNS implementations to support UDP and TCP and permits TCP first. The same logical question is asked again for the chosen retry, not continued at a byte offset. Native VD.dnsTCPModel.frame/decode supplies the two-byte length and complete-message gate. Chosen cumulative stream reads of1 and12 bytes are examples, not TCP packet or write boundaries. A final all-but-one-byte close cannot release the message. Response correlation, retransmission schedules, congestion, fragmentation, EDNS negotiation/fallback, zone transfer, persistent connections, real network traffic and DNSSEC signature validation are outside this fixture. The selected two-byte prefix is 2, 1 in decimal: 2 times256 plus 1 gives 513. The original native transport illustration remains intact. No data-origin or website-safety claim follows from complete UDP/TCP delivery.
Sources
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
EDNS allows a requester to advertise a larger UDP payload size; it is not a universal fixed larger limit.
Read the updated RFC section ↗