Jump to content

How to configure a Dynamic Resolver for IPv6

0
  chco's Photo
Posted Aug 04 2011 12:49 AM

The following excerpt from DNS and BIND on IPv6 offers a practical look at adopting IPv6 and how you'd set up a Dynamic Resolver to work with it.
IPv6 supports several methods for dynamically configuring a host’s IP address and other network parameters:

  • A “traditional” method, using DHCPv6, the IPv6 version of DHCP

  • Stateless Address Autoconfiguration, or SLAAC, in which a host uses Router Advertisements to assemble an IP address appropriate for use on the local network and to determine other network parameters

  • A hybrid method, in which a host uses SLAAC for address assignment but DHCPv6 to determine other network parameters


In the first and last methods, resolver configuration involves setting the right DHCPv6 options. In the second, it requires setting up the correct Router Advertisement options.

But wait—how does a host choose whether to use SLAAC, DHCPv6, or both? A router tells it its options with flags in its Router Advertisements:

  • The “M” flag, for “Managed Address Configuration,” tells hosts that DHCPv6 is available for both address assignment and network parameters (including resolver configuration).

  • The “A” flag, for “Autonomous Address Configuration,” tells hosts that SLAAC is available for address assignment and network parameters (possibly including resolver configuration).

  • The “O” flag, for “Other Stateful Configuration,” tells hosts that DHCPv6 is available for network parameters other than address assignment (that is, to be used together with SLAAC in the hybrid method described earlier).


Note that the host has a choice of methods to use and can use more than one. For example, a router may advertise the availability of both SLAAC and DHCPv6 for address assignment, and a host may get one IPv6 address using SLAAC and another using DHCPv6. A host may also receive resolver configuration from both methods, and then merge them. Confusing, eh?

Resolver Configuration Using DHCPv6

IPv6 supports dynamic configuration of hosts using DHCPv6, and naturally you can use DHCPv6 to configure a resolver. DHCPv6 has new resolver configuration options, though—you can’t use the same old DHCPv4 options to configure your resolver over DHCPv6. The new options are:

Option NumberISC Option NameOption Argument
23dhcp6.name-serversComma-separated list of IPv6 addresses
24dhcp6.domain-searchComma-separated list of domain names


And here’s a snippet from an ISC DHCP server’s dhcpd.conf file to show you how the options are set:

option dhcp6.name-servers 2001:db8:cafe:1::1, 2001:db8:cafe:2::1;
option dhcp6.domain-search "cgi.movie.edu","movie.edu";


The ability to set a search list via DHCP is new; while RFC 3397 introduced a DHCPv4 option to do that back in 2002, it was never widely supported by DHCP clients. DHCPv6 has supported configuration of the search list from the beginning, though, so all DHCPv6 clients should support it.

There’s another change in DHCPv6 worth mentioning. In IPv6, DHCP comes in two flavors: stateless and stateful. Stateful DHCPv6 is like DHCP on IPv4: a DHCP client can start with nothing but a MAC address and have an IP address plus other network configuration assigned. But stateless DHCPv6 is new and supports the hybrid method of configuring network stacks: a DHCP client that already has an IP address (e.g., assigned using SLAAC) can retrieve network configuration excluding address assignment (which it doesn’t need) from a DHCPv6 server.

Resolver Configuration Using Router Advertisements

Router Advertisements originally didn’t contain any resolver configuration parameters, so although hosts could use SLAAC to configure most of their network stacks, they couldn’t configure their resolvers. For that, they needed to use stateless DHCPv6, which could provide the IPv6 addresses of recursive name servers, as well as other DNS-related parameters, such as a search list, as described in the last section. But this required that every IPv6 subnet be served by a DHCPv6 server, in many cases solely to provide resolver configuration.

Then RFC 6106 extended Router Advertisements to support the specification of the IPv6 addresses of recursive name servers as well as a DNS search list, eliminating the need for a DHCPv6 server in many cases.

The Router Advertisement option used to configure a resolver’s name servers is called RDNSS, for Recursive DNS Server. The option for configuring a resolver’s search list is called DNSSL, for DNS Search List. As the name suggests, Router Advertisements are sent by routers, so you would usually configure the options on those routers. And, of course, the particular syntax required would vary depending on the make of routers you ran.

I write “would” because RFC 6106 is very new (published in November 2010), so not much gear supports it yet, though there’s somewhat more support for RFC 5006, a precursor to RFC 6106. (RFC 5006 introduced support for the RDNSS option but didn’t include a way to set a search list.) On the server side, Linux and various BSD operating systems have at least some support in rtadvd, the Router Advertisement daemon. On the client side, Mac OS X 10.7 (“Lion”) is rumored to support RFC 6106.

Here’s an example of configuring the RDNSS option in rtadvd.conf, the Linux version of rtadvd’s configuration file[2]:

[2] Note that the BSD operating systems use a substantially different syntax.


interface eth0 {
AdvSendAdvert on;
prefix 2001:db8:cafe:1::/64 {
AdvOnLink on;
AdvAutonomous on;
};
rdnss 2001:db8:cafe:1::1 {
};
};



Cover of DNS and BIND on IPv6
Learn more about this topic from DNS and BIND on IPv6. 

If you're preparing to roll out IPv6 on your network, this concise book provides the essentials you need to support this protocol with DNS. You'll learn how DNS was extended to accommodate IPv6 addresses, and how you can configure a BIND name server to run on the network. This book also features methods for troubleshooting problems with IPv6 forward- and reverse-mapping, techniques for helping islands of IPv6 clients communicate with IPv4 resources, and many other topics.

Learn More Read Now on Safari


Tags:
0 Subscribe


0 Replies