I don't quite understand the link between 4 parameters related to IPv6 stateful and stateless autoconfiguration used under netsh int ipv6 set interface
command context in Windows:
advertise
routerdescovery
managedaddress
otherstateful
From what I could find around so far, I understand that:
advertise
is used to indicate that RA should be emited/responded by OS containing theM
andO
flag configured asmanagedaddress
andotherstateful
for that particular interface; this is relevant to a server.routerdescovery
is used to indicate that OS should request/process RA on that interface and use it to configure itself based on what flags the RA has; ifrouterdescovery
is enabled,managedaddress
andotherstateful
are overridden by RA's flags; this is relevant to a client
My question is what happens when advertise
and routerdescovery
are disabled?
You would think that in this case, managedaddress
and otherstateful
determines whether or not DHCPv6 client is enabled or not on that interface. However, it doesn't seem to be so. If all 4 parameters are disabled (advertise
, routerdescovery
, managedaddress
and otherstateful
) Windows client will still try to contact a DHCPv6 server.
After many experiments and a lot of ambiguous docs and articles, I have deducted that
managedaddress
andotherstateful
are relevant only in conjunction withadvertise
(i.e. when you enable RA on your Windows server) and they help setting theM
andO
flags in the RA packets.If
routerdescovery
is enabled andadvertise
disabled, you can't configuremanagedaddress
andotherstateful
parameters through netsh anymore, but as soon as an RA arrives on the interface, these two parameters are configured automatically so that they reflect theM
andO
flags of the arrived RA packet.Regardless which configuration is used, DHCPv6 Solicit messages are always sent on IPv6 enabled interfaces, even when receiving RA packets with
M
flag NOT set. I could not find a way to disable DHCPv6 on Windows (I assume Vista and above; I tested on 8.1). If there is a DHCPv6 server on the network you will get an IPv6 address from it.Luckily, most networks use stateless autoconfiguration (each node configure itself based on the prefix advertised in the RA) instead of stateful autoconfiguration where an IPv6 address is negotiated with a DHCPv6 server. Because most networks are stateless, many people thought that disabling
routerdiscovery
will stop them from getting additional IPv6 addresses. But this is not valid if there is a DHCPv6 server on the network.