source: networking/connect/dhcpcd.xml@ 7031a69

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 7031a69 was 7031a69, checked in by Bruce Dubbs <bdubbs@…>, 10 years ago

Update to kde-4.14.1
Tags for kde dependencies

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

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