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