source: connect/dhcp/dhcp-client.xml@ 1af021dc

10.0 10.1 11.0 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 ken/refactor-virt krejzi/svn lazarus nosym perl-modules qt5new systemd-11177 systemd-13485 trunk v5_1 xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 1af021dc was 1af021dc, checked in by Larry Lawrence <larry@…>, 17 years ago

grammer changes

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

  • Property mode set to 100644
File size: 2.8 KB
Line 
1<sect1 id="connect-dhcp-client">
2<?dbhtml filename="dhcpclient.html"?>
3<title>DHCP-&dhcp-version;</title>
4
5<para>The <application><acronym>DHCP</acronym></application> package comes with
6both a client (<command>dhclient</command>) and a server program for
7using <acronym>DHCP</acronym>. If you want to install this package,
8the instructions can be found at <xref linkend="dhcp"/>.
9Note that if you only want to use the client, you
10do <emphasis>not</emphasis> need to run the server and so do not need
11the startup script and links provided for the server daemon.
12You only need to run the <acronym>DHCP</acronym> server if you're providing
13this service to a network, and it's likely that you'll know if that's the
14case; if it isn't, don't run the server! Once you have installed the
15package, return here for information on how to configure the client
16(<command>dhclient</command>).</para>
17
18<para>To configure <command>dhclient</command>, you need to first install
19the network service script,
20<filename>/etc/sysconfig/network-devices/services/dhclient</filename>
21included in the <xref linkend="intro-important-bootscripts"/> package.</para>
22
23<screen><userinput><command>make install-service-dhclient</command></userinput></screen>
24
25<para>Next, create the <filename>ifconfig.eth0</filename>
26file with the following commands. Adjust as necessary for additional
27interfaces.</para>
28
29<para><emphasis>Note</emphasis>: this will overwrite any existing file.</para>
30
31<screen><userinput><command>cat &gt; /etc/sysconfig/network-devices/ifconfig.eth0 &lt;&lt; "EOF"</command>
32ONBOOT=yes
33DHCP_START="<replaceable>[place appropriate start parameters here]</replaceable>"
34DHCP_STOP="-r <replaceable>[add additional stop parameters here]</replaceable>"
35SERVICE=dhclient
36<command>EOF</command></userinput></screen>
37
38<para>For more information on the appropriate
39<envar>DHCP_START</envar> and <envar>DHCP_STOP</envar>
40values, examine the man page for <command>dhclient</command>.</para>
41
42<para> You should then create
43<filename>/etc/dhclient.conf</filename> using the following
44commands. Append to the file if you have more than one interface:</para>
45
46<screen><userinput><command>cat &gt; /etc/dhclient.conf &lt;&lt; "EOF"</command>
47# dhclient.conf
48
49interface "eth0"{
50prepend domain-name-servers 127.0.0.1;
51request subnet-mask, broadcast-address, time-offset, routers,
52 domain-name, domain-name-servers, host-name;
53require subnet-mask, domain-name-servers;
54}
55# end dhclient.conf
56<command>EOF</command></userinput></screen>
57
58<para>Finally, if the <acronym>DHCP</acronym> configured interface is
59used as your default gateway, you should remove the GATEWAY and GATEWAY_IF
60variables from <filename>/etc/sysconfig/network</filename>: </para>
61
62<screen><userinput><command>sed -i "s/GATEWAY/#GATEWAY/" /etc/sysconfig/network</command></userinput></screen>
63
64</sect1>
Note: See TracBrowser for help on using the repository browser.