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
RevLine 
[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">
[cbc3f97]9 <!ENTITY dhcpcd-md5sum "a7b83c57f47b62f48373905d3b4f7978">
[cf193634]10 <!ENTITY dhcpcd-size "176 KB">
[cbc3f97]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
[cf193634]38 &lfs78_checked;
[77ac0f23]39
[e198725]40 <note>
41 <para>
[ac38e9dc]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
[e198725]44 <application>dhcpcd</application>.
45 </para>
46 </note>
47
[820d164a]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>
[4839c17]69
[ac38e9dc]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
[7e1f3aa]77 <para condition="html" role="usernotes">User Notes:
78 <ulink url="&blfs-wiki;/dhcpcd"/></para>
79
[820d164a]80 </sect2>
[4839c17]81
[820d164a]82 <sect2 role="installation">
[add19ff9]83 <title>Installation of dhcpcd</title>
[820d164a]84
[893d9711]85 <para>Install <application>dhcpcd</application> by running the following
[f9a784a]86 commands:</para>
[820d164a]87
[f0740ab]88<screen><userinput>./configure --libexecdir=/lib/dhcpcd \
[cbc3f97]89 --dbdir=/var/lib/dhcpcd &amp;&amp;
[f0740ab]90make</userinput></screen>
[f9a784a]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
[bfa01156]96<screen role='root'><userinput>make install</userinput></screen>
[4839c17]97
[690658a5]98<!--
[a41f643]99 <para>By default, a plain text lease info file isn't created but the
[a1d3648]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>
[232e46a]103
[bfa01156]104<screen role='root'><userinput>sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &amp;&amp;
[f9a784a]105install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/</userinput></screen>
[690658a5]106-->
[4839c17]107
[820d164a]108 </sect2>
[4839c17]109
[690658a5]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>
[cbc3f97]121 <parameter>--dbdir=/var/lib/dhcpcd</parameter>: The default
122 <filename class="directory">/var/db</filename> is not FHS-compliant
[690658a5]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
[414d109]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>
[cbc3f97]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>
[414d109]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
[820d164a]218 <sect2 role="content">
219 <title>Contents</title>
220
221 <segmentedlist>
[cbc3f97]222 <segtitle>Installed Program</segtitle>
223 <segtitle>Installed Library</segtitle>
224 <segtitle>Installed Directory</segtitle>
[4839c17]225
[820d164a]226 <seglistitem>
227 <seg>dhcpcd</seg>
[cbc3f97]228 <seg>/lib/dhcpcd/dev/udev.so</seg>
229 <seg>/{,var/}lib/dhcpcd and /usr/share/dhcpcd</seg>
[820d164a]230 </seglistitem>
231 </segmentedlist>
[4839c17]232
[820d164a]233 <variablelist>
234 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
235 <?dbfo list-presentation="list"?>
236 <?dbhtml list-presentation="table"?>
[4839c17]237
[820d164a]238 <varlistentry id="dhcpcd-prog">
239 <term><command>dhcpcd</command></term>
240 <listitem>
[232e46a]241 <para>is an implementation of the DHCP client specified
[f9a784a]242 in RFC2131.</para>
[820d164a]243 <indexterm zone="dhcpcd dhcpcd-prog">
244 <primary sortas="b-dhcpcd">dhcpcd</primary>
245 </indexterm>
246 </listitem>
247 </varlistentry>
[4839c17]248
[cbc3f97]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
[820d164a]263 </variablelist>
264
265 </sect2>
[f45b1953]266
267</sect1>
Note: See TracBrowser for help on using the repository browser.