Are IPv6 and IPv4 Address Spaces Completely Disjoint?

ipip addressipv4ipv6protocol-theory

Tanenbaum's Computer Networks says

Finally, IPv4 addresses can be written as a pair of colons and an old dotted
decimal number, for example:

::192.31.20.46
  1. Does it mean the IPv4 address space is embedded into the lowest
    subrange of the IPv6 address space?
  2. Is such embedding fixed? Can the IPv4 address space be embedded
    into any continuous subrange of the IPv6 address space?

    Does https://en.wikipedia.org/wiki/IPv6_address#Transition_from_IPv4 list several alternative ways of translation? If it is correct, then the embedding is not fixed.

  3. Does it mean that for any IPv4 address, there is some IPv6 address that refers to the same address as the IPv4 address?

    For example, are ::192.31.20.46 and 192.31.20.46 effectively the same address?

    • if I send a message to ::192.31.20.46, will 192.31.20.46 receive my message?

    • if I send a message to 192.31.20.46, will ::192.31.20.46 receive my message?

    Will ::127.0.0.1 still be a loopback IP address, and if yes, is it effectively the same address as 127.0.0.1?

  4. Or are the IPv6 address space and IPv4 address space completely
    disjoint (i.e. no overlapping), in the sense that when I communicate
    with a IPv6 address, I will not communicate with a IPv4 address?

Thanks.

Best Answer

Are the IPv6 address space and IPv4 address space completely disjoint?

Yes, they are two separate, incompatible protocols with completely different addressing.

That book is out-of-date. The addressing to which it refers was deprecated a long time ago. it is referring to the old IPv4-Compatible addressing for IPv6 that was deprecated. See RFC 5156, Special-Use IPv6 Addresses:

2.3. IPv4-Compatible Addresses

::/96 are the IPv4-compatible addresses [RFC4291]. These addresses are deprecated and should not appear on the public Internet.

There is IPv4-Mapped addressing for IPv6, but it is not really used as addressing for packets:

2.2.\ IPv4-Mapped Addresses

::FFFF:0:0/96 are the IPv4-mapped addresses [RFC4291]. Addresses within this block should not appear on the public Internet.

Also see the referenced RFC 4291, IP Version 6 Addressing Architecture:

2.5.5. IPv6 Addresses with Embedded IPv4 Addresses

Two types of IPv6 addresses are defined that carry an IPv4 address in the low-order 32 bits of the address. These are the "IPv4-Compatible IPv6 address" and the "IPv4-mapped IPv6 address".

2.5.5.1. IPv4-Compatible IPv6 Address

The "IPv4-Compatible IPv6 address" was defined to assist in the IPv6 transition. The format of the "IPv4-Compatible IPv6 address" is as follows:

|                80 bits               | 16 |      32 bits        |
+--------------------------------------+--------------------------+
|0000..............................0000|0000|    IPv4 address     |
+--------------------------------------+----+---------------------+

Note: The IPv4 address used in the "IPv4-Compatible IPv6 address" must be a globally-unique IPv4 unicast address.

The "IPv4-Compatible IPv6 address" is now deprecated because the current IPv6 transition mechanisms no longer use these addresses. New or updated implementations are not required to support this address type.

2.5.5.2. IPv4-Mapped IPv6 Address

A second type of IPv6 address that holds an embedded IPv4 address is defined. This address type is used to represent the addresses of IPv4 nodes as IPv6 addresses. The format of the "IPv4-mapped IPv6 address" is as follows:

|                80 bits               | 16 |      32 bits        |
+--------------------------------------+--------------------------+
|0000..............................0000|FFFF|    IPv4 address     |
+--------------------------------------+----+---------------------+

See [RFC4038] for background on the usage of the "IPv4-mapped IPv6 address".


Does it mean the IPv4 address space is embedded into the lowest subrange of the IPv6 address space?

Only under certain circumstances, but this is not normally recommended.

Is such embedding fixed? Can the IPv4 address space be embedded into any continuous subrange of the IPv6 address space?

Only a couple of IPv6 address ranges are designed for this, and they are not used for sending packets. This is not used in Global IPv6 addressing.

Does it mean that for any IPv4 address, there is some IPv6 address that refers to the same address as the IPv4 address?

Not really. Conceptually, yes, for IPv4-Mapped addressing for IPv6, but that is not actually used for sending packets.

For example, are ::192.31.20.46 and 192.31.20.46 effectively the same address?

  • if I send a message to ::192.31.20.46, will 192.31.20.46 receive my message?
  • if I send a message to 192.31.20.46, will ::192.31.20.46 receive my message?

Will ::127.0.0.1 still be a loopback IP address, and if yes, is it effectively the same address as 127.0.0.1?

No, ::192.31.20.46 is an invalid IPv6 address because the IPv4-Compatible addressing for IPv6 has been deprecated.

IPv4 and IPv6 are two separate, incompatible protocols that can coexist, but cannot directly communicate.

IPv6 has a loopback address of ::1.

Or are the IPv6 address space and IPv4 address space completely disjoint (i.e. no overlapping), in the sense that when I communicate with a IPv6 address, I will not communicate with a IPv4 address?

IPv4 and IPv6 have completely separate addressing. IPv4 uses 32-bit addressing that is incompatible with the IPv6 128-bit addressing. The protocol headers are also very different in other ways. IPv6 was created after lessons learned in IPv4. Remember that IPv4 was an academic/government experiment that was never intended to be used the way it is today, and IPv6 is an attempt to correct the deficiencies in IPv4, but it is incompatible with IPv4 because of that.

Related Topic