[246c904] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[246c904] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
[14d6b3e0] | 6 |
|
---|
[fefa337] | 7 | <!ENTITY dhcpcd-download-http "http://roy.marples.name/downloads/dhcpcd/dhcpcd-&dhcpcd-version;.tar.bz2">
|
---|
[a9435c4] | 8 | <!ENTITY dhcpcd-download-ftp "ftp://roy.marples.name/pub/dhcpcd/dhcpcd-&dhcpcd-version;.tar.bz2">
|
---|
[a27a478] | 9 | <!--<!ENTITY dhcpcd-download-ftp "ftp://ftp.osuosl.org/pub/gentoo/distfiles/dhcpcd-&dhcpcd-version;.tar.bz2">-->
|
---|
[a9435c4] | 10 | <!ENTITY dhcpcd-md5sum "af3e6cfb1f4e4657035a36716be1c1f6">
|
---|
[b5a7044] | 11 | <!ENTITY dhcpcd-size "156 KB">
|
---|
[e1617c94] | 12 | <!ENTITY dhcpcd-buildsize "2.3 MB">
|
---|
[ed4e5b4] | 13 | <!ENTITY dhcpcd-time "less than 0.1 SBU">
|
---|
[246c904] | 14 | ]>
|
---|
| 15 |
|
---|
[fd680fb] | 16 | <sect1 id="dhcpcd" xreflabel="dhcpcd-&dhcpcd-version;">
|
---|
[820d164a] | 17 | <?dbhtml filename="dhcpcd.html"?>
|
---|
[4839c17] | 18 |
|
---|
[820d164a] | 19 | <sect1info>
|
---|
| 20 | <othername>$LastChangedBy$</othername>
|
---|
| 21 | <date>$Date$</date>
|
---|
| 22 | </sect1info>
|
---|
[4839c17] | 23 |
|
---|
[add19ff9] | 24 | <title>dhcpcd-&dhcpcd-version;</title>
|
---|
[4839c17] | 25 |
|
---|
[820d164a] | 26 | <indexterm zone="dhcpcd">
|
---|
[add19ff9] | 27 | <primary sortas="a-dhcpcd">dhcpcd</primary>
|
---|
[820d164a] | 28 | </indexterm>
|
---|
| 29 |
|
---|
| 30 | <sect2 role="package">
|
---|
[add19ff9] | 31 | <title>Introduction to dhcpcd</title>
|
---|
[820d164a] | 32 |
|
---|
[add19ff9] | 33 | <para><application>dhcpcd</application> is an implementation of the
|
---|
[5aac2b97] | 34 | DHCP client specified in RFC2131. A DHCP client is useful for connecting
|
---|
[232e46a] | 35 | your computer to a network which uses DHCP to assign network
|
---|
[0d7900a] | 36 | addresses. dhcpcd strives to be a fully featured, yet very lightweight
|
---|
[5aac2b97] | 37 | DHCP client.</para>
|
---|
[4839c17] | 38 |
|
---|
[7031a69] | 39 | &lfs76_checked;
|
---|
[77ac0f23] | 40 |
|
---|
[820d164a] | 41 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 42 | <itemizedlist spacing="compact">
|
---|
| 43 | <listitem>
|
---|
| 44 | <para>Download (HTTP): <ulink url="&dhcpcd-download-http;"/></para>
|
---|
| 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>Download (FTP): <ulink url="&dhcpcd-download-ftp;"/></para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>Download MD5 sum: &dhcpcd-md5sum;</para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>Download size: &dhcpcd-size;</para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Estimated disk space required: &dhcpcd-buildsize;</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
| 59 | <para>Estimated build time: &dhcpcd-time;</para>
|
---|
| 60 | </listitem>
|
---|
| 61 | </itemizedlist>
|
---|
[4839c17] | 62 |
|
---|
[4edf8452] | 63 | <bridgehead renderas="sect3">dhcpcd Dependencies</bridgehead>
|
---|
| 64 |
|
---|
| 65 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 66 | <para role="optional">
|
---|
| 67 | <xref linkend="llvm"/> (with Clang)
|
---|
| 68 | </para>
|
---|
| 69 |
|
---|
[7e1f3aa] | 70 | <para condition="html" role="usernotes">User Notes:
|
---|
| 71 | <ulink url="&blfs-wiki;/dhcpcd"/></para>
|
---|
| 72 |
|
---|
[820d164a] | 73 | </sect2>
|
---|
[4839c17] | 74 |
|
---|
[820d164a] | 75 | <sect2 role="installation">
|
---|
[add19ff9] | 76 | <title>Installation of dhcpcd</title>
|
---|
[820d164a] | 77 |
|
---|
[893d9711] | 78 | <para>Install <application>dhcpcd</application> by running the following
|
---|
[f9a784a] | 79 | commands:</para>
|
---|
[820d164a] | 80 |
|
---|
[f0740ab] | 81 | <screen><userinput>./configure --libexecdir=/lib/dhcpcd \
|
---|
[690658a5] | 82 | --dbdir=/var/tmp &&
|
---|
[f0740ab] | 83 | make</userinput></screen>
|
---|
[f9a784a] | 84 |
|
---|
| 85 | <para>This package does not come with a test suite.</para>
|
---|
| 86 |
|
---|
| 87 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 88 |
|
---|
[bfa01156] | 89 | <screen role='root'><userinput>make install</userinput></screen>
|
---|
[4839c17] | 90 |
|
---|
[690658a5] | 91 | <!--
|
---|
[a41f643] | 92 | <para>By default, a plain text lease info file isn't created but the
|
---|
[a1d3648] | 93 | <application>dhcpcd</application> provides a hook which can be used for creating
|
---|
| 94 | such a file. Install the hook by running the following
|
---|
| 95 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[232e46a] | 96 |
|
---|
[bfa01156] | 97 | <screen role='root'><userinput>sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &&
|
---|
[f9a784a] | 98 | install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/</userinput></screen>
|
---|
[690658a5] | 99 | -->
|
---|
[4839c17] | 100 |
|
---|
[820d164a] | 101 | </sect2>
|
---|
[4839c17] | 102 |
|
---|
[690658a5] | 103 | <sect2 role="commands">
|
---|
| 104 | <title>Command Explanations</title>
|
---|
| 105 |
|
---|
| 106 | <para>
|
---|
| 107 | <parameter>--libexecdir=/lib/dhcpcd</parameter>: The default
|
---|
| 108 | <filename class="directory">/libexec</filename> is not FHS-compliant.
|
---|
| 109 | Since this directory may need to be available early in the boot,
|
---|
| 110 | <filename class="directory">/usr/libexec</filename> cannot be used either.
|
---|
| 111 | </para>
|
---|
| 112 |
|
---|
| 113 | <para>
|
---|
| 114 | <parameter>--dbdir=/var/tmp</parameter>: The default
|
---|
| 115 | <filename class="directory">/var/lib</filename> is not FHS-compliant
|
---|
| 116 | </para>
|
---|
| 117 |
|
---|
| 118 | <para>
|
---|
| 119 | <option>--with-hook=...</option>: You can optionally install more hooks,
|
---|
| 120 | for example to install some configuration files such as
|
---|
| 121 | <filename>ntp.conf</filename>. The set of hooks is in the
|
---|
| 122 | <filename class="directory">dhcpcd-hooks</filename> directory in the
|
---|
| 123 | build tree.
|
---|
| 124 | </para>
|
---|
| 125 | </sect2>
|
---|
| 126 |
|
---|
[820d164a] | 127 | <sect2 role="configuration">
|
---|
[add19ff9] | 128 | <title>Configuring dhcpcd</title>
|
---|
[820d164a] | 129 |
|
---|
| 130 | <sect3 id="dhcpcd-config">
|
---|
| 131 | <title>Config Files</title>
|
---|
[4839c17] | 132 |
|
---|
[5aac2b97] | 133 | <para><filename>/etc/dhcpcd.conf</filename></para>
|
---|
[4839c17] | 134 |
|
---|
[820d164a] | 135 | <indexterm zone="dhcpcd dhcpcd-config">
|
---|
[fefa337] | 136 | <primary sortas="e-etc-dhcpcd-dhcpcd-conf">/etc/dhcpcd/dhcpcd.conf</primary>
|
---|
[820d164a] | 137 | </indexterm>
|
---|
[4839c17] | 138 |
|
---|
[820d164a] | 139 | </sect3>
|
---|
| 140 |
|
---|
| 141 | <sect3 id="dhcpcd-init">
|
---|
[e5f38d6b] | 142 | <title>General Configuration Information</title>
|
---|
[820d164a] | 143 |
|
---|
| 144 | <para>To configure <command>dhcpcd</command>, you need to first install
|
---|
| 145 | the network service script,
|
---|
[f0740ab] | 146 | <filename>/lib/services/dhcpcd</filename>
|
---|
[5254d12] | 147 | included in the <xref linkend="bootscripts"/> package
|
---|
[820d164a] | 148 | (as user <systemitem class="username">root</systemitem>):</para>
|
---|
[4839c17] | 149 |
|
---|
[820d164a] | 150 | <indexterm zone="dhcpcd dhcpcd-init">
|
---|
| 151 | <primary sortas="f-dhcpcd">dhcpcd (service script)</primary>
|
---|
| 152 | </indexterm>
|
---|
| 153 |
|
---|
| 154 | <screen role='root'><userinput>make install-service-dhcpcd</userinput></screen>
|
---|
| 155 |
|
---|
[232e46a] | 156 | <para>Whenever <command>dhcpcd</command> configures or shuts down
|
---|
[fefa337] | 157 | a network interface, it executes hook scripts. For more details
|
---|
[f0740ab] | 158 | about those scripts, see the <command>dhcpcd-run-hooks</command> and
|
---|
| 159 | <command>dhcpcd</command> man pages.</para>
|
---|
[232e46a] | 160 |
|
---|
[893d9711] | 161 | <para id="dhcpcd-config2">Finally, as the <systemitem
|
---|
[820d164a] | 162 | class="username">root</systemitem> user create the
|
---|
[f0740ab] | 163 | <filename>/etc/sysconfig/ifconfig.eth0</filename>
|
---|
[893d9711] | 164 | configuration file using the following commands. Adjust appropriately
|
---|
[820d164a] | 165 | for additional interfaces:</para>
|
---|
[4839c17] | 166 |
|
---|
[820d164a] | 167 | <indexterm zone="dhcpcd dhcpcd-config2">
|
---|
[f0740ab] | 168 | <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary>
|
---|
[820d164a] | 169 | </indexterm>
|
---|
| 170 |
|
---|
[f0740ab] | 171 | <screen role='root'><userinput>cat > /etc/sysconfig/ifconfig.eth0 << "EOF"
|
---|
[820d164a] | 172 | <literal>ONBOOT="yes"
|
---|
[f0740ab] | 173 | IFACE="eth0"
|
---|
[afa198d] | 174 | SERVICE="dhcpcd"
|
---|
[5aac2b97] | 175 | DHCP_START="-b -q <replaceable><insert appropriate start options here></replaceable>"
|
---|
[f0740ab] | 176 | DHCP_STOP="-k <replaceable><insert additional stop options here></replaceable>"</literal>
|
---|
[820d164a] | 177 | EOF</userinput></screen>
|
---|
| 178 |
|
---|
[893d9711] | 179 | <para>For more information on the appropriate <envar>DHCP_START</envar> and
|
---|
| 180 | <envar>DHCP_STOP</envar> values, examine the man page for
|
---|
[820d164a] | 181 | <command>dhcpcd</command>.</para>
|
---|
[4839c17] | 182 |
|
---|
[820d164a] | 183 | <note>
|
---|
[f0740ab] | 184 |
|
---|
| 185 | <para id="dhcpcd-config3">The default behavior of
|
---|
| 186 | <command>dhcpcd</command> sets the hostname and mtu settings. It also
|
---|
| 187 | overwrites <filename>/etc/resolv.conf</filename> and
|
---|
[0d7900a] | 188 | <filename>/etc/ntp.conf</filename>.
|
---|
| 189 |
|
---|
[f0740ab] | 190 | These modifications to system files and settings on system
|
---|
| 191 | configuration files are done by hooks which are stored in <filename
|
---|
| 192 | class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
|
---|
[0d7900a] | 193 |
|
---|
[f0740ab] | 194 | Setup <command>dhcpcd</command> by removing or adding hooks from/to
|
---|
| 195 | that directory. The execution of hooks can be disabled by using the
|
---|
| 196 | <option>--nohook</option> (<option>-C</option>) command line option or
|
---|
| 197 | by the <option>nohook</option> option in the
|
---|
[0d7900a] | 198 | <filename>/etc/dhcpcd.conf</filename> file.</para>
|
---|
| 199 |
|
---|
[f0740ab] | 200 | <para>Review the <command>dhcpcd</command> man page for switches to add
|
---|
[0d7900a] | 201 | to the <envar>DHCP_START</envar> value.</para>
|
---|
| 202 |
|
---|
[820d164a] | 203 | </note>
|
---|
[4839c17] | 204 |
|
---|
[820d164a] | 205 | <indexterm zone="dhcpcd dhcpcd-config3">
|
---|
| 206 | <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
|
---|
| 207 | </indexterm>
|
---|
| 208 | </sect3>
|
---|
[4839c17] | 209 |
|
---|
[e5f38d6b] | 210 | <sect3 id="dhcpcd-init2">
|
---|
| 211 | <title>Configuration Information: fixed ip</title>
|
---|
| 212 |
|
---|
| 213 | <para id="dhcpcd-config4">Although not usual, it is possible that you need
|
---|
| 214 | to configure <application>dhcpcd</application> to use a fixed ip. Here,
|
---|
| 215 | we give an example. As the
|
---|
| 216 | <systemitem class="username">root</systemitem> user create the
|
---|
| 217 | <filename>/etc/sysconfig/ifconfig.eth0</filename> configuration file
|
---|
| 218 | using the following commands. Adjust appropriately for additional
|
---|
| 219 | interfaces and for the actual ip and router you need:</para>
|
---|
| 220 |
|
---|
| 221 | <indexterm zone="dhcpcd dhcpcd-config4">
|
---|
| 222 | <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary>
|
---|
| 223 | </indexterm>
|
---|
| 224 |
|
---|
| 225 | <screen role='root'><userinput>cat > /etc/sysconfig/ifconfig.eth0 << "EOF"
|
---|
| 226 | <literal>ONBOOT="yes"
|
---|
| 227 | IFACE="eth0"
|
---|
| 228 | SERVICE="dhcpcd"
|
---|
| 229 | DHCP_START="-b -q -S ip_address=192.168.0.10/24 -S routers=192.168.0.1"
|
---|
| 230 | DHCP_STOP="-k"</literal>
|
---|
| 231 | EOF</userinput></screen>
|
---|
| 232 |
|
---|
[0840866] | 233 | <para>You can either use DNS servers in
|
---|
| 234 | <filename>/etc/resolv.conf</filename> from another system, your
|
---|
| 235 | preferred servers, or just the example
|
---|
[0ecb3b77] | 236 | <filename>/etc/resolv.conf.head</filename> file below as is:</para>
|
---|
[e5f38d6b] | 237 |
|
---|
| 238 | <screen role='root'><userinput>cat > /etc/resolv.conf.head << "EOF"
|
---|
| 239 | <literal># OpenDNS servers
|
---|
| 240 | nameserver 208.67.222.222
|
---|
| 241 | nameserver 208.67.220.220</literal>
|
---|
| 242 | EOF</userinput></screen>
|
---|
| 243 |
|
---|
| 244 | </sect3>
|
---|
| 245 |
|
---|
[820d164a] | 246 | </sect2>
|
---|
[4839c17] | 247 |
|
---|
[820d164a] | 248 | <sect2 role="content">
|
---|
| 249 | <title>Contents</title>
|
---|
| 250 |
|
---|
| 251 | <segmentedlist>
|
---|
| 252 | <segtitle>Installed Program</segtitle>
|
---|
[d81eda8] | 253 | <segtitle>Installed Library</segtitle>
|
---|
[b1d305ed] | 254 | <segtitle>Installed Directory</segtitle>
|
---|
[4839c17] | 255 |
|
---|
[820d164a] | 256 | <seglistitem>
|
---|
| 257 | <seg>dhcpcd</seg>
|
---|
[81f1de4] | 258 | <seg>/lib/dhcpcd/dev/udev.so</seg>
|
---|
[f0740ab] | 259 | <seg>/lib/dhcpcd</seg>
|
---|
[820d164a] | 260 | </seglistitem>
|
---|
| 261 | </segmentedlist>
|
---|
[4839c17] | 262 |
|
---|
[820d164a] | 263 | <variablelist>
|
---|
| 264 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 265 | <?dbfo list-presentation="list"?>
|
---|
| 266 | <?dbhtml list-presentation="table"?>
|
---|
[4839c17] | 267 |
|
---|
[820d164a] | 268 | <varlistentry id="dhcpcd-prog">
|
---|
| 269 | <term><command>dhcpcd</command></term>
|
---|
| 270 | <listitem>
|
---|
[232e46a] | 271 | <para>is an implementation of the DHCP client specified
|
---|
[f9a784a] | 272 | in RFC2131.</para>
|
---|
[820d164a] | 273 | <indexterm zone="dhcpcd dhcpcd-prog">
|
---|
| 274 | <primary sortas="b-dhcpcd">dhcpcd</primary>
|
---|
| 275 | </indexterm>
|
---|
| 276 | </listitem>
|
---|
| 277 | </varlistentry>
|
---|
[4839c17] | 278 |
|
---|
[81f1de4] | 279 | <varlistentry id="dhcpcd-udev">
|
---|
| 280 | <term><filename class="libraryfile">udev.so</filename></term>
|
---|
| 281 | <listitem>
|
---|
| 282 | <para>
|
---|
| 283 | add udev support for interface arrival and departure; this is
|
---|
| 284 | because udev likes to rename the interface, which it can't do if
|
---|
| 285 | dhcpcd grabs it first.
|
---|
| 286 | </para>
|
---|
| 287 | <indexterm zone="dhcpcd dhcpcd-udev">
|
---|
| 288 | <primary sortas="c-dhcpcd-udev">udev.so</primary>
|
---|
| 289 | </indexterm>
|
---|
| 290 | </listitem>
|
---|
| 291 | </varlistentry>
|
---|
| 292 |
|
---|
[820d164a] | 293 | </variablelist>
|
---|
| 294 |
|
---|
| 295 | </sect2>
|
---|
[f45b1953] | 296 |
|
---|
| 297 | </sect1>
|
---|