source: networking/connect/dhcpcd.xml@ 0ecb3b77

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 0ecb3b77 was 0ecb3b77, checked in by Fernando de Oliveira <fernando@…>, 10 years ago

dhcpcd-6.2.0: trying to clarify one sentence.

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

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