source: networking/connect/dhcpcd.xml@ cbc3f97

systemd-13485
Last change on this file since cbc3f97 was cbc3f97, checked in by DJ Lucas <dj@…>, 8 years ago

Merge chapter 14 from trunk, merge recent updates from trunk to completed chapters, more -systemd.xml files cleanup.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@16869 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 8.9 KB
Line 
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.xz">
8 <!ENTITY dhcpcd-download-ftp "ftp://roy.marples.name/pub/dhcpcd/dhcpcd-&dhcpcd-version;.tar.xz">
9 <!ENTITY dhcpcd-md5sum "a7b83c57f47b62f48373905d3b4f7978">
10 <!ENTITY dhcpcd-size "176 KB">
11 <!ENTITY dhcpcd-buildsize "2.6 MB">
12 <!ENTITY dhcpcd-time "less than 0.1 SBU">
13]>
14
15<sect1 id="dhcpcd" xreflabel="dhcpcd-&dhcpcd-version;">
16 <?dbhtml filename="dhcpcd.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>dhcpcd-&dhcpcd-version;</title>
24
25 <indexterm zone="dhcpcd">
26 <primary sortas="a-dhcpcd">dhcpcd</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to dhcpcd</title>
31
32 <para><application>dhcpcd</application> is an implementation of the
33 DHCP client specified in RFC2131. A DHCP client is useful for connecting
34 your computer to a network which uses DHCP to assign network
35 addresses. dhcpcd strives to be a fully featured, yet very lightweight
36 DHCP client.</para>
37
38 &lfs78_checked;
39
40 <note>
41 <para>
42 Make sure that you disable the <command>systemd-networkd</command> service
43 or configure it not to manage the interfaces you want to manage with
44 <application>dhcpcd</application>.
45 </para>
46 </note>
47
48 <bridgehead renderas="sect3">Package Information</bridgehead>
49 <itemizedlist spacing="compact">
50 <listitem>
51 <para>Download (HTTP): <ulink url="&dhcpcd-download-http;"/></para>
52 </listitem>
53 <listitem>
54 <para>Download (FTP): <ulink url="&dhcpcd-download-ftp;"/></para>
55 </listitem>
56 <listitem>
57 <para>Download MD5 sum: &dhcpcd-md5sum;</para>
58 </listitem>
59 <listitem>
60 <para>Download size: &dhcpcd-size;</para>
61 </listitem>
62 <listitem>
63 <para>Estimated disk space required: &dhcpcd-buildsize;</para>
64 </listitem>
65 <listitem>
66 <para>Estimated build time: &dhcpcd-time;</para>
67 </listitem>
68 </itemizedlist>
69
70 <bridgehead renderas="sect3">dhcpcd Dependencies</bridgehead>
71
72 <bridgehead renderas="sect4">Optional</bridgehead>
73 <para role="optional">
74 <xref linkend="llvm"/> (with Clang)
75 </para>
76
77 <para condition="html" role="usernotes">User Notes:
78 <ulink url="&blfs-wiki;/dhcpcd"/></para>
79
80 </sect2>
81
82 <sect2 role="installation">
83 <title>Installation of dhcpcd</title>
84
85 <para>Install <application>dhcpcd</application> by running the following
86 commands:</para>
87
88<screen><userinput>./configure --libexecdir=/lib/dhcpcd \
89 --dbdir=/var/lib/dhcpcd &amp;&amp;
90make</userinput></screen>
91
92 <para>This package does not come with a test suite.</para>
93
94 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
95
96<screen role='root'><userinput>make install</userinput></screen>
97
98<!--
99 <para>By default, a plain text lease info file isn't created but the
100 <application>dhcpcd</application> provides a hook which can be used for creating
101 such a file. Install the hook by running the following
102 commands as the <systemitem class="username">root</systemitem> user:</para>
103
104<screen role='root'><userinput>sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &amp;&amp;
105install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/</userinput></screen>
106-->
107
108 </sect2>
109
110 <sect2 role="commands">
111 <title>Command Explanations</title>
112
113 <para>
114 <parameter>--libexecdir=/lib/dhcpcd</parameter>: The default
115 <filename class="directory">/libexec</filename> is not FHS-compliant.
116 Since this directory may need to be available early in the boot,
117 <filename class="directory">/usr/libexec</filename> cannot be used either.
118 </para>
119
120 <para>
121 <parameter>--dbdir=/var/lib/dhcpcd</parameter>: The default
122 <filename class="directory">/var/db</filename> is not FHS-compliant
123 </para>
124
125 <para>
126 <option>--with-hook=...</option>: You can optionally install more hooks,
127 for example to install some configuration files such as
128 <filename>ntp.conf</filename>. The set of hooks is in the
129 <filename class="directory">dhcpcd-hooks</filename> directory in the
130 build tree.
131 </para>
132 </sect2>
133
134 <sect2 role="configuration">
135 <title>Configuring dhcpcd</title>
136
137 <sect3 id="dhcpcd-config">
138 <title>Config Files</title>
139
140 <para><filename>/etc/dhcpcd.conf</filename></para>
141
142 <indexterm zone="dhcpcd dhcpcd-config">
143 <primary sortas="e-etc-dhcpcd-dhcpcd-conf">/etc/dhcpcd/dhcpcd.conf</primary>
144 </indexterm>
145
146 </sect3>
147
148 <sect3 id="dhcpcd-init">
149 <title>General Configuration Information</title>
150
151 <para>
152 If you want to configure network interfaces at boot using
153 <command>dhcpcd</command>, you need to install the
154 systemd unit included in <xref linkend="bootscripts"/>
155 package by running the following command as the
156 <systemitem class="username">root</systemitem> user:
157 </para>
158
159<screen role="root"><userinput>make install-dhcpcd</userinput></screen>
160
161 <indexterm zone="dhcpcd dhcpcd-init">
162 <primary sortas="f-dhcpcd">dhcpcd</primary>
163 </indexterm>
164
165 <para>
166 Whenever <command>dhcpcd</command> configures or shuts down
167 a network interface, it executes hook scripts. For more details
168 about those scripts, see the <command>dhcpcd-run-hooks</command> and
169 <command>dhcpcd</command> man pages.
170 </para>
171
172 <note>
173 <para id="dhcpcd-config3">The default behavior of
174 <command>dhcpcd</command> sets the hostname and mtu settings. It also
175 overwrites <filename>/etc/resolv.conf</filename> and
176 <filename>/etc/ntp.conf</filename>.
177
178 These modifications to system files and settings on system
179 configuration files are done by hooks which are stored in <filename
180 class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
181
182 Setup <command>dhcpcd</command> by removing or adding hooks from/to
183 that directory. The execution of hooks can be disabled by using the
184 <option>--nohook</option> (<option>-C</option>) command line option or
185 by the <option>nohook</option> option in the
186 <filename>/etc/dhcpcd.conf</filename> file.</para>
187 </note>
188
189 <indexterm zone="dhcpcd dhcpcd-config3">
190 <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
191 </indexterm>
192
193 <para>
194 At this point you can test if <command>dhcpcd</command> is
195 behaving as expected by running the following command as the
196 <systemitem class="username">root</systemitem> user:
197 </para>
198
199<screen role="root"><userinput>systemctl start dhcpcd@<replaceable>eth0</replaceable></userinput></screen>
200
201 <para>
202 To start <command>dhcpcd</command> on a specific interface
203 at boot, enable the previously installed systemd unit by
204 running the following command as the
205 <systemitem class="username">root</systemitem> user:
206 </para>
207
208<screen role="root"><userinput>systemctl enable dhcpcd@<replaceable>eth0</replaceable></userinput></screen>
209
210 <para>
211 Replace <replaceable>eth0</replaceable> with the actual interface name.
212 </para>
213
214 </sect3>
215
216 </sect2>
217
218 <sect2 role="content">
219 <title>Contents</title>
220
221 <segmentedlist>
222 <segtitle>Installed Program</segtitle>
223 <segtitle>Installed Library</segtitle>
224 <segtitle>Installed Directory</segtitle>
225
226 <seglistitem>
227 <seg>dhcpcd</seg>
228 <seg>/lib/dhcpcd/dev/udev.so</seg>
229 <seg>/{,var/}lib/dhcpcd and /usr/share/dhcpcd</seg>
230 </seglistitem>
231 </segmentedlist>
232
233 <variablelist>
234 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
235 <?dbfo list-presentation="list"?>
236 <?dbhtml list-presentation="table"?>
237
238 <varlistentry id="dhcpcd-prog">
239 <term><command>dhcpcd</command></term>
240 <listitem>
241 <para>is an implementation of the DHCP client specified
242 in RFC2131.</para>
243 <indexterm zone="dhcpcd dhcpcd-prog">
244 <primary sortas="b-dhcpcd">dhcpcd</primary>
245 </indexterm>
246 </listitem>
247 </varlistentry>
248
249 <varlistentry id="dhcpcd-udev">
250 <term><filename class="libraryfile">udev.so</filename></term>
251 <listitem>
252 <para>
253 add udev support for interface arrival and departure; this is
254 because udev likes to rename the interface, which it can't do if
255 dhcpcd grabs it first.
256 </para>
257 <indexterm zone="dhcpcd dhcpcd-udev">
258 <primary sortas="c-dhcpcd-udev">udev.so</primary>
259 </indexterm>
260 </listitem>
261 </varlistentry>
262
263 </variablelist>
264
265 </sect2>
266
267</sect1>
Note: See TracBrowser for help on using the repository browser.