glfs/basicnet/connect/dhcpcd.xml
Thomas Trepl fefa337dce Updated to dhcpcd-4.0.4 (#2569)
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@7658 af4574ff-66df-0310-9fd7-8a98e5e911e0
2008-12-21 16:26:03 +00:00

216 lines
7.7 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY dhcpcd-download-http "http://roy.marples.name/downloads/dhcpcd/dhcpcd-&dhcpcd-version;.tar.bz2">
<!ENTITY dhcpcd-download-ftp "ftp://ftp.osuosl.org/pub/gentoo/distfiles/dhcpcd-&dhcpcd-version;.tar.bz2">
<!ENTITY dhcpcd-md5sum "f57a9614e592814485c47495c53e4c30">
<!ENTITY dhcpcd-size "50 KB">
<!ENTITY dhcpcd-buildsize "0.3 MB">
<!ENTITY dhcpcd-time "less than 0.1 SBU">
]>
<sect1 id="dhcpcd" xreflabel="dhcpcd-&dhcpcd-version;">
<?dbhtml filename="dhcpcd.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>dhcpcd-&dhcpcd-version;</title>
<indexterm zone="dhcpcd">
<primary sortas="a-dhcpcd">dhcpcd</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to dhcpcd</title>
<para><application>dhcpcd</application> is an implementation of the
DHCP client specified in RFC2131. This is useful for connecting
your computer to a network which uses DHCP to assign network
addresses.</para>
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Download (HTTP): <ulink url="&dhcpcd-download-http;"/></para>
</listitem>
<listitem>
<para>Download (FTP): <ulink url="&dhcpcd-download-ftp;"/></para>
</listitem>
<listitem>
<para>Download MD5 sum: &dhcpcd-md5sum;</para>
</listitem>
<listitem>
<para>Download size: &dhcpcd-size;</para>
</listitem>
<listitem>
<para>Estimated disk space required: &dhcpcd-buildsize;</para>
</listitem>
<listitem>
<para>Estimated build time: &dhcpcd-time;</para>
</listitem>
</itemizedlist>
<para condition="html" role="usernotes">User Notes:
<ulink url="&blfs-wiki;/dhcpcd"/></para>
</sect2>
<sect2 role="installation">
<title>Installation of dhcpcd</title>
<para>Install <application>dhcpcd</application> by running the following
commands as the <systemitem class="username">root</systemitem> user:</para>
<screen><userinput>make PREFIX= \
LIBEXECDIR=/lib/dhcpcd \
DBDIR=/var/lib \
SYSCONFDIR=/etc/dhcpcd install</userinput></screen>
<para>By default, a plain text lease info file isn't created but the
<application>dhcpcd</application> provides a hook which can be used for creating
such a file. Install the hook by running the following
commands as the <systemitem class="username">root</systemitem> user:</para>
<screen><userinput>sed -i "s;/var/lib/dhcpcd-;/var/lib/dhcpcd/dhcpcd-;g" \
/lib/dhcpcd/dhcpcd-hooks/50-dhcpcd-compat &amp;&amp;
make LIBEXECDIR=/lib/dhcpcd \
HOOKSCRIPTS=50-dhcpcd-compat install</userinput></screen>
</sect2>
<sect2 role="configuration">
<title>Configuring dhcpcd</title>
<sect3 id="dhcpcd-config">
<title>Config Files</title>
<para><filename>/etc/dhcpcd/dhcpcd.conf</filename></para>
<indexterm zone="dhcpcd dhcpcd-config">
<primary sortas="e-etc-dhcpcd-dhcpcd-conf">/etc/dhcpcd/dhcpcd.conf</primary>
</indexterm>
</sect3>
<sect3 id="dhcpcd-init">
<title>Configuration Information</title>
<para>To configure <command>dhcpcd</command>, you need to first install
the network service script,
<filename>/etc/sysconfig/network-devices/services/dhcpcd</filename>
included in the <xref linkend="bootscripts"/> package
(as user <systemitem class="username">root</systemitem>):</para>
<indexterm zone="dhcpcd dhcpcd-init">
<primary sortas="f-dhcpcd">dhcpcd (service script)</primary>
</indexterm>
<screen role='root'><userinput>make install-service-dhcpcd</userinput></screen>
<para>Whenever <command>dhcpcd</command> configures or shuts down
a network interface, it executes hook scripts. For more details
about those scripts, see the <command>dhcpcd-run-hooks</command> as
well as the <command>dhcpcd</command> man page.</para>
<para id="dhcpcd-config2">Finally, as the <systemitem
class="username">root</systemitem> user create the
<filename>/etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd</filename>
configuration file using the following commands. Adjust appropriately
for additional interfaces:</para>
<indexterm zone="dhcpcd dhcpcd-config2">
<primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/.../dhcpcd</primary>
</indexterm>
<screen role='root'><userinput>install -v -d /etc/sysconfig/network-devices/ifconfig.eth0 &amp;&amp;
cat &gt; /etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd &lt;&lt; "EOF"
<literal>ONBOOT="yes"
SERVICE="dhcpcd"
DHCP_START="<replaceable>&lt;insert appropriate start options here&gt;</replaceable>"
DHCP_STOP="-k <replaceable>&lt;insert additional stop options here&gt;</replaceable>"
# Set PRINTIP="yes" to have the script print
# the DHCP assigned IP address
PRINTIP="no"
# Set PRINTALL="yes" to print the DHCP assigned values for
# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
PRINTALL="no"</literal>
EOF</userinput></screen>
<para>For more information on the appropriate <envar>DHCP_START</envar> and
<envar>DHCP_STOP</envar> values, examine the man page for
<command>dhcpcd</command>.</para>
<note>
<para id="dhcpcd-config3">The default behavior of <command>dhcpcd</command>
is to overwrite <filename>/etc/resolv.conf</filename>. All modifications on
system configuration files like <filename>/etc/resolv.conf</filename>,
<filename>/etc/yp.conf</filename> and <filename>/etc/ntp.conf</filename> are
done by hooks which are stored in <filename>/lib/dhcpcd/dhcpcd-hooks</filename>.
Setup <command>dhcpcd</command> by removing or adding hooks from/to that directory.
The execution of hooks can be disabled by using the -C command line option.
Rewiew the <command>dhcpcd</command> man page for switches to add to the
<envar>DHCP_START</envar> value.</para>
</note>
<indexterm zone="dhcpcd dhcpcd-config3">
<primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
</indexterm>
<!-- These are not modified by default with version 4 of dhcpcd
<indexterm zone="dhcpcd dhcpcd-config3">
<primary sortas="e-etc-yp.conf">/etc/yp.conf</primary>
</indexterm>
<indexterm zone="dhcpcd dhcpcd-config3">
<primary sortas="e-etc-ntp.conf">/etc/ntp.conf</primary>
</indexterm>
-->
</sect3>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Program</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directory</segtitle>
<seglistitem>
<seg>dhcpcd</seg>
<seg>None</seg>
<seg>None</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="dhcpcd-prog">
<term><command>dhcpcd</command></term>
<listitem>
<para>is an implementation of the DHCP client specified
in RFC2131 (when -r option is not specified) and RFC1541
(when -r option is specified).</para>
<indexterm zone="dhcpcd dhcpcd-prog">
<primary sortas="b-dhcpcd">dhcpcd</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>