glfs/connect/dhcp/dhcp-client.xml
Larry Lawrence ca3bcd405f continue ent and intro updates, consistency changes
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@55 af4574ff-66df-0310-9fd7-8a98e5e911e0
2002-08-04 19:08:14 +00:00

39 lines
1.6 KiB
XML

<sect1 id="connect-dhcp-client">
<?dbhtml filename="dhcpclient.html" dir="connect"?>
<title>dhcp-&dhcp-version;</title>
<para>The dhcp package comes with both a client and a server program for
using DHCP. If you want to install it, 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.
Note that to use the client, you still need to alter your
<filename>ethnet</filename> script as described in the next section.
You only need to run the DHCP server however, 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!</para>
<para>To configure the client, you need to modify the
<filename>/etc/sysconfig/network-devices/ifconfig.eth0</filename> file
(or the appropriate one for the interface you are running DHCP on)
you created earlier by adding the appropriate <userinput>DHCP_PROG
</userinput>, <userinput>DHCP_START</userinput> and
<userinput>DHCP_STOP</userinput> values.</para>
<para>Then create the <filename>/etc/dhclient.conf</filename> using the
following command:</para>
<para><screen><userinput>cat &gt; /etc/dhclient.conf &lt;&lt; "EOF"</userinput>
# 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
<userinput>EOF</userinput></screen></para>
</sect1>