From owner-doc-jp@jp.freebsd.org  Mon Jul 17 11:03:07 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id LAA02369;
	Mon, 17 Jul 2000 11:03:07 +0900 (JST)
	(envelope-from owner-doc-jp@jp.FreeBSD.org)
Received: from tortoise.jp.freebsd.org (root@tortoise.jp.FreeBSD.ORG [210.157.158.41])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id LAA02364
	for <doc-jp@jp.freebsd.org>; Mon, 17 Jul 2000 11:03:07 +0900 (JST)
	(envelope-from kuriyama@FreeBSD.org)
Received: from waterblue.imgsrc.co.jp (waterblue.imgsrc.co.jp [2001:218:422:2:250:70ff:fe00:6c68])
	by tortoise.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP/IPv6 id LAA26374
	for <doc-jp@jp.freebsd.org>; Mon, 17 Jul 2000 11:03:06 +0900 (JST)
	(envelope-from kuriyama@FreeBSD.org)
Received: from waterblue.imgsrc.co.jp (localhost [127.0.0.1])
	by waterblue.imgsrc.co.jp (8.11.0.Beta3/8.11.0.Beta1) with ESMTP id e6H239G25608
	for <doc-jp@jp.freebsd.org>; Mon, 17 Jul 2000 11:03:09 +0900 (JST)
Date: Mon, 17 Jul 2000 11:03:09 +0900
Message-ID: <7m8zv1ikde.wl@waterblue.imgsrc.co.jp>
From: Jun Kuriyama <kuriyama@FreeBSD.org>
To: Japanese Documentation Project <doc-jp@jp.freebsd.org>
User-Agent: Wanderlust/1.1.1 (Purple Rain) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) MULE XEmacs/21.1 (patch 10) (Capitol Reef) (i386--freebsd)
MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu")
Content-Type: text/plain; charset=ISO-2022-JP
Reply-To: doc-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: doc-jp 7568
Subject: [doc-jp 7568] =?ISO-2022-JP?B?GyRCTHU8VEpnPTgbKEI=?=
 (advanced-networking dhcp)
Errors-To: owner-doc-jp@jp.freebsd.org
Sender: owner-doc-jp@jp.freebsd.org
X-Originator: kuriyama@FreeBSD.org


$B!!(Badvanced-networking $B$d$C$F$F!"$A$g$&$I(B 1 $B%;%/%7%g%s$^$k$^$kDI2C$5$l$F(B
$B$$$kItJ,$,$"$C$?$N$G!"=i?4<T8~$1$@$H;W$&$N$GLu<T$rJg=8$7$^$9!#(B
$B!!$A$g$C$H$d$C$F$_$h$&$+$J!"$H;W$&?M$O%a!<%j%s%0%j%9%H$G<j$r5s$2$F$/$@$5(B
$B$$!#JL$K40`z$KLu$5$J$-$c$$$1$J$$!"$H$+!"%k!<%k$,$$$m$$$m$"$C$FBgJQ!"$H$+(B
$B9M$($J$/$F$$$$$G$9$N$G!"D)@o$7$F$_$h$&$H$$$&J}$,$$$l$P$<$R$I$&$>!#(B
$B!!(B130 $B9T$[$I$J$N$G!"5$@2$i$7$K$G$b$I$&$>!#(B

# $B?tF|BT$C$FC/$b$$$J$1$l$P<+J,$G$d$C$A$^$$$^$9$,!#(B


  <sect1 id="dhcp">
    <title>DHCP</title>

    <para><emphasis>Written by &a.gsutter;, March 2000.</emphasis></para>

    <sect2>
      <title>What is DHCP?</title>

      <para>DHCP, the Dynamic Host Configuration Protocol, describes
        the means by which a system can connect to a network and obtain the
        necessary information for communication upon that network. FreeBSD
        uses the ISC (Internet Software Consortium) DHCP implementation, so
        all implementation-specific information here is for use with the ISC
        distribution.</para>
    </sect2>

    <sect2>
      <title>What This Section Covers</title>

      <para>This handbook section attempts to describe only the parts
        of the DHCP system that are integrated with FreeBSD; 
        consequently, the server portions are not described.  The DHCP
        manual pages, in addition to the references below, are useful
        resources.</para>
    </sect2>

    <sect2>
      <title>How it Works</title>

      <para>When dhclient, the DHCP client, is executed on the client
        machine, it begins broadcasting requests for configuration
        information. By default, these requests are on UDP port 68. The
        server replies on UDP 67, giving the client an IP address and
        other relevant network information such as netmask, router, and
        DNS servers. All of this information comes in the form of a DHCP
        "lease" and is only valid for a certain time (configured by the
        DHCP server maintainer). In this manner, stale IP addresses for
        clients no longer connected to the network can be automatically
        reclaimed.</para>

      <para>DHCP clients can obtain a great deal of information from 
        the server.  An exhaustive list may be found in
        &man.dhcp-options.5;.</para>
    </sect2>

    <sect2>
      <title>FreeBSD Integration</title>

      <para>FreeBSD fully integrates the ISC DHCP client,
        <command>dhclient</command>.  DHCP client support is provided 
        within both the installer and the base system, obviating the need
        for detailed knowledge of network configurations on any network 
        that runs a DHCP server.  <command>dhclient</command> has been
        included in all FreeBSD distributions since 3.2.</para>

        <para>DHCP is supported by <application>sysinstall</application>.
          When configuring a network interface within sysinstall, 
          the first question asked is, "Do you want to try dhcp
          configuration of this interface?"  Answering affirmatively will
          execute dhclient, and if successful, will fill in the network
          configuration information automatically.</para>

        <para>To have your system use DHCP to obtain network information
          upon startup, edit your <filename>/etc/rc.conf</filename> to
          include the following:</para>

        <programlisting>
ifconfig_fxp0="DHCP"
        </programlisting>

        <note>
          <para>Be sure to replace <literal>fxp0</literal> with the
          designation for the interface that you wish to dynamically 
          configure.</para>
        </note>

        <para>If you are using a different location for
          <command>dhclient</command>, or if you wish to pass additional
          flags to <command>dhclient</command>, also include the
          following (editing as necessary):</para>

        <programlisting>
dhcp_program="/sbin/dhclient"
dhcp_flags=""
        </programlisting>

        <para>The DHCP server, <command>dhcpd</command>, is included
          as part of the <literal>isc-dhcp2</literal> port in the ports
          collection.  This port contains the full ISC DHCP distribution,
          consisting of client, server, relay agent and documentation.
          </para>
    </sect2>

    <sect2>
      <title>Files</title>

      <itemizedlist>
        <listitem><para><filename>/etc/dhclient.conf</filename></para>
          <para><command>dhclient</command> requires a configuration file,
            <filename>/etc/dhclient.conf</filename>. Typically the file
            contains only comments, the defaults being reasonably sane. This
            configuration file is described by the &man.dhclient.conf.5;
            man page.</para>
        </listitem>

        <listitem><para><filename>/sbin/dhclient</filename></para>
          <para><command>dhclient</command> is statically linked and
            resides in <filename>/sbin</filename>.  The &man.dhclient.8;
            manual page gives more information about
            <command>dhclient</command>.</para>
        </listitem>

        <listitem><para><filename>/sbin/dhclient-script</filename></para>
          <para><command>dhclient-script</command> is the FreeBSD-specific
            DHCP client configuration script.  It is described in
            &man.dhclient-script.8;, but should not need any user
            modification to function properly.</para>
        </listitem>

        <listitem><para><filename>/var/db/dhclient.leases</filename></para>
          <para>The DHCP client keeps a database of valid leases in this
            file, which is written as a log.  &man.dhclient.leases.5;
            gives a slightly longer description.</para>
        </listitem>
      </itemizedlist>
    </sect2>

    <sect2>
      <title>Further Reading</title>

      <para>The DHCP protocol is fully described in
        <ulink url="http://www.freesoft.org/CIE/RFC/2131/">RFC 2131</ulink>.
        An informational resource has also been set up at
        <ulink url="http://www.dhcp.org/">dhcp.org</ulink>.</para>
    </sect2>
  </sect1>


-- 
Jun Kuriyama <kuriyama@FreeBSD.org> // FreeBSD Project
