I have a static IPv6 /62 prefix and I use radvd on my router (running Debian) to advertise a /64 from within it to my entire network. Other than my router (which is ::1), I let EUI64 set the suffix based on the MAC address (i.e. matching the suffix of the automatic fe80:: address).
Most Linuxes are migrating to masking this for privacy reasons. I am really not concerned about the privacy implications, and further, want a perfectly predictable IPv6 address for services such as sshd.
In theory, this should be easy to configure. For example, on a Raspberry Pi running Raspbian, I've added to the /etc/sysctl.conf file:
###################################################################
# Enable IPv6 EUI64
#
net.ipv6.conf.all.use_tempaddr=0
net.ipv6.conf.default.use_tempaddr=0
net.ipv6.conf.eth0.use_tempaddr=0
Alas, nothing changes. (The last line was a last-ditch attempt; the previous two lines really ought to work alone.)
Something in these OSes is preventing EUI64 from working. What is it, and how do I enable it?
This particular machine is not running NetworkManager, but some of them are.
Best Answer
You are confusing two different address types:
The former are always generated in addition to the default address and do not replace it, so certainly not what you have in mind.
The latter do replace the default EUI64-based address, but they are not temporary and have nothing to do with the
use_tempaddr
knob. Instead you need to change the primary address generation mode:If SLAAC is performed by the kernel, change this sysctl:
(Looking at source code, it doesn't seem like
all.addr_gen_mode
is implemented.)If SLAAC is performed by dhcpcd, use this
dhcpcd.conf
option:If SLAAC is performed by NetworkManager: