IPv6 address preference and privacy extensions on Windows 7 and Ubuntu 12.04

I have a dual-stack network with a DHCPv6 server in a stateful mode (managed address configuration). Windows 7 and Ubuntu 12.04 hosts get the address configuration successfully, but still prefer the randomly generated addresses for a source address with a prefix advertised by RA.

If the privacy extensions are turned of with netsh interface ipv6 set privacy state=disabled, the problem disappears and the DHCP-provided address is used as a source.

I would like to know if there is a way to make Windows 7 and Ubuntu 12.04 prefer DHCPv6-provided address without globally turning privacy extensions off. Is there a DHCP option or a RA flag that would make this possible? It is a hassle to have to configure all the workstations manually.

I use ISC DHCPv6 daemon on a Linux server.


Solution 1:

You should change your RA deamon's config to send the M/L/O flag, and remove the A flag. In radvd.conf, this is:

on interface:

AdvManagedFlag on;
AdvOtherConfigFlag on;

This tells the client to use DHCP

On the prefix config node:

AdvAutonomous off;

This tells the client not to use the prefix for automatic address configuration (so no "privacy" address can be generated)