<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML ><HEAD ><TITLE >Dynamic Host Configuration v6 Server (dhcp6s)</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Linux IPv6 HOWTO (en)" HREF="index.html"><LINK REL="UP" TITLE="Hints for IPv6-enabled daemons" HREF="chapter-hints-daemons.html"><LINK REL="PREVIOUS" TITLE="Router Advertisement Daemon (radvd)" HREF="hints-daemons-radvd.html"><LINK REL="NEXT" TITLE="tcp_wrapper" HREF="hints-daemons-tcpwrapper.html"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Linux IPv6 HOWTO (en)</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="hints-daemons-radvd.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 21. Hints for IPv6-enabled daemons</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="hints-daemons-tcpwrapper.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="HINTS-DAEMONS-DHCPV6." ></A >21.5. Dynamic Host Configuration v6 Server (dhcp6s)</H1 ><P >DHCPv6 can be used for stateful configurations. The daemon itself need not necessary run on the Linux default IPv6 gateway router. </P ><P >You can specify more information than by using radvd. The are most similar to IPv4 DHCP server.</P ><P >After a proper configuration, the daemon reacts on received ICMPv6 multicast packets sent by a client to address ff02::16</P ><DIV CLASS="SECT2" ><H2 CLASS="SECT2" ><A NAME="AEN2629" ></A >21.5.1. Configuration of the DHCPv6 server (dhcp6s)</H2 ><DIV CLASS="SECT3" ><H3 CLASS="SECT3" ><A NAME="AEN2631" ></A >21.5.1.1. Simple configuration</H3 ><P >dhcp6s's config file is normally /etc/dhcp6s.conf. An simple example looks like following:</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >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; }; };</PRE ></FONT ></TD ></TR ></TABLE ></DIV ></DIV ><DIV CLASS="SECT2" ><H2 CLASS="SECT2" ><A NAME="AEN2635" ></A >21.5.2. Configuration of the DHCPv6 client (dhcp6c)</H2 ><DIV CLASS="SECT3" ><H3 CLASS="SECT3" ><A NAME="AEN2637" ></A >21.5.2.1. Simple configuration</H3 ><P >dhcp6c's config file is normally /etc/dhcp6c.conf. An simple example looks like following:</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" >interface eth0 { send rapid-commit; request domain-name-servers; }; </PRE ></FONT ></TD ></TR ></TABLE ></DIV ></DIV ><DIV CLASS="SECT2" ><H2 CLASS="SECT2" ><A NAME="AEN2641" ></A >21.5.3. Usage</H2 ><DIV CLASS="SECT3" ><H3 CLASS="SECT3" ><A NAME="AEN2643" ></A >21.5.3.1. dhcpv6_server</H3 ><P >Start server, e.g.</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" ># service dhcp6s start</PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="SECT3" ><H3 CLASS="SECT3" ><A NAME="AEN2647" ></A >21.5.3.2. dhcpv6_client</H3 ><P >Start client in foreground, e.g.</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" ># # dhcp6c -f eth0</PRE ></FONT ></TD ></TR ></TABLE ></DIV ></DIV ><DIV CLASS="SECT2" ><H2 CLASS="SECT2" ><A NAME="AEN2651" ></A >21.5.4. Debugging</H2 ><DIV CLASS="SECT3" ><H3 CLASS="SECT3" ><A NAME="AEN2653" ></A >21.5.4.1. dhcpv6_server</H3 ><P >The server has one foreground and two debug toggles (both should be used for debugging), here is an example:</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" ># dhcp6s -d -D -f eth0</PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="SECT3" ><H3 CLASS="SECT3" ><A NAME="AEN2657" ></A >21.5.4.2. dhcpv6_client</H3 ><P >The client has one foreground and two debug toggles, here is an example:</P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" ># 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</PRE ></FONT ></TD ></TR ></TABLE ><P >Note that the netlink error messages have no impact.</P ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="hints-daemons-radvd.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="hints-daemons-tcpwrapper.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Router Advertisement Daemon (radvd)</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="chapter-hints-daemons.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >tcp_wrapper</TD ></TR ></TABLE ></DIV ></BODY ></HTML >