Do all IPv4-compatible IPv6 devices have two IPv6 addresses?

2

1

Is it possible for an IPv4-compatible IPv6 device to have only one IPv6 address?

For example, when device-A talks to an IPv4 device, device-A communicates using its IPv4 address 2.2.2.4. Later, when device-A talks to an IPv6 device, can it use its IPv6 address ::2.2.2.4?

Or must all IPv4-compatible IPv6 device have two IPv6 addresses?

Pacerier

Posted 2012-07-12T22:27:53.627

Reputation: 22 232

Why are you saying it must have two IPv6 addresses? In your example what will be the two addresses? – fmanco – 2012-07-13T01:42:35.967

@criziot Since device-A can't talk to IPv6 devices using his address ::2.2.2.4 (reserved IPv6 address), he needs to use another IPv6 address to talk to IPv6 devices right? – Pacerier – 2012-07-13T02:08:35.670

1Ok. I got it. But as @Sander Steffann said, ::2.2.2.4 isn't used anymore. You usually have an autoconfigured IPv6 for link local and eventually a global address if you have an IPv6 capable router. But none of those are related with the IPv4 address you may have. – fmanco – 2012-07-13T06:25:57.760

@criziot So before automatic tunneling was deprecated, each IPv4-compatible IPv6 device has 1 IPv4 address + 2 IPv6 addresses = 3 address per device? – Pacerier – 2012-07-13T06:35:28.763

2Yes. You allays need a link local address, and if you want to communicate with a machine in other network you will need a global address since link local addresses are only valid within the link. So 2 IPv6 plus the IPv4. – fmanco – 2012-07-13T12:32:00.377

Answers

3

::2.2.2.4 is not a valid address to use. It was once intended for automatic tunnelling (see the old RFC 3513) but these days it is not used anymore (they became obsolete in RFC 4291).

There is another IPv6 address format called IPv4-mapped IPv6 addresses. The look like ::ffff:2.2.2.4 and they are used in IPv6 software that runs on an IPv4 compatible host. For example: Linux supports IPv4 connections on IPv6 sockets. So if a server is written to use IPv6 it can still accept incoming connections over IPv4. Because the server software expects IPv6 addresses the IPv4 addresses are represented as IPv4-mapped IPv6 addresses. That doesn't mean that you are communicating with IPv6 though. It means that IPv6 compatible software is communicating with IPv4.

To answer your question: If you want to communicate dual-stack (with both IPv4 and IPv6) then you need at least two addresses: one IPv4 address and one IPv6 address. Both need to be routed on the internet. The IPv6 addresses currently in use on the Internet come from the 2000::/3 prefix (everything starting with 2000: to 3fff:) so you'll need those.

Sander Steffann

Posted 2012-07-12T22:27:53.627

Reputation: 4 169

Before automatic tunneling was deprecated, how many IPv6 addresses does a IPv4-compatible IPv6 device have? – Pacerier – 2012-07-13T00:01:04.110

The amount of IPv4 and IPv6 addresses depends on how the device is configured. A common configuration is one IPv4 address, a link-local IPv6 address and an auto-configured global IPv6 address based on the MAC address of the network adapter. Another common configuration is one IPv4 address, a link-local IPv6 address, an auto-configured global IPv6 address based on the MAC address of the network adapter and multiple auto-configured global IPv6 addresses based on the IPv6 privacy extensions. – Sander Steffann – 2012-07-13T09:16:25.677

1Ic, just to confirm, before automatic tunneling was deprecated, is it valid for a device to use the address ::2.2.2.4 as its global IPv6 address? – Pacerier – 2012-07-13T10:14:58.543

Yes, see (now obsolete) RFC 2893

– Sander Steffann – 2012-07-14T12:49:21.270

Ic, so you are disagreeing with criziot http://superuser.com/questions/448267/do-all-ipv4-compatible-ipv6-devices-have-two-ipv6-addresses/448269#comment-520845? He said IPv4 compatible IPv6 address has minimum of 2 IPv6 addresses, but actually it is valid for a IPv4 compatible IPv6 address device to have only one IPv6 address?

– Pacerier – 2012-07-15T17:59:01.577

Critiot is not talking about IPv4-compatible IPv6 addresses. He says you need at least a link-local address for IPv6, which lets you communicate on the local link (usually ethernet) only. If you want to communicate beyond that you need a global address as well. Please forget about IPv4-compatible IPv6 addresses. They are not relevant. – Sander Steffann – 2012-07-15T20:20:22.943