Configuring ISC DHCPv6 Server

Configuring ISC DHCPv6 Server

Contents[hide]

Preface

This article should give you a short overview how to install a DHCPv6 Server and configure it.

With DHCPv6 you can decide in which mode you want to use your dhcp server. You can use a ‘stateless’ or ‘stateful mode’. Both are described in this article below

Stateless Configuration

In stateless configuration mode the dhcp server interacts together with an other IPv6 address assignment mechanism (e.g. a radvd router).The client first gets its prefix (and generates his own IPv6 address – SLAAC) and receives some more informations (like DNS server IPs, NTP server) as second part from your DHCPv6 server.

In this mode the DHCPv6 Server provides the following informations to clients:

DNS serveraddresses Domain Name NTP Server SIP Server (RFC 3319)… see

Stateful Configuration

In this mode the DHCPv6 server provides their addresses without any other address assigning mechanism.

Installation Softwaredownload

You can download the current production release of ISC DHCP Server from Single steps for installation are listed in file README.If you want to see my steps, look below:

wget tar -zxfv dhcp-4.2.1-P1.tar.gz cd dhcp-4.2.1-P1 ./configuremake && make install Sampleconfigurations

The folder “dhcp-4.2.1-P1/docs/examples” provides some sampleconfigs, who are documented very well.

Serverconfiguration Preconfigurationsteps

A possible configuration could look like this:

1.) prefix ‘2001:ed8:77b5’ (here you can use your sixxs prefix)2.) To indicate the dhcp server in ipv6 choose an ‘easy to read’ ipv4-in-ipv6 address: 2001:ed8:77b5::10:123:105:122 (ipv4: 10.123.105.122/24)3.) the dhcp range starts from 2001:ed8:77b5::1 to 2001:ed8:77b5::ffff:ffff (many addresses…)

ClientServer

HW MAC00:22:68:11:62:cd60:eb:69:4e:2b:8b

Link local Addressfe80::222:68ff:fe:11:62cdfe80::62eb:69ff:fe4e:2b8b

IPrange 2001:ed8:77b5::1 2001:ed8:77b5::ffff:ffff2001:ed8:77b5::10:123:105:122/64

SIXXsrange <YOUR-PREFIX>::1 <YOUR-PREFIX>::ffff:ffff<YOUR-PREFIX>::10:123:105:122/64

Adding the Serverinterface to your Subnet

To become the server work properly, the listening interface has to be configured with a ip address in the provided subnet – otherwise the server will not start.(With this address the server knows, which interface he should use.)

There exists two methodes to configure your interface with IPv6 addresses:

ifconfig ifconfig <INTERFACE> inet6 {add|del} <IPV6-ADDRESS>/<PREFIX-LENGTH>example (for adding a address):ifconfig eth0 inet6 add 2001:ed8:77b5::10:123:105:122/64

ip ip -6 addr {add|del} <IPV6-ADDRESS>/<PREFIX-LENGTH> dev <INTERFACE>exampleip -6 addr add 2001:ed8:77b5::10:123:105:122/64 dev eth0

The Expected IP Flow

Keep in mind, that the IPv6 DHCP client communicates always with the ‘all multicast node’ (ff02::1:1,ff02::1:2) as destination address. The server always communicates with his local link address (fe80::) as source address.

At first look it’s a little bit confusing, but the IP flow looks like this:(taken from whireshark’s ip flow view)

ClientDHCP Serverfe80::222:68ff:fe11:62cdfe80::62eb:69ff:fe4e:2b8b|||(all nodes address)||ff02::1:2|||||||| Solicit XID: 0x28d6|| DHCPv6: Solicit XID: 0x28d6e4 CID: 0001000115ad822e0022681162cd |—————————->||||||||| Advertise XID: 0x28|| DHCPv6: Advertise XID: 0x28d6e4 IAA: 2001:ed8:77b5::8758:1493 CID: 0001000115ad822e0022681162cd |<———————————————————|||||||| Request XID: 0x35a2|| DHCPv6: Request XID: 0x35a211 CID: 0001000115ad822e0022681162cd IAA: 2001:ed8:77b5::8758:1493 | —————————>||||||||| Reply XID: 0x35a211|| DHCPv6: Reply XID: 0x35a211 IAA: 2001:ed8:77b5::8758:1493 CID: 0001000115ad822e0022681162cd |<———————————————————|

DHCP Server Configfiles (Create a Range) stateful configurationdefault-lease-time 2592000;preferred-lifetime 604800;option dhcp-renewal-time 3600;option dhcp-rebinding-time 7200;# Enable RFC 5007 support (same than for DHCPv4)allow leasequery;# Global definitions for name server address(es) and domain search list## option dhcp6.name-servers 3ffe:501:ffff:100:200:ff:fe00:3f3e;option dhcp6.domain-search “test.example.com”,”example.com”;option dhcp6.info-refresh-time 21600;# The subnet where the server is attachedsubnet6 2001:ed8:77b5::/64 {range6 2001:ed8:77b5::1 2001:ed8:77b5::ffff:ffff;}

Starting the Server Manually

You can start the server with the following command:

dhcpd -6 -cf <PATH-to-configfile> -ls <PATH-to-leasefile>

Automatically with /etc/init.d/ 可以提高你的水平。(戏从对手来。

Configuring ISC DHCPv6 Server

相关文章:

你感兴趣的文章:

标签云: