Vanity IPv6 address with SLAAC

3

1

I would like to force the second half (the interface identifier) of my link-local and SLAAC-configured global addresses to not be derived from my MAC address or completely random (from privacy extensions), but a value I would specify myself.

Is this possible?

codl

Posted 2014-03-29T22:42:43.460

Reputation: 35

Answers

1

You can't do this with SLAAC.

But you can do it with DHCPv6 with a static reservation, (e.g. the fixed-address6 directive for ISC dhcp) or by configuring your IPv6 address manually on your computer.

Michael Hampton

Posted 2014-03-29T22:42:43.460

Reputation: 11 744

1

I would like to provide additional options to the accepted answer.

You cannot change the behaviour of SLAAC and SLAAC+privacy extensions, as you've realized, but you can configure your router to advertise a stateful DHCPv6 service (in addition to the SLAAC automatic addresses). This mode of operation has a different name across different router software, but is generally referred to as stateless+stateful. This will allow your router to hand out additional leases over which you have more control.

If you don't like the SLAAC addresses you may disable it on your network, but note that some android devices might require SLAAC to configure their addresses. I would suggest that you configure DHCPv6 in addition to SLAAC.

If you're using OpenWRT, you can configure a ULA (universal local address) prefix for your subnet, (e.g. fd00:c0de::). In this mode, a host at, say 192.168.1.5, would receive fd00:c0de::5 via dhcpv6 (in addition to any SLAAC addresses if enabled). I personally find this option convenient, as it is based off your dhcpv4 leases.

Depending on your router, you probably can also add a static reservation on v6, based on your device's DUUID. This is mentioned in the accepted answer.

You could also just assign yourself the IPv6 you want on the host if you find the router configuration nightmarish:

 #on linux
 sudo ip addr add fd00::g00d:c0de:15:dead/64 dev eth0

init_js

Posted 2014-03-29T22:42:43.460

Reputation: 275