Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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 at 14:50
    
@user3439894 Didn't know about this loopback adapter... – nbro Jan 11 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 at 21:38

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.

share|improve this answer
2  
And you can have an arbitrary number of static addresses you choose your own, too. – Max Ried Jan 11 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 at 19:53
3  
@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 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 at 22:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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