1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY dhcpcd-download-http "http://roy.marples.name/downloads/dhcpcd/dhcpcd-&dhcpcd-version;.tar.bz2">
|
---|
8 | <!ENTITY dhcpcd-download-ftp " ">
|
---|
9 | <!--<!ENTITY dhcpcd-download-ftp "ftp://ftp.osuosl.org/pub/gentoo/distfiles/dhcpcd-&dhcpcd-version;.tar.bz2">-->
|
---|
10 | <!ENTITY dhcpcd-md5sum "b22005c131e7108ecf598b6a4ac091eb">
|
---|
11 | <!ENTITY dhcpcd-size "148 KB">
|
---|
12 | <!ENTITY dhcpcd-buildsize "2.2 MB">
|
---|
13 | <!ENTITY dhcpcd-time "less than 0.1 SBU">
|
---|
14 | ]>
|
---|
15 |
|
---|
16 | <sect1 id="dhcpcd" xreflabel="dhcpcd-&dhcpcd-version;">
|
---|
17 | <?dbhtml filename="dhcpcd.html"?>
|
---|
18 |
|
---|
19 | <sect1info>
|
---|
20 | <othername>$LastChangedBy$</othername>
|
---|
21 | <date>$Date$</date>
|
---|
22 | </sect1info>
|
---|
23 |
|
---|
24 | <title>dhcpcd-&dhcpcd-version;</title>
|
---|
25 |
|
---|
26 | <indexterm zone="dhcpcd">
|
---|
27 | <primary sortas="a-dhcpcd">dhcpcd</primary>
|
---|
28 | </indexterm>
|
---|
29 |
|
---|
30 | <sect2 role="package">
|
---|
31 | <title>Introduction to dhcpcd</title>
|
---|
32 |
|
---|
33 | <para><application>dhcpcd</application> is an implementation of the
|
---|
34 | DHCP client specified in RFC2131. A DHCP client is useful for connecting
|
---|
35 | your computer to a network which uses DHCP to assign network
|
---|
36 | addresses. dhcpcd strives to be a fully featured, yet very lightweight
|
---|
37 | DHCP client.</para>
|
---|
38 |
|
---|
39 | &lfs76_checked;
|
---|
40 |
|
---|
41 | <note>
|
---|
42 | <para>
|
---|
43 | Make sure you disable <command>systemd-networkd</command> service or
|
---|
44 | make it not configure the connections you want to manage with
|
---|
45 | <application>dhcpcd</application>.
|
---|
46 | </para>
|
---|
47 | </note>
|
---|
48 |
|
---|
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>
|
---|
70 |
|
---|
71 | <para condition="html" role="usernotes">User Notes:
|
---|
72 | <ulink url="&blfs-wiki;/dhcpcd"/></para>
|
---|
73 |
|
---|
74 | </sect2>
|
---|
75 |
|
---|
76 | <sect2 role="installation">
|
---|
77 | <title>Installation of dhcpcd</title>
|
---|
78 |
|
---|
79 | <para>
|
---|
80 | First, silence a lot of warnings caused by using the latest toolchain
|
---|
81 | by running the following command:
|
---|
82 | </para>
|
---|
83 |
|
---|
84 | <screen><userinput>sed -i "s:BSD_SOURCE:DEFAULT_SOURCE:g" configure</userinput></screen>
|
---|
85 |
|
---|
86 | <para>Install <application>dhcpcd</application> by running the following
|
---|
87 | commands:</para>
|
---|
88 |
|
---|
89 | <screen><userinput>./configure --libexecdir=/lib/dhcpcd \
|
---|
90 | --dbdir=/var/tmp &&
|
---|
91 | make</userinput></screen>
|
---|
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 |
|
---|
97 | <screen role='root'><userinput>make install</userinput></screen>
|
---|
98 |
|
---|
99 | <!--
|
---|
100 | <para>By default, a plain text lease info file isn't created but the
|
---|
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>
|
---|
104 |
|
---|
105 | <screen role='root'><userinput>sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &&
|
---|
106 | install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/</userinput></screen>
|
---|
107 | -->
|
---|
108 |
|
---|
109 | </sect2>
|
---|
110 |
|
---|
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 |
|
---|
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 |
|
---|
221 | <sect2 role="content">
|
---|
222 | <title>Contents</title>
|
---|
223 |
|
---|
224 | <segmentedlist>
|
---|
225 | <segtitle>Installed Programs</segtitle>
|
---|
226 | <segtitle>Installed Libraries</segtitle>
|
---|
227 | <segtitle>Installed Directories</segtitle>
|
---|
228 |
|
---|
229 | <seglistitem>
|
---|
230 | <seg>dhcpcd</seg>
|
---|
231 | <seg>None</seg>
|
---|
232 | <seg>/lib/dhcpcd</seg>
|
---|
233 | </seglistitem>
|
---|
234 | </segmentedlist>
|
---|
235 |
|
---|
236 | <variablelist>
|
---|
237 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
238 | <?dbfo list-presentation="list"?>
|
---|
239 | <?dbhtml list-presentation="table"?>
|
---|
240 |
|
---|
241 | <varlistentry id="dhcpcd-prog">
|
---|
242 | <term><command>dhcpcd</command></term>
|
---|
243 | <listitem>
|
---|
244 | <para>is an implementation of the DHCP client specified
|
---|
245 | in RFC2131.</para>
|
---|
246 | <indexterm zone="dhcpcd dhcpcd-prog">
|
---|
247 | <primary sortas="b-dhcpcd">dhcpcd</primary>
|
---|
248 | </indexterm>
|
---|
249 | </listitem>
|
---|
250 | </varlistentry>
|
---|
251 |
|
---|
252 | </variablelist>
|
---|
253 |
|
---|
254 | </sect2>
|
---|
255 |
|
---|
256 | </sect1>
|
---|