Visual RFC.
ALL RFCs / RFC 8914
Read the RFC ↗
RFC 8914 / DNS DIAGNOSTICS

Count the option bytes and keep two code spaces distinct

02

EDNS, Extension Mechanisms for DNS, carries options in an OPT metadata record. An EDE option has its own option code, length, INFO-CODE and optional UTF-8 human text.

RFC 8914 · § 2EXAMPLE
4 / 4
Count the option bytes and keep two code spaces distinctSchematic EDNS tuple: outer OPTION-CODE15, payload OPTION-LENGTH, 16-bit INFO-CODE, UTF-8 text. Independent cases distinguish option15 from reason15, code23 as hex0017, échec as six UTF-8 bytes with payload length8, and OK plus optional NUL as three text bytes with payload length5. Length, not NUL, defines the next option boundary.Optional NUL is inside the lengthOPTION-CODE 15 · EDE containerOPTION-LENGTH 5 · payload octetspayload starts after 4 header octetsINFO-CODE 23 · Network ErrorEXTRA-TEXT bytes: 4f 4b 00next option starts after all 3 text octetsMUST use OPTION-LENGTH, not a terminator
04
Use length even when an optional NUL is present.

Separate text example: OK followed by NUL occupies 3 octets, so OPTION-LENGTH=5 including INFO-CODE. A following option starts after all three text bytes. No terminator is required for a different option with nonterminated text.

Source for this drawing: RFC 8914 · Read RFC section 2 ↗

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.

KEY POINT

Option code 15 identifies EDE; the separate 16-bit INFO-CODE identifies its reason.

  • OPTION-CODE is 16 bits with value 15. OPTION-LENGTH is 16 bits and counts the payload after that field:2 bytes of INFO-CODE plus EXTRA-TEXT bytes.
  • INFO-CODE is 16 bits in most-significant-byte-first network order. It indexes the EDE code registry, not the DNS RCODE registry.
  • EXTRA-TEXT is variable UTF-8 text for people, not automated parsing. It may be empty. It may be NUL terminated, but receivers MUST NOT assume that; its length MUST come from OPTION-LENGTH.
  • The worked word échec is 5 Unicode code points but 6 UTF-8 octets. With INFO-CODE 23, OPTION-LENGTH=8 and the complete option is 12 octets including its 4-byte option header.
DETAILS

Fields are schematic, not bit-width scale. The bounded codec models an isolated EDNS option and well-formed UTF-8, not a complete DNS parser or the full RFC 5198 network-text profile. A local 1024-text-octet teaching limit is not a wire-format limit.

Read the RFC section ↗

All chapters in RFC 8914

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 ↗