[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 |
|
---|
[3938420] | 7 | <!ENTITY dhcpcd-download-http "http://roy.marples.name/downloads/dhcpcd/dhcpcd-&dhcpcd-version;.tar.xz">
|
---|
| 8 | <!ENTITY dhcpcd-download-ftp "ftp://roy.marples.name/pub/dhcpcd/dhcpcd-&dhcpcd-version;.tar.xz">
|
---|
[a27a478] | 9 | <!--<!ENTITY dhcpcd-download-ftp "ftp://ftp.osuosl.org/pub/gentoo/distfiles/dhcpcd-&dhcpcd-version;.tar.bz2">-->
|
---|
[cf193634] | 10 | <!ENTITY dhcpcd-md5sum "8357d023c4687d27bc6ea7964236b2a6">
|
---|
| 11 | <!ENTITY dhcpcd-size "176 KB">
|
---|
| 12 | <!ENTITY dhcpcd-buildsize "3.4 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 |
|
---|
[cf193634] | 39 | &lfs78_checked;
|
---|
[77ac0f23] | 40 |
|
---|
[e198725] | 41 | <note>
|
---|
| 42 | <para>
|
---|
[ac38e9dc] | 43 | Make sure that you disable the <command>systemd-networkd</command> service
|
---|
| 44 | or configure it not to manage the interfaces you want to manage with
|
---|
[e198725] | 45 | <application>dhcpcd</application>.
|
---|
| 46 | </para>
|
---|
| 47 | </note>
|
---|
| 48 |
|
---|
[820d164a] | 49 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 50 | <itemizedlist spacing="compact">
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>Download (HTTP): <ulink url="&dhcpcd-download-http;"/></para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>Download (FTP): <ulink url="&dhcpcd-download-ftp;"/></para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>Download MD5 sum: &dhcpcd-md5sum;</para>
|
---|
| 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
| 61 | <para>Download size: &dhcpcd-size;</para>
|
---|
| 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>Estimated disk space required: &dhcpcd-buildsize;</para>
|
---|
| 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
| 67 | <para>Estimated build time: &dhcpcd-time;</para>
|
---|
| 68 | </listitem>
|
---|
| 69 | </itemizedlist>
|
---|
[4839c17] | 70 |
|
---|
[ac38e9dc] | 71 | <bridgehead renderas="sect3">dhcpcd Dependencies</bridgehead>
|
---|
| 72 |
|
---|
| 73 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 74 | <para role="optional">
|
---|
| 75 | <xref linkend="llvm"/> (with Clang)
|
---|
| 76 | </para>
|
---|
| 77 |
|
---|
[7e1f3aa] | 78 | <para condition="html" role="usernotes">User Notes:
|
---|
| 79 | <ulink url="&blfs-wiki;/dhcpcd"/></para>
|
---|
| 80 |
|
---|
[820d164a] | 81 | </sect2>
|
---|
[4839c17] | 82 |
|
---|
[820d164a] | 83 | <sect2 role="installation">
|
---|
[add19ff9] | 84 | <title>Installation of dhcpcd</title>
|
---|
[820d164a] | 85 |
|
---|
[893d9711] | 86 | <para>Install <application>dhcpcd</application> by running the following
|
---|
[f9a784a] | 87 | commands:</para>
|
---|
[820d164a] | 88 |
|
---|
[f0740ab] | 89 | <screen><userinput>./configure --libexecdir=/lib/dhcpcd \
|
---|
[690658a5] | 90 | --dbdir=/var/tmp &&
|
---|
[f0740ab] | 91 | make</userinput></screen>
|
---|
[f9a784a] | 92 |
|
---|
| 93 | <para>This package does not come with a test suite.</para>
|
---|
| 94 |
|
---|
| 95 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 96 |
|
---|
[bfa01156] | 97 | <screen role='root'><userinput>make install</userinput></screen>
|
---|
[4839c17] | 98 |
|
---|
[690658a5] | 99 | <!--
|
---|
[a41f643] | 100 | <para>By default, a plain text lease info file isn't created but the
|
---|
[a1d3648] | 101 | <application>dhcpcd</application> provides a hook which can be used for creating
|
---|
| 102 | such a file. Install the hook by running the following
|
---|
| 103 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[232e46a] | 104 |
|
---|
[bfa01156] | 105 | <screen role='root'><userinput>sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &&
|
---|
[f9a784a] | 106 | install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/</userinput></screen>
|
---|
[690658a5] | 107 | -->
|
---|
[4839c17] | 108 |
|
---|
[820d164a] | 109 | </sect2>
|
---|
[4839c17] | 110 |
|
---|
[690658a5] | 111 | <sect2 role="commands">
|
---|
| 112 | <title>Command Explanations</title>
|
---|
| 113 |
|
---|
| 114 | <para>
|
---|
| 115 | <parameter>--libexecdir=/lib/dhcpcd</parameter>: The default
|
---|
| 116 | <filename class="directory">/libexec</filename> is not FHS-compliant.
|
---|
| 117 | Since this directory may need to be available early in the boot,
|
---|
| 118 | <filename class="directory">/usr/libexec</filename> cannot be used either.
|
---|
| 119 | </para>
|
---|
| 120 |
|
---|
| 121 | <para>
|
---|
| 122 | <parameter>--dbdir=/var/tmp</parameter>: The default
|
---|
| 123 | <filename class="directory">/var/lib</filename> is not FHS-compliant
|
---|
| 124 | </para>
|
---|
| 125 |
|
---|
| 126 | <para>
|
---|
| 127 | <option>--with-hook=...</option>: You can optionally install more hooks,
|
---|
| 128 | for example to install some configuration files such as
|
---|
| 129 | <filename>ntp.conf</filename>. The set of hooks is in the
|
---|
| 130 | <filename class="directory">dhcpcd-hooks</filename> directory in the
|
---|
| 131 | build tree.
|
---|
| 132 | </para>
|
---|
| 133 | </sect2>
|
---|
| 134 |
|
---|
[414d109] | 135 | <sect2 role="configuration">
|
---|
| 136 | <title>Configuring dhcpcd</title>
|
---|
| 137 |
|
---|
| 138 | <sect3 id="dhcpcd-config">
|
---|
| 139 | <title>Config Files</title>
|
---|
| 140 |
|
---|
| 141 | <para><filename>/etc/dhcpcd.conf</filename></para>
|
---|
| 142 |
|
---|
| 143 | <indexterm zone="dhcpcd dhcpcd-config">
|
---|
| 144 | <primary sortas="e-etc-dhcpcd-dhcpcd-conf">/etc/dhcpcd/dhcpcd.conf</primary>
|
---|
| 145 | </indexterm>
|
---|
| 146 |
|
---|
| 147 | </sect3>
|
---|
| 148 |
|
---|
| 149 | <sect3 id="dhcpcd-init">
|
---|
| 150 | <title>General Configuration Information</title>
|
---|
| 151 |
|
---|
| 152 | <para>
|
---|
| 153 | If you want to configure network interfaces at boot using
|
---|
| 154 | <command>dhcpcd</command>, you need to install the
|
---|
| 155 | systemd unit included in <xref linkend="bootscripts"/>
|
---|
| 156 | package by running the following command as the
|
---|
| 157 | <systemitem class="username">root</systemitem> user:
|
---|
| 158 | </para>
|
---|
| 159 |
|
---|
| 160 | <screen role="root"><userinput>make install-dhcpcd</userinput></screen>
|
---|
| 161 |
|
---|
| 162 | <indexterm zone="dhcpcd dhcpcd-init">
|
---|
| 163 | <primary sortas="f-dhcpcd">dhcpcd</primary>
|
---|
| 164 | </indexterm>
|
---|
| 165 |
|
---|
| 166 | <para>
|
---|
| 167 | Whenever <command>dhcpcd</command> configures or shuts down
|
---|
| 168 | a network interface, it executes hook scripts. For more details
|
---|
| 169 | about those scripts, see the <command>dhcpcd-run-hooks</command> and
|
---|
| 170 | <command>dhcpcd</command> man pages.
|
---|
| 171 | </para>
|
---|
| 172 |
|
---|
| 173 | <note>
|
---|
| 174 | <para id="dhcpcd-config3">
|
---|
| 175 | The default behavior of <command>dhcpcd</command> sets the
|
---|
| 176 | hostname and mtu settings. It also overwrites
|
---|
| 177 | <filename>/etc/resolv.conf</filename> and
|
---|
| 178 | <filename>/etc/ntp.conf</filename>.
|
---|
| 179 |
|
---|
| 180 | These modifications to system files and settings on system
|
---|
| 181 | configuration files are done by hooks which are stored in
|
---|
| 182 | <filename class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
|
---|
| 183 |
|
---|
| 184 | Setup <command>dhcpcd</command> by removing or adding hooks from/to
|
---|
| 185 | that directory. The execution of hooks can be disabled by using the
|
---|
| 186 | <option>--nohook</option> (<option>-C</option>) command line option or
|
---|
| 187 | by the <option>nohook</option> option in the
|
---|
| 188 | <filename>/etc/dhcpcd.conf</filename> file.
|
---|
| 189 | </para>
|
---|
| 190 | </note>
|
---|
| 191 |
|
---|
| 192 | <indexterm zone="dhcpcd dhcpcd-config3">
|
---|
| 193 | <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
|
---|
| 194 | </indexterm>
|
---|
| 195 |
|
---|
| 196 | <para>
|
---|
| 197 | At this point you can test if <command>dhcpcd</command> is
|
---|
| 198 | behaving as expected by running the following command as the
|
---|
| 199 | <systemitem class="username">root</systemitem> user:
|
---|
| 200 | </para>
|
---|
| 201 |
|
---|
| 202 | <screen role="root"><userinput>systemctl start dhcpcd@<replaceable>eth0</replaceable></userinput></screen>
|
---|
| 203 |
|
---|
| 204 | <para>
|
---|
| 205 | To start <command>dhcpcd</command> on a specific interface
|
---|
| 206 | at boot, enable the previously installed systemd unit by
|
---|
| 207 | running the following command as the
|
---|
| 208 | <systemitem class="username">root</systemitem> user:
|
---|
| 209 | </para>
|
---|
| 210 |
|
---|
| 211 | <screen role="root"><userinput>systemctl enable dhcpcd@<replaceable>eth0</replaceable></userinput></screen>
|
---|
| 212 |
|
---|
| 213 | <para>
|
---|
| 214 | Replace <replaceable>eth0</replaceable> with the actual interface name.
|
---|
| 215 | </para>
|
---|
| 216 |
|
---|
| 217 | </sect3>
|
---|
| 218 |
|
---|
| 219 | </sect2>
|
---|
| 220 |
|
---|
[820d164a] | 221 | <sect2 role="content">
|
---|
| 222 | <title>Contents</title>
|
---|
| 223 |
|
---|
| 224 | <segmentedlist>
|
---|
[414d109] | 225 | <segtitle>Installed Programs</segtitle>
|
---|
| 226 | <segtitle>Installed Libraries</segtitle>
|
---|
| 227 | <segtitle>Installed Directories</segtitle>
|
---|
[4839c17] | 228 |
|
---|
[820d164a] | 229 | <seglistitem>
|
---|
| 230 | <seg>dhcpcd</seg>
|
---|
[414d109] | 231 | <seg>None</seg>
|
---|
[f0740ab] | 232 | <seg>/lib/dhcpcd</seg>
|
---|
[820d164a] | 233 | </seglistitem>
|
---|
| 234 | </segmentedlist>
|
---|
[4839c17] | 235 |
|
---|
[820d164a] | 236 | <variablelist>
|
---|
| 237 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 238 | <?dbfo list-presentation="list"?>
|
---|
| 239 | <?dbhtml list-presentation="table"?>
|
---|
[4839c17] | 240 |
|
---|
[820d164a] | 241 | <varlistentry id="dhcpcd-prog">
|
---|
| 242 | <term><command>dhcpcd</command></term>
|
---|
| 243 | <listitem>
|
---|
[232e46a] | 244 | <para>is an implementation of the DHCP client specified
|
---|
[f9a784a] | 245 | in RFC2131.</para>
|
---|
[820d164a] | 246 | <indexterm zone="dhcpcd dhcpcd-prog">
|
---|
| 247 | <primary sortas="b-dhcpcd">dhcpcd</primary>
|
---|
| 248 | </indexterm>
|
---|
| 249 | </listitem>
|
---|
| 250 | </varlistentry>
|
---|
[4839c17] | 251 |
|
---|
[820d164a] | 252 | </variablelist>
|
---|
| 253 |
|
---|
| 254 | </sect2>
|
---|
[f45b1953] | 255 |
|
---|
| 256 | </sect1>
|
---|