This article explains the difference between stateless and stateful mode of a Windows Server 2008 R2 DHCP server for IPv6 (DHCPv6) and tells you how to change this mode.

Michael Pietroforte

Michael Pietroforte is the founder and editor in chief of 4sysops. He has more than 35 years of experience in IT management and system administration.

When I first installed a DHCPv6 server on Window Server 2008 R2, my clients (Vista and Windows 7) were unable to receive IP addresses. Thus, I started googling to find out what went wrong. I found quite a few official and unofficial resources with promising advice. In the end, it turned out that most of those resources were either outdated or simply provided wrong information. In my last post about DHCPv6 server installation, I mentioned the wrong advice regarding client settings.

Stateful.DHCP.server

The difference between stateless and stateful IPv6 autoconfiguration ^

However, the most prominent confusion about setting up DHCPv6 on Windows Server 2008 R2 is the difference between stateless and stateful autoconfiguration. I briefly discussed the difference already in my article about the IPv6 features. With stateless autoconfiguration of IPv6 addresses, a host uses the IPv6 prefix (the subnet address) advertised by a router on the link (subnet) to generate an IPv6 address.

Clients can use the MAC address of their network interface to determine the interface identifier. The interface identifier is the last 64 bits of an IPv6 address. If you are interested in how this interface identifier generation works in stateless autoconfiguration, I recommend this explanation.

Stateful autoconfiguration is simply IP address assignment through a DHCPv6 server.

Stateless mode and stateful mode of a Windows 2008 R2 DHCP server ^

Much of the confusion on the web stems from the fact that when you install the DHCP role on a Window 2008 or R2 server, you have to choose whether you "Enable DHCPv6 stateless mode for this server" or "Disable DHCPv6 stateless mode for this server" (see screenshots). Since disabling stateless mode seems to imply that you enable stateful mode, many recommend that you re-install your DHCP server and make sure that your DHCP server is in stateful mode because only then will it issue IPv6 addresses to DHCPv6 clients.

DHCPv6 server stateless mode DHCPv6 server stateful mode

This claim is wrong. As to my tests, this setting makes no difference with regard to automatic IPv6 address assignment through a Windows DHCPv6 server. The only difference between those two options is that if you choose to enable stateless mode, the installation wizard will ask for a Parent Domain and an IPv6 DNS Server. The reason for this is that, with stateless autoconfiguration, clients can only receive the IPv6 prefix from a router to derive the IPv6 address but no additional network settings as the DNS server.

However, a router can tell clients to obtain this configuration from a DHCPv6 server by setting the so-called M Flag to 0 and the O Flag to 1. In this scenario, the corresponding DHCP server runs in stateless mode because it won't assign IPv6 addresses to clients. But since you have no IPv6 scopes in stateless mode on the DHCP server where you could assign those options, you have to configure them during the DHCP server installation and assign them to the server. More information about the M Flag and O Flag can be found in this article.

Difference stateless stateful mode - DHCP IPv6 - DNS Settings

How to change a DHCPv6 server from stateless to stateful mode ^

I also often saw the question of how to change the mode of a Windows DHCPv6 server from stateless to stateful mode. Since there is no explicit setting where you could change a Windows DHCP server from stateful to stateless mode in the DHCP management console, it is often recommended to re-install the DHCP server. However, from what I have just said above, it is clear that this advice doesn't make sense.

All you have to do is to change the DHCP server from stateless to stateful mode is to add and activate an IPv6 scope and you get a stateful DHCPv6 server that is able to assign IPv6 addresses to clients.

Change a stateless DHCP server to a stateful DHCPv6 server

And if you want to move a DHCP server from stateful to stateless mode, you simply have to deactivate or delete all IPv6 scopes from the server.

The parameters Parent Domain and IPv6 DNS Server, which the installation wizard asked for during the DHCP server role installation if you chose "enable stateless mode," can be added manually to the Server Options node in the DHCP management console. The stateless DHPC server can then configure clients with these settings while the IPv6 prefix has to be provided by a router.

Are you an IT pro? Apply for membership!

0
Share
7 Comments
  1. AJ 8 years ago

    Great Info :o)

    0

  2. Edward 8 years ago

    Great document!

    I noticed that you're using a 'special' sample IPv6 address. Say I want to use my own site-link address; how do I generate/get such address? I know these start from FEC:: through FFF::, but how I do go about generating them?

    0

  3. Jeremy 7 years ago

    @Edward, please see the SixXS ULA page, or read RFC 4193.

    0

  4. timothy watters 6 years ago

    I didn't understand your explaination of what stateful mode is. I am not a computer expert. I just want a simple answer to the question.

    1+

  5. ShabazTech 5 years ago

    Stateful - dhcp server assigns ip addresses to clients

    Stateless - clients generate addresses by assistance from a router (this is configurable)

    2+

  6. Nkusi 4 years ago

    great summarized informations

    0

  7. salim 3 years ago

    Compare Address Auto-Configuration and DHCPv6 and how the co-exist.

    0

Leave a reply

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2019

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account