source: networking/connect/dhcpcd.xml@ 907f0780

10.0 10.1 11.0 11.1 7.10 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind krejzi/svn lazarus nosym perl-modules qt5new trunk upgradedb xry111/intltool xry111/test-20220226
Last change on this file since 907f0780 was 907f0780, checked in by Fernando de Oliveira <fernando@…>, 8 years ago

Update to dhcpcd-6.5.0.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@14534 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 10.4 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.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 "1c4de66bfd353dd97d34b120c8401d5a">
11 <!ENTITY dhcpcd-size "152 KB">
12 <!ENTITY dhcpcd-buildsize "2.3 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 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
44 <para>Download (HTTP): <ulink url="&dhcpcd-download-http;"/></para>
45 </listitem>
46 <listitem>
47 <para>Download (FTP): <ulink url="&dhcpcd-download-ftp;"/></para>
48 </listitem>
49 <listitem>
50 <para>Download MD5 sum: &dhcpcd-md5sum;</para>
51 </listitem>
52 <listitem>
53 <para>Download size: &dhcpcd-size;</para>
54 </listitem>
55 <listitem>
56 <para>Estimated disk space required: &dhcpcd-buildsize;</para>
57 </listitem>
58 <listitem>
59 <para>Estimated build time: &dhcpcd-time;</para>
60 </listitem>
61 </itemizedlist>
62
63 <bridgehead renderas="sect3">dhcpcd Dependencies</bridgehead>
64
65 <bridgehead renderas="sect4">Optional</bridgehead>
66 <para role="optional">
67 <xref linkend="llvm"/> (with Clang)
68 </para>
69
70 <para condition="html" role="usernotes">User Notes:
71 <ulink url="&blfs-wiki;/dhcpcd"/></para>
72
73 </sect2>
74
75 <sect2 role="installation">
76 <title>Installation of dhcpcd</title>
77
78 <para>Install <application>dhcpcd</application> by running the following
79 commands:</para>
80
81<screen><userinput>./configure --libexecdir=/lib/dhcpcd \
82 --dbdir=/var/tmp &amp;&amp;
83make</userinput></screen>
84
85 <para>This package does not come with a test suite.</para>
86
87 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
88
89<screen role='root'><userinput>make install</userinput></screen>
90
91<!--
92 <para>By default, a plain text lease info file isn't created but the
93 <application>dhcpcd</application> provides a hook which can be used for creating
94 such a file. Install the hook by running the following
95 commands as the <systemitem class="username">root</systemitem> user:</para>
96
97<screen role='root'><userinput>sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &amp;&amp;
98install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/</userinput></screen>
99-->
100
101 </sect2>
102
103 <sect2 role="commands">
104 <title>Command Explanations</title>
105
106 <para>
107 <parameter>--libexecdir=/lib/dhcpcd</parameter>: The default
108 <filename class="directory">/libexec</filename> is not FHS-compliant.
109 Since this directory may need to be available early in the boot,
110 <filename class="directory">/usr/libexec</filename> cannot be used either.
111 </para>
112
113 <para>
114 <parameter>--dbdir=/var/tmp</parameter>: The default
115 <filename class="directory">/var/lib</filename> is not FHS-compliant
116 </para>
117
118 <para>
119 <option>--with-hook=...</option>: You can optionally install more hooks,
120 for example to install some configuration files such as
121 <filename>ntp.conf</filename>. The set of hooks is in the
122 <filename class="directory">dhcpcd-hooks</filename> directory in the
123 build tree.
124 </para>
125 </sect2>
126
127 <sect2 role="configuration">
128 <title>Configuring dhcpcd</title>
129
130 <sect3 id="dhcpcd-config">
131 <title>Config Files</title>
132
133 <para><filename>/etc/dhcpcd.conf</filename></para>
134
135 <indexterm zone="dhcpcd dhcpcd-config">
136 <primary sortas="e-etc-dhcpcd-dhcpcd-conf">/etc/dhcpcd/dhcpcd.conf</primary>
137 </indexterm>
138
139 </sect3>
140
141 <sect3 id="dhcpcd-init">
142 <title>General Configuration Information</title>
143
144 <para>To configure <command>dhcpcd</command>, you need to first install
145 the network service script,
146 <filename>/lib/services/dhcpcd</filename>
147 included in the <xref linkend="bootscripts"/> package
148 (as user <systemitem class="username">root</systemitem>):</para>
149
150 <indexterm zone="dhcpcd dhcpcd-init">
151 <primary sortas="f-dhcpcd">dhcpcd (service script)</primary>
152 </indexterm>
153
154<screen role='root'><userinput>make install-service-dhcpcd</userinput></screen>
155
156 <para>Whenever <command>dhcpcd</command> configures or shuts down
157 a network interface, it executes hook scripts. For more details
158 about those scripts, see the <command>dhcpcd-run-hooks</command> and
159 <command>dhcpcd</command> man pages.</para>
160
161 <para id="dhcpcd-config2">Finally, as the <systemitem
162 class="username">root</systemitem> user create the
163 <filename>/etc/sysconfig/ifconfig.eth0</filename>
164 configuration file using the following commands. Adjust appropriately
165 for additional interfaces:</para>
166
167 <indexterm zone="dhcpcd dhcpcd-config2">
168 <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary>
169 </indexterm>
170
171<screen role='root'><userinput>cat &gt; /etc/sysconfig/ifconfig.eth0 &lt;&lt; "EOF"
172<literal>ONBOOT="yes"
173IFACE="eth0"
174SERVICE="dhcpcd"
175DHCP_START="-b -q <replaceable>&lt;insert appropriate start options here&gt;</replaceable>"
176DHCP_STOP="-k <replaceable>&lt;insert additional stop options here&gt;</replaceable>"</literal>
177EOF</userinput></screen>
178
179 <para>For more information on the appropriate <envar>DHCP_START</envar> and
180 <envar>DHCP_STOP</envar> values, examine the man page for
181 <command>dhcpcd</command>.</para>
182
183 <note>
184
185 <para id="dhcpcd-config3">The default behavior of
186 <command>dhcpcd</command> sets the hostname and mtu settings. It also
187 overwrites <filename>/etc/resolv.conf</filename> and
188 <filename>/etc/ntp.conf</filename>.
189
190 These modifications to system files and settings on system
191 configuration files are done by hooks which are stored in <filename
192 class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
193
194 Setup <command>dhcpcd</command> by removing or adding hooks from/to
195 that directory. The execution of hooks can be disabled by using the
196 <option>--nohook</option> (<option>-C</option>) command line option or
197 by the <option>nohook</option> option in the
198 <filename>/etc/dhcpcd.conf</filename> file.</para>
199
200 <para>Review the <command>dhcpcd</command> man page for switches to add
201 to the <envar>DHCP_START</envar> value.</para>
202
203 </note>
204
205 <indexterm zone="dhcpcd dhcpcd-config3">
206 <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
207 </indexterm>
208 </sect3>
209
210 <sect3 id="dhcpcd-init2">
211 <title>Configuration Information: fixed ip</title>
212
213 <para id="dhcpcd-config4">Although not usual, it is possible that you need
214 to configure <application>dhcpcd</application> to use a fixed ip. Here,
215 we give an example. As the
216 <systemitem class="username">root</systemitem> user create the
217 <filename>/etc/sysconfig/ifconfig.eth0</filename> configuration file
218 using the following commands. Adjust appropriately for additional
219 interfaces and for the actual ip and router you need:</para>
220
221 <indexterm zone="dhcpcd dhcpcd-config4">
222 <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary>
223 </indexterm>
224
225<screen role='root'><userinput>cat &gt; /etc/sysconfig/ifconfig.eth0 &lt;&lt; "EOF"
226<literal>ONBOOT="yes"
227IFACE="eth0"
228SERVICE="dhcpcd"
229DHCP_START="-b -q -S ip_address=192.168.0.10/24 -S routers=192.168.0.1"
230DHCP_STOP="-k"</literal>
231EOF</userinput></screen>
232
233 <para>You can either use DNS servers in
234 <filename>/etc/resolv.conf</filename> from another system, your
235 preferred servers, or just the example
236 <filename>/etc/resolv.conf.head</filename> file below as is:</para>
237
238<screen role='root'><userinput>cat &gt; /etc/resolv.conf.head &lt;&lt; "EOF"
239<literal># OpenDNS servers
240nameserver 208.67.222.222
241nameserver 208.67.220.220</literal>
242EOF</userinput></screen>
243
244 </sect3>
245
246 </sect2>
247
248 <sect2 role="content">
249 <title>Contents</title>
250
251 <segmentedlist>
252 <segtitle>Installed Program</segtitle>
253 <segtitle>Installed Library</segtitle>
254 <segtitle>Installed Directory</segtitle>
255
256 <seglistitem>
257 <seg>dhcpcd</seg>
258 <seg>/lib/dhcpcd/dev/udev.so</seg>
259 <seg>/lib/dhcpcd</seg>
260 </seglistitem>
261 </segmentedlist>
262
263 <variablelist>
264 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
265 <?dbfo list-presentation="list"?>
266 <?dbhtml list-presentation="table"?>
267
268 <varlistentry id="dhcpcd-prog">
269 <term><command>dhcpcd</command></term>
270 <listitem>
271 <para>is an implementation of the DHCP client specified
272 in RFC2131.</para>
273 <indexterm zone="dhcpcd dhcpcd-prog">
274 <primary sortas="b-dhcpcd">dhcpcd</primary>
275 </indexterm>
276 </listitem>
277 </varlistentry>
278
279 <varlistentry id="dhcpcd-udev">
280 <term><filename class="libraryfile">udev.so</filename></term>
281 <listitem>
282 <para>
283 add udev support for interface arrival and departure; this is
284 because udev likes to rename the interface, which it can't do if
285 dhcpcd grabs it first.
286 </para>
287 <indexterm zone="dhcpcd dhcpcd-udev">
288 <primary sortas="c-dhcpcd-udev">udev.so</primary>
289 </indexterm>
290 </listitem>
291 </varlistentry>
292
293 </variablelist>
294
295 </sect2>
296
297</sect1>
Note: See TracBrowser for help on using the repository browser.