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