I have a static IPv6 address I would like to assign. When I add the address to the /etc/sysconfig/network-scripts/ifcfg-eth0 file and restart networking I realize I get several IPv6 addresses. The first one is my static address (Prefix::host) and the second one is my autoconfiguration address (Prefix::MAC_ADDRESS).

I realized traffic was going out of the autoconfiguration address so my solution was to disable it. I added "IPV6_AUTOCONF=no" to the /etc/sysconfig/network-scripts/ifcfg-eth0 file. That solved the issue since the autoconfiguration address was gone.

However since there is no autoconfiguration I was not getting the default gateway. I believe Solaris has something called "token based IPv6" where you can specify the host portion of the address and autoconfiguration still runs to assign the prefix, dns, and default gateway. Can I do this in linux?

  • 1
    Any particular reason you don't want to configure the default gateway statically as well?
    – kasperd
    Jan 3, 2015 at 17:18

3 Answers 3


Token IPv6 addresses is a thing in Linux, man ip-token. Essentially,
ip token set ::123/64 dev eth0 There isn't really configuration supporting this in EL scripts, so I just dump it in a /sbin/ifup-local script.

Auto configuration addresses are not necessarily based on your MAC address. sysctl -w net.ipv6.conf.default.use_tempaddr=1 should turn on privacy extensions and also prefer your static global addresses, if you want that kind of predictability. Save to /etc/sysctl.d/ if you are happy with it and want it permanently. See ip-sysctl.txt for other options.


You need to accept the Router Advertisement (RA) messages from the router. That will have the prefix (network) and prefix length as well as the default gateway.

Check out the kernel config vars



and make sure they are set to (typically) 1

Also, make sure that something on your network (usually your router) is sending the RAs.


One possible answer is DHCPv6 (on the network side). In my own experience where some type of IPv6 advertisement service (instead of DHCPv6) is available for addressing is that if I want my own "static" address, I have to statically define the rest (gateway, etc) as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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