[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;
|
---|
[14d6b3e0] | 6 |
|
---|
[246c904] | 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 |
|
---|
[f45b1953] | 14 | <sect1 id="dhcpcd" xreflabel="dhcpcd-&dhcpcd-version;">
|
---|
[00bb024c] | 15 | <?dbhtml filename="dhcpcd.html"?>
|
---|
[f45b1953] | 16 | <title>dhcpcd-&dhcpcd-version;</title>
|
---|
| 17 |
|
---|
[246c904] | 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'>
|
---|
[07b157f4] | 41 | <listitem><para>Required Patch:
|
---|
[14d6b3e0] | 42 | <ulink url="&patch-root;/dhcpcd-&dhcpcd-version;-fhs-1.patch"/></para></listitem>
|
---|
[246c904] | 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 |
|
---|
[14d6b3e0] | 92 | <para><parameter>--mandir=/usr/share/man</parameter>: This command installs
|
---|
| 93 | the man pages to the <filename class="directory">/usr/share/man</filename>
|
---|
[246c904] | 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 |
|
---|
[afa198d] | 113 | <para>Finally, create the
|
---|
| 114 | <filename>/etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd</filename>
|
---|
| 115 | configuration file using the following commands. Adjust appropriately
|
---|
| 116 | for additional interfaces.</para>
|
---|
| 117 |
|
---|
| 118 | <screen><userinput><command>install -d /etc/sysconfig/network-devices/ifconfig.eth0 &&
|
---|
| 119 | cat > /etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd << "EOF"</command>
|
---|
| 120 | ONBOOT="yes"
|
---|
| 121 | SERVICE="dhcpcd"
|
---|
[246c904] | 122 | DHCP_START="<replaceable>[insert appropriate start options here]</replaceable>"
|
---|
[afa198d] | 123 | DHCP_STOP="-k <replaceable>[insert additional stop options here]</replaceable>"
|
---|
[246c904] | 124 | <command>EOF</command></userinput></screen>
|
---|
| 125 |
|
---|
| 126 | <para>For more information on the appropriate
|
---|
| 127 | <envar>DHCP_START</envar> and <envar>DHCP_STOP</envar>
|
---|
| 128 | values, examine the man page for <command>dhcpcd</command>.</para>
|
---|
| 129 |
|
---|
[802e6fe7] | 130 | <note><para>The default behavior of <command>dhcpcd</command> is to overwrite
|
---|
[afa198d] | 131 | (after making backup copies) <filename>/etc/resolv.conf</filename>,
|
---|
| 132 | <filename>/etc/yp.conf</filename> and <filename>/etc/ntp.conf</filename>
|
---|
| 133 | with new files containing information from the <acronym>DHCP</acronym>
|
---|
| 134 | server. If this is undesirable, review the <command>dhcpcd</command>
|
---|
| 135 | man page for switches to add to the <envar>DHCP_START</envar>
|
---|
[802e6fe7] | 136 | value.</para></note>
|
---|
[246c904] | 137 |
|
---|
| 138 | </sect3>
|
---|
| 139 |
|
---|
| 140 | </sect2>
|
---|
| 141 |
|
---|
| 142 | <sect2>
|
---|
| 143 | <title>Contents</title>
|
---|
| 144 |
|
---|
[14d6b3e0] | 145 | <para>The <application>dhcpcd</application> package contains
|
---|
| 146 | <command>dhcpcd</command>.</para>
|
---|
[246c904] | 147 |
|
---|
| 148 | </sect2>
|
---|
| 149 |
|
---|
| 150 | <sect2><title>Description</title>
|
---|
| 151 |
|
---|
| 152 | <sect3><title>dhcpcd</title>
|
---|
[9a6caf3c] | 153 | <para><command>dhcpcd</command> is an implementation of the
|
---|
| 154 | <acronym>DHCP</acronym> client specified in <acronym>RFC</acronym>2131 and
|
---|
[246c904] | 155 | <acronym>RFC</acronym>1541 (depending on which options are specified).</para>
|
---|
| 156 | </sect3>
|
---|
| 157 |
|
---|
| 158 | </sect2>
|
---|
[f45b1953] | 159 |
|
---|
| 160 | </sect1>
|
---|
| 161 |
|
---|