glfs/connect/dhcp/dhcpcd.xml

160 lines
5.9 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY dhcpcd-download-http "http://www.phystech.com/ftp/dhcpcd-&dhcpcd-version;.tar.gz">
<!ENTITY dhcpcd-download-ftp "ftp://ftp.phystech.com/pub/dhcpcd-&dhcpcd-version;.tar.gz">
<!ENTITY dhcpcd-size "145 KB">
<!ENTITY dhcpcd-buildsize "868 KB">
<!ENTITY dhcpcd-time "0.04 SBU">
]>
<sect1 id="dhcpcd" xreflabel="dhcpcd-&dhcpcd-version;">
<?dbhtml filename="dhcpcd.html"?>
<title>dhcpcd-&dhcpcd-version;</title>
<sect2>
<title>Introduction to <application>dhcpcd</application></title>
<para>The <application>dhcpcd</application> package contains the
<command>dhcpcd</command> client. This is useful for connecting your computer
to a network which uses <acronym>DHCP</acronym> to assign network addresses.
</para>
<sect3><title>Package information</title>
<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 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>
</sect3>
<sect3><title>Additional downloads</title>
<itemizedlist spacing='compact'>
<listitem><para>Required patch:
<ulink url="&patch-root;/dhcpcd-&dhcpcd-version;-fhs-1.patch"/></para></listitem>
</itemizedlist>
</sect3>
</sect2>
<sect2>
<title>Installation of <application>dhcpcd</application></title>
<para>Install <application>dhcpcd</application> by running the following
commands:</para>
<screen><userinput><command>patch -Np1 -i ../dhcpcd-&dhcpcd-version;-fhs-1.patch &amp;&amp;
./configure --prefix="" --sysconfdir=/var/lib \
--mandir=/usr/share/man &amp;&amp;
make &amp;&amp;
make install</command></userinput></screen>
</sect2>
<sect2>
<title>Command explanations</title>
<para><command>patch -Np1 -i ../dhcpcd-&dhcpcd-version;-fhs-1.patch
</command>: <application>Dhcpcd</application> unpatched puts all configuration
and temporary files in <filename>/etc/dhcpc</filename>. This becomes very
annoying when <application>dhcpcd</application> tells you it's running and it's
not. You look in <filename class="directory">/var/run</filename> for
the <filename>PID</filename> file, but it's not
there, the <filename>PID</filename> file that needs deleting is in
<filename class="directory">/etc/dhcpc</filename>.
This patch brings this program into <acronym>FHS</acronym> compliance, but more
importantly, puts files where you expect them to be.</para>
<para><parameter>--prefix=""</parameter>: There may be a good reason for
abandoning the normal <acronym>BLFS</acronym> convention of using
<parameter>--prefix=/usr</parameter> here. If you are installing
<acronym>DHCP</acronym>, it is likely that it is
required during the boot process and
<filename class="directory">/usr</filename> may be network
mounted, in which case <command>dhcpcd</command> wouldn't be available due to
being on the network! Therefore, depending on your situation, you may want it
to be installed in <filename class="directory">/sbin</filename> or
<filename class="directory">/usr/sbin</filename>. This command installs to
<filename class="directory">/sbin</filename>.</para>
<para><parameter>--sysconfdir=/var/lib</parameter>: This command installs
configuration files in the <filename class="directory">/var/lib</filename>
directory.</para>
<para><parameter>--mandir=/usr/share/man</parameter>: This command installs
the man pages to the <filename class="directory">/usr/share/man</filename>
directory.</para>
</sect2>
<sect2>
<title>Configuring <application>dhcpcd</application></title>
<sect3><title>Config files</title>
<para><filename>/var/lib/dhcpc/*</filename></para></sect3>
<sect3><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="intro-important-bootscripts"/> package.</para>
<screen><userinput><command>make install-service-dhcpcd</command></userinput></screen>
<para>Now create the <filename>ifconfig.eth0</filename> configuration
file using the following commands. Adjust appropriately for additional
interfaces.</para>
<para><emphasis>Note:</emphasis> This will overwrite any existing file.</para>
<screen><userinput><command>cat &gt; /etc/sysconfig/network-devices/ifconfig.eth0 &lt;&lt; "EOF"</command>
ONBOOT=yes
DHCP_START="<replaceable>[insert appropriate start options here]</replaceable>"
DHCP_STOP="-k <replaceable>[insert other stop options here]</replaceable>"
SERVICE=dhcpcd
<command>EOF</command></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>
<para>Finally, if the <acronym>DHCP</acronym> configured interface is
used as your default gateway, you should remove the GATEWAY and GATEWAY_IF
variables from <filename>/etc/sysconfig/network</filename>: </para>
<screen><userinput><command>sed -i "s/GATEWAY/#&amp;/" /etc/sysconfig/network</command></userinput></screen>
</sect3>
</sect2>
<sect2>
<title>Contents</title>
<para>The <application>dhcpcd</application> package contains
<command>dhcpcd</command>.</para>
</sect2>
<sect2><title>Description</title>
<sect3><title>dhcpcd</title>
<para><command>dhcpcd</command> is an implementation of the <acronym>DHCP
</acronym> client specified in <acronym>RFC</acronym>2131 and
<acronym>RFC</acronym>1541 (depending on which options are specified).</para>
</sect3>
</sect2>
</sect1>