LOGBOOK

HELP

Quiz Entry - updated: 2026.07.05

What are the canonical IPv6 text-representation rules from RFC 5952?

Lowercase hex, drop leading zeros in each group, collapse the longest zero-run to ::, and use :: only once (leftmost on a tie).

RFC 5952 exists because the same address can be written many valid ways — which breaks string comparison, logs, and ACLs. The binding rules produce one canonical form:

  1. Lowercase all hex letters (af, never AF)
  2. Omit leading zeros in every group (0db8db8, 00000)
  3. Collapse one or more consecutive all-zero groups to ::
  4. :: must shorten the longest run of zero groups; on a tie, compress the leftmost run
  5. :: is never used to shorten just a single 0 group when it wouldn't save space

So 2001:0DB8:0000:0000:0001:0000:0000:0001 canonicalises to 2001:db8::1:0:0:1 — there are two equal-length zero runs (groups 3–4 and groups 6–7), so the tie-break rule kicks in and the left run is the one compressed.

Tip: When two equal-length zero runs exist, compress the left one — a common exam trap.

Go deeper:

From Quiz: INTROL / IPv6 – Das Netz der Zukunft | Updated: Jul 05, 2026