Visual RFC.
ALL RFCs / RFC 3596
Read the RFC ↗
RFC 3596 / DNS FOR IPv6

Encode sixteen address bytes

02

The zone file uses IPv6 text. The DNS packet carries the same address as sixteen bytes, with the high-order byte first.

RFC 3596 · § 2.2EXAMPLE
4 / 4
Encode sixteen address bytesChosen record owner picnic.example., type 28, class IN 1 and example TTL 3600 surround RDLENGTH 16 and address data. Expanded 2001:0db8:0000:0000:0000:0000:0000:0001 encodes as 16 high-order-first bytes beginning 20 01 0d b8 and ending 00 01. A separate illustrative encoder gate stops ASCII address text containing colons before binary RDATA; it is not a specified DNS response error.AAAA address data · schematic envelopeASCII text: 2001:db8::1Encoder checks the representationStop: text is not binary address RDATAEncode 16 address bytes instead20 01 0d b8 … 00 01
04
Keep printed text out of binary RDATA.

An illustrative encoder check stops ASCII text with colons before it becomes wire address data. Encode the 128-bit value instead; no DNS response error code is invented.

Source for this drawing: RFC 3596 · Read RFC section 2.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

Encode the value, not the printed colons.

  • AAAA data is a 128-bit IPv6 address in network byte order: the high-order byte comes first. That is 16 eight-bit bytes. Hexadecimal writes each byte with two digits from 0–9 and a–f.
  • The master database file uses the IPv6 textual address representation. Colons and :: are text notation; they are not literal characters inside AAAA address data.
  • The DNS resource-record envelope contains owner name, type, class, TTL and RDLENGTH. For this AAAA value, RDLENGTH is 16 bytes; it counts RDATA, not the entire record.
DETAILS

The envelope is schematic; generic DNS field definitions come from RFC 1035 §3.2.1. TTL (time to live) limits cache lifetime; the chosen 3600 seconds is an example, not a requirement. Current address-text background is in RFC 4291 and RFC 5952; RFC 3596’s original reference is RFC 3513.

Read the RFC section ↗

All chapters in RFC 3596

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 ↗