Server 2012 Obtaining DHCPv6 Address, but has static configuration


This is very similar to the problem I had with 2008R2 (Win2k8R2 Obtaining DHCPv6 address, but has static configuration), but that solution doesn't work with 2012R2.

The box is a new 2012R2 domain controller, with a teamed interface to our LAN (where our desktop clients and other domain controller is). The other domain controller hands out DHCPv4 and DHCPv6. The 2012R2 controller only has the 1 interface:

netsh interface ipv6>show int

Idx     Met         MTU          State                Name
---  ----------  ----------  ------------  ---------------------------
  1          50  4294967295  connected     Loopback Pseudo-Interface 1
 15           5        1500  connected     LAN

Router Discovery, Managed Address Configuration and Other Stateful Configuration are all disabled on this interface:

netsh interface ipv6>show interface 15

Interface LAN Parameters
IfLuid                             : ethernet_12
IfIndex                            : 15
State                              : connected
Metric                             : 5
Link MTU                           : 1500 bytes
Reachable Time                     : 38000 ms
Base Reachable Time                : 30000 ms
Retransmission Interval            : 1000 ms
DAD Transmits                      : 1
Site Prefix Length                 : 64
Site Id                            : 1
Forwarding                         : disabled
Advertising                        : disabled
Neighbor Discovery                 : enabled
Neighbor Unreachability Detection  : enabled
Router Discovery                   : disabled
Managed Address Configuration      : disabled
Other Stateful Configuration       : disabled
Weak Host Sends                    : disabled
Weak Host Receives                 : disabled
Use Automatic Metric               : enabled
Ignore Default Routes              : disabled
Advertised Router Lifetime         : 1800 seconds
Advertise Default Route            : disabled
Current Hop Limit                  : 0
Force ARPND Wake up patterns       : disabled
Directed MAC Wake up patterns      : disabled
ECN capability                     : application

But the interface still obtains a DHCP address, even though it has been manually configured with a static address:

netsh interface ipv6>show address 15

Address 2001:44b8:4126:c615::22 Parameters
Interface Luid     : LAN
Scope Id           : 0.0
Valid Lifetime     : infinite
Preferred Lifetime : infinite
DAD State          : Preferred
Address Type       : Manual
Skip as Source     : false

Address 2001:44b8:4126:c615:dc62:63e4:77e3:a0ad Parameters
Interface Luid     : LAN
Scope Id           : 0.0
Valid Lifetime     : 10d4h36m31s
Preferred Lifetime : 4d4h36m31s
DAD State          : Preferred
Address Type       : Dhcp
Skip as Source     : false

Address fe80::d903:344a:627b:2289%15 Parameters
Interface Luid     : LAN
Scope Id           : 0.15
Valid Lifetime     : infinite
Preferred Lifetime : infinite
DAD State          : Preferred
Address Type       : Other
Skip as Source     : false

Best Answer

Unfortunately, this is intended behaviour, however ridiculous it may seem.

In ipv6, the router will initiate a client's IP settings via router advertisements in ipv6, and (under certain configurations) then point the client to a DHCP server for further information.

Unlike with ipv4, with ipv6 each interface can holding multiple ipv6 addresses, so setting up a static IP will not prevent the interface from also getting a DHCP assigned IP address.

This behaviour is counterintuitive, and even unwanted in some circumstances, but it is by design and thus persists up to this moment.

@fukawi2: (sorry, guests cannot reply to comments apparently) It should depend on the flags active in the router advertisement. If you have the A flag set, the dhcp client should automatically configure himself an autoconfig ipv6 address. The M flag forces the client to ask the DHCP server for an address; the O flag forces the client to get his DNS and other info from the DHCP server. The flags can easily coexist, so if the A flag and the M flag is on, the client should get 2 addresses, one from DHCP and one from autoconfig. Same if the A flag is on and you put a static ip on the client.

The mess is that you can't easily undo this; turning off the dhcp client breaks the dns service if it runs on the same server (as DNS updates are handled by the DHCP service in some cases), and turning off the M flag in a domain environment will make your other clients stop looking for a DHCP address as well.

Try to wireshark the packets and see which flags are active on your router advertisements (and no, turning them off if a no-no as well). IPv6 is a mess that just started hitting the real world and will require a few adjustments in order to survive in it. It's a global beta, really, and we get to debug :-)