Bering-uClibc 4.x - User Guide - IPv6 Networking - Configure DHCPv6

From bering-uClibc
Revision as of 15:46, 30 January 2011 by Davidmbrooke (Talk | contribs) (Added notes on Radvd AdvOtherConfigFlag usage)

Jump to: navigation, search
IPv6 Networking - Configure DHCPv6
Prev Bering-uClibc 4.x - User Guide


Introduction

While Stateless Autoconfiguration using Radvd is sufficient for some IPv6 networks, DHCPv6 provides a mechanism for better managing which IPv6 addresses get allocated to which clients and permits clients to be automatically informed of DNS servers, NTP servers and other local network resources which would otherwise need to be configured manually.

DHCPv6 is defined by a number of RFCS, most notably RFC 3315.

Note: DHCPv6 support for Bering-uClibc 4.x is currently under development and is not yet included as a standard part of Bering-uClibc 4.x. This page is being developed along with the supporting software.

The most common use case for a Bering-uClibc machine will be acting as a DHCPv6 server while also acting as an IPv6 router, providing a full set of IPv6 services to clients on one or more internal networks. Alternative, but less common use cases will be:

  • Acting as a DHCPv6 client
  • Acting as a DHCPv6 relay


DHCPv6 Software Options

There are two main options for DHCPv6 software for Linux:

  • Dibbler, a dedicated IPv6 DHCP server, relay or client
  • ISC DHCP, a generic DHCP solution which includes IP(v4) as well as IPv6 DHCP server capabilities

Of these, Dibbler appears to be a better fit alongside existing IP(v4) tools like Dnsmasq, whereas ISC DHCP offers the opportunity of a unified IP(v4) and IPv6 DHCP solution.

We probably need to investigate both of these in order to settle on the best option - Davidmbrooke 17:54, 8 January 2011 (UTC)


General Considerations

As well as, not instead of Radvd

DHCPv6 is not a replacement for Radvd. Router Advertisements are still required, most notably so that the Default IPv6 Gateway can be identified (there is no way to define a Default Gateway using DHCPv6).

It is necessary to slightly change the Radvd configuration in order to specify that a client should also initiate a DHCPv6 transaction. Depending on the desired behaviour, two Radvd configuration settings can be relevant:

  • AdvManagedFlag can be used to set the "M" flag in the Router Advertisement, which means that a client should use DHCPv6 to obtain a stateful IPv6 address (and potentially other network settings as well).
  • AdvOtherConfigFlag can be used to set the "O" flag in the Router Advertisement, which means that DHCPv6 should be used to obtain other network settings (such as a DNS or NTP server), most likely for use in conjunction with an auto-configured IPv6 address.

The relevant Radvd configuration field must be set to on for each interface where DHCPv6 is being used.

Note: It is legitimate to specify AdvManagedFlag on at the same time as AdvAutonomous on. However, different DHCPv6 clients seem to react differently when this is done and the results can be difficult to predict.

Firewall rules

A DHCPv6 server (or relay) listens on UDP port 547, so if Shorewall6 is being used this must have a Rule to accept traffic on this port for each interface where DHCPv6 is being used. A DHCPv6 client listens on UDP port 546 so the DHCPv6 server firewall must also be allowed to send to this port and any DHCPv6 client firewall must be allowed to listen on this port.



Prev Up