DHCPv6

DHCPv6

Introduction

As of Ubuntu version 11.04 Natty Narwhal, we have moved to ISC-DHCPv4, which now supports DHCP for IPv6, both as a server and as a client.

DHCPv6 offers advantages over "traditional" stateless IPv6 autoconfigurations: as with IPv4, you can hand out specific addresses to clients and have them keep the same address throughout their lifetime. DHCPv6 also obviously allows logging of reservations and selected addresses, which can allow system administrators to more easily identifies issues that could arise from autoconfiguration.

ISC DHCP v6 Server

Installing the DHCP server

To install the DHCP 4 server that support DHCPv6; install the isc-dhcp-server package:

sudo apt-get install isc-dhcp-server

You will then need to edit and modify the stock configuration file shipped in /etc/dhcp/dhcpd.conf.

Setting up the DHCP server

To configure the DHCP server to start on your system, you will first need to modify the init script in /etc/init.d/isc-dhcp-server:

Change all the places where dhcpd is started to add an extra parameter -6; there should be three, you can place this new parameter just before -t is passed to dhcpd.

If you instead want a DHCP server for IPv4 and one for IPv6 to cohabit on the same system, copy the original init script to a new file; the original should not be modified, and your new copy should have the extra -6 parameter.

To configure the DHCP server; you can then modify the included config file in /etc/dhcp/dhcpd.conf. Note the following syntax changes for common keywords:

DHCP v4 keyword

DHCP v6 keyword

subnet <address/prefix>

subnet6 <address/prefix>

range <start ip> <end ip>

range6 (<start ip> <end ip> | <network/prefix>)

Consider checking man dhcpd.conf for the full syntax reference.

ISC DHCP v6 Client

Installing the DHCP client

On most systems, the ISC DHCP client should already be installed. This is true for both standard desktop and server installs.

The ISC DHCP client can be installed with the following command:

sudo apt-get install isc-dhcp-client

You can then use the dhcp client by issuing the following command:

sudo dhclient <iface>

Where <iface> is the network device you want to configure. For example, eth0, or wlan0.

Client configuration

ISC DHCP 4 provides much of the same configuration files and parameters as DHCP 3.

The configuration file used by dhclient is /etc/dhcp/dhclient.conf. Most configuration parameters are the same as in DHCP3 and /etc/dhcp3/dhclient.conf; please refer to man dhclient.conf.

From man dhclient.conf:

       The client does not yet have a default DHCPv6 Option Request Option (ORO), nor
       has it been integrated with the 'request' and 'require' syntax above.   It  is
       neccessary to configure an ORO then.

         send dhcp6.oro 1, 2, 7, 12, 13, 23, 24, 39;

       The  above ORO will request both identifiers (server, client), the preference,
       unicast, nameservers, domain-search, and FQDN(v6) options.

DHCPv6 (last edited 2011-02-09 14:29:14 by ua-178)