MacOS – Configuring predictable IPv6 addresses for laptop client

ipv6macosNetwork

I recently set up IPv6 for my home network via a tunnel. I have a /48 subnet and have assigned manual IPv6 addresses to my stationary Macs. I would like to set up my laptops to get a dynamic IPv6 address which is same every time I get onto my home network (wired or wireless). The aim would be to be able to connect to these machines via IPv6 from the outside.

As far as I understand OS X has no DHCPv6 client and therefore the IPv6 IP address allocation is done via router advertisement. Is this IP address allocated randomly (within the range of available addresses) or is there some predictability? AFAIK, the MAC address of the ethernet adapter is used as part of the IP address (unless some privacy flag is set). In a way I am trying to set up the equivalent of IPv4 DHCP with fixed IP addresses for IPv6. How would this be possible?

Best Answer

Just a small correction, but OSX (at least Mountain Lion) has full DHCPv6 client, which works out of the box to communicate with a DHCPv6 server on your network. The case may be, that Apple Airport does not have a DHCPv6 server and therefore your choice of IPv6 assignment is limited to auto-configuration (SLAAC) and link-local schemes (the ones controlled by privacy setting).

The SLAAC address, as you correctly worked out, uses the last three octets of the L2 MAC address. The other address is the link-local address of the interface.

If you wanted to use a DHCPv6 assignment, then you would run a small inexpensive DHCPv6 server on your network and end up with a third IPv6 address from your chosen DHCP scope, configured on your interfaces (depending on privacy setting).

If you combine this DHCPv6 server with your own DNS server, and configure delegation, you could just use DNS names rather than relying on IPs.

Reference:

http://blog.ipspace.net/2012/11/ipv6-router-advertisements-deep-dive.html http://blog.belodedenko.me/2013/06/a-practical-guide-to-setting-up-ipv6.html http://en.wikipedia.org/wiki/Link-local_address#IPv6

Related Question