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

Choose the zero run

03

A double colon replaces consecutive all-zero groups. Choose the longest run; if tied, choose the first.

RFC 5952 · § 4.2.3EXAMPLE
5 / 5
Choose the zero runFive separate cases show the longest run of three versus two groups; the first of two equal two-group runs; no compression of a single zero; leading and trailing runs yielding ::1 and 2001:db8:1::; and the all-zero unspecified address ::, distinct from loopback. Spans under groups mark exact candidates. Output follows section 4.2; legitimate noncanonical input remains valid.Separate zero-run examples · eight groups each00000000all 8 groups omitted0:0:0:0:0:0:0:0 → :::: unspecified ≠ ::1 loopbackOne double colon · never two
05
Represent all eight zero groups.

The unspecified address is ::. Do not write :: twice or confuse this value with loopback ::1.

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

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

Compress one complete eligible run, never a single group.

  • The symbol :: MUST NOT shorten just one 16-bit zero field. When an eligible run exists, use :: to its maximum capability.
  • The longest consecutive run MUST be shortened. When runs have equal length, the first run MUST be shortened.
  • Only one :: is allowed. It can replace leading, trailing, or all eight zero groups. Expansion must still recover exactly eight groups.
DETAILS

The maximum-compression rule is read together with the explicit one-zero exception. Held erratum 6272 discusses their ordering; it does not remove that exception. Each state below is a separate example, not an address changing on a network.

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 ↗