source: connect/dhcp/dhcp-client.xml@ 9cf73e3

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 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 9cf73e3 was 9cf73e3, checked in by Randy McMurchy <randy@…>, 19 years ago

Added indexing tags to the DHCP Client instructions

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

  • Property mode set to 100644
File size: 3.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="dhcp-client" xreflabel="DHCP-&dhcp-version; Client">
9<sect1info>
10<othername>$LastChangedBy$</othername>
11<date>$Date$</date>
12</sect1info>
13<?dbhtml filename="dhcpclient.html"?>
14<title>DHCP-&dhcp-version; Client</title>
15<indexterm zone="dhcp-client">
16<primary sortas="b-dhclient">dhclient</primary></indexterm>
17
18<para>The <application><acronym>DHCP</acronym></application> package comes with
19both a client (<command>dhclient</command>) and a server program for
20using <acronym>DHCP</acronym>. If you want to install this package,
21the instructions can be found at <xref linkend="dhcp"/>.
22Note that if you only want to use the client, you
23do <emphasis>not</emphasis> need to run the server and so do not need
24the startup script and links provided for the server daemon.
25You only need to run the <acronym>DHCP</acronym> server if you're providing
26this service to a network, and it's likely that you'll know if that's the
27case; if it isn't, don't run the server! Once you have installed the
28package, return here for information on how to configure the client
29(<command>dhclient</command>).</para>
30
31<para id="dhclient-service">To configure <command>dhclient</command>, you need
32to first install the network service script,
33<filename>/etc/sysconfig/network-devices/services/dhclient</filename>
34included in the <xref linkend="intro-important-bootscripts"/> package.</para>
35<indexterm zone="dhcp-client dhclient-service">
36<primary sortas="f-dhclient">dhclient (service script)</primary></indexterm>
37
38<screen><userinput><command>make install-service-dhclient</command></userinput></screen>
39
40<para id="dhclient-config1">Next, create the
41<filename>/etc/sysconfig/network-devices/ifconfig.eth0/dhclient</filename>
42configuration file with the following commands. Adjust as necessary for
43additional interfaces.</para>
44<indexterm zone="dhcp-client dhclient-config1">
45<primary
46sortas="e-etc-sysconfig-...-dhclient">/etc/sysconfig/.../dhclient</primary>
47</indexterm>
48
49<screen><userinput><command>install -d /etc/sysconfig/network-devices/ifconfig.eth0 &amp;&amp;
50cat &gt; /etc/sysconfig/network-devices/ifconfig.eth0/dhclient &lt;&lt; "EOF"</command>
51ONBOOT="yes"
52SERVICE="dhclient"
53DHCP_START="-q <replaceable>[add additional start parameters here]</replaceable>"
54DHCP_STOP="-q -r <replaceable>[add additional stop parameters here]</replaceable>"
55<command>EOF</command></userinput></screen>
56
57<para>For more information on the appropriate
58<envar>DHCP_START</envar> and <envar>DHCP_STOP</envar>
59values, examine the man page for <command>dhclient</command>.</para>
60
61<para id="dhclient-config2">Finally, you should create the
62<filename>/etc/dhclient.conf</filename> file using the following
63commands:</para>
64<indexterm zone="dhcp-client dhclient-config2">
65<primary sortas="e-etc-dhclient.conf">/etc/dhclient.conf</primary></indexterm>
66
67<note><para>You'll need to add a second interface definition to the file if you
68have more than one interface.</para></note>
69
70<screen><userinput><command>cat &gt; /etc/dhclient.conf &lt;&lt; "EOF"</command>
71# dhclient.conf
72
73interface "eth0"{
74prepend domain-name-servers 127.0.0.1;
75request subnet-mask, broadcast-address, time-offset, routers,
76 domain-name, domain-name-servers, host-name;
77require subnet-mask, domain-name-servers;
78}
79# end dhclient.conf
80<command>EOF</command></userinput></screen>
81
82</sect1>
Note: See TracBrowser for help on using the repository browser.