Trim groups without changing bits
02Remove padding at the beginning of each hexadecimal group, use lowercase letters, and leave a visible 0 for an all-zero group.
Do not replace this single zero group with :: in canonical output. The output is shorter without changing the address.
Source for this drawing: RFC 5952 · Read RFC section 4.1 ↗
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.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Shorter spelling must preserve every group value.
- Leading zeros in each 16-bit field MUST be suppressed. An all-zero field MUST be represented as 0 before any eligible zero-run compression.
- The hexadecimal characters a through f MUST be lowercase in canonical output. Uppercase remains legitimate input.
- Remove leading zeros, never trailing digits: 00a0 becomes a0, not a. A lone zero group remains 0; :: MUST NOT shorten just one zero group.
The worked address has one zero group, so the final canonical form contains no double colon. Hexadecimal a0 is decimal 160; a is decimal 10. Lowercase changes spelling, not value.
Read the RFC section ↗