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 | <!ENTITY dhcpcd-download-http "http://www.phystech.com/ftp/dhcpcd-&dhcpcd-version;.tar.gz">
|
---|
8 | <!ENTITY dhcpcd-download-ftp "ftp://ftp.phystech.com/pub/dhcpcd-&dhcpcd-version;.tar.gz">
|
---|
9 | <!ENTITY dhcpcd-size "145 KB">
|
---|
10 | <!ENTITY dhcpcd-buildsize "868 KB">
|
---|
11 | <!ENTITY dhcpcd-time "0.04 SBU">
|
---|
12 | ]>
|
---|
13 |
|
---|
14 | <sect1 id="dhcpcd" xreflabel="dhcpcd-&dhcpcd-version;">
|
---|
15 | <?dbhtml filename="dhcpcd.html"?>
|
---|
16 | <title>dhcpcd-&dhcpcd-version;</title>
|
---|
17 |
|
---|
18 | <sect2>
|
---|
19 | <title>Introduction to <application>dhcpcd</application></title>
|
---|
20 |
|
---|
21 | <para>The <application>dhcpcd</application> package contains the
|
---|
22 | <command>dhcpcd</command> client. This is useful for connecting your computer
|
---|
23 | to a network which uses <acronym>DHCP</acronym> to assign network addresses.
|
---|
24 | </para>
|
---|
25 |
|
---|
26 | <sect3><title>Package information</title>
|
---|
27 | <itemizedlist spacing='compact'>
|
---|
28 | <listitem><para>Download (HTTP): <ulink
|
---|
29 | url="&dhcpcd-download-http;"/></para></listitem>
|
---|
30 | <listitem><para>Download (FTP): <ulink
|
---|
31 | url="&dhcpcd-download-ftp;"/></para></listitem>
|
---|
32 | <listitem><para>Download size: &dhcpcd-size;</para></listitem>
|
---|
33 | <listitem><para>Estimated Disk space required:
|
---|
34 | &dhcpcd-buildsize;</para></listitem>
|
---|
35 | <listitem><para>Estimated build time:
|
---|
36 | &dhcpcd-time;</para></listitem></itemizedlist>
|
---|
37 | </sect3>
|
---|
38 |
|
---|
39 | <sect3><title>Additional downloads</title>
|
---|
40 | <itemizedlist spacing='compact'>
|
---|
41 | <listitem><para>Required Patch:
|
---|
42 | <ulink url="&patch-root;/dhcpcd-&dhcpcd-version;-fhs-1.patch"/></para></listitem>
|
---|
43 | </itemizedlist>
|
---|
44 | </sect3>
|
---|
45 |
|
---|
46 | </sect2>
|
---|
47 |
|
---|
48 | <sect2>
|
---|
49 | <title>Installation of <application>dhcpcd</application></title>
|
---|
50 |
|
---|
51 | <para>Install <application>dhcpcd</application> by running the following
|
---|
52 | commands:</para>
|
---|
53 |
|
---|
54 | <screen><userinput><command>patch -Np1 -i ../dhcpcd-&dhcpcd-version;-fhs-1.patch &&
|
---|
55 | ./configure --prefix="" --sysconfdir=/var/lib \
|
---|
56 | --mandir=/usr/share/man &&
|
---|
57 | make &&
|
---|
58 | make install</command></userinput></screen>
|
---|
59 |
|
---|
60 | </sect2>
|
---|
61 |
|
---|
62 | <sect2>
|
---|
63 | <title>Command explanations</title>
|
---|
64 |
|
---|
65 | <para><command>patch -Np1 -i ../dhcpcd-&dhcpcd-version;-fhs-1.patch
|
---|
66 | </command>: <application>Dhcpcd</application> unpatched puts all configuration
|
---|
67 | and temporary files in <filename>/etc/dhcpc</filename>. This becomes very
|
---|
68 | annoying when <application>dhcpcd</application> tells you it's running and it's
|
---|
69 | not. You look in <filename class="directory">/var/run</filename> for
|
---|
70 | the <filename>PID</filename> file, but it's not
|
---|
71 | there, the <filename>PID</filename> file that needs deleting is in
|
---|
72 | <filename class="directory">/etc/dhcpc</filename>.
|
---|
73 | This patch brings this program into <acronym>FHS</acronym> compliance, but more
|
---|
74 | importantly, puts files where you expect them to be.</para>
|
---|
75 |
|
---|
76 | <para><parameter>--prefix=""</parameter>: There may be a good reason for
|
---|
77 | abandoning the normal <acronym>BLFS</acronym> convention of using
|
---|
78 | <parameter>--prefix=/usr</parameter> here. If you are installing
|
---|
79 | <acronym>DHCP</acronym>, it is likely that it is
|
---|
80 | required during the boot process and
|
---|
81 | <filename class="directory">/usr</filename> may be network
|
---|
82 | mounted, in which case <command>dhcpcd</command> wouldn't be available due to
|
---|
83 | being on the network! Therefore, depending on your situation, you may want it
|
---|
84 | to be installed in <filename class="directory">/sbin</filename> or
|
---|
85 | <filename class="directory">/usr/sbin</filename>. This command installs to
|
---|
86 | <filename class="directory">/sbin</filename>.</para>
|
---|
87 |
|
---|
88 | <para><parameter>--sysconfdir=/var/lib</parameter>: This command installs
|
---|
89 | configuration files in the <filename class="directory">/var/lib</filename>
|
---|
90 | directory.</para>
|
---|
91 |
|
---|
92 | <para><parameter>--mandir=/usr/share/man</parameter>: This command installs
|
---|
93 | the man pages to the <filename class="directory">/usr/share/man</filename>
|
---|
94 | directory.</para>
|
---|
95 |
|
---|
96 | </sect2>
|
---|
97 |
|
---|
98 | <sect2>
|
---|
99 | <title>Configuring <application>dhcpcd</application></title>
|
---|
100 |
|
---|
101 | <sect3><title>Config files</title>
|
---|
102 | <para><filename>/var/lib/dhcpc/*</filename></para></sect3>
|
---|
103 |
|
---|
104 | <sect3><title>Configuration Information</title>
|
---|
105 |
|
---|
106 | <para>To configure <command>dhcpcd</command>, you need to first install
|
---|
107 | the network service script,
|
---|
108 | <filename>/etc/sysconfig/network-devices/services/dhcpcd</filename>
|
---|
109 | included in the <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
110 |
|
---|
111 | <screen><userinput><command>make install-service-dhcpcd</command></userinput></screen>
|
---|
112 |
|
---|
113 | <note><para>The default behavior of <command>dhcpcd</command> is to overwrite
|
---|
114 | (after making backup copies) <filename>/etc/resolv.conf</filename>,
|
---|
115 | <filename>/etc/yp.conf</filename> and <filename>/etc/ntp.conf</filename> with
|
---|
116 | new files containing information from the <acronym>DHCP</acronym> server. If
|
---|
117 | this is undesirable, review the <command>dhcpcd</command> man page for
|
---|
118 | switches to add to the <command>dhcpcd</command> command in the network
|
---|
119 | service script.</para></note>
|
---|
120 |
|
---|
121 | <para>Now create the <filename>ifconfig.eth0</filename> configuration
|
---|
122 | file using the following commands. Adjust appropriately for additional
|
---|
123 | interfaces.</para>
|
---|
124 |
|
---|
125 | <para><emphasis>Note:</emphasis> This will overwrite any existing file.</para>
|
---|
126 |
|
---|
127 | <screen><userinput><command>cat > /etc/sysconfig/network-devices/ifconfig.eth0 << "EOF"</command>
|
---|
128 | ONBOOT=yes
|
---|
129 | DHCP_START="<replaceable>[insert appropriate start options here]</replaceable>"
|
---|
130 | DHCP_STOP="-k <replaceable>[insert other stop options here]</replaceable>"
|
---|
131 | SERVICE=dhcpcd
|
---|
132 | <command>EOF</command></userinput></screen>
|
---|
133 |
|
---|
134 | <para>For more information on the appropriate
|
---|
135 | <envar>DHCP_START</envar> and <envar>DHCP_STOP</envar>
|
---|
136 | values, examine the man page for <command>dhcpcd</command>.</para>
|
---|
137 |
|
---|
138 | <para>Finally, if the <acronym>DHCP</acronym> configured interface is
|
---|
139 | used as your default gateway, you should remove the GATEWAY and GATEWAY_IF
|
---|
140 | variables from <filename>/etc/sysconfig/network</filename>: </para>
|
---|
141 |
|
---|
142 | <screen><userinput><command>sed -i "s/GATEWAY/#&/" /etc/sysconfig/network</command></userinput></screen>
|
---|
143 |
|
---|
144 | </sect3>
|
---|
145 |
|
---|
146 | </sect2>
|
---|
147 |
|
---|
148 | <sect2>
|
---|
149 | <title>Contents</title>
|
---|
150 |
|
---|
151 | <para>The <application>dhcpcd</application> package contains
|
---|
152 | <command>dhcpcd</command>.</para>
|
---|
153 |
|
---|
154 | </sect2>
|
---|
155 |
|
---|
156 | <sect2><title>Description</title>
|
---|
157 |
|
---|
158 | <sect3><title>dhcpcd</title>
|
---|
159 | <para><command>dhcpcd</command> is an implementation of the
|
---|
160 | <acronym>DHCP</acronym> client specified in <acronym>RFC</acronym>2131 and
|
---|
161 | <acronym>RFC</acronym>1541 (depending on which options are specified).</para>
|
---|
162 | </sect3>
|
---|
163 |
|
---|
164 | </sect2>
|
---|
165 |
|
---|
166 | </sect1>
|
---|
167 |
|
---|