How can I 'dip my toes' into dynamic IPv6 network addressing?

Zoredache asked:

Is there any way in IPv6 to enable dynamic addressing and configuration for a subset of hosts on a network identified by specific mac addresses?

I have been slowly working at setting up IPv6. All my routers have static addresses and routes and a few critical servers are statically addressed. Now I want to start testing out some clients, but I don’t want to simply enable it for an entire network at once. I would like to be able to just enable it for a few hosts.

In the IPv4 world I would setup a DHCP server with 0 free addresses in the scope, and just setup reservations. In the IPv6 world this doesn’t appear to be an option since I can’t set a default gateway via DHCPv6, that apparently can only be learned via router advertisements.

How is this approached? Is it simply not possible to selectively enable IPv6 on a network?

My routers are Linux based and the DHCPv6 server would run on Linux if it matters, and I am looking to enable clients of all sorts (Windows/Linux/OSX).

My answer:

I don’t see why you can’t do it substantially the same way with IPv6 as with IPv4 (though I will recommend deploying by subnets rather than by single hosts; it will save you a lot of time and headaches later).

This is how IPv6 works here (greatly simplified; see RFC 4861 for the gory details):

The default router sends a router advertisement periodically, or when it receives a router solicitation from a new host. The RA contains the address of the router, of course, and various flags. Of interest to us here are the M (managed) flag and the O (other) flag. These flags specify that the host should get the remainder of its configuration information from a DHCPv6 server:

  • When the M flag is set, all configuration information (except the router addresses) is provided by DHCPv6.
  • When the O flag is set, the host configures its own IPv6 address with SLAAC; all other configuration information (except the router addresses) is provided by DHCPv6.

At that point, it’s just a matter of using, e.g. fixed-address6 in your dhcpd.conf configuration to set reservations; your DHCPv6 setup will be substantially similar to the DHCP setup for IPv4.

I’ve also skipped over the case where a subnet might have two or more routers handling the “default” route; in this case look into IPv6 router preference for configuring this aspect.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.