CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" >

22.5. Dynamic Host Configuration v6 Server (dhcp6s)

DHCPv6 can be used for stateful configurations. The daemon itself need not necessary run on the Linux default IPv6 gateway router.

You can specify more information than by using radvd. The are most similar to IPv4 DHCP server.

After a proper configuration, the daemon reacts on received ICMPv6 multicast packets sent by a client to address ff02::1:2

22.5.1. Configuration of the DHCPv6 server (dhcp6s)

22.5.1.1. Simple configuration

dhcp6s's config file is normally /etc/dhcp6s.conf. An simple example looks like following:

interface eth0 {
        server-preference 255;
        renew-time 60;
        rebind-time 90;
        prefer-life-time 130;
        valid-life-time 200;
        allow rapid-commit;
        option dns_servers 2001:db8:0:f101::1 sub.domain.example;
        link AAA {
                range 2001:db8:0:f101::1000 to 2001:db8:0:f101::ffff/64;
                prefix 2001:db8:0:f101::/64;
        };
};

22.5.2. Configuration of the DHCPv6 client (dhcp6c)

22.5.2.1. Simple configuration

dhcp6c's config file is normally /etc/dhcp6c.conf. An simple example looks like following:

interface eth0 {
        send rapid-commit;
        request domain-name-servers;
}; 

22.5.3. Usage

22.5.3.1. dhcpv6_server

Start server, e.g.

# service dhcp6s start

22.5.3.2. dhcpv6_client

Start client in foreground, e.g.

# dhcp6c -f eth0

22.5.4. Debugging

22.5.4.1. dhcpv6_server

The server has one foreground and two debug toggles (both should be used for debugging), here is an example:

# dhcp6s -d -D -f eth0

22.5.4.2. dhcpv6_client

As general debugging for test whether the IPv6 DHCP server is reable on the link use an IPv6 ping to the DHCP multicast address:

# ping6 -I eth0 ff02::1:2

The client has one foreground and two debug toggles, here is an example:

# dhcp6c -d -f eth0
Oct/03/2005 17:18:16 dhcpv6 doesn't support hardware type 776 
Oct/03/2005 17:18:16 doesn't support sit0 address family 0 
Oct/03/2005 17:18:16 netlink_recv_rtgenmsg error 
Oct/03/2005 17:18:16 netlink_recv_rtgenmsg error 
Oct/03/2005 17:18:17 status code for this address is: success 
Oct/03/2005 17:18:17 status code: success 
Oct/03/2005 17:18:17 netlink_recv_rtgenmsg error 
Oct/03/2005 17:18:17 netlink_recv_rtgenmsg error 
Oct/03/2005 17:18:17 assigned address 2001:db8:0:f101::1002 prefix len is not
¬ in any RAs prefix length using 64 bit instead 
Oct/03/2005 17:18:17 renew time 60, rebind time 9

Note that the netlink error messages have no impact.