• Welcome to Hurricane Electric's IPv6 Tunnel Broker Forums.

DAD causes services to not come up during boot

Started by kasperd, December 29, 2013, 04:45:36 AM

Previous topic - Next topic


I have found that on Ubuntu 12.04 LTS having a service configured to listen on a static IPv6 address is not working. I have a static IPv6 address configured on eth0, and I have services configured to listen on that IPv6 address. More often than not, services do not come up during boot.

As best I can tell, this problem is caused by duplicate address detection. When an IPv6 address is assigned to an interface, the kernel will start DAD in the background. The process, which configured the address will continue immediately. If you attempt to bind to the address while DAD is still in progress, the kernel will refuse to bind the socket to the address, the same as would have happened, if you had not configured the address on any interface.

This means that timing of DAD vs boot scripts causes the behaviour to be nondeterministic. The later a service is started, the more likely it is to work.

For now I can think of two possible workarounds. My question is, which workaround is best? Is there a better one?

I can disable DAD on eth0 through sysctl.confnet.ipv6.conf.eth0.accept_dad=0
Or I can configure the same static IPv6 address on a dummy interface, such that the kernel should find it on an interface, even if DAD is not yet complete.