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