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 | &lfs75_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>Install <application>dhcpcd</application> by running the following
|
---|
80 | commands:</para>
|
---|
81 |
|
---|
82 | <screen><userinput>./configure --libexecdir=/lib/dhcpcd \
|
---|
83 | --dbdir=/var/tmp &&
|
---|
84 | make</userinput></screen>
|
---|
85 |
|
---|
86 | <para>This package does not come with a test suite.</para>
|
---|
87 |
|
---|
88 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
89 |
|
---|
90 | <screen role='root'><userinput>make install</userinput></screen>
|
---|
91 |
|
---|
92 | <!--
|
---|
93 | <para>By default, a plain text lease info file isn't created but the
|
---|
94 | <application>dhcpcd</application> provides a hook which can be used for creating
|
---|
95 | such a file. Install the hook by running the following
|
---|
96 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
97 |
|
---|
98 | <screen role='root'><userinput>sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &&
|
---|
99 | install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/</userinput></screen>
|
---|
100 | -->
|
---|
101 |
|
---|
102 | </sect2>
|
---|
103 |
|
---|
104 | <sect2 role="commands">
|
---|
105 | <title>Command Explanations</title>
|
---|
106 |
|
---|
107 | <para>
|
---|
108 | <parameter>--libexecdir=/lib/dhcpcd</parameter>: The default
|
---|
109 | <filename class="directory">/libexec</filename> is not FHS-compliant.
|
---|
110 | Since this directory may need to be available early in the boot,
|
---|
111 | <filename class="directory">/usr/libexec</filename> cannot be used either.
|
---|
112 | </para>
|
---|
113 |
|
---|
114 | <para>
|
---|
115 | <parameter>--dbdir=/var/tmp</parameter>: The default
|
---|
116 | <filename class="directory">/var/lib</filename> is not FHS-compliant
|
---|
117 | </para>
|
---|
118 |
|
---|
119 | <para>
|
---|
120 | <option>--with-hook=...</option>: You can optionally install more hooks,
|
---|
121 | for example to install some configuration files such as
|
---|
122 | <filename>ntp.conf</filename>. The set of hooks is in the
|
---|
123 | <filename class="directory">dhcpcd-hooks</filename> directory in the
|
---|
124 | build tree.
|
---|
125 | </para>
|
---|
126 | </sect2>
|
---|
127 |
|
---|
128 | <sect2 role="configuration">
|
---|
129 | <title>Configuring dhcpcd</title>
|
---|
130 |
|
---|
131 | <sect3 id="dhcpcd-config">
|
---|
132 | <title>Config Files</title>
|
---|
133 |
|
---|
134 | <para><filename>/etc/dhcpcd.conf</filename></para>
|
---|
135 |
|
---|
136 | <indexterm zone="dhcpcd dhcpcd-config">
|
---|
137 | <primary sortas="e-etc-dhcpcd-dhcpcd-conf">/etc/dhcpcd/dhcpcd.conf</primary>
|
---|
138 | </indexterm>
|
---|
139 |
|
---|
140 | </sect3>
|
---|
141 |
|
---|
142 | <sect3 id="dhcpcd-init">
|
---|
143 | <title>General Configuration Information</title>
|
---|
144 |
|
---|
145 | <para>
|
---|
146 | If you want to configure network interfaces at boot using
|
---|
147 | <command>dhcpcd</command>, you need to install the
|
---|
148 | systemd unit included in <xref linkend="bootscripts"/>
|
---|
149 | package by running the following command as the
|
---|
150 | <systemitem class="username">root</systemitem> user:
|
---|
151 | </para>
|
---|
152 |
|
---|
153 | <screen role="root"><userinput>make install-dhcpcd</userinput></screen>
|
---|
154 |
|
---|
155 | <indexterm zone="dhcpcd dhcpcd-init">
|
---|
156 | <primary sortas="f-dhcpcd">dhcpcd</primary>
|
---|
157 | </indexterm>
|
---|
158 |
|
---|
159 | <para>
|
---|
160 | Whenever <command>dhcpcd</command> configures or shuts down
|
---|
161 | a network interface, it executes hook scripts. For more details
|
---|
162 | about those scripts, see the <command>dhcpcd-run-hooks</command> and
|
---|
163 | <command>dhcpcd</command> man pages.
|
---|
164 | </para>
|
---|
165 |
|
---|
166 | <note>
|
---|
167 | <para id="dhcpcd-config3">
|
---|
168 | The default behavior of <command>dhcpcd</command> sets the
|
---|
169 | hostname and mtu settings. It also overwrites
|
---|
170 | <filename>/etc/resolv.conf</filename> and
|
---|
171 | <filename>/etc/ntp.conf</filename>.
|
---|
172 |
|
---|
173 | These modifications to system files and settings on system
|
---|
174 | configuration files are done by hooks which are stored in
|
---|
175 | <filename class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
|
---|
176 |
|
---|
177 | Setup <command>dhcpcd</command> by removing or adding hooks from/to
|
---|
178 | that directory. The execution of hooks can be disabled by using the
|
---|
179 | <option>--nohook</option> (<option>-C</option>) command line option or
|
---|
180 | by the <option>nohook</option> option in the
|
---|
181 | <filename>/etc/dhcpcd.conf</filename> file.
|
---|
182 | </para>
|
---|
183 | </note>
|
---|
184 |
|
---|
185 | <indexterm zone="dhcpcd dhcpcd-config3">
|
---|
186 | <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
|
---|
187 | </indexterm>
|
---|
188 |
|
---|
189 | <para>
|
---|
190 | At this point you can test if <command>dhcpcd</command> is
|
---|
191 | behaving as expected by running the following command as the
|
---|
192 | <systemitem class="username">root</systemitem> user:
|
---|
193 | </para>
|
---|
194 |
|
---|
195 | <screen role="root"><userinput>systemctl start dhcpcd@<replaceable>eth0</replaceable></userinput></screen>
|
---|
196 |
|
---|
197 | <para>
|
---|
198 | To start <command>dhcpcd</command> on a specific interface
|
---|
199 | at boot, enable the previously installed systemd unit by
|
---|
200 | running the following command as the
|
---|
201 | <systemitem class="username">root</systemitem> user:
|
---|
202 | </para>
|
---|
203 |
|
---|
204 | <screen role="root"><userinput>systemctl enable dhcpcd@<replaceable>eth0</replaceable></userinput></screen>
|
---|
205 |
|
---|
206 | <para>
|
---|
207 | Replace <replaceable>eth0</replaceable> with the actual interface name.
|
---|
208 | </para>
|
---|
209 |
|
---|
210 | </sect3>
|
---|
211 |
|
---|
212 | </sect2>
|
---|
213 |
|
---|
214 | <sect2 role="content">
|
---|
215 | <title>Contents</title>
|
---|
216 |
|
---|
217 | <segmentedlist>
|
---|
218 | <segtitle>Installed Programs</segtitle>
|
---|
219 | <segtitle>Installed Libraries</segtitle>
|
---|
220 | <segtitle>Installed Directories</segtitle>
|
---|
221 |
|
---|
222 | <seglistitem>
|
---|
223 | <seg>dhcpcd</seg>
|
---|
224 | <seg>None</seg>
|
---|
225 | <seg>/lib/dhcpcd</seg>
|
---|
226 | </seglistitem>
|
---|
227 | </segmentedlist>
|
---|
228 |
|
---|
229 | <variablelist>
|
---|
230 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
231 | <?dbfo list-presentation="list"?>
|
---|
232 | <?dbhtml list-presentation="table"?>
|
---|
233 |
|
---|
234 | <varlistentry id="dhcpcd-prog">
|
---|
235 | <term><command>dhcpcd</command></term>
|
---|
236 | <listitem>
|
---|
237 | <para>is an implementation of the DHCP client specified
|
---|
238 | in RFC2131.</para>
|
---|
239 | <indexterm zone="dhcpcd dhcpcd-prog">
|
---|
240 | <primary sortas="b-dhcpcd">dhcpcd</primary>
|
---|
241 | </indexterm>
|
---|
242 | </listitem>
|
---|
243 | </varlistentry>
|
---|
244 |
|
---|
245 | </variablelist>
|
---|
246 |
|
---|
247 | </sect2>
|
---|
248 |
|
---|
249 | </sect1>
|
---|