[0931098] | 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;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY dhcp-download-http "http://gd.tuwien.ac.at/infosys/servers/isc/dhcp/dhcp-&dhcp-version;.tar.gz">
|
---|
| 8 | <!ENTITY dhcp-download-ftp "ftp://ftp.isc.org/isc/dhcp/dhcp-&dhcp-version;.tar.gz">
|
---|
[0fbab6b] | 9 | <!ENTITY dhcp-md5sum "44f72d16a12acc3fbe09703157aa42d2">
|
---|
[0931098] | 10 | <!ENTITY dhcp-size "852 KB">
|
---|
| 11 | <!ENTITY dhcp-buildsize "29.6 MB">
|
---|
| 12 | <!ENTITY dhcp-time "0.23 SBU">
|
---|
| 13 | ]>
|
---|
| 14 |
|
---|
[40330fcd] | 15 | <sect1 id="dhcp" xreflabel="DHCP-&dhcp-version;">
|
---|
[a0f03b0] | 16 | <sect1info>
|
---|
[5cd0959d] | 17 | <othername>$LastChangedBy$</othername>
|
---|
| 18 | <date>$Date$</date>
|
---|
[a0f03b0] | 19 | </sect1info>
|
---|
[00bb024c] | 20 | <?dbhtml filename="dhcp.html"?>
|
---|
[40330fcd] | 21 | <title><acronym>DHCP</acronym>-&dhcp-version;</title>
|
---|
[f45b1953] | 22 |
|
---|
[0931098] | 23 | <sect2>
|
---|
[0fbab6b] | 24 | <title>Introduction to
|
---|
| 25 | <application><acronym>DHCP</acronym></application></title>
|
---|
[0931098] | 26 |
|
---|
| 27 | <para>The <application><acronym>DHCP</acronym></application> package contains
|
---|
| 28 | both the client and server programs for <acronym>DHCP</acronym>.
|
---|
| 29 | <command>dhclient</command> (the client) is useful for connecting your computer
|
---|
| 30 | to a network which uses <acronym>DHCP</acronym> to assign network addresses.
|
---|
| 31 | <command>dhcpd</command> (the server) is useful for assigning network addresses
|
---|
| 32 | on your private network.</para>
|
---|
| 33 |
|
---|
| 34 | <sect3><title>Package information</title>
|
---|
| 35 | <itemizedlist spacing='compact'>
|
---|
| 36 | <listitem><para>Download (HTTP): <ulink
|
---|
| 37 | url="&dhcp-download-http;"/></para></listitem>
|
---|
| 38 | <listitem><para>Download (FTP): <ulink
|
---|
| 39 | url="&dhcp-download-ftp;"/></para></listitem>
|
---|
[0fbab6b] | 40 | <listitem><para>Download MD5 sum: &dhcp-md5sum;</para></listitem>
|
---|
[0931098] | 41 | <listitem><para>Download size: &dhcp-size;</para></listitem>
|
---|
[518538f] | 42 | <listitem><para>Estimated disk space required:
|
---|
[0931098] | 43 | &dhcp-buildsize;</para></listitem>
|
---|
| 44 | <listitem><para>Estimated build time:
|
---|
| 45 | &dhcp-time;</para></listitem></itemizedlist>
|
---|
| 46 | </sect3>
|
---|
| 47 |
|
---|
[662602c] | 48 | <sect3><title><application>dhcp</application> dependencies</title>
|
---|
| 49 | <sect4><title>Required</title>
|
---|
[0fbab6b] | 50 | <para><xref linkend="net-tools"/> (you may omit
|
---|
| 51 | <application>net-tools</application> by using the following patch to utilize
|
---|
| 52 | <application>iproute2</application>: <ulink
|
---|
| 53 | url="&patch-root;/dhcp-&dhcp-version;-iproute2-1.patch"/>)</para>
|
---|
| 54 | </sect4>
|
---|
[fa052cc7] | 55 | </sect3>
|
---|
| 56 |
|
---|
[0931098] | 57 | </sect2>
|
---|
| 58 |
|
---|
| 59 | <sect2>
|
---|
[0fbab6b] | 60 | <title>Installation of
|
---|
| 61 | <application><acronym>DHCP</acronym></application></title>
|
---|
[0931098] | 62 |
|
---|
| 63 | <note><para>You must have Packet Socket support compiled in the kernel and
|
---|
| 64 | Socket Filtering either compiled in or as a kernel module.</para></note>
|
---|
[4774914f] | 65 |
|
---|
| 66 | <para>Install <application><acronym>DHCP</acronym></application> by running
|
---|
| 67 | the following commands:</para>
|
---|
[0931098] | 68 |
|
---|
[fa052cc7] | 69 | <screen><userinput><command>patch -Np1 -i ../dhcp-&dhcp-version;-iproute2-1.patch &&
|
---|
| 70 | ./configure &&
|
---|
[0931098] | 71 | make &&
|
---|
| 72 | make LIBDIR=/usr/lib INCDIR=/usr/include install</command></userinput></screen>
|
---|
| 73 |
|
---|
| 74 | </sect2>
|
---|
| 75 |
|
---|
| 76 | <sect2>
|
---|
| 77 | <title>Command explanations</title>
|
---|
| 78 |
|
---|
| 79 | <para><parameter>LIBDIR=/usr/lib INCDIR=/usr/include</parameter>: This
|
---|
[0fbab6b] | 80 | command installs the library and include files in
|
---|
| 81 | <filename class="directory">/usr</filename> instead of
|
---|
| 82 | <filename class="directory">/usr/local</filename>.</para>
|
---|
[0931098] | 83 |
|
---|
| 84 | </sect2>
|
---|
| 85 |
|
---|
| 86 | <sect2>
|
---|
| 87 | <title>Configuring <application><acronym>DHCP</acronym></application></title>
|
---|
| 88 |
|
---|
| 89 | <sect3><title>Config files</title>
|
---|
| 90 | <para><filename>/etc/dhclient.conf</filename></para>
|
---|
| 91 | </sect3>
|
---|
| 92 |
|
---|
| 93 | <sect3><title>Configuration Information</title>
|
---|
| 94 |
|
---|
| 95 | <para>Information on configuring the <acronym>DHCP</acronym> client can be
|
---|
| 96 | found in <xref linkend="connect-dhcp"/>.</para>
|
---|
| 97 |
|
---|
| 98 | <para>Note that you only need the <acronym>DHCP</acronym> server if
|
---|
| 99 | you want to issue <acronym>LAN</acronym> addresses over your network. The
|
---|
| 100 | <acronym>DHCP</acronym> client doesn't need this script to be used. Also note
|
---|
| 101 | that this script is coded for the <emphasis role="strong">eth1</emphasis>
|
---|
| 102 | interface, which may need to be modified for your hardware configuration.</para>
|
---|
| 103 |
|
---|
| 104 | <para>Install the <filename>/etc/rc.d/init.d/dhcp</filename>
|
---|
[0fbab6b] | 105 | init script included in the <xref linkend="intro-important-bootscripts"/>
|
---|
| 106 | package.</para>
|
---|
[4774914f] | 107 |
|
---|
[0931098] | 108 | <screen><userinput><command>make install-dhcp</command></userinput></screen>
|
---|
| 109 |
|
---|
| 110 | <para>The lease file must exist on startup. The following command will
|
---|
| 111 | satisfy that requirement:</para>
|
---|
| 112 |
|
---|
| 113 | <screen><userinput><command>touch /var/state/dhcp/dhcpd.leases</command></userinput></screen>
|
---|
| 114 |
|
---|
| 115 | <para>The following commands will create a base configuration file for a
|
---|
| 116 | <acronym>DHCP</acronym> server. There are several options that you may want to
|
---|
| 117 | add (information that is passed back to the <acronym>DHCP</acronym> client) and
|
---|
| 118 | those are covered in the man pages for <filename>dhcp.conf</filename>.</para>
|
---|
| 119 |
|
---|
| 120 | <screen><userinput><command>cat > /etc/dhcpd.conf << "EOF"</command>
|
---|
| 121 | default-lease-time 72000;
|
---|
| 122 | max-lease-time 144000;
|
---|
| 123 | ddns-update-style ad-hoc;
|
---|
| 124 |
|
---|
| 125 | subnet <replaceable>[192.168.5.0]</replaceable> netmask <replaceable>[255.255.255.0]</replaceable> {
|
---|
| 126 | range <replaceable>[192.168.5.10] [192.168.5.240]</replaceable>;
|
---|
| 127 | option broadcast-address <replaceable>[195.168.5.255]</replaceable>;
|
---|
| 128 | option routers <replaceable>[192.168.5.1]</replaceable>;
|
---|
| 129 | }
|
---|
| 130 | <command>EOF</command></userinput></screen>
|
---|
| 131 |
|
---|
| 132 | <para>All addresses should be changed to meet your circumstance.</para>
|
---|
| 133 |
|
---|
| 134 | </sect3>
|
---|
| 135 |
|
---|
| 136 | </sect2>
|
---|
| 137 |
|
---|
| 138 | <sect2>
|
---|
| 139 | <title>Contents</title>
|
---|
| 140 |
|
---|
| 141 | <para>The <application><acronym>DHCP</acronym></application> package contains
|
---|
[4774914f] | 142 | <command>dhclient</command>, <command>dhcpd</command> and
|
---|
| 143 | <command>dhcrelay</command>.</para>
|
---|
[0931098] | 144 |
|
---|
| 145 | </sect2>
|
---|
| 146 |
|
---|
| 147 | <sect2><title>Description</title>
|
---|
| 148 |
|
---|
| 149 | <sect3><title>dhclient</title>
|
---|
| 150 | <para><command>dhclient</command> is the implementation of the
|
---|
| 151 | <acronym>DHCP</acronym> client.</para></sect3>
|
---|
| 152 |
|
---|
| 153 | <sect3><title>dhcpd</title>
|
---|
| 154 | <para><command>dhcpd</command> implements Dynamic Host Configuration Protocol
|
---|
| 155 | (<acronym>DHCP</acronym>) and Internet Bootstrap Protocol
|
---|
| 156 | (<acronym>BOOTP</acronym>) requests for network addresses.</para></sect3>
|
---|
| 157 |
|
---|
| 158 | <sect3><title>dhcrelay</title>
|
---|
| 159 | <para><command>dhcrelay</command> provides a means to accept <acronym>DHCP
|
---|
| 160 | </acronym> and <acronym>BOOTP</acronym> requests on a subnet without a
|
---|
| 161 | <acronym>DHCP</acronym> server and relay them to a <acronym>DHCP</acronym>
|
---|
| 162 | server on another subnet.</para></sect3>
|
---|
| 163 |
|
---|
| 164 | </sect2>
|
---|
[f45b1953] | 165 |
|
---|
| 166 | </sect1>
|
---|
| 167 |
|
---|