source: networking/connect/dhcp.xml@ fa3e12e1

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 fa3e12e1 was fa3e12e1, checked in by Ken Moffat <ken@…>, 12 years ago

Update to dhcp-4.2.3

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

  • Property mode set to 100644
File size: 13.0 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 <!-- isc have a weird way of offering the tarballs and without dots in version!
7 FIXME - change hardcoded 423s in http url and version in ftp when upgrading -->
8 <!ENTITY dhcp-download-http "http://www.isc.org/software/dhcp/423/download/dhcp-423targz?download=">
9 <!ENTITY dhcp-download-ftp "ftp://ftp.isc.org/isc/dhcp/4.2.3/dhcp-&dhcp-version;.tar.gz">
10 <!ENTITY dhcp-md5sum "a06649ec5336d284fc86a0232c0edd63">
11 <!ENTITY dhcp-size "9.1 MB">
12 <!ENTITY dhcp-buildsize "185 MB (client and server), 140MB client only, 172MB server only">
13 <!ENTITY dhcp-time "0.7 SBU (client and server, or server), 0.6 SBU client only ">
14]>
15
16<sect1 id="dhcp" xreflabel="DHCP-&dhcp-version;">
17 <?dbhtml filename="dhcp.html"?>
18
19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>DHCP-&dhcp-version;</title>
25
26 <indexterm zone="dhcp">
27 <primary sortas="a-dhcp">Dhcp</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to DHCP</title>
32
33 <para>The <application>DHCP</application> package contains both the client
34 and server programs for DHCP. <command>dhclient</command> (the client) is
35 useful for connecting your computer to a network which uses DHCP to assign
36 network addresses. <command>dhcpd</command> (the server) is useful for
37 assigning network addresses on your private network.</para>
38
39 &lfs70_checked;
40
41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
44 <para>Download (HTTP): <ulink url="&dhcp-download-http;"/></para>
45 </listitem>
46 <listitem>
47 <para>Download (FTP): <ulink url="&dhcp-download-ftp;"/></para>
48 </listitem>
49 <listitem>
50 <para>Download MD5 sum: &dhcp-md5sum;</para>
51 </listitem>
52 <listitem>
53 <para>Download size: &dhcp-size;</para>
54 </listitem>
55 <listitem>
56 <para>Estimated disk space required: &dhcp-buildsize;</para>
57 </listitem>
58 <listitem>
59 <para>Estimated build time: &dhcp-time;</para>
60 </listitem>
61 </itemizedlist>
62
63 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
64 <itemizedlist spacing='compact'>
65 <listitem>
66 <para>Recommended Patch (for client):
67 <ulink url="&patch-root;/dhcp-&dhcp-version;-iproute2-1.patch"/></para>
68 </listitem>
69 <listitem>
70 <para>Optional Patch:
71 <ulink url="&patch-root;/dhcp-&dhcp-version;-missing_ipv6-1.patch"/></para>
72 </listitem>
73 </itemizedlist>
74
75 <bridgehead renderas="sect3">DHCP Dependencies</bridgehead>
76
77 <bridgehead renderas="sect4">Required</bridgehead>
78 <para role="required"><xref linkend="net-tools"/> is required at runtime
79 by <command>dhclient</command> if you do not use the iproute2 patch.</para>
80
81 <para condition="html" role="usernotes">User Notes:
82 <ulink url="&blfs-wiki;/dhcp"/></para>
83
84 </sect2>
85
86 <sect2 role="kernel" id='dhcp-kernel'>
87 <title>Kernel Configuration</title>
88
89 <para>You must have Packet Socket support (Networking
90 Support &rArr; Networking Options &rArr; Packet Socket) compiled into
91 the kernel. If you do not have IPv6 support (Networking Support &rArr;
92 Networking Options &rArr; The IPv6 Protocol) compiled in, then you
93 must use the missing_ipv6 patch.</para>
94
95 <indexterm zone="dhcp dhcp-kernel">
96 <primary sortas="d-dhcp">DHCP</primary>
97 </indexterm>
98
99 </sect2>
100
101 <sect2 role="installation">
102 <title>Installation of DHCP</title>
103
104 <para>If you have not compiled IPv6 support into the kernel, apply the
105 missing_ipv6 patch</para>
106
107<screen><userinput>patch -Np1 -i ../dhcp-&dhcp-version;-missing_ipv6-1.patch</userinput></screen>
108
109 <para>If you are installing the client, apply the iproute2 patch unless you
110 will have installed <application>net-tools</application> by the time you wish
111 to use the client:</para>
112
113<screen><userinput>patch -Np1 -i ../dhcp-&dhcp-version;-iproute2-1.patch</userinput></screen>
114
115 <para>Install <application>DHCP</application> by running
116 the following commands:</para>
117
118<screen><userinput>sed -i 's%\(^sbindir =\).*%\1 @prefix@@sbindir@%' server/Makefile.in &amp;&amp;
119./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
120 --sbindir=/sbin \
121 --with-srv-lease-file=/var/state/dhcp/dhcpd.leases \
122 --with-srv6-lease-file=/var/state/dhcp/dhcpd6.leases \
123 --with-cli-lease-file=/var/state/dhclient.leases \
124 --with-cli6-lease-file=/var/state/dhclient6.leases &amp;&amp;
125sed -i 's/-Werror//' {client,common,dst,omapip,relay,server,tests}/Makefile</userinput></screen>
126
127 <para>If you only wish to build the server, enter:</para>
128<screen><userinput>sed -i 's/ client//' Makefile</userinput></screen>
129
130 <para>If you only wish to build the client, enter:</para>
131<screen><userinput>sed -i 's/ dhcpctl relay server//' Makefile</userinput></screen>
132
133 <para>Build your chosen variant(s) with:</para>
134<screen><userinput>make</userinput></screen>
135
136 <para>To test the results, issue: <command>make check</command></para>
137
138 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
139
140<screen role="root"><userinput>make install</userinput></screen>
141
142 <para>The supplied <filename>/etc/dhcpd.conf</filename> (server) and
143 <filename>/etc/dhclient.conf</filename> (client) are examples for a
144 specific <literal>BSD</literal> system. They are unlikely to be appropriate
145 to your needs, but you may wish to read them for ideas before deleting them
146 or moving them to a different location.</para>
147
148 <para>Now create the director(y,ies) for the leases.</para>
149
150 <para>For the server:</para>
151
152<screen role="root"><userinput>mkdir -pv /var/state/dhcp</userinput></screen>
153
154 <para>For the client:</para>
155<screen role="root"><userinput>mkdir -pv /var/state</userinput></screen>
156
157 </sect2>
158
159 <sect2 role="commands">
160 <title>Command Explanations</title>
161
162 <para><command>sed -i 's%\(^sbindir =\).*%\1 @prefix@@sbindir@%' server/Makefile.in</command>
163 This command moves the <command>dhcp</command> program to
164 <filename class='directory'>/usr/sbin</filename> instead of
165 <filename class='directory'>/sbin</filename> because it is not needed
166 while the server is booting.</para>
167
168 <para><command>--sbindir=/sbin</command> The <command>dhclient</command>
169 program is moved to <filename class='directory'>/sbin</filename> instead of
170 <filename class='directory'>/usr/sbin</filename> so that it is available
171 during boot, e.g. if <filename class='directory'>/usr</filename> is to be
172 an <literal>nfs</literal> mount.</para>
173
174 <para><command>--with-*-lease-files=...</command> By default, lease files
175 are placed in <filename class='directory'>/var/db</filename> which is an
176 anachronism.</para>
177
178 <para><command>sed -i 's/-Werror//' {client,common,...}/Makefile</command> -
179 the Makefiles in this package add <literal>-Werror</literal> to the
180 <literal>CFLAGS</literal>. On recent versions of <application>gcc</application>
181 more things, particularly unused variables, create warnings. The
182 <literal>-Werror</literal> flag causes warnings to break the build, so we
183 remove it where necessary.</para>
184
185 <para><command>sed -i 's/ something//' Makefile</command> - this stops the
186 build from entering the director(y,ies) named here.</para>
187
188 <para><option>rm -v /usr/lib/lib{dhcpctl,dst,omapi}.a</option> - there is
189 no easy way to prevent these static libraries being installed, but they are
190 only needed during the build of this package. <filename>libdhcpctl.a</filename>
191 is only installed if you build the server.</para>
192
193 </sect2>
194
195 <sect2 role="configuration">
196 <title>Configuring DHCP</title>
197
198 <sect3 id='dhcp-config'>
199 <title>Config Files</title>
200
201 <para><filename>/etc/dhclient.conf</filename> and
202 <filename>/etc/dhcpd.conf</filename></para>
203
204 <indexterm zone="dhcp dhcp-config">
205 <primary sortas="e-etc-dhclient.conf">/etc/dhclient.conf</primary>
206 </indexterm>
207
208 <indexterm zone="dhcp dhcp-config">
209 <primary sortas="e-etc-dhcpd.conf">/etc/dhcpd.conf</primary>
210 </indexterm>
211
212 </sect3>
213
214 <sect3 id='dhcp-init'>
215 <title>Configuration Information</title>
216
217 <para>Information on configuring the DHCP client can be
218 found in <xref linkend="basicnet-connect"/>.</para>
219
220 <para>Note that you only need the DHCP server if you want to issue
221 LAN addresses over your network. The DHCP client doesn't need this
222 script to be used. Also note that this script is coded for the
223 <emphasis role="strong">eth1</emphasis> interface, which may need
224 to be modified for your hardware configuration.</para>
225
226 <para>Install the <filename>/etc/rc.d/init.d/dhcp</filename>
227 init script included in the <xref linkend="bootscripts"/>
228 package.</para>
229
230 <indexterm zone="dhcp dhcp-init">
231 <primary sortas="f-dhcp">dhcpd</primary>
232 </indexterm>
233
234<screen role="root"><userinput>make install-dhcp</userinput></screen>
235
236 <para>The lease file must exist on startup. The following command will
237 satisfy that requirement:</para>
238
239<screen role="root"><userinput>touch /var/state/dhcp/dhcpd.leases</userinput></screen>
240
241 <para>The following commands will create a base configuration file
242 for a DHCP server. There are several options that you may want to
243 add (information that is passed back to the DHCP client) and those
244 are covered in the man pages for <filename>dhcp.conf</filename>.</para>
245
246<screen role="root"><userinput>cat &gt; /etc/dhcpd.conf &lt;&lt; "EOF"
247<literal>default-lease-time 72000;
248max-lease-time 144000;
249
250subnet <replaceable>&lt;192.168.5.0&gt;</replaceable> netmask <replaceable>&lt;255.255.255.0&gt;</replaceable> {
251 range <replaceable>&lt;192.168.5.10&gt; &lt;192.168.5.240&gt;</replaceable>;
252 option broadcast-address <replaceable>&lt;192.168.5.255&gt;</replaceable>;
253 option routers <replaceable>&lt;192.168.5.1&gt;</replaceable>;
254}</literal>
255EOF</userinput></screen>
256
257 <para>All addresses should be changed to meet your circumstance.</para>
258
259 </sect3>
260
261 </sect2>
262
263 <sect2 role="content">
264 <title>Contents</title>
265
266 <segmentedlist>
267 <segtitle>Installed Programs</segtitle>
268 <segtitle>Installed Libraries</segtitle>
269 <segtitle>Installed Directories</segtitle>
270
271 <seglistitem>
272 <seg>dhcpd, dhcrelay, dhclient, dhclient-script, and omshell</seg>
273 <seg>libbdhcpctl.a, libdst.a, libomapi.a</seg>
274 <seg>/var/state/dhcp, /usr/include/omapip, and /usr/include/isi-dhcp</seg>
275 </seglistitem>
276 </segmentedlist>
277
278 <variablelist>
279 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
280 <?dbfo list-presentation="list"?>
281 <?dbhtml list-presentation="table"?>
282
283 <varlistentry id="dhclient">
284 <term><command>dhclient</command></term>
285 <listitem>
286 <para>is the implementation of the DHCP client.</para>
287 <indexterm zone="dhcp dhclient">
288 <primary sortas="b-dhclient">dhclient</primary>
289 </indexterm>
290 </listitem>
291 </varlistentry>
292
293 <varlistentry id="dhclient-script">
294 <term><command>dhclient-script</command></term>
295 <listitem>
296 <para>is used by dhclient to (re)configure interfaces. It can make
297 extra changes by invoking custom dhclient-{entry,exit}-hooks.</para>
298 <indexterm zone="dhcp dhclient-script">
299 <primary sortas="b-dhclient-script">dhclient-script</primary>
300 </indexterm>
301 </listitem>
302 </varlistentry>
303
304 <varlistentry id="dhcpd">
305 <term><command>dhcpd</command></term>
306 <listitem>
307 <para>implements Dynamic Host Configuration Protocol (DHCP) and
308 Internet Bootstrap Protocol (BOOTP) requests for network
309 addresses.</para>
310 <indexterm zone="dhcp dhcpd">
311 <primary sortas="b-dhcpd">dhcpd</primary>
312 </indexterm>
313 </listitem>
314 </varlistentry>
315
316 <varlistentry id="dhcrelay">
317 <term><command>dhcrelay</command></term>
318 <listitem>
319 <para>provides a means to accept DHCP and BOOTP requests on a subnet
320 without a DHCP server and relay them to a DHCP server on another
321 subnet.</para>
322 <indexterm zone="dhcp dhcrelay">
323 <primary sortas="b-dhcrelay">dhcrelay</primary>
324 </indexterm>
325 </listitem>
326 </varlistentry>
327
328 <varlistentry id="omshell">
329 <term><command>omshell</command></term>
330 <listitem>
331 <para> provides an interactive way to connect to, query, and
332 possibly change, the ISC DHCP Server's state via OMAPI, the
333 Object Management API.</para>
334 <indexterm zone="dhcp omshell">
335 <primary sortas="b-omshell">omshell</primary>
336 </indexterm>
337 </listitem>
338 </varlistentry>
339
340 </variablelist>
341
342 </sect2>
343
344</sect1>
Note: See TracBrowser for help on using the repository browser.