source: connect/dhcp/dhcpcd.xml@ d0e741f

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 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 d0e741f was d0e741f, checked in by David Jensen <djensen@…>, 19 years ago

unused command explanation in Dhcpcd

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

  • Property mode set to 100644
File size: 8.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY dhcpcd-download-http "http://www.phystech.com/ftp/dhcpcd-&dhcpcd-version;.tar.gz">
8 <!ENTITY dhcpcd-download-ftp "ftp://ftp.phystech.com/pub/dhcpcd-&dhcpcd-version;.tar.gz">
9 <!ENTITY dhcpcd-md5sum "dd627a121e43835bead3ffef5b1a72fd">
10 <!ENTITY dhcpcd-size "145 KB">
11 <!ENTITY dhcpcd-buildsize "944 KB">
12 <!ENTITY dhcpcd-time "0.04 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>The <application>dhcpcd</application> package contains the
33 <command>dhcpcd</command> client. This is useful for connecting your computer
34 to a network which uses DHCP to assign network addresses.</para>
35
36 <bridgehead renderas="sect3">Package Information</bridgehead>
37 <itemizedlist spacing="compact">
38 <listitem>
39 <para>Download (HTTP): <ulink url="&dhcpcd-download-http;"/></para>
40 </listitem>
41 <listitem>
42 <para>Download (FTP): <ulink url="&dhcpcd-download-ftp;"/></para>
43 </listitem>
44 <listitem>
45 <para>Download MD5 sum: &dhcpcd-md5sum;</para>
46 </listitem>
47 <listitem>
48 <para>Download size: &dhcpcd-size;</para>
49 </listitem>
50 <listitem>
51 <para>Estimated disk space required: &dhcpcd-buildsize;</para>
52 </listitem>
53 <listitem>
54 <para>Estimated build time: &dhcpcd-time;</para>
55 </listitem>
56 </itemizedlist>
57
58 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
59 <itemizedlist spacing='compact'>
60 <listitem>
61 <para>Required Patch:
62 <ulink url="&patch-root;/dhcpcd-&dhcpcd-version;-fhs-1.patch"/></para>
63 </listitem>
64 </itemizedlist>
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>patch -Np1 -i ../dhcpcd-&dhcpcd-version;-fhs-1.patch &amp;&amp;
75./configure --prefix="" --sysconfdir=/var/lib &amp;&amp;
76make</userinput></screen>
77
78 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
79
80<screen role="root"><userinput>make install</userinput></screen>
81
82 </sect2>
83
84 <sect2 role="commands">
85 <title>Command Explanations</title>
86
87 <para><command>patch -Np1 -i ../dhcpcd-&dhcpcd-version;-fhs-1.patch</command>:
88 <application>dhcpcd</application> unpatched puts all configuration
89 and temporary files in <filename class='directory'>/etc/dhcpc</filename>. This
90 becomes very annoying when <application>dhcpcd</application> tells you it's
91 running and it's not. You look in
92 <filename class="directory">/var/run</filename> for the
93 <filename>PID</filename> file, but it's not there, the
94 <filename>PID</filename> file that needs deleting is in
95 <filename class="directory">/etc/dhcpc</filename>. This patch brings this
96 program into FHS compliance, but more importantly, puts
97 files where you expect them to be.</para>
98
99 <para><parameter>--prefix=""</parameter>: There may be a good reason for
100 abandoning the normal BLFS convention of using
101 <parameter>--prefix=/usr</parameter> here. If you are installing
102 DHCP, it is likely that it is
103 required during the boot process and
104 <filename class="directory">/usr</filename> may be network mounted, in which
105 case <command>dhcpcd</command> wouldn't be available due to being on the
106 network! Therefore, depending on your situation, you may want it to be
107 installed in <filename class="directory">/sbin</filename> or
108 <filename class="directory">/usr/sbin</filename>. This command installs to
109 <filename class="directory">/sbin</filename>.</para>
110
111 <para><parameter>--sysconfdir=/var/lib</parameter>: This command installs
112 configuration files in the <filename class="directory">/var/lib</filename>
113 directory.</para>
114
115 </sect2>
116
117 <sect2 role="configuration">
118 <title>Configuring Dhcpcd</title>
119
120 <sect3 id="dhcpcd-config">
121 <title>Config Files</title>
122
123 <para><filename>/var/lib/dhcpc/*</filename></para>
124
125 <indexterm zone="dhcpcd dhcpcd-config">
126 <primary sortas="e-var-lib-dhcpc">/var/lib/dhcpc/*</primary>
127 </indexterm>
128
129 </sect3>
130
131 <sect3 id="dhcpcd-init">
132 <title>Configuration Information</title>
133
134 <para>To configure <command>dhcpcd</command>, you need to first install
135 the network service script,
136 <filename>/etc/sysconfig/network-devices/services/dhcpcd</filename>
137 included in the <xref linkend="intro-important-bootscripts"/> package
138 (as user <systemitem class="username">root</systemitem>):</para>
139
140 <indexterm zone="dhcpcd dhcpcd-init">
141 <primary sortas="f-dhcpcd">dhcpcd (service script)</primary>
142 </indexterm>
143
144<screen role='root'><userinput>make install-service-dhcpcd</userinput></screen>
145
146 <para id="dhcpcd-config2">Finally, as the <systemitem
147 class="username">root</systemitem> user create the
148 <filename>/etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd</filename>
149 configuration file using the following commands. Adjust appropriately
150 for additional interfaces:</para>
151
152 <indexterm zone="dhcpcd dhcpcd-config2">
153 <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/.../dhcpcd</primary>
154 </indexterm>
155
156<screen role='root'><userinput>install -v -d /etc/sysconfig/network-devices/ifconfig.eth0 &amp;&amp;
157cat &gt; /etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd &lt;&lt; "EOF"
158<literal>ONBOOT="yes"
159SERVICE="dhcpcd"
160DHCP_START="<replaceable>[insert appropriate start options here]</replaceable>"
161DHCP_STOP="-k <replaceable>[insert additional stop options here]</replaceable>"
162
163# Set PRINTIP="yes" to have the script print
164# the DHCP assigned IP address
165PRINTIP="no"
166
167# Set PRINTALL="yes" to print the DHCP assigned values for
168# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
169PRINTALL="no"</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 <para id="dhcpcd-config3">The default behavior of
178 <command>dhcpcd</command> is to overwrite (after making backup copies)
179 <filename>/etc/resolv.conf</filename>, <filename>/etc/yp.conf</filename> and
180 <filename>/etc/ntp.conf</filename> with new files containing information from
181 the DHCP server. If this is undesirable, review the
182 <command>dhcpcd</command> man page for switches to add to the
183 <envar>DHCP_START</envar> value.</para>
184 </note>
185
186 <indexterm zone="dhcpcd dhcpcd-config3">
187 <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
188 </indexterm>
189
190 <indexterm zone="dhcpcd dhcpcd-config3">
191 <primary sortas="e-etc-yp.conf">/etc/yp.conf</primary>
192 </indexterm>
193
194 <indexterm zone="dhcpcd dhcpcd-config3">
195 <primary sortas="e-etc-ntp.conf">/etc/ntp.conf</primary>
196 </indexterm>
197
198 </sect3>
199
200 </sect2>
201
202 <sect2 role="content">
203 <title>Contents</title>
204
205 <segmentedlist>
206 <segtitle>Installed Program</segtitle>
207 <segtitle>Installed Libraries</segtitle>
208 <segtitle>Installed Directory</segtitle>
209
210 <seglistitem>
211 <seg>dhcpcd</seg>
212 <seg>None</seg>
213 <seg>/var/lib/dhcpc</seg>
214 </seglistitem>
215 </segmentedlist>
216
217 <variablelist>
218 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
219 <?dbfo list-presentation="list"?>
220 <?dbhtml list-presentation="table"?>
221
222 <varlistentry id="dhcpcd-prog">
223 <term><command>dhcpcd</command></term>
224 <listitem>
225 <para>is an implementation of the DHCP client
226 specified in RFC2131 and RFC1541
227 (depending on which options are specified).</para>
228 <indexterm zone="dhcpcd dhcpcd-prog">
229 <primary sortas="b-dhcpcd">dhcpcd</primary>
230 </indexterm>
231 </listitem>
232 </varlistentry>
233
234 </variablelist>
235
236 </sect2>
237
238</sect1>
Note: See TracBrowser for help on using the repository browser.