Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Any particular reason you don't want to configure the default gateway statically as well? – kasperd Jan 3 '15 at 17:18

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.

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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