[246c904] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[246c904] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
[14d6b3e0] | 6 |
|
---|
[246c904] | 7 | <!ENTITY dhcpcd-download-http "http://www.phystech.com/ftp/dhcpcd-&dhcpcd-version;.tar.gz">
|
---|
| 8 | <!ENTITY dhcpcd-download-ftp "ftp://ftp.phystech.com/pub/dhcpcd-&dhcpcd-version;.tar.gz">
|
---|
[791e96fa] | 9 | <!ENTITY dhcpcd-md5sum "dd627a121e43835bead3ffef5b1a72fd">
|
---|
[246c904] | 10 | <!ENTITY dhcpcd-size "145 KB">
|
---|
[791e96fa] | 11 | <!ENTITY dhcpcd-buildsize "944 KB">
|
---|
[246c904] | 12 | <!ENTITY dhcpcd-time "0.04 SBU">
|
---|
| 13 | ]>
|
---|
| 14 |
|
---|
[f45b1953] | 15 | <sect1 id="dhcpcd" xreflabel="dhcpcd-&dhcpcd-version;">
|
---|
[820d164a] | 16 | <?dbhtml filename="dhcpcd.html"?>
|
---|
[4839c17] | 17 |
|
---|
[820d164a] | 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
[6d4fc00] | 21 | <keywordset>
|
---|
| 22 | <keyword role="package">dhcpcd-&dhcpcd-version;.tar</keyword>
|
---|
[fa64a0e3] | 23 | <keyword role="ftpdir">dhcpcd</keyword>
|
---|
[6d4fc00] | 24 | </keywordset>
|
---|
[820d164a] | 25 | </sect1info>
|
---|
[4839c17] | 26 |
|
---|
[820d164a] | 27 | <title>Dhcpcd-&dhcpcd-version;</title>
|
---|
[4839c17] | 28 |
|
---|
[820d164a] | 29 | <indexterm zone="dhcpcd">
|
---|
| 30 | <primary sortas="a-Dhcpcd">Dhcpcd</primary>
|
---|
| 31 | </indexterm>
|
---|
| 32 |
|
---|
| 33 | <sect2 role="package">
|
---|
| 34 | <title>Introduction to Dhcpcd</title>
|
---|
| 35 |
|
---|
| 36 | <para>The <application>dhcpcd</application> package contains the
|
---|
[893d9711] | 37 | <command>dhcpcd</command> client. This is useful for connecting your computer
|
---|
[820d164a] | 38 | to a network which uses DHCP to assign network addresses.</para>
|
---|
[4839c17] | 39 |
|
---|
[820d164a] | 40 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 41 | <itemizedlist spacing="compact">
|
---|
| 42 | <listitem>
|
---|
| 43 | <para>Download (HTTP): <ulink url="&dhcpcd-download-http;"/></para>
|
---|
| 44 | </listitem>
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>Download (FTP): <ulink url="&dhcpcd-download-ftp;"/></para>
|
---|
| 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
| 49 | <para>Download MD5 sum: &dhcpcd-md5sum;</para>
|
---|
| 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>Download size: &dhcpcd-size;</para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>Estimated disk space required: &dhcpcd-buildsize;</para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>Estimated build time: &dhcpcd-time;</para>
|
---|
| 59 | </listitem>
|
---|
| 60 | </itemizedlist>
|
---|
[4839c17] | 61 |
|
---|
[820d164a] | 62 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 63 | <itemizedlist spacing='compact'>
|
---|
| 64 | <listitem>
|
---|
[893d9711] | 65 | <para>Required Patch:
|
---|
[820d164a] | 66 | <ulink url="&patch-root;/dhcpcd-&dhcpcd-version;-fhs-1.patch"/></para>
|
---|
| 67 | </listitem>
|
---|
| 68 | </itemizedlist>
|
---|
[4839c17] | 69 |
|
---|
[820d164a] | 70 | </sect2>
|
---|
[4839c17] | 71 |
|
---|
[820d164a] | 72 | <sect2 role="installation">
|
---|
| 73 | <title>Installation of Dhcpcd</title>
|
---|
| 74 |
|
---|
[893d9711] | 75 | <para>Install <application>dhcpcd</application> by running the following
|
---|
[820d164a] | 76 | commands:</para>
|
---|
| 77 |
|
---|
| 78 | <screen><userinput>patch -Np1 -i ../dhcpcd-&dhcpcd-version;-fhs-1.patch &&
|
---|
[7335dd2d] | 79 | ./configure --prefix="" --sysconfdir=/var/lib &&
|
---|
[820d164a] | 80 | make</userinput></screen>
|
---|
[4839c17] | 81 |
|
---|
[820d164a] | 82 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[4839c17] | 83 |
|
---|
[820d164a] | 84 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[4839c17] | 85 |
|
---|
[820d164a] | 86 | </sect2>
|
---|
[4839c17] | 87 |
|
---|
[820d164a] | 88 | <sect2 role="commands">
|
---|
| 89 | <title>Command Explanations</title>
|
---|
| 90 |
|
---|
[893d9711] | 91 | <para><command>patch -Np1 -i ../dhcpcd-&dhcpcd-version;-fhs-1.patch</command>:
|
---|
| 92 | <application>dhcpcd</application> unpatched puts all configuration
|
---|
| 93 | and temporary files in <filename class='directory'>/etc/dhcpc</filename>. This
|
---|
| 94 | becomes very annoying when <application>dhcpcd</application> tells you it's
|
---|
| 95 | running and it's not. You look in
|
---|
| 96 | <filename class="directory">/var/run</filename> for the
|
---|
| 97 | <filename>PID</filename> file, but it's not there, the
|
---|
[820d164a] | 98 | <filename>PID</filename> file that needs deleting is in
|
---|
[893d9711] | 99 | <filename class="directory">/etc/dhcpc</filename>. This patch brings this
|
---|
| 100 | program into FHS compliance, but more importantly, puts
|
---|
[820d164a] | 101 | files where you expect them to be.</para>
|
---|
[4839c17] | 102 |
|
---|
[820d164a] | 103 | <para><parameter>--prefix=""</parameter>: There may be a good reason for
|
---|
| 104 | abandoning the normal BLFS convention of using
|
---|
[893d9711] | 105 | <parameter>--prefix=/usr</parameter> here. If you are installing
|
---|
| 106 | DHCP, it is likely that it is
|
---|
| 107 | required during the boot process and
|
---|
| 108 | <filename class="directory">/usr</filename> may be network mounted, in which
|
---|
| 109 | case <command>dhcpcd</command> wouldn't be available due to being on the
|
---|
| 110 | network! Therefore, depending on your situation, you may want it to be
|
---|
| 111 | installed in <filename class="directory">/sbin</filename> or
|
---|
| 112 | <filename class="directory">/usr/sbin</filename>. This command installs to
|
---|
[820d164a] | 113 | <filename class="directory">/sbin</filename>.</para>
|
---|
[4839c17] | 114 |
|
---|
[820d164a] | 115 | <para><parameter>--sysconfdir=/var/lib</parameter>: This command installs
|
---|
| 116 | configuration files in the <filename class="directory">/var/lib</filename>
|
---|
| 117 | directory.</para>
|
---|
[4839c17] | 118 |
|
---|
[820d164a] | 119 | </sect2>
|
---|
[4839c17] | 120 |
|
---|
[820d164a] | 121 | <sect2 role="configuration">
|
---|
| 122 | <title>Configuring Dhcpcd</title>
|
---|
| 123 |
|
---|
| 124 | <sect3 id="dhcpcd-config">
|
---|
| 125 | <title>Config Files</title>
|
---|
[4839c17] | 126 |
|
---|
[820d164a] | 127 | <para><filename>/var/lib/dhcpc/*</filename></para>
|
---|
[4839c17] | 128 |
|
---|
[820d164a] | 129 | <indexterm zone="dhcpcd dhcpcd-config">
|
---|
| 130 | <primary sortas="e-var-lib-dhcpc">/var/lib/dhcpc/*</primary>
|
---|
| 131 | </indexterm>
|
---|
[4839c17] | 132 |
|
---|
[820d164a] | 133 | </sect3>
|
---|
| 134 |
|
---|
| 135 | <sect3 id="dhcpcd-init">
|
---|
| 136 | <title>Configuration Information</title>
|
---|
| 137 |
|
---|
| 138 | <para>To configure <command>dhcpcd</command>, you need to first install
|
---|
| 139 | the network service script,
|
---|
| 140 | <filename>/etc/sysconfig/network-devices/services/dhcpcd</filename>
|
---|
[5254d12] | 141 | included in the <xref linkend="bootscripts"/> package
|
---|
[820d164a] | 142 | (as user <systemitem class="username">root</systemitem>):</para>
|
---|
[4839c17] | 143 |
|
---|
[820d164a] | 144 | <indexterm zone="dhcpcd dhcpcd-init">
|
---|
| 145 | <primary sortas="f-dhcpcd">dhcpcd (service script)</primary>
|
---|
| 146 | </indexterm>
|
---|
| 147 |
|
---|
| 148 | <screen role='root'><userinput>make install-service-dhcpcd</userinput></screen>
|
---|
| 149 |
|
---|
[893d9711] | 150 | <para id="dhcpcd-config2">Finally, as the <systemitem
|
---|
[820d164a] | 151 | class="username">root</systemitem> user create the
|
---|
[4839c17] | 152 | <filename>/etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd</filename>
|
---|
[893d9711] | 153 | configuration file using the following commands. Adjust appropriately
|
---|
[820d164a] | 154 | for additional interfaces:</para>
|
---|
[4839c17] | 155 |
|
---|
[820d164a] | 156 | <indexterm zone="dhcpcd dhcpcd-config2">
|
---|
| 157 | <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/.../dhcpcd</primary>
|
---|
| 158 | </indexterm>
|
---|
| 159 |
|
---|
[e3353b3] | 160 | <screen role='root'><userinput>install -v -d /etc/sysconfig/network-devices/ifconfig.eth0 &&
|
---|
[820d164a] | 161 | cat > /etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd << "EOF"
|
---|
| 162 | <literal>ONBOOT="yes"
|
---|
[afa198d] | 163 | SERVICE="dhcpcd"
|
---|
[246c904] | 164 | DHCP_START="<replaceable>[insert appropriate start options here]</replaceable>"
|
---|
[afa198d] | 165 | DHCP_STOP="-k <replaceable>[insert additional stop options here]</replaceable>"
|
---|
[00f97e91] | 166 |
|
---|
[893d9711] | 167 | # Set PRINTIP="yes" to have the script print
|
---|
[7ee9849] | 168 | # the DHCP assigned IP address
|
---|
[00f97e91] | 169 | PRINTIP="no"
|
---|
| 170 |
|
---|
[893d9711] | 171 | # Set PRINTALL="yes" to print the DHCP assigned values for
|
---|
[7ee9849] | 172 | # IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
|
---|
[820d164a] | 173 | PRINTALL="no"</literal>
|
---|
| 174 | EOF</userinput></screen>
|
---|
| 175 |
|
---|
[893d9711] | 176 | <para>For more information on the appropriate <envar>DHCP_START</envar> and
|
---|
| 177 | <envar>DHCP_STOP</envar> values, examine the man page for
|
---|
[820d164a] | 178 | <command>dhcpcd</command>.</para>
|
---|
[4839c17] | 179 |
|
---|
[820d164a] | 180 | <note>
|
---|
[893d9711] | 181 | <para id="dhcpcd-config3">The default behavior of
|
---|
| 182 | <command>dhcpcd</command> is to overwrite (after making backup copies)
|
---|
| 183 | <filename>/etc/resolv.conf</filename>, <filename>/etc/yp.conf</filename> and
|
---|
| 184 | <filename>/etc/ntp.conf</filename> with new files containing information from
|
---|
| 185 | the DHCP server. If this is undesirable, review the
|
---|
| 186 | <command>dhcpcd</command> man page for switches to add to the
|
---|
[820d164a] | 187 | <envar>DHCP_START</envar> value.</para>
|
---|
| 188 | </note>
|
---|
[4839c17] | 189 |
|
---|
[820d164a] | 190 | <indexterm zone="dhcpcd dhcpcd-config3">
|
---|
| 191 | <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
|
---|
| 192 | </indexterm>
|
---|
[4839c17] | 193 |
|
---|
[820d164a] | 194 | <indexterm zone="dhcpcd dhcpcd-config3">
|
---|
| 195 | <primary sortas="e-etc-yp.conf">/etc/yp.conf</primary>
|
---|
| 196 | </indexterm>
|
---|
[4839c17] | 197 |
|
---|
[820d164a] | 198 | <indexterm zone="dhcpcd dhcpcd-config3">
|
---|
| 199 | <primary sortas="e-etc-ntp.conf">/etc/ntp.conf</primary>
|
---|
| 200 | </indexterm>
|
---|
[4839c17] | 201 |
|
---|
[820d164a] | 202 | </sect3>
|
---|
[4839c17] | 203 |
|
---|
[820d164a] | 204 | </sect2>
|
---|
[4839c17] | 205 |
|
---|
[820d164a] | 206 | <sect2 role="content">
|
---|
| 207 | <title>Contents</title>
|
---|
| 208 |
|
---|
| 209 | <segmentedlist>
|
---|
| 210 | <segtitle>Installed Program</segtitle>
|
---|
| 211 | <segtitle>Installed Libraries</segtitle>
|
---|
[b1d305ed] | 212 | <segtitle>Installed Directory</segtitle>
|
---|
[4839c17] | 213 |
|
---|
[820d164a] | 214 | <seglistitem>
|
---|
| 215 | <seg>dhcpcd</seg>
|
---|
| 216 | <seg>None</seg>
|
---|
| 217 | <seg>/var/lib/dhcpc</seg>
|
---|
| 218 | </seglistitem>
|
---|
| 219 | </segmentedlist>
|
---|
[4839c17] | 220 |
|
---|
[820d164a] | 221 | <variablelist>
|
---|
| 222 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 223 | <?dbfo list-presentation="list"?>
|
---|
| 224 | <?dbhtml list-presentation="table"?>
|
---|
[4839c17] | 225 |
|
---|
[820d164a] | 226 | <varlistentry id="dhcpcd-prog">
|
---|
| 227 | <term><command>dhcpcd</command></term>
|
---|
| 228 | <listitem>
|
---|
[893d9711] | 229 | <para>is an implementation of the DHCP client
|
---|
| 230 | specified in RFC2131 and RFC1541
|
---|
[820d164a] | 231 | (depending on which options are specified).</para>
|
---|
| 232 | <indexterm zone="dhcpcd dhcpcd-prog">
|
---|
| 233 | <primary sortas="b-dhcpcd">dhcpcd</primary>
|
---|
| 234 | </indexterm>
|
---|
| 235 | </listitem>
|
---|
| 236 | </varlistentry>
|
---|
[4839c17] | 237 |
|
---|
[820d164a] | 238 | </variablelist>
|
---|
| 239 |
|
---|
| 240 | </sect2>
|
---|
[f45b1953] | 241 |
|
---|
| 242 | </sect1>
|
---|