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