Visual RFC.
ALL RFCs / RFC 5952
Read the RFC ↗
RFC 5952 / WRITE IPv6 ADDRESSES

One address, several spellings

01

IPv6 addresses are 128-bit values. Several strings can name the same value; canonical means the chosen consistent output spelling. This makes logs and searches easier to read.

RFC 5952 · § 4EXAMPLE
4 / 4
One address, several spellingsTwo legitimate spellings expand to the same eight 16-bit group values: 2001, db8, 0, 0, 1, 0, 0, 1. The canonical output is 2001:db8::1:0:0:1, choosing the first equal-length zero run. Arrows show parsing and formatting data flow. Neither input is rejected; the 128-bit value stays the same.One 128-bit value · several legitimate spellings2001db8001001first longest runCanonical text generatorsame address value2001:db8::1:0:0:1Accept legitimate input; recommend this output
04
Generate the same spelling each time.

The formatter emits lowercase, suppresses leading zeros, and compresses the leftmost longest zero run. Both original inputs remain legitimate.

Source for this drawing: RFC 5952 · Read RFC section 4 ↗

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

Accept legitimate input; generate a consistent spelling.

  • An IPv6 address has eight 16-bit groups. Each group uses up to four hexadecimal digits (0–9 and a–f); one digit represents four bits.
  • RFC 4291 permits leading zeros, either letter case, and one :: replacing one or more all-zero groups. These choices can preserve the same address.
  • RFC 5952 §4 says its generation recommendation SHOULD be followed. All implementations MUST accept and handle any legitimate RFC 4291 format; a noncanonical spelling is not automatically invalid.
DETAILS

This guide changes text, not address bits or routing. Canonical spelling helps operations but does not authenticate a machine. Examples use documentation addresses; no connection is made.

Read the RFC section ↗

All chapters in RFC 5952

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 ↗