10

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.

  • 3
    Beware of outdated textbooks. IPv4-compatible IPv6 addresses have been deprecated for almost 15 years, replaed by IPv4-mapped IPv6 addresses. Modern operating systems may not recognize them. See RFC 4291. – Michael Hampton Mar 23 at 23:45
7

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.

10

Number 4 is correct. V4 and v6 protocols are completely different with different formats and addressing schemes. The two addresses have the same relationship as telephone numbers and lottery numbers— that is, none.

There have been many proposed methods of mapping v4 to v6 to allow for protocol translation, but most are deprecated today.

0

I'm somewhat surprised that no existing answer mentioned 6to4.

It allows to send an IPv6 packet to an IPv4 host, encapsulated within IPv4 packet of protocol type 41.

6to4 addresses are of the type 2002:AABB:CCDD:suffix corresponding to IPv4 address A.B.C.D where A,B,C,D are decimal and AA,BB,CC,DD are hexadecimal. So, each IPv4 address actually has a whole /48 block of IPv6 addresses.

6to4 is not just some notation mechanism allowing IPv4 addresses to be notated using IPv6 addresses, it's a real and working IPv6 transition mechanism.

The performance and latency of 6to4 connectivity will be poor, however, so native IPv6 is preferred where such connectivity is available.

So, my answer to IPv4 and IPv6 spaces being disjoint: not really, each IPv4 address has a /48 block of IPv6 addresses.

  • The problem with your answer is that it leads people to believe that you can have an IPv6-only host directly communicate with an IPv4-only host or vice versa, and that simply isn't true. There is a lot more to it than that, including relay routers to translate the protocols, so, yes, the address space is still separate, but you have something that can talk in both protocols to do translation. – Ron Maupin Mar 24 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.