IPv4 Addresses Embedded in IPv6 Addresses
Stateful NAT64 and XLAT464 embed IPv4 addresses in IPv6 addresses by using an IPv6 prefix that you specify. The prefix length you use determines how the IPv4 address is embedded.
IPv6 addresses with embedded IPv4 addresses are composed of a variable-length prefix, the embedded IPv4 address, and a variable-length suffix. Bits 64 to 71 are reserved and must be set to 0. The suffix follows the last bit of the embedded IPv4 address, and the suffix bits are ignored and should be set to 0.
The format for the IPv4-embedded IPv6 address depends on the prefix length, as shown in Table 1.
Prefix length |
Prefix bits |
IPv4 address bits |
Reserved bits (must be set to 0) |
Suffix bits |
---|---|---|---|---|
32 |
0-31 |
32 to 63 |
64 to 71 |
72 to 127 |
40 |
0 to 39 |
40 to 63 and 72 to 79 |
64 to 71 |
80 to 127 |
48 |
0 to 47 |
48 to 63 and 72 to 87 |
64 to 71 |
88 to 127 |
56 |
0 to 55 |
56 to 63 and 72 to 95 |
64 to 71 |
96 to 127 |
64 |
0 to 63 |
72 to 103 |
64 to 71 |
104 to 127 |
96 |
0 to 95 |
96 to 127 |
64 to 71 |
No suffix bits |
The following table shows an example of an IPv4 address embedded in an IPv6 address for various prefix lengths.
IPv6 Prefix |
IPv4 Address |
IPv4 Address Embedded in IPv6 Address |
---|---|---|
2001:db8::/32 |
192.0.2.33 |
2001:db8:c000:221:: |
2001:db8:100::/40 |
192.0.2.33 |
2001:db8:1c0:2:21:: |
2001:db8:122::/48 |
192.0.2.33 |
2001:db8:122:c000:2:2100:: |
2001:db8:122:300::/56 |
192.0.2.33 |
2001:db8:122:3c0:0:221:: |
2001:db8:122:344::/64 |
192.0.2.33 |
2001:db8:122:344:c0:2:2100:: |
2001:db8:122:344::/96 |
192.0.2.33 |
2001:db8:122:344::192.0.2.33 |