Browse Source

[1367] DHCPv6 doc added, DHCPv4 doc updated.

Tomek Mrugalski 13 years ago
parent
commit
315edfd3b0
2 changed files with 328 additions and 95 deletions
  1. 151 65
      doc/guide/bind10-guide.html
  2. 177 30
      doc/guide/bind10-guide.xml

File diff suppressed because it is too large
+ 151 - 65
doc/guide/bind10-guide.html


+ 177 - 30
doc/guide/bind10-guide.xml

@@ -1817,7 +1817,8 @@ then change those defaults with config set Resolver/forward_addresses[0]/address
     clients. Even though principles of both DHCPv4 and DHCPv6 are
     somewhat similar, these are two radically different
     protocols. BIND10 offers server implementations for both DHCPv4
-    and DHCPv6.</para>
+    and DHCPv6. This chapter is about DHCP for IPv4. For description of
+    DHCPv6 server, see <xref linkend="dhcp6"/>.</para>
 
     <note>
       <para>
@@ -1832,9 +1833,9 @@ then change those defaults with config set Resolver/forward_addresses[0]/address
       </para>
     </note>
 
-    <section>
-      <title>Server Usage</title>
-      <para>BIND10 provides experimental DHCPv4 server component since
+    <section id="dhcp4-usage">
+      <title>DHCPv4 Server Usage</title>
+      <para>BIND10 provides DHCPv4 server component since
       December 2011. It is currently described as skeleton server and
       can be described as an early prototype that is not yet fully
       functional. It is mature enough to conduct first tests in lab
@@ -1873,7 +1874,7 @@ then change those defaults with config set Resolver/forward_addresses[0]/address
     </section>
 
     <section id="dhcp4-config">
-      <title>Server Configuration</title>
+      <title>DHCPv4 Server Configuration</title>
       <para>
         DHCPv4 server does not have lease database implemented yet
         or any support for configuration, so every time the same set
@@ -1885,13 +1886,13 @@ then change those defaults with config set Resolver/forward_addresses[0]/address
         configuration is to tweak its source code. To do so, please edit
         src/bin/dhcp4/dhcp4_srv.cc file and modify following parameters:
         <screen>
-const std::string HARDCODED_LEASE = "10.3.2.222"; // assigned lease
+const std::string HARDCODED_LEASE = "192.0.2.222"; // assigned lease
 const std::string HARDCODED_NETMASK = "255.255.255.0";
 const uint32_t    HARDCODED_LEASE_TIME = 60; // in seconds
-const std::string HARDCODED_GATEWAY = "10.3.2.2";
-const std::string HARDCODED_DNS_SERVER = "8.8.8.8";
-const std::string HARDCODED_DOMAIN_NAME = "isc.example.org";
-const std::string HARDCODED_SERVER_ID = "10.3.1.1";</screen>
+const std::string HARDCODED_GATEWAY = "192.0.2.1";
+const std::string HARDCODED_DNS_SERVER = "192.0.2.2";
+const std::string HARDCODED_DOMAIN_NAME = "isc.example.com";
+const std::string HARDCODED_SERVER_ID = "192.0.2.1";</screen>
 
         Lease database and configuration support is planned for 2012.
       </para>
@@ -1906,23 +1907,25 @@ const std::string HARDCODED_SERVER_ID = "10.3.1.1";</screen>
       </para>
       <itemizedlist>
           <listitem>
-            <simpara>During initial IPv4 node configuration, where server has to
-        send packet to a node that does not have IPv4 address
-        assigned yet, server requires certain tricks (or hacks) to
-        transmit such packets. This is not implemented yet, therefore
-        DHCPv4 server supports relayed traffic only.</simpara>
+            <simpara>During initial IPv4 node configuration, where
+            server has to send packet to a node that does not have
+            IPv4 address assigned yet, server requires certain tricks
+            (or hacks) to transmit such packets. This is not
+            implemented yet, therefore DHCPv4 server supports relayed
+            traffic only.</simpara>
           </listitem>
           <listitem>
-            <simpara>It provides a single, fixed, hardcoded lease to
-            any client that asks.  There is no lease manager
-            implemented. If two clients request addresses, they will
-            both get the same fixed address.</simpara>
+            <simpara><command>b10-dhcp4</command> provides a single,
+            fixed, hardcoded lease to any client that asks.  There is
+            no lease manager implemented. If two clients request
+            addresses, they will both get the same fixed
+            address.</simpara>
           </listitem>
           <listitem>
-            <simpara>Server does not support any configuration
-            mechanisms yet. The whole configuration is currently
-            hardcoded. The only way to tweak configuration is to
-            directly modify source code. See see <xref
+            <simpara><command>b10-dhcp4</command> does not support any
+            configuration mechanisms yet. The whole configuration is
+            currently hardcoded. The only way to tweak configuration
+            is to directly modify source code. See see <xref
             linkend="dhcp4-config"/> for details.</simpara>
           </listitem>
           <listitem>
@@ -1932,8 +1935,9 @@ const std::string HARDCODED_SERVER_ID = "10.3.1.1";</screen>
             coded in reception routines yet, so if you are running
             this code on a machine that has many interfaces and
             <command>b10-dhcp4</command> happens to listen on wrong
-            interface, the easiest way to is to down other
-            interfaces. This limitation will be fixed shortly.</simpara>
+            interface, the easiest way to work around this problem is
+            to down other interfaces. This limitation will be fixed
+            shortly.</simpara>
           </listitem>
           <listitem>
             <simpara>PRL (Parameter Request List) is currently ignored
@@ -1943,7 +1947,7 @@ const std::string HARDCODED_SERVER_ID = "10.3.1.1";</screen>
           <listitem>
             <simpara><command>b10-dhcp4</command> does not support
             BOOTP. That is a design choice. This limitation is
-            permanent. If have legacy nodes that can't use DHCP and
+            permanent. If you have legacy nodes that can't use DHCP and
             require BOOTP support, please use latest version of ISC DHCP
             <ulink url="http://www.isc.org/software/dhcp"/>.</simpara>
           </listitem>
@@ -1951,24 +1955,162 @@ const std::string HARDCODED_SERVER_ID = "10.3.1.1";</screen>
             <simpara>Interface detection is currently working on Linux
             only. See <xref linkend="iface-detect"/> for details.</simpara>
           </listitem>
+        <listitem>
+          <simpara>Address renewal (RENEW), rebinding (REBIND),
+          confirmation (CONFIRM), duplication report (DECLINE) and
+          release (RELEASE) are not supported yet.</simpara>
+        </listitem>
+        <listitem>
+          <simpara>DNS Update is not supported yet.</simpara>
+        </listitem>
       </itemizedlist>
 
     </section>
   </chapter>
 
-  <chapter id="dhcp6-srv">
+  <chapter id="dhcp6">
     <title>DHCPv6 Server</title>
+    <para>Dynamic Host Configuration Protocol for IPv6 (DHCPv6) is
+    specified in RFC3315. BIND10 provides DHCPv6 server implementation
+    that is described in this chapter. For DHCPv4 server
+    implementation, see <xref linkend="dhcp4"/>.
+    </para>
+
+    <note>
+      <para>
+        As of December 2011, both DHCPv4 and DHCPv6 components are
+        skeleton servers. That means that while they are capable of
+        performing DHCP configuration, they are not fully functional
+        yet. In particular, both do not have functional lease
+        databases. This means that they will assign the same, fixed,
+        hardcoded addresses to any client that will ask. See <xref
+        linkend="dhcp4-limit"/> and <xref linkend="dhcp6-limit"/> for
+        detailed description.
+      </para>
+    </note>
+
+    <section id="dhcp6-usage">
+      <title>DHCPv6 Server Usage</title>
+      <para>
+        BIND10 provides DHCPv6 server component since September
+        2011. It is currently described as skeleton server and can be
+        described as an early prototype that is not yet fully
+        functional. It is mature enough to conduct first tests in lab
+        environment, but it has significant limitations. See <xref
+        linkend="dhcp6-limit"/> for details.
+      </para>
+
+      <para>
+        DHCPv6 server is implemented as <command>b10-dhcp6</command>
+        daemon. As it is configurable yet, it is fully autonomous,
+        i.e. it does not interact with <command>b10-cfgmgr</command>.
+        To start DHCPv6 server, simply input:
+
+        <screen>
+#<userinput>cd src/bin/dhcp6</userinput>
+#<userinput>./b10-dhcp6</userinput>
+</screen>
+
+        Depending on your installation, <command>b10-dhcp6</command>
+        binary may reside in src/bin/dhcp6 in your source code
+        directory, in /usr/local/bin/b10-dhcp6 or other directory
+        you specified during compilation.
+
+        Afre start, server will detect available network interfaces
+        and will attempt to open UDP sockets on all interfaces that
+        are up, running, are not loopback and have IPv4 address
+        assigned.
+
+        Server will then listen to incoming traffic. Currently
+        supported client messages are SOLICIT and REQUEST. Server
+        will respond to them with ADVERTISE and REPLY, respectively.
+
+        As DHCPv6 server opens privileged ports, it requires root
+        access. Make sure you run this daemon as root.
+      </para>
+    </section>
+
+    <section id="dhcp6-config">
+      <title>DHCPv6 Server Configuration</title>
+      <para>
+        DHCPv4 server does not have lease database implemented yet
+        or any support for configuration, so every time the same set
+        of configuration options (including the same fixed address)
+        will be assigned every time.
+      </para>
+      <para>
+        At this stage of development, the only way to alter server
+        configuration is to tweak its source code. To do so, please edit
+        src/bin/dhcp6/dhcp6_srv.cc file and modify following parameters:
+        <screen>
+const std::string HARDCODED_LEASE = "2001:db8:1::1234:abcd";
+const uint32_t HARDCODED_T1 = 1500; // in seconds
+const uint32_t HARDCODED_T2 = 2600; // in seconds
+const uint32_t HARDCODED_PREFERRED_LIFETIME = 3600; // in seconds
+const uint32_t HARDCODED_VALID_LIFETIME = 7200; // in seconds
+const std::string HARDCODED_DNS_SERVER = "2001:db8:1::1";</screen>
+
+        Lease database and configuration support is planned for 2012.
+      </para>
+
+    </section>
+
     <section id="dhcp6-limit">
       <title>DHCPv6 Server Limitations</title>
       <para>
-        Relayed traffic is not supported.
+      <itemizedlist>
+        <listitem>
+          <simpara>Relayed traffic is not supported.</simpara>
+        </listitem>
+        <listitem>
+          <simpara><command>b10-dhcp6</command> provides a single,
+          fixed, hardcoded lease to any client that asks. There is no
+          lease manager implemented. If two clients request addresses,
+          they will both get the same fixed address.</simpara>
+        </listitem>
+        <listitem>
+          <simpara><command>b10-dhcp6</command> does not support any
+            configuration mechanisms yet. The whole configuration is
+            currently hardcoded. The only way to tweak configuration
+            is to directly modify source code. See see <xref
+            linkend="dhcp6-config"/> for details.</simpara>
+        </listitem>
+        <listitem>
+          <simpara>Upon start, server will open sockets on all
+          interfaces that are not loopback, are up, running and are
+          multicast capable and have IPv6 address.  Support for
+          multiple interfaces is not coded in reception routines yet,
+          so if you are running this code on a machine that has many
+          interfaces and <command>b10-dhcp6</command> happens to
+          listen on wrong interface, the easiest way to work around
+          this problem is to down other interfaces. This limitation
+          will be fixed shortly.</simpara>
+        </listitem>
+        <listitem>
+          <simpara>Temporary addresses are not supported yet.</simpara>
+        </listitem>
+        <listitem>
+          <simpara>Prefix delegation is not supported yet.</simpara>
+        </listitem>
+        <listitem>
+          <simpara>Address renewal (RENEW), rebinding (REBIND),
+          confirmation (CONFIRM), duplication report (DECLINE) and
+          release (RELEASE) are not supported yet.</simpara>
+        </listitem>
+        <listitem>
+          <simpara>DNS Update is not supported yet.</simpara>
+        </listitem>
+        <listitem>
+          <simpara>Interface detection is currently working on Linux
+          only. See <xref linkend="iface-detect"/> for details.</simpara>
+        </listitem>
+      </itemizedlist>
       </para>
     </section>
 
-
   </chapter>
 
-  <chapter id="libdhcp++">
+  <chapter id="libdhcp">
     <title>libdhcp++ library</title>
     <para>libdhcp++ is a common library written in C++ that is
     handles many DHCP-related tasks, like DHCPv4 and DHCPv6 packets
@@ -2008,6 +2150,11 @@ eth0 fe80::21e:8cff:fe9b:7349
       </para>
     </section>
 
+    <section id="packet-handling">
+      <title>DHCPv4/DHCPv6 packet handling</title>
+      <para>TODO: Describe packet handling here, with pointers to wiki</para>
+    </section>
+
   </chapter>
 
   <chapter id="statistics">