[0931098] | 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" [
|
---|
[0931098] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
[697cb83f] | 6 |
|
---|
[ac02266] | 7 | <!ENTITY dhcp-download-http " ">
|
---|
[697cb83f] | 8 | <!ENTITY dhcp-download-ftp "ftp://ftp.isc.org/isc/dhcp/&dhcp-version;/dhcp-&dhcp-version;.tar.gz">
|
---|
[edfde25] | 9 | <!ENTITY dhcp-md5sum "61c2a4f5675edb95d78038df6735ae8e">
|
---|
| 10 | <!ENTITY dhcp-size "10 MB">
|
---|
| 11 | <!ENTITY dhcp-buildsize "211 MB">
|
---|
| 12 | <!ENTITY dhcp-time "0.7 SBU">
|
---|
[0931098] | 13 | ]>
|
---|
| 14 |
|
---|
[40330fcd] | 15 | <sect1 id="dhcp" xreflabel="DHCP-&dhcp-version;">
|
---|
[6ad98e12] | 16 | <?dbhtml filename="dhcp.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>DHCP-&dhcp-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="dhcp">
|
---|
[697cb83f] | 26 | <primary sortas="a-DHCP">DHCP</primary>
|
---|
[6ad98e12] | 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
[697cb83f] | 30 | <title>Introduction to ISC DHCP</title>
|
---|
[6ad98e12] | 31 |
|
---|
[697cb83f] | 32 | <para>
|
---|
[138bdf6] | 33 | The <application>ISC DHCP</application> package contains both the client
|
---|
| 34 | and server programs for DHCP. <command>dhclient</command> (the client) is
|
---|
[697cb83f] | 35 | used for connecting to a network which uses DHCP to assign network
|
---|
| 36 | addresses. <command>dhcpd</command> (the server) is used for assigning
|
---|
| 37 | network addresses on private networks.
|
---|
| 38 | </para>
|
---|
[6ad98e12] | 39 |
|
---|
[aaf45d3] | 40 | &lfs81_checked;
|
---|
[fa3e12e1] | 41 |
|
---|
[6ad98e12] | 42 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 43 | <itemizedlist spacing="compact">
|
---|
| 44 | <listitem>
|
---|
[697cb83f] | 45 | <para>
|
---|
| 46 | Download (HTTP): <ulink url="&dhcp-download-http;"/>
|
---|
| 47 | </para>
|
---|
[6ad98e12] | 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
[697cb83f] | 50 | <para>
|
---|
| 51 | Download (FTP): <ulink url="&dhcp-download-ftp;"/>
|
---|
| 52 | </para>
|
---|
[6ad98e12] | 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
[697cb83f] | 55 | <para>
|
---|
| 56 | Download MD5 sum: &dhcp-md5sum;
|
---|
| 57 | </para>
|
---|
[6ad98e12] | 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
[697cb83f] | 60 | <para>
|
---|
| 61 | Download size: &dhcp-size;
|
---|
| 62 | </para>
|
---|
[6ad98e12] | 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
[697cb83f] | 65 | <para>
|
---|
| 66 | Estimated disk space required: &dhcp-buildsize;
|
---|
| 67 | </para>
|
---|
[6ad98e12] | 68 | </listitem>
|
---|
| 69 | <listitem>
|
---|
[697cb83f] | 70 | <para>
|
---|
| 71 | Estimated build time: &dhcp-time;
|
---|
| 72 | </para>
|
---|
[6ad98e12] | 73 | </listitem>
|
---|
| 74 | </itemizedlist>
|
---|
[d60f0d5] | 75 | <!--
|
---|
[413bf97] | 76 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[697cb83f] | 77 | <itemizedlist spacing="compact">
|
---|
[b89d0335] | 78 | <listitem>
|
---|
[697cb83f] | 79 | <para>
|
---|
[54f740f] | 80 | Required patch:
|
---|
[9885c0be] | 81 | <ulink url="&patch-root;/dhcp-&dhcp-version;-client_script-1.patch"/>
|
---|
[697cb83f] | 82 | </para>
|
---|
[b89d0335] | 83 | </listitem>
|
---|
[413bf97] | 84 | <listitem>
|
---|
[697cb83f] | 85 | <para>
|
---|
[54f740f] | 86 | Optional patch:
|
---|
[697cb83f] | 87 | <ulink url="&patch-root;/dhcp-&dhcp-version;-missing_ipv6-1.patch"/>
|
---|
| 88 | </para>
|
---|
[413bf97] | 89 | </listitem>
|
---|
| 90 | </itemizedlist>
|
---|
[d60f0d5] | 91 | -->
|
---|
[3cb0c57] | 92 | <para condition="html" role="usernotes">User Notes:
|
---|
[697cb83f] | 93 | <ulink url="&blfs-wiki;/dhcp"/>
|
---|
| 94 | </para>
|
---|
[6ad98e12] | 95 | </sect2>
|
---|
| 96 |
|
---|
[697cb83f] | 97 | <sect2 role="kernel" id="dhcp-kernel">
|
---|
[6ad98e12] | 98 | <title>Kernel Configuration</title>
|
---|
| 99 |
|
---|
[697cb83f] | 100 | <para>
|
---|
[196d393] | 101 | You must have Packet Socket support:
|
---|
| 102 | </para>
|
---|
| 103 |
|
---|
| 104 | <screen><literal>[*] Networking support ---> [CONFIG_NET]
|
---|
| 105 | Networking options --->
|
---|
| 106 | <*> Packet socket [CONFIG_PACKET]</literal></screen>
|
---|
| 107 |
|
---|
| 108 | <para>
|
---|
| 109 | If you do not have IPv6 support:
|
---|
| 110 | </para>
|
---|
| 111 |
|
---|
| 112 | <screen><literal>[*] Networking support ---> [CONFIG_NET]
|
---|
| 113 | Networking Options --->
|
---|
| 114 | <*> The IPv6 Protocol ---> [CONFIG_IPV6]</literal></screen>
|
---|
| 115 |
|
---|
| 116 | <para>
|
---|
| 117 | compiled in, then you must use the <quote>missing_ipv6</quote> patch.
|
---|
[697cb83f] | 118 | </para>
|
---|
[6ad98e12] | 119 |
|
---|
| 120 | <indexterm zone="dhcp dhcp-kernel">
|
---|
[697cb83f] | 121 | <primary sortas="d-DHCP">DHCP</primary>
|
---|
[6ad98e12] | 122 | </indexterm>
|
---|
| 123 |
|
---|
| 124 | </sect2>
|
---|
| 125 |
|
---|
| 126 | <sect2 role="installation">
|
---|
[697cb83f] | 127 | <title>Installation of ISC DHCP</title>
|
---|
[6ad98e12] | 128 |
|
---|
[3f7242a4] | 129 | <note>
|
---|
| 130 | <para>
|
---|
| 131 | This package does not support parallel build.
|
---|
| 132 | </para>
|
---|
| 133 | </note>
|
---|
[d60f0d5] | 134 | <!-- This should not be needed any more. Visual check appears to handle it.
|
---|
[697cb83f] | 135 | <para>
|
---|
| 136 | If you have not compiled IPv6 support into the kernel, apply the
|
---|
| 137 | missing_ipv6 patch:
|
---|
| 138 | </para>
|
---|
[b89d0335] | 139 |
|
---|
[fa3e12e1] | 140 | <screen><userinput>patch -Np1 -i ../dhcp-&dhcp-version;-missing_ipv6-1.patch</userinput></screen>
|
---|
[d60f0d5] | 141 | -->
|
---|
[b33c421] | 142 | <note>
|
---|
| 143 | <para>
|
---|
| 144 | Be careful with the instructions below. The single and
|
---|
[edf9f584] | 145 | double quotes are important because the defined
|
---|
[b33c421] | 146 | variables are used verbatim in the code.
|
---|
| 147 | </para>
|
---|
| 148 | </note>
|
---|
[76b71ab] | 149 |
|
---|
[b33c421] | 150 | <para>
|
---|
| 151 | Install <application>ISC DHCP</application> by running
|
---|
| 152 | the following commands:
|
---|
| 153 | </para>
|
---|
[6ad98e12] | 154 |
|
---|
[d60f0d5] | 155 | <screen><userinput>CFLAGS="-D_PATH_DHCLIENT_SCRIPT='\"/sbin/dhclient-script\"' \
|
---|
[697cb83f] | 156 | -D_PATH_DHCPD_CONF='\"/etc/dhcp/dhcpd.conf\"' \
|
---|
[f77c63d0] | 157 | -D_PATH_DHCLIENT_CONF='\"/etc/dhcp/dhclient.conf\"'" &&
|
---|
[d60f0d5] | 158 |
|
---|
[697cb83f] | 159 | ./configure --prefix=/usr \
|
---|
| 160 | --sysconfdir=/etc/dhcp \
|
---|
| 161 | --localstatedir=/var \
|
---|
| 162 | --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \
|
---|
| 163 | --with-srv6-lease-file=/var/lib/dhcpd/dhcpd6.leases \
|
---|
| 164 | --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \
|
---|
| 165 | --with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases &&
|
---|
[3f7242a4] | 166 | make -j1</userinput></screen>
|
---|
[697cb83f] | 167 |
|
---|
| 168 | <para>
|
---|
[d60f0d5] | 169 | <!-- Note: make check builds a library, but otherwise does nothing. -->
|
---|
[1b777da] | 170 | This package does not come with a test suite.
|
---|
[697cb83f] | 171 | </para>
|
---|
| 172 |
|
---|
| 173 | <para>
|
---|
| 174 | If you only want to install the <application>ISC DHCP</application> client,
|
---|
| 175 | issue the following commands as the
|
---|
| 176 | <systemitem class="username">root</systemitem> user:
|
---|
| 177 | </para>
|
---|
| 178 |
|
---|
| 179 | <screen role="root"><userinput>make -C client install &&
|
---|
| 180 | mv -v /usr/sbin/dhclient /sbin &&
|
---|
| 181 | install -v -m755 client/scripts/linux /sbin/dhclient-script</userinput></screen>
|
---|
[fa3e12e1] | 182 |
|
---|
[697cb83f] | 183 | <para>
|
---|
[138bdf6] | 184 | Skip to <xref linkend="dhclient-config"/> in order to configure the
|
---|
| 185 | client
|
---|
[697cb83f] | 186 | </para>
|
---|
[6ad98e12] | 187 |
|
---|
[697cb83f] | 188 | <para>
|
---|
| 189 | If you only want to install the <application>ISC DHCP</application> server,
|
---|
| 190 | issue the following command as the
|
---|
| 191 | <systemitem class="username">root</systemitem> user:
|
---|
| 192 | </para>
|
---|
[fa3e12e1] | 193 |
|
---|
[697cb83f] | 194 | <screen role="root"><userinput>make -C server install</userinput></screen>
|
---|
[fa3e12e1] | 195 |
|
---|
[697cb83f] | 196 | <para>
|
---|
| 197 | Skip to <xref linkend="dhcpd-config"/> in order to configure the server.
|
---|
| 198 | </para>
|
---|
[275b1da] | 199 |
|
---|
[697cb83f] | 200 | <para>
|
---|
| 201 | Alternatively, you can install whole package which includes the client,
|
---|
| 202 | server, relay, static libraries and development headers by running the
|
---|
| 203 | following commands as the
|
---|
| 204 | <systemitem class="username">root</systemitem> user:
|
---|
| 205 | </para>
|
---|
[04a6794] | 206 |
|
---|
[697cb83f] | 207 | <screen role="root"><userinput>make install &&
|
---|
| 208 | mv -v /usr/sbin/dhclient /sbin &&
|
---|
[ac02266] | 209 | install -v -m755 client/scripts/linux /sbin/dhclient-script</userinput></screen>
|
---|
[fa3e12e1] | 210 |
|
---|
[697cb83f] | 211 | </sect2>
|
---|
[fa3e12e1] | 212 |
|
---|
[697cb83f] | 213 | <sect2 role="configuration">
|
---|
| 214 | <title>Configuring ISC DHCP</title>
|
---|
[fa3e12e1] | 215 |
|
---|
[697cb83f] | 216 | <sect3 id="dhcp-config">
|
---|
| 217 | <title>Config Files</title>
|
---|
[fa3e12e1] | 218 |
|
---|
[697cb83f] | 219 | <para>
|
---|
| 220 | <filename>/etc/dhcp/dhclient.conf</filename> and
|
---|
| 221 | <filename>/etc/dhcp/dhcpd.conf</filename>
|
---|
| 222 | </para>
|
---|
[0931098] | 223 |
|
---|
[697cb83f] | 224 | <indexterm zone="dhcp dhcp-config">
|
---|
| 225 | <primary sortas="e-etc-dhcp-dhclient.conf">/etc/dhcp/dhclient.conf</primary>
|
---|
| 226 | </indexterm>
|
---|
[0931098] | 227 |
|
---|
[697cb83f] | 228 | <indexterm zone="dhcp dhcp-config">
|
---|
| 229 | <primary sortas="e-etc-dhcp-dhcpd.conf">/etc/dhcp/dhcpd.conf</primary>
|
---|
| 230 | </indexterm>
|
---|
[0931098] | 231 |
|
---|
[697cb83f] | 232 | </sect3>
|
---|
[fa3e12e1] | 233 |
|
---|
[138bdf6] | 234 | <sect3 id="dhclient-config">
|
---|
[697cb83f] | 235 | <title>Client Configuration</title>
|
---|
| 236 |
|
---|
| 237 | <para>
|
---|
[f77c63d0] | 238 | Create a basic <filename>/etc/dhcp/dhclient.conf</filename>
|
---|
[697cb83f] | 239 | by running the following command as the
|
---|
| 240 | <systemitem class="username">root</systemitem> user:
|
---|
| 241 | </para>
|
---|
| 242 |
|
---|
[37f4f30] | 243 | <screen role="root"><userinput>install -vdm755 /etc/dhcp &&
|
---|
| 244 | cat > /etc/dhcp/dhclient.conf << "EOF"
|
---|
[697cb83f] | 245 | <literal># Begin /etc/dhcp/dhclient.conf
|
---|
| 246 | #
|
---|
| 247 | # Basic dhclient.conf(5)
|
---|
| 248 |
|
---|
| 249 | #prepend domain-name-servers 127.0.0.1;
|
---|
| 250 | request subnet-mask, broadcast-address, time-offset, routers,
|
---|
| 251 | domain-name, domain-name-servers, domain-search, host-name,
|
---|
| 252 | netbios-name-servers, netbios-scope, interface-mtu,
|
---|
| 253 | ntp-servers;
|
---|
| 254 | require subnet-mask, domain-name-servers;
|
---|
| 255 | #timeout 60;
|
---|
| 256 | #retry 60;
|
---|
| 257 | #reboot 10;
|
---|
| 258 | #select-timeout 5;
|
---|
| 259 | #initial-interval 2;
|
---|
| 260 |
|
---|
| 261 | # End /etc/dhcp/dhclient.conf</literal>
|
---|
| 262 | EOF</userinput></screen>
|
---|
[fa3e12e1] | 263 |
|
---|
[697cb83f] | 264 | <para>
|
---|
| 265 | See <command>man 5 dhclient.conf</command> for additional options.
|
---|
| 266 | </para>
|
---|
[fa3e12e1] | 267 |
|
---|
[697cb83f] | 268 | <para>
|
---|
| 269 | Now create the <filename class="directory">/var/lib/dhclient</filename>
|
---|
| 270 | directory which will contain DHCP Client leases by running the following
|
---|
| 271 | command as the <systemitem class="username">root</systemitem> user:
|
---|
| 272 | </para>
|
---|
[fa3e12e1] | 273 |
|
---|
[697cb83f] | 274 | <screen role="root"><userinput>install -v -dm 755 /var/lib/dhclient</userinput></screen>
|
---|
[fa3e12e1] | 275 |
|
---|
[138bdf6] | 276 | <para id="dhclient-service-sysd" revision="systemd">
|
---|
| 277 | If you want to configure network interfaces at boot using
|
---|
| 278 | <command>dhclient</command>, you need to install the
|
---|
| 279 | <filename>dhclient@.service</filename> unit included in the
|
---|
| 280 | <xref linkend="systemd-units"/> package by running the following
|
---|
| 281 | command as the <systemitem class="username">root</systemitem> user:
|
---|
| 282 | </para>
|
---|
| 283 |
|
---|
| 284 | <indexterm zone="dhcp dhclient-service-sysd" revision="systemd">
|
---|
| 285 | <primary sortas="f-dhclient">dhclient@.service</primary>
|
---|
| 286 | </indexterm>
|
---|
| 287 |
|
---|
| 288 | <screen role="root" revision="systemd"><userinput>make install-dhclient</userinput></screen>
|
---|
| 289 |
|
---|
| 290 | <note revision="systemd">
|
---|
| 291 | <para>
|
---|
| 292 | Make sure that you disable the <command>systemd-networkd</command>
|
---|
| 293 | service or configure it not to manage the interfaces you want to
|
---|
| 294 | manage with <command>dhclient</command>.
|
---|
| 295 | </para>
|
---|
| 296 | </note>
|
---|
| 297 |
|
---|
[697cb83f] | 298 | <para>
|
---|
| 299 | At this point you can test if <command>dhclient</command> is
|
---|
| 300 | behaving as expected by running the following command as the
|
---|
| 301 | <systemitem class="username">root</systemitem> user:
|
---|
| 302 | </para>
|
---|
[0931098] | 303 |
|
---|
[138bdf6] | 304 | <screen role="root" revision="sysv"><userinput>dhclient <replaceable><eth0></replaceable></userinput></screen>
|
---|
[0931098] | 305 |
|
---|
[138bdf6] | 306 | <screen role="root" revision="systemd"><userinput>systemctl start dhclient@<replaceable>eth0</replaceable></userinput></screen>
|
---|
| 307 |
|
---|
| 308 | <para revision="sysv">
|
---|
[697cb83f] | 309 | Replace <replaceable><eth0></replaceable> with your
|
---|
| 310 | desired interface. If you want more verbose output, add the
|
---|
| 311 | <command>-v</command> parameter to the command above.
|
---|
| 312 | </para>
|
---|
[0931098] | 313 |
|
---|
[138bdf6] | 314 | <para id="dhclient-service" revision="sysv">
|
---|
[697cb83f] | 315 | If you want to configure network interfaces at boot using
|
---|
| 316 | <command>dhclient</command>, you need to install the
|
---|
| 317 | <filename>/lib/services/dhclient</filename> script
|
---|
| 318 | included in <xref linkend="bootscripts"/> package:
|
---|
| 319 | </para>
|
---|
[04a6794] | 320 |
|
---|
[138bdf6] | 321 | <screen role="root" revision="sysv"><userinput>make install-service-dhclient</userinput></screen>
|
---|
[04a6794] | 322 |
|
---|
[138bdf6] | 323 | <indexterm zone="dhcp dhclient-service" revision="sysv">
|
---|
[697cb83f] | 324 | <primary sortas="f-dhclient">dhclient (service script)</primary>
|
---|
[6ad98e12] | 325 | </indexterm>
|
---|
[04a6794] | 326 |
|
---|
[138bdf6] | 327 | <para id="dhclient-ifconfig" revision="sysv">
|
---|
[697cb83f] | 328 | Next, create the <filename>/etc/sysconfig/ifconfig.eth0</filename>
|
---|
| 329 | configuration file with the following commands as the
|
---|
| 330 | <systemitem class="username">root</systemitem> user:
|
---|
| 331 | </para>
|
---|
| 332 |
|
---|
[138bdf6] | 333 | <screen role="root" revision="sysv"><userinput>cat > /etc/sysconfig/ifconfig.eth0 << "EOF"
|
---|
[697cb83f] | 334 | <literal>ONBOOT="yes"
|
---|
| 335 | IFACE="eth0"
|
---|
| 336 | SERVICE="dhclient"
|
---|
| 337 | DHCP_START=""
|
---|
| 338 | DHCP_STOP=""
|
---|
| 339 |
|
---|
| 340 | # Set PRINTIP="yes" to have the script print
|
---|
| 341 | # the DHCP assigned IP address
|
---|
| 342 | PRINTIP="no"
|
---|
| 343 |
|
---|
| 344 | # Set PRINTALL="yes" to print the DHCP assigned values for
|
---|
| 345 | # IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
|
---|
| 346 | PRINTALL="no"</literal>
|
---|
| 347 | EOF</userinput></screen>
|
---|
| 348 |
|
---|
[138bdf6] | 349 | <indexterm zone="dhcp dhclient-ifconfig" revision="sysv">
|
---|
[697cb83f] | 350 | <primary sortas="e-etc-sysconfig-...-dhclient">/etc/sysconfig/ifconfig.eth0</primary>
|
---|
[6ad98e12] | 351 | </indexterm>
|
---|
[0931098] | 352 |
|
---|
[138bdf6] | 353 | <para revision="sysv">
|
---|
[697cb83f] | 354 | Adjust the file to suit your needs.
|
---|
| 355 | </para>
|
---|
[0931098] | 356 |
|
---|
[138bdf6] | 357 | <para revision="sysv">
|
---|
[697cb83f] | 358 | For more information on the appropriate <envar>DHCP_START</envar>
|
---|
| 359 | and <envar>DHCP_STOP</envar> values see
|
---|
| 360 | <command>man 8 dhclient</command>.
|
---|
| 361 | </para>
|
---|
[0931098] | 362 |
|
---|
[138bdf6] | 363 | <para revision="systemd">
|
---|
| 364 | To start <command>dhclient</command> on a specific interface
|
---|
| 365 | at boot, enable the previously installed systemd unit by
|
---|
| 366 | running the following command as the
|
---|
| 367 | <systemitem class="username">root</systemitem> user:
|
---|
| 368 | </para>
|
---|
[0931098] | 369 |
|
---|
[138bdf6] | 370 | <screen role="root" revision="systemd"><userinput>systemctl enable dhclient@<replaceable>eth0</replaceable></userinput></screen>
|
---|
| 371 |
|
---|
| 372 | <para revision="systemd">
|
---|
| 373 | Replace <replaceable>eth0</replaceable> with the actual interface name.
|
---|
| 374 | </para>
|
---|
[3c7bd00] | 375 |
|
---|
| 376 | </sect3>
|
---|
| 377 |
|
---|
[697cb83f] | 378 | <sect3 id="dhcpd-config">
|
---|
| 379 | <title>Server Configuration</title>
|
---|
[4774914f] | 380 |
|
---|
[697cb83f] | 381 | <para>
|
---|
| 382 | Note that you only need the DHCP server if you want to issue
|
---|
| 383 | LAN addresses over your network. The DHCP client doesn't need
|
---|
| 384 | the server in order to function properly.
|
---|
| 385 | </para>
|
---|
[04a6794] | 386 |
|
---|
[697cb83f] | 387 | <para>
|
---|
| 388 | Start with creating <filename>/etc/dhcp/dhcpd.conf</filename>
|
---|
| 389 | by running the following command as the
|
---|
| 390 | <systemitem class="username">root</systemitem> user:
|
---|
| 391 | </para>
|
---|
[0931098] | 392 |
|
---|
[697cb83f] | 393 | <screen role="root"><userinput>cat > /etc/dhcp/dhcpd.conf << "EOF"
|
---|
| 394 | <literal># Begin /etc/dhcp/dhcpd.conf
|
---|
| 395 | #
|
---|
| 396 | # Example dhcpd.conf(5)
|
---|
[0931098] | 397 |
|
---|
[697cb83f] | 398 | # Use this to enble / disable dynamic dns updates globally.
|
---|
| 399 | ddns-update-style none;
|
---|
[0931098] | 400 |
|
---|
[697cb83f] | 401 | # option definitions common to all supported networks...
|
---|
| 402 | option domain-name "example.org";
|
---|
| 403 | option domain-name-servers ns1.example.org, ns2.example.org;
|
---|
[0931098] | 404 |
|
---|
[697cb83f] | 405 | default-lease-time 600;
|
---|
| 406 | max-lease-time 7200;
|
---|
[6ad98e12] | 407 |
|
---|
[697cb83f] | 408 | # This is a very basic subnet declaration.
|
---|
| 409 | subnet 10.254.239.0 netmask 255.255.255.224 {
|
---|
| 410 | range 10.254.239.10 10.254.239.20;
|
---|
| 411 | option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
|
---|
| 412 | }
|
---|
[0931098] | 413 |
|
---|
[697cb83f] | 414 | # End /etc/dhcp/dhcpd.conf</literal>
|
---|
[6ad98e12] | 415 | EOF</userinput></screen>
|
---|
| 416 |
|
---|
[697cb83f] | 417 | <para>
|
---|
| 418 | Adjust the file to suit your needs. See
|
---|
| 419 | <command>man 5 dhcpd.conf</command> for additional options.
|
---|
| 420 | </para>
|
---|
| 421 |
|
---|
| 422 | <para>
|
---|
| 423 | Now create the <filename class="directory">/var/lib/dhcpd</filename>
|
---|
| 424 | directory which will contain DHCP Server leases by running the following
|
---|
| 425 | command as the <systemitem class="username">root</systemitem> user:
|
---|
| 426 | </para>
|
---|
| 427 |
|
---|
| 428 | <screen role="root"><userinput>install -v -dm 755 /var/lib/dhcpd</userinput></screen>
|
---|
| 429 |
|
---|
| 430 | <para>
|
---|
[138bdf6] | 431 | If you want to start the DHCP Server at boot, install the
|
---|
| 432 | <phrase revision="sysv"><filename>/etc/rc.d/init.d/dhcpd</filename>
|
---|
| 433 | inti script</phrase>
|
---|
| 434 | <phrase revision="systemd"><filename>dhcpd.service</filename>
|
---|
| 435 | unit</phrase> included in the
|
---|
[3c7bd00] | 436 | <xref linkend="bootscripts" revision="sysv"/>
|
---|
| 437 | <xref linkend="systemd-units" revision="systemd"/>
|
---|
[697cb83f] | 438 | package:
|
---|
| 439 | </para>
|
---|
| 440 |
|
---|
| 441 | <screen role="root"><userinput>make install-dhcpd</userinput></screen>
|
---|
| 442 |
|
---|
| 443 | <indexterm zone="dhcp dhcpd-config">
|
---|
| 444 | <primary sortas="f-dhcpd">dhcpd</primary>
|
---|
| 445 | </indexterm>
|
---|
| 446 |
|
---|
| 447 | <para>
|
---|
| 448 | You will need to edit the
|
---|
[138bdf6] | 449 | <phrase revision="sysv"><filename>/etc/sysconfig/dhcpd</filename></phrase>
|
---|
| 450 | <phrase revision="systemd"><filename>/etc/default/dhcpd</filename></phrase>
|
---|
| 451 | in order to set the interface on which <command>dhcpd</command>
|
---|
[697cb83f] | 452 | will serve the DHCP requests.
|
---|
| 453 | </para>
|
---|
[6ad98e12] | 454 |
|
---|
| 455 | </sect3>
|
---|
| 456 |
|
---|
| 457 | </sect2>
|
---|
| 458 |
|
---|
| 459 | <sect2 role="content">
|
---|
| 460 | <title>Contents</title>
|
---|
| 461 |
|
---|
| 462 | <segmentedlist>
|
---|
| 463 | <segtitle>Installed Programs</segtitle>
|
---|
| 464 | <segtitle>Installed Libraries</segtitle>
|
---|
| 465 | <segtitle>Installed Directories</segtitle>
|
---|
| 466 |
|
---|
| 467 | <seglistitem>
|
---|
[697cb83f] | 468 | <seg>
|
---|
| 469 | dhclient, dhclient-script, dhcpd, dhcrelay and omshell
|
---|
| 470 | </seg>
|
---|
| 471 | <seg>
|
---|
[f77c63d0] | 472 | libdhcpctl.a and libomapi.a
|
---|
[697cb83f] | 473 | </seg>
|
---|
| 474 | <seg>
|
---|
[03f254d] | 475 | /etc/dhcp,
|
---|
[697cb83f] | 476 | /usr/include/dhcpctl,
|
---|
| 477 | /usr/include/isc-dhcp,
|
---|
| 478 | /usr/include/omapip,
|
---|
| 479 | /var/lib/dhclient and
|
---|
| 480 | /var/lib/dhcpd
|
---|
| 481 | </seg>
|
---|
[6ad98e12] | 482 | </seglistitem>
|
---|
| 483 | </segmentedlist>
|
---|
| 484 |
|
---|
| 485 | <variablelist>
|
---|
| 486 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 487 | <?dbfo list-presentation="list"?>
|
---|
| 488 | <?dbhtml list-presentation="table"?>
|
---|
| 489 |
|
---|
| 490 | <varlistentry id="dhclient">
|
---|
| 491 | <term><command>dhclient</command></term>
|
---|
| 492 | <listitem>
|
---|
[697cb83f] | 493 | <para>
|
---|
| 494 | is the implementation of the DHCP client.
|
---|
| 495 | </para>
|
---|
[6ad98e12] | 496 | <indexterm zone="dhcp dhclient">
|
---|
| 497 | <primary sortas="b-dhclient">dhclient</primary>
|
---|
| 498 | </indexterm>
|
---|
| 499 | </listitem>
|
---|
| 500 | </varlistentry>
|
---|
| 501 |
|
---|
[fa3e12e1] | 502 | <varlistentry id="dhclient-script">
|
---|
| 503 | <term><command>dhclient-script</command></term>
|
---|
| 504 | <listitem>
|
---|
[697cb83f] | 505 | <para>
|
---|
| 506 | is used by dhclient to (re)configure interfaces. It can make
|
---|
| 507 | extra changes by invoking custom dhclient-{entry,exit}-hooks.
|
---|
| 508 | </para>
|
---|
[fa3e12e1] | 509 | <indexterm zone="dhcp dhclient-script">
|
---|
| 510 | <primary sortas="b-dhclient-script">dhclient-script</primary>
|
---|
| 511 | </indexterm>
|
---|
| 512 | </listitem>
|
---|
| 513 | </varlistentry>
|
---|
| 514 |
|
---|
[6ad98e12] | 515 | <varlistentry id="dhcpd">
|
---|
| 516 | <term><command>dhcpd</command></term>
|
---|
| 517 | <listitem>
|
---|
[697cb83f] | 518 | <para>
|
---|
| 519 | implements Dynamic Host Configuration Protocol (DHCP) and
|
---|
| 520 | Internet Bootstrap Protocol (BOOTP) requests for network
|
---|
| 521 | addresses.
|
---|
| 522 | </para>
|
---|
[6ad98e12] | 523 | <indexterm zone="dhcp dhcpd">
|
---|
| 524 | <primary sortas="b-dhcpd">dhcpd</primary>
|
---|
| 525 | </indexterm>
|
---|
| 526 | </listitem>
|
---|
| 527 | </varlistentry>
|
---|
| 528 |
|
---|
| 529 | <varlistentry id="dhcrelay">
|
---|
| 530 | <term><command>dhcrelay</command></term>
|
---|
| 531 | <listitem>
|
---|
[697cb83f] | 532 | <para>
|
---|
| 533 | provides a means to accept DHCP and BOOTP requests on a subnet
|
---|
| 534 | without a DHCP server and relay them to a DHCP server on another
|
---|
| 535 | subnet.
|
---|
| 536 | </para>
|
---|
[6ad98e12] | 537 | <indexterm zone="dhcp dhcrelay">
|
---|
| 538 | <primary sortas="b-dhcrelay">dhcrelay</primary>
|
---|
| 539 | </indexterm>
|
---|
| 540 | </listitem>
|
---|
| 541 | </varlistentry>
|
---|
| 542 |
|
---|
| 543 | <varlistentry id="omshell">
|
---|
| 544 | <term><command>omshell</command></term>
|
---|
| 545 | <listitem>
|
---|
[697cb83f] | 546 | <para>
|
---|
| 547 | provides an interactive way to connect to, query and
|
---|
| 548 | possibly change the ISC DHCP Server's state via OMAPI, the
|
---|
| 549 | Object Management API.
|
---|
| 550 | </para>
|
---|
[6ad98e12] | 551 | <indexterm zone="dhcp omshell">
|
---|
| 552 | <primary sortas="b-omshell">omshell</primary>
|
---|
| 553 | </indexterm>
|
---|
| 554 | </listitem>
|
---|
| 555 | </varlistentry>
|
---|
| 556 |
|
---|
| 557 | </variablelist>
|
---|
| 558 |
|
---|
| 559 | </sect2>
|
---|
[04a6794] | 560 |
|
---|
[f45b1953] | 561 | </sect1>
|
---|