source: networking/connect/dhcpcd.xml@ 81f1de4

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 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 systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 81f1de4 was 81f1de4, checked in by Fernando de Oliveira <fernando@…>, 10 years ago

Updates to clutter-1.16.4 and gnutls-3.2.9. Library udev.so included and described in dhcpcd-6.2.1.

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

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