Visual RFC.
ALL RFCs / RFC 1035
Read the RFC ↗
RFC 1035 / DNS MESSAGES AND FILES

What if the reply will not fit?

04

Try a small message envelope, recover over a stream, then break the connection or end it one byte too soon.

RFC 1035 · § 4.2EXAMPLE
1 / 4 · Start with one whole reply

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.

Keeper’s complete text-note replynote.example.513 message bytes469 text characters + DNS fields

We 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.

3 / 3
03
A TCP exchange carries a length-prefixed complete message.

A TCP exchange carries a length-prefixed complete message.

What if the reply will not fit?Try a small message envelope, recover over a stream, then break the connection or end it one byte too soon.Response larger than original UDP limitOriginal UDP envelope: 512 octetsTC = 1 · truncatedlengthcomplete DNS message via TCPEDNS later extends UDP signaling; TCP has a two-byte length

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.

Look up a term in the glossary ↗

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
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
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.

What changed
RFC 1035 · 512-byte UDP baselineRFC 6891 § 4.3

EDNS allows a requester to advertise a larger UDP payload size; it is not a universal fixed larger limit.

Read the updated RFC section ↗

All chapters in RFC 1035

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗