[246c904] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[246c904] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
[14d6b3e0] | 6 |
|
---|
[fefa337] | 7 | <!ENTITY dhcpcd-download-http "http://roy.marples.name/downloads/dhcpcd/dhcpcd-&dhcpcd-version;.tar.bz2">
|
---|
[a27a478] | 8 | <!ENTITY dhcpcd-download-ftp " ">
|
---|
| 9 | <!--<!ENTITY dhcpcd-download-ftp "ftp://ftp.osuosl.org/pub/gentoo/distfiles/dhcpcd-&dhcpcd-version;.tar.bz2">-->
|
---|
| 10 | <!ENTITY dhcpcd-md5sum "214483a069b5e8b3b96371755eaa1b18">
|
---|
[e5f38d6b] | 11 | <!ENTITY dhcpcd-size "120 KB">
|
---|
| 12 | <!ENTITY dhcpcd-buildsize "1.8 MB">
|
---|
[ed4e5b4] | 13 | <!ENTITY dhcpcd-time "less than 0.1 SBU">
|
---|
[246c904] | 14 | ]>
|
---|
| 15 |
|
---|
[fd680fb] | 16 | <sect1 id="dhcpcd" xreflabel="dhcpcd-&dhcpcd-version;">
|
---|
[820d164a] | 17 | <?dbhtml filename="dhcpcd.html"?>
|
---|
[4839c17] | 18 |
|
---|
[820d164a] | 19 | <sect1info>
|
---|
| 20 | <othername>$LastChangedBy$</othername>
|
---|
| 21 | <date>$Date$</date>
|
---|
| 22 | </sect1info>
|
---|
[4839c17] | 23 |
|
---|
[add19ff9] | 24 | <title>dhcpcd-&dhcpcd-version;</title>
|
---|
[4839c17] | 25 |
|
---|
[820d164a] | 26 | <indexterm zone="dhcpcd">
|
---|
[add19ff9] | 27 | <primary sortas="a-dhcpcd">dhcpcd</primary>
|
---|
[820d164a] | 28 | </indexterm>
|
---|
| 29 |
|
---|
| 30 | <sect2 role="package">
|
---|
[add19ff9] | 31 | <title>Introduction to dhcpcd</title>
|
---|
[820d164a] | 32 |
|
---|
[add19ff9] | 33 | <para><application>dhcpcd</application> is an implementation of the
|
---|
[5aac2b97] | 34 | DHCP client specified in RFC2131. A DHCP client is useful for connecting
|
---|
[232e46a] | 35 | your computer to a network which uses DHCP to assign network
|
---|
[0d7900a] | 36 | addresses. dhcpcd strives to be a fully featured, yet very lightweight
|
---|
[5aac2b97] | 37 | DHCP client.</para>
|
---|
[4839c17] | 38 |
|
---|
[283bd88] | 39 | &lfs74_checked;
|
---|
[77ac0f23] | 40 |
|
---|
[820d164a] | 41 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 42 | <itemizedlist spacing="compact">
|
---|
| 43 | <listitem>
|
---|
| 44 | <para>Download (HTTP): <ulink url="&dhcpcd-download-http;"/></para>
|
---|
| 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>Download (FTP): <ulink url="&dhcpcd-download-ftp;"/></para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>Download MD5 sum: &dhcpcd-md5sum;</para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>Download size: &dhcpcd-size;</para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Estimated disk space required: &dhcpcd-buildsize;</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
| 59 | <para>Estimated build time: &dhcpcd-time;</para>
|
---|
| 60 | </listitem>
|
---|
| 61 | </itemizedlist>
|
---|
[4839c17] | 62 |
|
---|
[7e1f3aa] | 63 | <para condition="html" role="usernotes">User Notes:
|
---|
| 64 | <ulink url="&blfs-wiki;/dhcpcd"/></para>
|
---|
| 65 |
|
---|
[820d164a] | 66 | </sect2>
|
---|
[4839c17] | 67 |
|
---|
[820d164a] | 68 | <sect2 role="installation">
|
---|
[add19ff9] | 69 | <title>Installation of dhcpcd</title>
|
---|
[820d164a] | 70 |
|
---|
[893d9711] | 71 | <para>Install <application>dhcpcd</application> by running the following
|
---|
[f9a784a] | 72 | commands:</para>
|
---|
[820d164a] | 73 |
|
---|
[f0740ab] | 74 | <screen><userinput>./configure --libexecdir=/lib/dhcpcd \
|
---|
| 75 | --dbdir=/run \
|
---|
| 76 | --sysconfdir=/etc &&
|
---|
| 77 | make</userinput></screen>
|
---|
[f9a784a] | 78 |
|
---|
| 79 | <para>This package does not come with a test suite.</para>
|
---|
| 80 |
|
---|
| 81 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 82 |
|
---|
[f0740ab] | 83 | <screen><userinput>make install</userinput></screen>
|
---|
[4839c17] | 84 |
|
---|
[a41f643] | 85 | <para>By default, a plain text lease info file isn't created but the
|
---|
[a1d3648] | 86 | <application>dhcpcd</application> provides a hook which can be used for creating
|
---|
| 87 | such a file. Install the hook by running the following
|
---|
| 88 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[232e46a] | 89 |
|
---|
[f0740ab] | 90 | <screen><userinput>sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &&
|
---|
[f9a784a] | 91 | install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/</userinput></screen>
|
---|
[4839c17] | 92 |
|
---|
[820d164a] | 93 | </sect2>
|
---|
[4839c17] | 94 |
|
---|
[820d164a] | 95 | <sect2 role="configuration">
|
---|
[add19ff9] | 96 | <title>Configuring dhcpcd</title>
|
---|
[820d164a] | 97 |
|
---|
| 98 | <sect3 id="dhcpcd-config">
|
---|
| 99 | <title>Config Files</title>
|
---|
[4839c17] | 100 |
|
---|
[5aac2b97] | 101 | <para><filename>/etc/dhcpcd.conf</filename></para>
|
---|
[4839c17] | 102 |
|
---|
[820d164a] | 103 | <indexterm zone="dhcpcd dhcpcd-config">
|
---|
[fefa337] | 104 | <primary sortas="e-etc-dhcpcd-dhcpcd-conf">/etc/dhcpcd/dhcpcd.conf</primary>
|
---|
[820d164a] | 105 | </indexterm>
|
---|
[4839c17] | 106 |
|
---|
[820d164a] | 107 | </sect3>
|
---|
| 108 |
|
---|
| 109 | <sect3 id="dhcpcd-init">
|
---|
[e5f38d6b] | 110 | <title>General Configuration Information</title>
|
---|
[820d164a] | 111 |
|
---|
| 112 | <para>To configure <command>dhcpcd</command>, you need to first install
|
---|
| 113 | the network service script,
|
---|
[f0740ab] | 114 | <filename>/lib/services/dhcpcd</filename>
|
---|
[5254d12] | 115 | included in the <xref linkend="bootscripts"/> package
|
---|
[820d164a] | 116 | (as user <systemitem class="username">root</systemitem>):</para>
|
---|
[4839c17] | 117 |
|
---|
[820d164a] | 118 | <indexterm zone="dhcpcd dhcpcd-init">
|
---|
| 119 | <primary sortas="f-dhcpcd">dhcpcd (service script)</primary>
|
---|
| 120 | </indexterm>
|
---|
| 121 |
|
---|
| 122 | <screen role='root'><userinput>make install-service-dhcpcd</userinput></screen>
|
---|
| 123 |
|
---|
[232e46a] | 124 | <para>Whenever <command>dhcpcd</command> configures or shuts down
|
---|
[fefa337] | 125 | a network interface, it executes hook scripts. For more details
|
---|
[f0740ab] | 126 | about those scripts, see the <command>dhcpcd-run-hooks</command> and
|
---|
| 127 | <command>dhcpcd</command> man pages.</para>
|
---|
[232e46a] | 128 |
|
---|
[893d9711] | 129 | <para id="dhcpcd-config2">Finally, as the <systemitem
|
---|
[820d164a] | 130 | class="username">root</systemitem> user create the
|
---|
[f0740ab] | 131 | <filename>/etc/sysconfig/ifconfig.eth0</filename>
|
---|
[893d9711] | 132 | configuration file using the following commands. Adjust appropriately
|
---|
[820d164a] | 133 | for additional interfaces:</para>
|
---|
[4839c17] | 134 |
|
---|
[820d164a] | 135 | <indexterm zone="dhcpcd dhcpcd-config2">
|
---|
[f0740ab] | 136 | <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary>
|
---|
[820d164a] | 137 | </indexterm>
|
---|
| 138 |
|
---|
[f0740ab] | 139 | <screen role='root'><userinput>cat > /etc/sysconfig/ifconfig.eth0 << "EOF"
|
---|
[820d164a] | 140 | <literal>ONBOOT="yes"
|
---|
[f0740ab] | 141 | IFACE="eth0"
|
---|
[afa198d] | 142 | SERVICE="dhcpcd"
|
---|
[5aac2b97] | 143 | DHCP_START="-b -q <replaceable><insert appropriate start options here></replaceable>"
|
---|
[f0740ab] | 144 | DHCP_STOP="-k <replaceable><insert additional stop options here></replaceable>"</literal>
|
---|
[820d164a] | 145 | EOF</userinput></screen>
|
---|
| 146 |
|
---|
[893d9711] | 147 | <para>For more information on the appropriate <envar>DHCP_START</envar> and
|
---|
| 148 | <envar>DHCP_STOP</envar> values, examine the man page for
|
---|
[820d164a] | 149 | <command>dhcpcd</command>.</para>
|
---|
[4839c17] | 150 |
|
---|
[820d164a] | 151 | <note>
|
---|
[f0740ab] | 152 |
|
---|
| 153 | <para id="dhcpcd-config3">The default behavior of
|
---|
| 154 | <command>dhcpcd</command> sets the hostname and mtu settings. It also
|
---|
| 155 | overwrites <filename>/etc/resolv.conf</filename> and
|
---|
[0d7900a] | 156 | <filename>/etc/ntp.conf</filename>.
|
---|
| 157 |
|
---|
[f0740ab] | 158 | These modifications to system files and settings on system
|
---|
| 159 | configuration files are done by hooks which are stored in <filename
|
---|
| 160 | class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
|
---|
[0d7900a] | 161 |
|
---|
[f0740ab] | 162 | Setup <command>dhcpcd</command> by removing or adding hooks from/to
|
---|
| 163 | that directory. The execution of hooks can be disabled by using the
|
---|
| 164 | <option>--nohook</option> (<option>-C</option>) command line option or
|
---|
| 165 | by the <option>nohook</option> option in the
|
---|
[0d7900a] | 166 | <filename>/etc/dhcpcd.conf</filename> file.</para>
|
---|
| 167 |
|
---|
[f0740ab] | 168 | <para>Review the <command>dhcpcd</command> man page for switches to add
|
---|
[0d7900a] | 169 | to the <envar>DHCP_START</envar> value.</para>
|
---|
| 170 |
|
---|
[820d164a] | 171 | </note>
|
---|
[4839c17] | 172 |
|
---|
[820d164a] | 173 | <indexterm zone="dhcpcd dhcpcd-config3">
|
---|
| 174 | <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
|
---|
| 175 | </indexterm>
|
---|
| 176 | </sect3>
|
---|
[4839c17] | 177 |
|
---|
[e5f38d6b] | 178 | <sect3 id="dhcpcd-init2">
|
---|
| 179 | <title>Configuration Information: fixed ip</title>
|
---|
| 180 |
|
---|
| 181 | <para id="dhcpcd-config4">Although not usual, it is possible that you need
|
---|
| 182 | to configure <application>dhcpcd</application> to use a fixed ip. Here,
|
---|
| 183 | we give an example. As the
|
---|
| 184 | <systemitem class="username">root</systemitem> user create the
|
---|
| 185 | <filename>/etc/sysconfig/ifconfig.eth0</filename> configuration file
|
---|
| 186 | using the following commands. Adjust appropriately for additional
|
---|
| 187 | interfaces and for the actual ip and router you need:</para>
|
---|
| 188 |
|
---|
| 189 | <indexterm zone="dhcpcd dhcpcd-config4">
|
---|
| 190 | <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary>
|
---|
| 191 | </indexterm>
|
---|
| 192 |
|
---|
| 193 | <screen role='root'><userinput>cat > /etc/sysconfig/ifconfig.eth0 << "EOF"
|
---|
| 194 | <literal>ONBOOT="yes"
|
---|
| 195 | IFACE="eth0"
|
---|
| 196 | SERVICE="dhcpcd"
|
---|
| 197 | DHCP_START="-b -q -S ip_address=192.168.0.10/24 -S routers=192.168.0.1"
|
---|
| 198 | DHCP_STOP="-k"</literal>
|
---|
| 199 | EOF</userinput></screen>
|
---|
| 200 |
|
---|
[0ecb3b77] | 201 | <para>You can either use the DNS servers used in
|
---|
| 202 | <filename>/etc/resolv.conf</filename> by another system, use your
|
---|
| 203 | preferred servers, or just use the example
|
---|
| 204 | <filename>/etc/resolv.conf.head</filename> file below as is:</para>
|
---|
[e5f38d6b] | 205 |
|
---|
| 206 | <screen role='root'><userinput>cat > /etc/resolv.conf.head << "EOF"
|
---|
| 207 | <literal># OpenDNS servers
|
---|
| 208 | nameserver 208.67.222.222
|
---|
| 209 | nameserver 208.67.220.220</literal>
|
---|
| 210 | EOF</userinput></screen>
|
---|
| 211 |
|
---|
| 212 | </sect3>
|
---|
| 213 |
|
---|
[820d164a] | 214 | </sect2>
|
---|
[4839c17] | 215 |
|
---|
[820d164a] | 216 | <sect2 role="content">
|
---|
| 217 | <title>Contents</title>
|
---|
| 218 |
|
---|
| 219 | <segmentedlist>
|
---|
| 220 | <segtitle>Installed Program</segtitle>
|
---|
| 221 | <segtitle>Installed Libraries</segtitle>
|
---|
[b1d305ed] | 222 | <segtitle>Installed Directory</segtitle>
|
---|
[4839c17] | 223 |
|
---|
[820d164a] | 224 | <seglistitem>
|
---|
| 225 | <seg>dhcpcd</seg>
|
---|
[81f1de4] | 226 | <seg>/lib/dhcpcd/dev/udev.so</seg>
|
---|
[f0740ab] | 227 | <seg>/lib/dhcpcd</seg>
|
---|
[820d164a] | 228 | </seglistitem>
|
---|
| 229 | </segmentedlist>
|
---|
[4839c17] | 230 |
|
---|
[820d164a] | 231 | <variablelist>
|
---|
| 232 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 233 | <?dbfo list-presentation="list"?>
|
---|
| 234 | <?dbhtml list-presentation="table"?>
|
---|
[4839c17] | 235 |
|
---|
[820d164a] | 236 | <varlistentry id="dhcpcd-prog">
|
---|
| 237 | <term><command>dhcpcd</command></term>
|
---|
| 238 | <listitem>
|
---|
[232e46a] | 239 | <para>is an implementation of the DHCP client specified
|
---|
[f9a784a] | 240 | in RFC2131.</para>
|
---|
[820d164a] | 241 | <indexterm zone="dhcpcd dhcpcd-prog">
|
---|
| 242 | <primary sortas="b-dhcpcd">dhcpcd</primary>
|
---|
| 243 | </indexterm>
|
---|
| 244 | </listitem>
|
---|
| 245 | </varlistentry>
|
---|
[4839c17] | 246 |
|
---|
[81f1de4] | 247 | <varlistentry id="dhcpcd-udev">
|
---|
| 248 | <term><filename class="libraryfile">udev.so</filename></term>
|
---|
| 249 | <listitem>
|
---|
| 250 | <para>
|
---|
| 251 | add udev support for interface arrival and departure; this is
|
---|
| 252 | because udev likes to rename the interface, which it can't do if
|
---|
| 253 | dhcpcd grabs it first.
|
---|
| 254 | </para>
|
---|
| 255 | <indexterm zone="dhcpcd dhcpcd-udev">
|
---|
| 256 | <primary sortas="c-dhcpcd-udev">udev.so</primary>
|
---|
| 257 | </indexterm>
|
---|
| 258 | </listitem>
|
---|
| 259 | </varlistentry>
|
---|
| 260 |
|
---|
[820d164a] | 261 | </variablelist>
|
---|
| 262 |
|
---|
| 263 | </sect2>
|
---|
[f45b1953] | 264 |
|
---|
| 265 | </sect1>
|
---|