source: networking/connect/dhcpcd.xml@ b7b9311

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 b7b9311 was b7b9311, checked in by Ragnar Thomsen <rthomsen@…>, 11 years ago

Dhcpcd 5.6.7

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

  • Property mode set to 100644
File size: 7.4 KB
RevLine 
[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">
[232e46a]8 <!ENTITY dhcpcd-download-ftp "ftp://ftp.osuosl.org/pub/gentoo/distfiles/dhcpcd-&dhcpcd-version;.tar.bz2">
[b7b9311]9 <!ENTITY dhcpcd-md5sum "998bcc3a47fbb2b0f91f8986d4b68345">
10 <!ENTITY dhcpcd-size "86 KB">
11 <!ENTITY dhcpcd-buildsize "1.0 MB">
[ed4e5b4]12 <!ENTITY dhcpcd-time "less than 0.1 SBU">
[246c904]13]>
14
[fd680fb]15<sect1 id="dhcpcd" xreflabel="dhcpcd-&dhcpcd-version;">
[820d164a]16 <?dbhtml filename="dhcpcd.html"?>
[4839c17]17
[820d164a]18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
[4839c17]22
[add19ff9]23 <title>dhcpcd-&dhcpcd-version;</title>
[4839c17]24
[820d164a]25 <indexterm zone="dhcpcd">
[add19ff9]26 <primary sortas="a-dhcpcd">dhcpcd</primary>
[820d164a]27 </indexterm>
28
29 <sect2 role="package">
[add19ff9]30 <title>Introduction to dhcpcd</title>
[820d164a]31
[add19ff9]32 <para><application>dhcpcd</application> is an implementation of the
[5aac2b97]33 DHCP client specified in RFC2131. A DHCP client is useful for connecting
[232e46a]34 your computer to a network which uses DHCP to assign network
[5aac2b97]35 addresses. dhcpcd strives to be a fully featured, yet very lightweight
36 DHCP client.</para>
[4839c17]37
[302b2386]38 &lfs72_checked;
[77ac0f23]39
[820d164a]40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
43 <para>Download (HTTP): <ulink url="&dhcpcd-download-http;"/></para>
44 </listitem>
45 <listitem>
46 <para>Download (FTP): <ulink url="&dhcpcd-download-ftp;"/></para>
47 </listitem>
48 <listitem>
49 <para>Download MD5 sum: &dhcpcd-md5sum;</para>
50 </listitem>
51 <listitem>
52 <para>Download size: &dhcpcd-size;</para>
53 </listitem>
54 <listitem>
55 <para>Estimated disk space required: &dhcpcd-buildsize;</para>
56 </listitem>
57 <listitem>
58 <para>Estimated build time: &dhcpcd-time;</para>
59 </listitem>
60 </itemizedlist>
[4839c17]61
[7e1f3aa]62 <para condition="html" role="usernotes">User Notes:
63 <ulink url="&blfs-wiki;/dhcpcd"/></para>
64
[820d164a]65 </sect2>
[4839c17]66
[820d164a]67 <sect2 role="installation">
[add19ff9]68 <title>Installation of dhcpcd</title>
[820d164a]69
[893d9711]70 <para>Install <application>dhcpcd</application> by running the following
[f9a784a]71 commands:</para>
[820d164a]72
[f0740ab]73<screen><userinput>./configure --libexecdir=/lib/dhcpcd \
74 --dbdir=/run \
75 --sysconfdir=/etc &amp;&amp;
76make</userinput></screen>
[f9a784a]77
78 <para>This package does not come with a test suite.</para>
79
80 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
81
[f0740ab]82<screen><userinput>make install</userinput></screen>
[4839c17]83
[a41f643]84 <para>By default, a plain text lease info file isn't created but the
[fefa337]85 <application>dhcpcd</application> provides a hook which can be used for creating
86 such a file. Install the hook by running the following
87 commands as the <systemitem class="username">root</systemitem> user:</para>
[232e46a]88
[f0740ab]89<screen><userinput>sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &amp;&amp;
[f9a784a]90install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/</userinput></screen>
[4839c17]91
[820d164a]92 </sect2>
[4839c17]93
[820d164a]94 <sect2 role="configuration">
[add19ff9]95 <title>Configuring dhcpcd</title>
[820d164a]96
97 <sect3 id="dhcpcd-config">
98 <title>Config Files</title>
[4839c17]99
[5aac2b97]100 <para><filename>/etc/dhcpcd.conf</filename></para>
[4839c17]101
[820d164a]102 <indexterm zone="dhcpcd dhcpcd-config">
[fefa337]103 <primary sortas="e-etc-dhcpcd-dhcpcd-conf">/etc/dhcpcd/dhcpcd.conf</primary>
[820d164a]104 </indexterm>
[4839c17]105
[820d164a]106 </sect3>
107
108 <sect3 id="dhcpcd-init">
109 <title>Configuration Information</title>
110
111 <para>To configure <command>dhcpcd</command>, you need to first install
112 the network service script,
[f0740ab]113 <filename>/lib/services/dhcpcd</filename>
[5254d12]114 included in the <xref linkend="bootscripts"/> package
[820d164a]115 (as user <systemitem class="username">root</systemitem>):</para>
[4839c17]116
[820d164a]117 <indexterm zone="dhcpcd dhcpcd-init">
118 <primary sortas="f-dhcpcd">dhcpcd (service script)</primary>
119 </indexterm>
120
121<screen role='root'><userinput>make install-service-dhcpcd</userinput></screen>
122
[232e46a]123 <para>Whenever <command>dhcpcd</command> configures or shuts down
[fefa337]124 a network interface, it executes hook scripts. For more details
[f0740ab]125 about those scripts, see the <command>dhcpcd-run-hooks</command> and
126 <command>dhcpcd</command> man pages.</para>
[232e46a]127
[893d9711]128 <para id="dhcpcd-config2">Finally, as the <systemitem
[820d164a]129 class="username">root</systemitem> user create the
[f0740ab]130 <filename>/etc/sysconfig/ifconfig.eth0</filename>
[893d9711]131 configuration file using the following commands. Adjust appropriately
[820d164a]132 for additional interfaces:</para>
[4839c17]133
[820d164a]134 <indexterm zone="dhcpcd dhcpcd-config2">
[f0740ab]135 <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary>
[820d164a]136 </indexterm>
137
[f0740ab]138<screen role='root'><userinput>cat &gt; /etc/sysconfig/ifconfig.eth0 &lt;&lt; "EOF"
[820d164a]139<literal>ONBOOT="yes"
[f0740ab]140IFACE="eth0"
[afa198d]141SERVICE="dhcpcd"
[5aac2b97]142DHCP_START="-b -q <replaceable>&lt;insert appropriate start options here&gt;</replaceable>"
[f0740ab]143DHCP_STOP="-k <replaceable>&lt;insert additional stop options here&gt;</replaceable>"</literal>
[820d164a]144EOF</userinput></screen>
145
[893d9711]146 <para>For more information on the appropriate <envar>DHCP_START</envar> and
147 <envar>DHCP_STOP</envar> values, examine the man page for
[820d164a]148 <command>dhcpcd</command>.</para>
[4839c17]149
[820d164a]150 <note>
[f0740ab]151
152 <para id="dhcpcd-config3">The default behavior of
153 <command>dhcpcd</command> sets the hostname and mtu settings. It also
154 overwrites <filename>/etc/resolv.conf</filename> and
155 <filename>/etc/ntp.conf</filename>.
156
157 These modifications to system files and settings on system
158 configuration files are done by hooks which are stored in <filename
159 class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.
160
161 Setup <command>dhcpcd</command> by removing or adding hooks from/to
162 that directory. The execution of hooks can be disabled by using the
163 <option>--nohook</option> (<option>-C</option>) command line option or
164 by the <option>nohook</option> option in the
165 <filename>/etc/dhcpcd.conf</filename> file.</para>
166
167 <para>Review the <command>dhcpcd</command> man page for switches to add
168 to the <envar>DHCP_START</envar> value.</para>
169
[820d164a]170 </note>
[4839c17]171
[820d164a]172 <indexterm zone="dhcpcd dhcpcd-config3">
173 <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
174 </indexterm>
175 </sect3>
[4839c17]176
[820d164a]177 </sect2>
[4839c17]178
[820d164a]179 <sect2 role="content">
180 <title>Contents</title>
181
182 <segmentedlist>
183 <segtitle>Installed Program</segtitle>
184 <segtitle>Installed Libraries</segtitle>
[b1d305ed]185 <segtitle>Installed Directory</segtitle>
[4839c17]186
[820d164a]187 <seglistitem>
188 <seg>dhcpcd</seg>
[eb65262f]189 <seg>none</seg>
[f0740ab]190 <seg>/lib/dhcpcd</seg>
[820d164a]191 </seglistitem>
192 </segmentedlist>
[4839c17]193
[820d164a]194 <variablelist>
195 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
196 <?dbfo list-presentation="list"?>
197 <?dbhtml list-presentation="table"?>
[4839c17]198
[820d164a]199 <varlistentry id="dhcpcd-prog">
200 <term><command>dhcpcd</command></term>
201 <listitem>
[232e46a]202 <para>is an implementation of the DHCP client specified
[f9a784a]203 in RFC2131.</para>
[820d164a]204 <indexterm zone="dhcpcd dhcpcd-prog">
205 <primary sortas="b-dhcpcd">dhcpcd</primary>
206 </indexterm>
207 </listitem>
208 </varlistentry>
[4839c17]209
[820d164a]210 </variablelist>
211
212 </sect2>
[f45b1953]213
214</sect1>
Note: See TracBrowser for help on using the repository browser.