How to Obtain the IPv6 Address of Your Mac and iPad

| How-To

Finding the IPv6 address of your Mac or iPad isn't extremely difficult. But there are a few technical wrinkles to be aware of. While OS X, with access to the command line and more disclosure in the Network System Preferences, almost nails the details, it's less straightforward with an iPad (or iPhone).

_____________________

IPv6 development by the ISPs is moving along at a good pace, and the chances are good now that, soon, you'll encounter an IPv6 address on one of your Apple products. The goal is to help you interpret what you may see.

This article assumes you have some basic familiarity with IPv6, namely the way IPv6 addresses are constructed. In addition, here is some basic background that may be helpful, "A Layman's Guide to the IPv6 Transition.

First, let's look at what's happening on the Mac. Soon, you'll see why I'm starting there. Note that, for the sake of privacy, I have obscured part of my own IPv6 addresses.

Obtaining IPv6 Address on a Mac

The most natural thing to do is look at System Preferences -> Network. If your Mac detects that your ISP and router are offering IPv6 service, (through a router notification called an "advertisement,") you'll see a single address there.

 

However, if you dig a little deeper, System Preferences -> Network -> Advanced -> TCP/IP, you'll see two IPv6 addresses. What's going on?

What's behind this is that the way a device gets its IPv6 address can vary. It might be self-assigned or it might be assigned to the device. A device can get away with self-assigning its own IPv6 address because of the vast, and I mean vast, number of IPv6 addresses available: 2128 = 3.4 x 1038.

For example, one could assign every square centimeter on the surface of Earth a million different IPv6 addresses each and every second for the next million years and still not exhaust the full 2128 bit address space. (That's a simplification, actually, because the IPv6 address space is segmented for different uses, just like IPv4, but you get the idea.)

There is a protocol for self-assignment, and it has continued to evolve. For some time now, OS X and its sibling iOS have used what's called the EUI-64 address. EUI stands for Extended Unique Identifier. The first 64-bits are the address of a specific network, and the next 64-bits are for use inside the network. To indicate that, you'll see a "/64" appended to the end of the address. What's interesting about EUI-64 is that, in an (ironic) effort to avoid address duplication, the device's hardware MAC address is encoded into the EUI-64 address.

Over time, that practice raised concerns about privacy, and so the concept of a second, parallel "privacy address" or "temporary address" has developed. OS X started using the privacy address starting in 10.7 Lion, so that's why you see two IPv6 addresses on the TCP/IP tab.

How can we tell which is which? Apple hasn't bothered to label the two IPv6 addresses, so we have to do a little work on our own.

The first thing to note is that an EUI-64 address will always have an embedded string "ff:fe" near the middle, so look for that. The other address, then, must be the privacy address.

Method #1. An IPv6 test page. If you go to test-ipv6.comcast.net, it will echo back your Mac's public IPv6 address. (You don't have to be a Comcast customer to access this page, and it provides a lot of information about your IPv6 state of readiness.) Another one I use is Jason Fesler's test-ipv6.com. Here is the result I got.

Method #2. For the geek at heart, we have the venerable command line. Assuming you're on a wired connection, enter the command

~ ifconfig en0

You should see something like this:

Lo and behold, those addresses are nicely labeled, and the one marked "temporary" is your privacy address. It changes, depending on usage conditions. Leaving it the same for a week would make the machine too vulnerable; changing every few minutes would have a performance impact. From my reading, it ends up being updated every 24 to 72 hours.

Notice how the "inet6" address that ends in "79b8", the one marked "temporary" in the screen shot above is the same as that echoed back from the test site. (We can ignore the (Link-Local) IPv6 address that starts with "fe80" for now.)

Summary. OS X, as of Mountain Lion, generates two IPv6 addresses, an EUI-64 address when the interface is first brought up and a privacy or temporary address which is the one exposed to the Internet.  The reason we keep the EUI-64 address is to provide a stable address for local administrators and, for example, SSH connections. The privacy address varies to keep that device a moving target. The above techniques will help you figure out which is which.

Obtaining IPv6 Address on an iPad

iOS is an operating system designed to be quick and easy to use, mobile and not at all intimidating. As a result, Apple, in iOS 6, has elected not to display the IPv6 address in Settings -> Wi-Fi when you tap the blue right arrow. I have heard that nothing changes there in iOS 7.

However, everything under the hood regarding EUI-64 and privacy addresses remains the same.  It's just a question of getting at the two numbers.

Again, the easiest way to obtain the public IPv6 address on an iPad (or iPhone) is to go to the Comcast IPv6 test page with Safari.

If you're not happy with that level of detail, or you need the EUI-64 address, there is a very handy, nicely engineered iOS app called "IPv6 Toolkit" by James Hamilton. I've exchanged some email with Mr. Hamilton, and he really knows his stuff.

On the Interfaces tab, under "'en0, Wi-Fi Interface," IPv6 Toolkit displays the IPv6 addresses provided to it by the iOS kernel.  Again, you can look for the "ff:fe" string that earmarks the EUI-64 address so that you can uniquely identify the other one, the privacy address. Perhaps a future version of the app will have explicit labels.

If you only see one address, in addition to the Link-Local address that starts with "fe80", it's probably because the iPad is in the process of changing to a new privacy address. In time, you'll see two IPv6 addresses there, for a total of three, as shown above.

There is a massive amount of literature surrounding IPv6, and one can quickly become overwhelmed. With that in mind, I've tried to limit the scope of this article. My plan is that by tackling IPv6 in small chunks, a body of easily understood articles can be built up.

Comments

Jason Fesler

Humble but biased suggestion: test-ipv6.com instead of the comcast mirror. The comcast mirror is out of date.

John Martellaro

Thanks jason.  I should have included that link as well. I just added it in the article.

iJack

For whatever reason, no IPV6 for me.

wab95

Many thanks for this, John.

It was good to review your article on iPv6 again. I did check the Comcast website, however it confirmed that I am only on IPv4 at this time, although it suggests that IPv6 will roll out soon.

Curious, as we recently installed, at Comcast’s bidding, a new cable modem which I thought was dual-stack enabled. This inspires me to contact my service provider and see when the service change is anticipated.

Lawrence Hughes

Note that the “ff:fe” string in the middle of an IPv6 address indicates the low 64 bits (Interface Identifier) was created with EUI64 from your MAC address. On my iPad mini, both addresses (primary and privacy) are randomly generated (not EUI64). So, with this app there is no way to know which is the primary and which is the privacy address.

BTW, this app only allows you to VIEW your IPv6 configuration - you can’t CHANGE anything (e.g. manually configure an address, enable/disable privacy option, etc.). Guess I will have to write one.

For a very powerful GUI IPv6 configuration app for Windows, see www.sixscape.com under Products / NetConf. It’s free, unlike this app. It appears the free ad-supported version of this is no longer available - the only choice I saw was the paid one.

It is AMAZING to me that Apple chose to show only the antiquated (way past shelf-life) IPv4 addresses in their address info. They look so quaint - almost as out of date as 8 bit ARPANET addresses. The Safari browser bravely connected to several IPv6 websites (e.g. ipv6-test.com) with no problem, and showed full operation, but most people will be totally clueless that their device has and supports IPv6, even if their ISP provides it. Good job, Apple (..... NOT). 

Log-in to comment