1 | <sect1 id="connect-dhcp-client">
|
---|
2 | <?dbhtml filename="dhcpclient.html" dir="connect"?>
|
---|
3 | <title>Installing dhcp-&dhcp-version;</title>
|
---|
4 |
|
---|
5 | <para>The dhcp package comes with both a client and a server program for
|
---|
6 | using DHCP. If you want to install it, the instructions can be found
|
---|
7 | at <xref linkend="dhcp"/>. Note that if you only want to
|
---|
8 | use the client, you do <emphasis>not</emphasis> need to run the server and
|
---|
9 | so do not need the startup script and links provided for the server daemon.
|
---|
10 | Note that to use the client, you still need to alter your
|
---|
11 | <filename>ethnet</filename> script as described in the next section.
|
---|
12 | You only need to run the DHCP server however, if you're providing this
|
---|
13 | service to a network, and it's likely that you'll know if that's the
|
---|
14 | case; if it isn't, don't run the server!</para>
|
---|
15 |
|
---|
16 | <para>To configure the client, you need to modify the
|
---|
17 | <filename>/etc/sysconfig/network-devices/ifconfig.eth0</filename> file
|
---|
18 | (or the appropriate one for the interface you are running DHCP on)
|
---|
19 | you created earlier by adding the appropriate <userinput>DHCP_PROG
|
---|
20 | </userinput>, <userinput>DHCP_START</userinput> and
|
---|
21 | <userinput>DHCP_STOP</userinput> values.</para>
|
---|
22 |
|
---|
23 | <para>Then create the <filename>/etc/dhclient.conf</filename> using the
|
---|
24 | following command:</para>
|
---|
25 |
|
---|
26 | <para><screen><userinput>cat > /etc/dhclient.conf <<
|
---|
27 | "EOF"</userinput>
|
---|
28 | # dhclient.conf
|
---|
29 |
|
---|
30 | interface "eth0"{
|
---|
31 | prepend domain-name-servers 127.0.0.1;
|
---|
32 | request subnet-mask, broadcast-address, time-offset, routers,
|
---|
33 | domain-name, domain-name-servers, host-name;
|
---|
34 | require subnet-mask, domain-name-servers;
|
---|
35 | }
|
---|
36 | # end dhclient.conf
|
---|
37 | <userinput>EOF</userinput></screen></para>
|
---|
38 |
|
---|
39 | </sect1>
|
---|