15

If I go to System Preferences > Network > Advanced it is shown that I have 2 different IPv6 addresses (both with a 64-bit prefix). Why is so?

If I type ifconfig | grep inet on the terminal, it also shows me those 2 IPv6 addresses (among the other addresses). At the end of one of those 2 IPv6 addresses there's the word dynamic and at the end of the other there's autoconf temporary. Why wonder why should we need two IPv6 addresses and what is the different between dynamic and autoconf temporary.

  • 2
    One is probably for the loopback adapter (lo0) and the other is for your active network connection, whatever your using Wi-Fi, Ethernet, etc. – user3439894 Jan 11 '16 at 14:50
  • @user3439894 Didn't know about this loopback adapter... – nbro Jan 11 '16 at 14:51
  • You can read more about Loopback and Localhost. In IPv4 the loopback is 127.0.0.1. In IPv6, ::1 (0000:0000:0000:0000:0000:0000:0000:0001). – Basil Bourque Jan 11 '16 at 21:38
15

IPv6 used to be derived of the MAC address of your device. This is the Modified EUI-64 format. Such addresses are recognisable by looking at the middle of the last 64 bits. If they contain ..ff:fe.. then it is probably a EUI-64 based address.

Because the algorithm produces the same 64 bits every time some people were afraid that it would become easy to track mobile devices such as laptops and smart phones. Every network would have a different prefix, but the last 64 bits would always be the same.

That is why Privacy Extensions were invented. A device generates new 64 bits every once in a while and uses that in the IPv6 address. Because new addresses are generated regularly the addresses are marked as temporary. A device can have multiple privacy extension addresses if the system is still using an old address when a new address is being generated. The system will keep the old address for as long as necessary. For new outgoing connections a system will usually use the most recently generated temporary address to maintain a maximum level of privacy.

  • 4
    And you can have an arbitrary number of static addresses you choose your own, too. – Max Ried Jan 11 '16 at 15:47
  • 1
    Also, correct me if I'm wrong, but don't most devices have two IP addresses anyways (a "link local" version and a public Internet version)? I think I'd expect to see at least two IPs on any device connected to a network. – phyrfox Jan 11 '16 at 19:53
  • 6
    @phyrfox Yes, in fact it's entirely normal to see 3 IPv6 addresses on the same interface: a EUI-64-based number (usually of global scope), a privacy address (same scope, temporary), and a link-local address (starting with fe80:). – Gordon Davisson Jan 11 '16 at 20:20
  • 2
    @GordonDavisson True, I was only talking about global addresses. Including link local then at least three addresses per interface is indeed the most common. – Sander Steffann Jan 11 '16 at 22:07
1

There appear to be four different types of IPv6 addresses:

  1. Main address, using your ISP prefix + derivation of your network-interface MAC-address.
  2. Temporary addresses, based on your main address but with randomization to prevent tracking. (a new one is generated every so often)
  3. Link-local address, identified by starting with fe80:. (not usable globally, tied to routing)
  4. Unique local address, identified by starting with fd00:. (not usable globally, not tied to routing)

In my case, I just enabled IPv6 on my home network, and found I have one of each of these these four types of addresses for my Windows computer. (showing up when I run ipconfig)

I wasn't confused by the Temporary address and the Link-Local address since they were marked as such, but I was confused at first by the second address that was labeled the same way as my main. I noticed it was shorter though and started with fd00, and after Googling that, found that it's the Unique Local Address for my device.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .