Score:1

Purpose of IPv4 mapped IPv6 address

ye flag

I am still confused about the purpose of IPv4 mapped IPv6 addresses and would like some enlightenment.

I have a server client pair of machines and I intend to connect them via Openvpn. The server has an IPv6 address, while the client an IPv4 only address. When I ping the client's IPv4 mapped IPv6 address, there is a response. However, when I configured the client to connect to the server's IPv6 address, I was unable to connect. I have included the client's IPv4 mapped IPv6 address into the Openvpn client configuration file -- local

Let's switch the pair. Now, the server has an IPv4 address (with a IPv4 mapped IPv6 address) and the client as an IPv6 address. I am also unable to establish an Openvpn connection by connecting to the server's IPv4 mapped IPv6 address.

In this case, What good is here when it comes to Openvpn connections while IPv4 mapped IPv6 address?

TLDR: For instance, I have an IPv4 only machine with IP 126.10.13.2 and it has an IPv4 mapped IPv6 address of ::ffff:7e0a:d02. I have another IPv6 machine with IP 2a04::dead:beef:5802:A. How am I able to connect both of them via Openvpn? I cannot seem to connect the IPv6 address of both machines together.

ng flag
Can you give examples (by editing your question) of addresses? I'm unsure what you mean by this mapping.
Mervyn Heng avatar
ye flag
For instance, I have an IPv4 only machine with IP 126.10.13.2 and it has an IPv4 mapped IPv6 address of ::ffff:7e0a:d02. I have another IPv6 machine with IP 2a04::dead:beef:5802:A. How am I able to connect both of them via Openvpn? I cannot seem to connect the IPv6 address of both machines together.
ng flag
Can you post the output of your OS tools for network config (`ip -4 addr; ip -6 addr` or `ipconfig` for windows, etc).
Ron Maupin avatar
us flag
IPv4-Mapped addresses are _not_ IPv6 addresses, they are IPv4 addresses represented in a specific IPv6 format. This allows a single store, e.g. database, to hold both IPv4 and IPv6 addresses in a common format. [These addresses cannot be used as source or destination addresses on IP packets, nor can they be routed, and the are reserved by IPv6 itself](https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml), they are only for representing IPv4 addresses in the IPv6 format.
Score:2
kr flag

These mapped addresses cannot be used to make IPv6 connections. They are only usable to represent IPv4 connections in IPv6 software.

Say that you have a machine that is dual stacked with both IPv4 and IPv6. On that machine you could run software that is written just for IPv6 (because it’s easier to support only one protocol than two). If the software listens on the :: IPv6 address it can still accept connections from IPv4 clients. Because the software is only written for IPv6 it can only deal with IPv6 addresses, and the kernel uses ::ffff:aabb:ccdd to represent IPv4 address aa.bb.cc.dd.

That doesn’t mean the protocol on the network is IPv6. The protocol is IPv4, with a mapping that makes it usable for IPv6-only software.

It is therefore impossible to use these mapped addresses to communicate with aan IPv6 system, because internally to the system they are still IPv4 connections.

Ben Butterworth avatar
in flag
That's a nice answer. Could you point to documentation or more information? I'm trying to see if I can disable this feature (just for learning/understanding).
Mervyn Heng avatar
ye flag
Thanks for your answer! I have a question. You mentioned in paragraph two that the IPv6 address on the software that is written just for IPv6 can still accept connections from IPv4 clients. However, in your last paragraph, you mentioned that it is therefore impossible to use these mapped addresses to communicate with an IPv6 system. Can you explain a little the difference between these two sentences. In the case of Openvpn, if I were to open an IPv6 address to listen to connections on the server, can I connect an IPv4 client to it? Or will there have to be changes made.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.