Visual RFC.
ALL RFCs / RFC 6052
Read the RFC ↗
RFC 6052 / IPV4 INSIDE IPV6

Compose and extract an address

03

Use the configured prefix length in both directions. The /48 worked example makes the reserved-byte boundary visible.

RFC 6052 · § 2.3EXAMPLE
4 / 4
Compose and extract an addressThe /48 worked example begins with hexadecimal IPv4 bytes c0 00 02 21. The next state places two before the reserved u byte and two after it. The third state fills the suffix with zero and shows the complete IPv6 result. The fourth removes u and extracts the original four octets using /48. Arrows indicate byte operations, not network messages.Worked /48 mapping · 192.0.2.332001:db8:122:c000:2:2100::Use the configured /48 layoutremove u; extract 32 bits after prefixc0 00 02 21 → 192.0.2.33The final 32 bits alone would be wrong here
04
Remove u and recover the same four octets.

Using /48, extraction yields c0 00 02 21, or 192.0.2.33. Taking only the last 32 IPv6 bits here would recover zeros and be wrong.

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

Extraction must use the configured prefix and layout.

  • Extraction must use the configured prefix and layout.
  • Compose the prefix, the IPv4 bits and a suffix; for a prefix shorter than /96 insert the null u octet at bits 64–71 and keep the result 128 bits.
  • For extraction below /96, remove u and take the 32 bits after the prefix. For /96, take the last 32 bits. Nonzero suffix values SHOULD be ignored as zero, absent a future extension; that recommendation does not waive the u MUST.
DETAILS

Chosen operations use Table 1’s /48 prefix 2001:db8:122::/48 and 192.0.2.33. The helper validates configured-prefix matching and the reserved byte as teaching preconditions; it is not a complete translator. No requirement to reject every nonzero suffix is invented. These drawings show byte placement rather than network transmissions.

Read the RFC section ↗

All chapters in RFC 6052

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 ↗