source: connect/dhcp/dhcp-client.xml@ 246c904

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 246c904 was 246c904, checked in by Bruce Dubbs <bdubbs@…>, 20 years ago

New XML Part IV (Chapters 13-15)

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

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