glfs/connect/dhcp/dhcp-client.xml
Archaic 5cd0959daa Resetting keywords
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2592 af4574ff-66df-0310-9fd7-8a98e5e911e0
2004-08-10 04:25:57 +00:00

73 lines
2.9 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
]>
<sect1 id="connect-dhcp-client">
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<?dbhtml filename="dhcpclient.html"?>
<title>DHCP-&dhcp-version;</title>
<para>The <application><acronym>DHCP</acronym></application> package comes with
both a client (<command>dhclient</command>) and a server program for
using <acronym>DHCP</acronym>. If you want to install this package,
the instructions can be found at <xref linkend="dhcp"/>.
Note that if you only want to use the client, you
do <emphasis>not</emphasis> need to run the server and so do not need
the startup script and links provided for the server daemon.
You only need to run the <acronym>DHCP</acronym> server if you're providing
this service to a network, and it's likely that you'll know if that's the
case; if it isn't, don't run the server! Once you have installed the
package, return here for information on how to configure the client
(<command>dhclient</command>).</para>
<para>To configure <command>dhclient</command>, you need to first install
the network service script,
<filename>/etc/sysconfig/network-devices/services/dhclient</filename>
included in the <xref linkend="intro-important-bootscripts"/> package.</para>
<screen><userinput><command>make install-service-dhclient</command></userinput></screen>
<para>Next, create the
<filename>/etc/sysconfig/network-devices/ifconfig.eth0/dhclient</filename>
configuration file with the following commands. Adjust as necessary for
additional interfaces.</para>
<screen><userinput><command>install -d /etc/sysconfig/network-devices/ifconfig.eth0 &amp;&amp;
cat &gt; /etc/sysconfig/network-devices/ifconfig.eth0/dhclient &lt;&lt; "EOF"</command>
ONBOOT="yes"
SERVICE="dhclient"
DHCP_START="-q <replaceable>[add additional start parameters here]</replaceable>"
DHCP_STOP="-q -r <replaceable>[add additional stop parameters here]</replaceable>"
<command>EOF</command></userinput></screen>
<para>For more information on the appropriate
<envar>DHCP_START</envar> and <envar>DHCP_STOP</envar>
values, examine the man page for <command>dhclient</command>.</para>
<para>Finally, you should create the
<filename>/etc/dhclient.conf</filename> file using the following
commands:</para>
<note><para>You'll need to add a second interface definition to the file if you
have more than one interface.</para></note>
<screen><userinput><command>cat &gt; /etc/dhclient.conf &lt;&lt; "EOF"</command>
# dhclient.conf
interface "eth0"{
prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name;
require subnet-mask, domain-name-servers;
}
# end dhclient.conf
<command>EOF</command></userinput></screen>
</sect1>