Added Greg's newly written dhcp chapter to the advanced networking
section. Submitted by: gsutter Reviewed by: jim
This commit is contained in:
parent
b5f643dd92
commit
65eae5960e
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=6963
2 changed files with 278 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
The FreeBSD Documentation Project
|
||||
|
||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.19 2000/02/13 21:14:23 unfurl Exp $
|
||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.20 2000/03/30 23:55:50 jim Exp $
|
||||
-->
|
||||
|
||||
<chapter id="advanced-networking">
|
||||
|
@ -1659,6 +1659,144 @@ lrwxr-xr-x 1 root wheel 14 Nov 8 14:27 /usr/lib/libscrypt.so@ -> libscryp
|
|||
pretty good place to start looking for possible problems.</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<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>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
The FreeBSD Documentation Project
|
||||
|
||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.19 2000/02/13 21:14:23 unfurl Exp $
|
||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.20 2000/03/30 23:55:50 jim Exp $
|
||||
-->
|
||||
|
||||
<chapter id="advanced-networking">
|
||||
|
@ -1659,6 +1659,144 @@ lrwxr-xr-x 1 root wheel 14 Nov 8 14:27 /usr/lib/libscrypt.so@ -> libscryp
|
|||
pretty good place to start looking for possible problems.</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<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>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
|
|
Loading…
Reference in a new issue