source: networking/connect/dhcpcd.xml@ e1617c94

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.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 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 e1617c94 was e1617c94, checked in by Fernando de Oliveira <fernando@…>, 10 years ago

Update to gcr-3.14.0.
Update to pcre-8.36.
Update to dhcpcd-6.4.6.
Update to cups-filters-1.0.59.
Update to gtk-doc-1.21.
Update to vala-0.26.0.
Update to gdk-pixbuf-2.31.1.

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

  • Property mode set to 100644
File size: 10.2 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
[fefa337]7 <!ENTITY dhcpcd-download-http "http://roy.marples.name/downloads/dhcpcd/dhcpcd-&dhcpcd-version;.tar.bz2">
[a27a478]8 <!ENTITY dhcpcd-download-ftp " ">
9 <!--<!ENTITY dhcpcd-download-ftp "ftp://ftp.osuosl.org/pub/gentoo/distfiles/dhcpcd-&dhcpcd-version;.tar.bz2">-->
[e1617c94]10 <!ENTITY dhcpcd-md5sum "f0c3059eccc5bd8ab007a0ef62f56ed2">
[ef3c320]11 <!ENTITY dhcpcd-size "152 KB">
[e1617c94]12 <!ENTITY dhcpcd-buildsize "2.3 MB">
[ed4e5b4]13 <!ENTITY dhcpcd-time "less than 0.1 SBU">
[246c904]14]>
15
[fd680fb]16<sect1 id="dhcpcd" xreflabel="dhcpcd-&dhcpcd-version;">
[820d164a]17 <?dbhtml filename="dhcpcd.html"?>
[4839c17]18
[820d164a]19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
[4839c17]23
[add19ff9]24 <title>dhcpcd-&dhcpcd-version;</title>
[4839c17]25
[820d164a]26 <indexterm zone="dhcpcd">
[add19ff9]27 <primary sortas="a-dhcpcd">dhcpcd</primary>
[820d164a]28 </indexterm>
29
30 <sect2 role="package">
[add19ff9]31 <title>Introduction to dhcpcd</title>
[820d164a]32
[add19ff9]33 <para><application>dhcpcd</application> is an implementation of the
[5aac2b97]34 DHCP client specified in RFC2131. A DHCP client is useful for connecting
[232e46a]35 your computer to a network which uses DHCP to assign network
[0d7900a]36 addresses. dhcpcd strives to be a fully featured, yet very lightweight
[5aac2b97]37 DHCP client.</para>
[4839c17]38
[7031a69]39 &lfs76_checked;
[77ac0f23]40
[820d164a]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>
[4839c17]62
[7e1f3aa]63 <para condition="html" role="usernotes">User Notes:
64 <ulink url="&blfs-wiki;/dhcpcd"/></para>
65
[820d164a]66 </sect2>
[4839c17]67
[820d164a]68 <sect2 role="installation">
[add19ff9]69 <title>Installation of dhcpcd</title>
[820d164a]70
[893d9711]71 <para>Install <application>dhcpcd</application> by running the following
[f9a784a]72 commands:</para>
[820d164a]73
[f0740ab]74<screen><userinput>./configure --libexecdir=/lib/dhcpcd \
[690658a5]75 --dbdir=/var/tmp &amp;&amp;
[f0740ab]76make</userinput></screen>
[f9a784a]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
[bfa01156]82<screen role='root'><userinput>make install</userinput></screen>
[4839c17]83
[690658a5]84<!--
[a41f643]85 <para>By default, a plain text lease info file isn't created but the
[a1d3648]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>
[232e46a]89
[bfa01156]90<screen role='root'><userinput>sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &amp;&amp;
[f9a784a]91install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/</userinput></screen>
[690658a5]92-->
[4839c17]93
[820d164a]94 </sect2>
[4839c17]95
[690658a5]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
[820d164a]120 <sect2 role="configuration">
[add19ff9]121 <title>Configuring dhcpcd</title>
[820d164a]122
123 <sect3 id="dhcpcd-config">
124 <title>Config Files</title>
[4839c17]125
[5aac2b97]126 <para><filename>/etc/dhcpcd.conf</filename></para>
[4839c17]127
[820d164a]128 <indexterm zone="dhcpcd dhcpcd-config">
[fefa337]129 <primary sortas="e-etc-dhcpcd-dhcpcd-conf">/etc/dhcpcd/dhcpcd.conf</primary>
[820d164a]130 </indexterm>
[4839c17]131
[820d164a]132 </sect3>
133
134 <sect3 id="dhcpcd-init">
[e5f38d6b]135 <title>General Configuration Information</title>
[820d164a]136
137 <para>To configure <command>dhcpcd</command>, you need to first install
138 the network service script,
[f0740ab]139 <filename>/lib/services/dhcpcd</filename>
[5254d12]140 included in the <xref linkend="bootscripts"/> package
[820d164a]141 (as user <systemitem class="username">root</systemitem>):</para>
[4839c17]142
[820d164a]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
[232e46a]149 <para>Whenever <command>dhcpcd</command> configures or shuts down
[fefa337]150 a network interface, it executes hook scripts. For more details
[f0740ab]151 about those scripts, see the <command>dhcpcd-run-hooks</command> and
152 <command>dhcpcd</command> man pages.</para>
[232e46a]153
[893d9711]154 <para id="dhcpcd-config2">Finally, as the <systemitem
[820d164a]155 class="username">root</systemitem> user create the
[f0740ab]156 <filename>/etc/sysconfig/ifconfig.eth0</filename>
[893d9711]157 configuration file using the following commands. Adjust appropriately
[820d164a]158 for additional interfaces:</para>
[4839c17]159
[820d164a]160 <indexterm zone="dhcpcd dhcpcd-config2">
[f0740ab]161 <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary>
[820d164a]162 </indexterm>
163
[f0740ab]164<screen role='root'><userinput>cat &gt; /etc/sysconfig/ifconfig.eth0 &lt;&lt; "EOF"
[820d164a]165<literal>ONBOOT="yes"
[f0740ab]166IFACE="eth0"
[afa198d]167SERVICE="dhcpcd"
[5aac2b97]168DHCP_START="-b -q <replaceable>&lt;insert appropriate start options here&gt;</replaceable>"
[f0740ab]169DHCP_STOP="-k <replaceable>&lt;insert additional stop options here&gt;</replaceable>"</literal>
[820d164a]170EOF</userinput></screen>
171
[893d9711]172 <para>For more information on the appropriate <envar>DHCP_START</envar> and
173 <envar>DHCP_STOP</envar> values, examine the man page for
[820d164a]174 <command>dhcpcd</command>.</para>
[4839c17]175
[820d164a]176 <note>
[f0740ab]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
[0d7900a]181 <filename>/etc/ntp.conf</filename>.
182
[f0740ab]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>.
[0d7900a]186
[f0740ab]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
[0d7900a]191 <filename>/etc/dhcpcd.conf</filename> file.</para>
192
[f0740ab]193 <para>Review the <command>dhcpcd</command> man page for switches to add
[0d7900a]194 to the <envar>DHCP_START</envar> value.</para>
195
[820d164a]196 </note>
[4839c17]197
[820d164a]198 <indexterm zone="dhcpcd dhcpcd-config3">
199 <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
200 </indexterm>
201 </sect3>
[4839c17]202
[e5f38d6b]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
[0840866]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
[0ecb3b77]229 <filename>/etc/resolv.conf.head</filename> file below as is:</para>
[e5f38d6b]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
[820d164a]239 </sect2>
[4839c17]240
[820d164a]241 <sect2 role="content">
242 <title>Contents</title>
243
244 <segmentedlist>
245 <segtitle>Installed Program</segtitle>
[d81eda8]246 <segtitle>Installed Library</segtitle>
[b1d305ed]247 <segtitle>Installed Directory</segtitle>
[4839c17]248
[820d164a]249 <seglistitem>
250 <seg>dhcpcd</seg>
[81f1de4]251 <seg>/lib/dhcpcd/dev/udev.so</seg>
[f0740ab]252 <seg>/lib/dhcpcd</seg>
[820d164a]253 </seglistitem>
254 </segmentedlist>
[4839c17]255
[820d164a]256 <variablelist>
257 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
258 <?dbfo list-presentation="list"?>
259 <?dbhtml list-presentation="table"?>
[4839c17]260
[820d164a]261 <varlistentry id="dhcpcd-prog">
262 <term><command>dhcpcd</command></term>
263 <listitem>
[232e46a]264 <para>is an implementation of the DHCP client specified
[f9a784a]265 in RFC2131.</para>
[820d164a]266 <indexterm zone="dhcpcd dhcpcd-prog">
267 <primary sortas="b-dhcpcd">dhcpcd</primary>
268 </indexterm>
269 </listitem>
270 </varlistentry>
[4839c17]271
[81f1de4]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
[820d164a]286 </variablelist>
287
288 </sect2>
[f45b1953]289
290</sect1>
Note: See TracBrowser for help on using the repository browser.