head 1.18; access; symbols cjep_sun2x:1.18.0.44 cjep_sun2x-base:1.18 cjep_staticlib_x-base1:1.18 cjep_staticlib_x:1.18.0.42 cjep_staticlib_x-base:1.18 phil-wifi-20200421:1.18 phil-wifi-20200411:1.18 phil-wifi-20200406:1.18 pgoyette-compat-merge-20190127:1.18 pgoyette-compat-20190127:1.18 pgoyette-compat-20190118:1.18 pgoyette-compat-1226:1.18 pgoyette-compat-1126:1.18 pgoyette-compat-1020:1.18 pgoyette-compat-0930:1.18 pgoyette-compat-0906:1.18 pgoyette-compat-0728:1.18 pgoyette-compat-0625:1.18 pgoyette-compat-0521:1.18 pgoyette-compat-0502:1.18 pgoyette-compat-0422:1.18 pgoyette-compat-0415:1.18 pgoyette-compat-0407:1.18 pgoyette-compat-0330:1.18 pgoyette-compat-0322:1.18 pgoyette-compat-0315:1.18 pgoyette-compat:1.18.0.40 pgoyette-compat-base:1.18 perseant-stdc-iso10646:1.18.0.38 perseant-stdc-iso10646-base:1.18 prg-localcount2-base3:1.18 prg-localcount2-base2:1.18 prg-localcount2-base1:1.18 prg-localcount2:1.18.0.36 prg-localcount2-base:1.18 pgoyette-localcount-20170426:1.18 bouyer-socketcan-base1:1.18 pgoyette-localcount-20170320:1.18 bouyer-socketcan:1.18.0.34 bouyer-socketcan-base:1.18 pgoyette-localcount-20170107:1.18 pgoyette-localcount-20161104:1.18 localcount-20160914:1.18 pgoyette-localcount-20160806:1.18 pgoyette-localcount-20160726:1.18 pgoyette-localcount:1.18.0.32 pgoyette-localcount-base:1.18 netbsd-5-2-3-RELEASE:1.18 netbsd-5-1-5-RELEASE:1.18 yamt-pagecache-base9:1.18 yamt-pagecache-tag8:1.18 tls-earlyentropy:1.18.0.28 tls-earlyentropy-base:1.18 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.18 riastradh-drm2-base3:1.18 netbsd-5-2-2-RELEASE:1.18 netbsd-5-1-4-RELEASE:1.18 netbsd-5-2-1-RELEASE:1.18 netbsd-5-1-3-RELEASE:1.18 agc-symver:1.18.0.30 agc-symver-base:1.18 tls-maxphys-base:1.18 yamt-pagecache-base8:1.18 netbsd-5-2:1.18.0.26 yamt-pagecache-base7:1.18 netbsd-5-2-RELEASE:1.18 netbsd-5-2-RC1:1.18 yamt-pagecache-base6:1.18 yamt-pagecache-base5:1.18 yamt-pagecache-base4:1.18 netbsd-5-1-2-RELEASE:1.18 netbsd-5-1-1-RELEASE:1.18 yamt-pagecache-base3:1.18 yamt-pagecache-base2:1.18 yamt-pagecache:1.18.0.24 yamt-pagecache-base:1.18 bouyer-quota2-nbase:1.18 bouyer-quota2:1.18.0.22 bouyer-quota2-base:1.18 matt-nb5-pq3:1.18.0.20 matt-nb5-pq3-base:1.18 netbsd-5-1:1.18.0.18 netbsd-5-1-RELEASE:1.18 netbsd-5-1-RC4:1.18 netbsd-5-1-RC3:1.18 netbsd-5-1-RC2:1.18 netbsd-5-1-RC1:1.18 netbsd-5-0-2-RELEASE:1.18 netbsd-5-0-1-RELEASE:1.18 jym-xensuspend-nbase:1.18 netbsd-5-0:1.18.0.16 netbsd-5-0-RELEASE:1.18 netbsd-5-0-RC4:1.18 netbsd-5-0-RC3:1.18 netbsd-5-0-RC2:1.18 jym-xensuspend:1.18.0.14 jym-xensuspend-base:1.18 netbsd-5-0-RC1:1.18 netbsd-5:1.18.0.12 netbsd-5-base:1.18 mjf-devfs2:1.18.0.10 mjf-devfs2-base:1.18 yamt-pf42-base4:1.18 yamt-pf42-base3:1.18 hpcarm-cleanup-nbase:1.18 yamt-pf42-base2:1.18 yamt-pf42:1.18.0.8 yamt-pf42-base:1.18 keiichi-mipv6-nbase:1.18 keiichi-mipv6:1.18.0.6 keiichi-mipv6-base:1.18 cube-autoconf:1.18.0.4 cube-autoconf-base:1.18 hpcarm-cleanup:1.18.0.2 hpcarm-cleanup-base:1.18 netbsd-1-5-PATCH003:1.8.2.6 netbsd-1-5-PATCH002:1.8.2.6 ISC_V3RC8:1.1.1.15 netbsd-1-5-PATCH001:1.8.2.5 ISC_V3P2PL24:1.1.1.14 ISC_V3B2PL23:1.1.1.14 netbsd-1-5-RELEASE:1.8.2.4 netbsd-1-5-BETA2:1.8.2.4 netbsd-1-5-BETA:1.8.2.4 ISC_V3B2PL9:1.1.1.13 netbsd-1-4-PATCH003:1.5.2.2 ISC_V3B2PL2:1.1.1.12 ISC_20000719_MERGE:1.11 netbsd-1-5-ALPHA2:1.8.2.2 ISC_20000719:1.1.1.11 ISC_20000708:1.1.1.10 ISC_20000623:1.1.1.9 netbsd-1-5:1.8.0.2 netbsd-1-5-base:1.8 ISC_200006101802:1.1.1.9 minoura-xpg4dl-base:1.7 minoura-xpg4dl:1.7.0.2 DHCP_20000422:1.1.1.8 netbsd-1-4-PATCH002:1.5.2.1 wrstuden-devbsize-19991221:1.6 wrstuden-devbsize:1.6.0.4 wrstuden-devbsize-base:1.6 comdex-fall-1999:1.6.0.2 comdex-fall-1999-base:1.6 netbsd-1-4-PATCH001:1.5.2.1 netbsd-1-4-RELEASE:1.5.2.1 V2-BETA-1-PATCH-27:1.1.1.7 V2-BETA-1-PATCH-25:1.1.1.7 netbsd-1-4:1.5.0.2 netbsd-1-4-base:1.5 V2-BETA-1-PATCH-22:1.1.1.6 V2-BETA-1-PATCH-21:1.1.1.6 V2-BETA-1-PATCH-20A:1.1.1.6 V2-BETA-1-PATCH-20:1.1.1.6 V2-BETA-1-PATCH-19:1.1.1.6 V2-BETA-1-PATCH-18:1.1.1.5 V2-BETA-1-PATCH-15:1.1.1.5 V2-BETA-1-PATCH-14:1.1.1.4 V2-BETA-1-PATCH-13:1.1.1.4 netbsd-1-3-PATCH003:1.1.1.2.2.1 netbsd-1-3-PATCH003-CANDIDATE2:1.1.1.2.2.1 netbsd-1-3-PATCH003-CANDIDATE1:1.1.1.2.2.1 netbsd-1-3-PATCH003-CANDIDATE0:1.1.1.2.2.1 V2-BETA-2:1.1.1.3 netbsd-1-3-PATCH002:1.1.1.2.2.1 netbsd-1-3-PATCH001:1.1.1.2.2.1 netbsd-1-3-RELEASE:1.1.1.2.2.1 netbsd-1-3-BETA:1.1.1.2.2.1 DHCP-971122:1.1.1.3 netbsd-1-3:1.1.1.2.0.2 netbsd-1-3-base:1.1.1.2 ISC_NetBSD_1_3_Alpha:1.1.1.2 DHCP-970607:1.1.1.2 DHCP-970605:1.1.1.2 DHCP-970602:1.1.1.2 DHCP-970331:1.1.1.1 DHCP-970329A:1.1.1.1 DHCP-970329:1.1.1.1 ISC:1.1.1; locks; strict; comment @.\" @; 1.18 date 2001.08.03.14.14.33; author drochner; state dead; branches; next 1.17; 1.17 date 2001.07.22.13.34.17; author wiz; state Exp; branches; next 1.16; 1.16 date 2001.06.18.19.02.00; author drochner; state Exp; branches; next 1.15; 1.15 date 2001.04.02.23.46.01; author mellon; state Exp; branches; next 1.14; 1.14 date 2000.10.17.16.10.44; author taca; state Exp; branches; next 1.13; 1.13 date 2000.10.14.05.14.02; author taca; state Exp; branches; next 1.12; 1.12 date 2000.09.04.23.19.42; author mellon; state Exp; branches; next 1.11; 1.11 date 2000.08.02.18.23.44; author jwise; state Exp; branches; next 1.10; 1.10 date 2000.07.20.05.59.20; author mellon; state Exp; branches; next 1.9; 1.9 date 2000.07.08.20.52.20; author mellon; state Exp; branches; next 1.8; 1.8 date 2000.06.10.18.17.22; author mellon; state Exp; branches 1.8.2.1; next 1.7; 1.7 date 2000.04.22.08.18.17; author mellon; state Exp; branches 1.7.2.1; next 1.6; 1.6 date 99.04.09.17.55.02; author mellon; state Exp; branches; next 1.5; 1.5 date 99.03.26.17.52.46; author mellon; state Exp; branches 1.5.2.1; next 1.4; 1.4 date 99.02.24.04.14.35; author mellon; state Exp; branches; next 1.3; 1.3 date 99.02.18.22.04.07; author mellon; state Exp; branches; next 1.2; 1.2 date 98.09.10.19.30.37; author kleink; state Exp; branches; next 1.1; 1.1 date 97.03.29.21.52.18; author mellon; state Exp; branches 1.1.1.1; next ; 1.8.2.1 date 2000.07.10.19.58.53; author mellon; state Exp; branches; next 1.8.2.2; 1.8.2.2 date 2000.07.22.05.02.56; author mellon; state Exp; branches; next 1.8.2.3; 1.8.2.3 date 2000.10.17.01.29.47; author tv; state Exp; branches; next 1.8.2.4; 1.8.2.4 date 2000.10.18.04.11.43; author tv; state Exp; branches; next 1.8.2.5; 1.8.2.5 date 2001.04.04.20.56.44; author he; state Exp; branches; next 1.8.2.6; 1.8.2.6 date 2001.08.16.18.53.42; author tv; state dead; branches; next ; 1.7.2.1 date 2000.06.22.18.00.54; author minoura; state Exp; branches; next ; 1.5.2.1 date 99.04.09.20.10.51; author mellon; state Exp; branches; next 1.5.2.2; 1.5.2.2 date 2000.07.27.17.17.43; author he; state Exp; branches; next ; 1.1.1.1 date 97.03.29.21.52.18; author mellon; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 97.06.03.02.49.58; author mellon; state Exp; branches 1.1.1.2.2.1; next 1.1.1.3; 1.1.1.3 date 97.11.22.09.14.39; author mellon; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 99.02.18.21.48.55; author mellon; state Exp; branches; next 1.1.1.5; 1.1.1.5 date 99.02.24.04.11.07; author mellon; state Exp; branches; next 1.1.1.6; 1.1.1.6 date 99.03.26.17.49.27; author mellon; state Exp; branches; next 1.1.1.7; 1.1.1.7 date 99.04.09.17.52.10; author mellon; state Exp; branches; next 1.1.1.8; 1.1.1.8 date 2000.04.22.07.12.03; author mellon; state Exp; branches; next 1.1.1.9; 1.1.1.9 date 2000.06.10.18.05.34; author mellon; state Exp; branches; next 1.1.1.10; 1.1.1.10 date 2000.07.08.20.41.08; author mellon; state Exp; branches; next 1.1.1.11; 1.1.1.11 date 2000.07.20.05.50.45; author mellon; state Exp; branches; next 1.1.1.12; 1.1.1.12 date 2000.09.04.23.10.44; author mellon; state Exp; branches; next 1.1.1.13; 1.1.1.13 date 2000.10.17.15.10.26; author taca; state Exp; branches; next 1.1.1.14; 1.1.1.14 date 2001.04.02.21.57.19; author mellon; state Exp; branches; next 1.1.1.15; 1.1.1.15 date 2001.06.18.18.13.25; author drochner; state Exp; branches; next ; 1.1.1.2.2.1 date 97.11.22.09.29.07; author mellon; state Exp; branches; next ; desc @@ 1.18 log @switch to reachover build from src/dist/dhcp @ text @.\" dhcpd.conf.5 .\" .\" Copyright (c) 1996-2001 Internet Software Consortium. .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of The Internet Software Consortium nor the names .\" of its contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE .\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR .\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" This software has been written for the Internet Software Consortium .\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc. .\" To learn more about the Internet Software Consortium, see .\" ``http://www.isc.org/''. To learn more about Vixie Enterprises, .\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see .\" ``http://www.nominum.com''. .TH dhcpd.conf 5 .SH NAME dhcpd.conf - dhcpd configuration file .SH DESCRIPTION The dhcpd.conf file contains configuration information for .IR dhcpd, the Internet Software Consortium DHCP Server. .PP The dhcpd.conf file is a free-form ASCII text file. It is parsed by the recursive-descent parser built into dhcpd. The file may contain extra tabs and newlines for formatting purposes. Keywords in the file are case-insensitive. Comments may be placed anywhere within the file (except within quotes). Comments begin with the # character and end at the end of the line. .PP The file essentially consists of a list of statements. Statements fall into two broad categories - parameters and declarations. .PP Parameter statements either say how to do something (e.g., how long a lease to offer), whether to do something (e.g., should dhcpd provide addresses to unknown clients), or what parameters to provide to the client (e.g., use gateway 220.177.244.7). .PP Declarations are used to describe the topology of the network, to describe clients on the network, to provide addresses that can be assigned to clients, or to apply a group of parameters to a group of declarations. In any group of parameters and declarations, all parameters must be specified before any declarations which depend on those parameters may be specified. .PP Declarations about network topology include the \fIshared-network\fR and the \fIsubnet\fR declarations. If clients on a subnet are to be assigned addresses dynamically, a \fIrange\fR declaration must appear within the \fIsubnet\fR declaration. For clients with statically assigned addresses, or for installations where only known clients will be served, each such client must have a \fIhost\fR declaration. If parameters are to be applied to a group of declarations which are not related strictly on a per-subnet basis, the \fIgroup\fR declaration can be used. .PP For every subnet which will be served, and for every subnet to which the dhcp server is connected, there must be one \fIsubnet\fR declaration, which tells dhcpd how to recognize that an address is on that subnet. A \fIsubnet\fR declaration is required for each subnet even if no addresses will be dynamically allocated on that subnet. .PP Some installations have physical networks on which more than one IP subnet operates. For example, if there is a site-wide requirement that 8-bit subnet masks be used, but a department with a single physical ethernet network expands to the point where it has more than 254 nodes, it may be necessary to run two 8-bit subnets on the same ethernet until such time as a new physical network can be added. In this case, the \fIsubnet\fR declarations for these two networks must be enclosed in a \fIshared-network\fR declaration. .PP Some sites may have departments which have clients on more than one subnet, but it may be desirable to offer those clients a uniform set of parameters which are different than what would be offered to clients from other departments on the same subnet. For clients which will be declared explicitly with \fIhost\fR declarations, these declarations can be enclosed in a \fIgroup\fR declaration along with the parameters which are common to that department. For clients whose addresses will be dynamically assigned, class declarations and conditional declarations may be used to group parameter assignments based on information the client sends. .PP When a client is to be booted, its boot parameters are determined by consulting that client's \fIhost\fR declaration (if any), and then consulting any \fIclass\fR declarations matching the client, followed by the \fIpool\fR, \fIsubnet\fR and \fIshared-network\fR declarations for the IP address assigned to the client. Each of these declarations itself appears within a lexical scope, and all declarations at less specific lexical scopes are also consulted for client option declarations. Scopes are never considered twice, and if parameters are declared in more than one scope, the parameter declared in the most specific scope is the one that is used. .PP When dhcpd tries to find a \fIhost\fR declaration for a client, it first looks for a \fIhost\fR declaration which has a \fIfixed-address\fR parameter which matches the subnet or shared network on which the client is booting. If it doesn't find any such entry, it then tries to find an entry which has no \fIfixed-address\fR parameter. .SH EXAMPLES .PP A typical dhcpd.conf file will look something like this: .nf .I global parameters... subnet 204.254.239.0 netmask 255.255.255.224 { \fIsubnet-specific parameters...\fR range 204.254.239.10 204.254.239.30; } subnet 204.254.239.32 netmask 255.255.255.224 { \fIsubnet-specific parameters...\fR range 204.254.239.42 204.254.239.62; } subnet 204.254.239.64 netmask 255.255.255.224 { \fIsubnet-specific parameters...\fR range 204.254.239.74 204.254.239.94; } group { \fIgroup-specific parameters...\fR host zappo.test.isc.org { \fIhost-specific parameters...\fR } host beppo.test.isc.org { \fIhost-specific parameters...\fR } host harpo.test.isc.org { \fIhost-specific parameters...\fR } } .ce 1 Figure 1 .fi .PP Notice that at the beginning of the file, there's a place for global parameters. These might be things like the organization's domain name, the addresses of the name servers (if they are common to the entire organization), and so on. So, for example: .nf option domain-name "isc.org"; option domain-name-servers ns1.isc.org, ns2.isc.org; .ce 1 Figure 2 .fi .PP As you can see in Figure 2, you can specify host addresses in parameters using their domain names rather than their numeric IP addresses. If a given hostname resolves to more than one IP address (for example, if that host has two ethernet interfaces), then where possible, both addresses are supplied to the client. .PP The most obvious reason for having subnet-specific parameters as shown in Figure 1 is that each subnet, of necessity, has its own router. So for the first subnet, for example, there should be something like: .nf option routers 204.254.239.1; .fi .PP Note that the address here is specified numerically. This is not required - if you have a different domain name for each interface on your router, it's perfectly legitimate to use the domain name for that interface instead of the numeric address. However, in many cases there may be only one domain name for all of a router's IP addresses, and it would not be appropriate to use that name here. .PP In Figure 1 there is also a \fIgroup\fR statement, which provides common parameters for a set of three hosts - zappo, beppo and harpo. As you can see, these hosts are all in the test.isc.org domain, so it might make sense for a group-specific parameter to override the domain name supplied to these hosts: .nf option domain-name "test.isc.org"; .fi .PP Also, given the domain they're in, these are probably test machines. If we wanted to test the DHCP leasing mechanism, we might set the lease timeout somewhat shorter than the default: .nf max-lease-time 120; default-lease-time 120; .fi .PP You may have noticed that while some parameters start with the \fIoption\fR keyword, some do not. Parameters starting with the \fIoption\fR keyword correspond to actual DHCP options, while parameters that do not start with the option keyword either control the behavior of the DHCP server (e.g., how long a lease dhcpd will give out), or specify client parameters that are not optional in the DHCP protocol (for example, server-name and filename). .PP In Figure 1, each host had \fIhost-specific parameters\fR. These could include such things as the \fIhostname\fR option, the name of a file to upload (the \fIfilename parameter) and the address of the server from which to upload the file (the \fInext-server\fR parameter). In general, any parameter can appear anywhere that parameters are allowed, and will be applied according to the scope in which the parameter appears. .PP Imagine that you have a site with a lot of NCD X-Terminals. These terminals come in a variety of models, and you want to specify the boot files for each model. One way to do this would be to have host declarations for each server and group them by model: .nf group { filename "Xncd19r"; next-server ncd-booter; host ncd1 { hardware ethernet 0:c0:c3:49:2b:57; } host ncd4 { hardware ethernet 0:c0:c3:80:fc:32; } host ncd8 { hardware ethernet 0:c0:c3:22:46:81; } } group { filename "Xncd19c"; next-server ncd-booter; host ncd2 { hardware ethernet 0:c0:c3:88:2d:81; } host ncd3 { hardware ethernet 0:c0:c3:00:14:11; } } group { filename "XncdHMX"; next-server ncd-booter; host ncd1 { hardware ethernet 0:c0:c3:11:90:23; } host ncd4 { hardware ethernet 0:c0:c3:91:a7:8; } host ncd8 { hardware ethernet 0:c0:c3:cc:a:8f; } } .fi .SH ADDRESS POOLS .PP The .B pool declaration can be used to specify a pool of addresses that will be treated differently than another pool of addresses, even on the same network segment or subnet. For example, you may want to provide a large set of addresses that can be assigned to DHCP clients that are registered to your DHCP server, while providing a smaller set of addresses, possibly with short lease times, that are available for unknown clients. If you have a firewall, you may be able to arrange for addresses from one pool to be allowed access to the Internet, while addresses in another pool are not, thus encouraging users to register their DHCP clients. To do this, you would set up a pair of pool declarations: .PP .nf subnet 10.0.0.0 netmask 255.255.255.0 { option routers 10.0.0.254; # Unknown clients get this pool. pool { option domain-name-servers bogus.example.com; max-lease-time 300; range 10.0.0.200 10.0.0.253; allow unknown clients; } # Known clients get this pool. pool { option domain-name-servers ns1.example.com, ns2.example.com; max-lease-time 28800; range 10.0.0.5 10.0.0.199; deny unknown clients; } } .fi .PP It is also possible to set up entirely different subnets for known and unknown clients - address pools exist at the level of shared networks, so address ranges within pool declarations can be on different subnets. .PP As you can see in the preceding example, pools can have permit lists that control which clients are allowed access to the pool and which aren't. Each entry in a pool's permit list is introduced with the .I allow or \fIdeny\fR keyword. If a pool has a permit list, then only those clients that match specific entries on the permit list will be eligible to be assigned addresses from the pool. If a pool has a deny list, then only those clients that do not match any entries on the deny list will be eligible. If both permit and deny lists exist for a pool, then only clients that match the permit list and do not match the deny list will be allowed access. .SH DYNAMIC ADDRESS ALLOCATION Address allocation is actually only done when a client is in the INIT state and has sent a DHCPDISCOVER message. If the client thinks it has a valid lease and sends a DHCPREQUEST to initiate or renew that lease, the server has only three choices - it can ignore the DHCPREQUEST, send a DHCPNAK to tell the client it should stop using the address, or send a DHCPACK, telling the client to go ahead and use the address for a while. .PP If the server finds the address the client is requesting, and that address is available to the client, the server will send a DHCPACK. If the address is no longer available, or the client isn't permitted to have it, the server will send a DHCPNAK. If the server knows nothing about the address, it will remain silent, unless the address is incorrect for the network segment to which the client has been attached and the server is authoritative for that network segment, in which case the server will send a DHCPNAK even though it doesn't know about the address. .PP There may be a host declaration matching the client's identification, and that host declaration contains a fixed-address declaration that is valid for the network segment to which the client is connected. In this case, the DHCP server will never do dynamic address allocation. In this case, the client is \fIrequired\fB to take the address specified in the host declaration. If the client is requesting some other address, the server will respond with a DHCPNAK. .PP When the DHCP server allocates a new address for a client (remember, this only happens if the client has sent a DHCPDISCOVER), it first looks to see if the client already has a valid lease on an IP address, or if there is an old IP address the client had before that hasn't yet been reassigned. In that case, the server will take that address and check it to see if the client is still permitted to use it. If the client is no longer permitted to use it, the lease is freed if the server thought it was still in use - the fact that the client has sent a DHCPDISCOVER proves to the server that the client is no longer using the lease. .PP If no existing lease is found, or if the client is forbidden to receive the existing lease, then the server will look in the list of address pools for the network segment to which the client is attached for a lease that is not in use and that the client is permitted to have. It looks through each pool declaration in sequence (all .I range declarations that appear outside of pool declarations are grouped into a single pool with no permit list). If the permit list for the pool allows the client to be allocated an address from that pool, the pool is examined to see if there is an address available. If so, then the client is tentatively assigned that address. Otherwise, the next pool is tested. If no addresses are found that can be assigned to the client, no response is sent to the client. .PP If an address is found that the client is permitted to have, and that has never been assigned to any client before, the address is immediately allocated to the client. If the address is available for allocation but has been previously assigned to a different client, the server will keep looking in hopes of finding an address that has never before been assigned to a client. .SH IP ADDRESS CONFLICT PREVENTION The DHCP server checks IP addresses to see if they are in use before allocating them to clients. It does this by sending an ICMP Echo request message to the IP address being allocated. If no ICMP Echo reply is received within a second, the address is assumed to be free. This is only done for leases that have been specified in range statements, and only when the lease is thought by the DHCP server to be free - i.e., the DHCP server or its failover peer has not listed the lease as in use. .PP If a response is received to an ICMP Echo request, the DHCP server assumes that there is a configuration error - the IP address is in use by some host on the network that is not a DHCP client. It marks the address as abandoned, and will not assign it to clients. .PP If a DHCP client tries to get an IP address, but none are available, but there are abandoned IP addresses, then the DHCP server will attempt to reclaim an abandoned IP address. It marks one IP address as free, and then does the same ICMP Echo request check described previously. If there is no answer to the ICMP Echo request, the address is assigned to the client. .PP The DHCP server does not cycle through abandoned IP addresses if the first IP address it tries to reclaim is free. Rather, when the next DHCPDISCOVER comes in from the client, it will attempt a new allocation using the same method described here, and will typically try a new IP address. .SH DHCP FAILOVER This version of the ISC DHCP server supports the DHCP failover protocol as documented in draft-ietf-dhc-failover-07.txt. This is not a final protocol document, and we have not done interoperability testing with other vendors' implementations of this protocol, so you must not assume that this implementation conforms to the standard. If you wish to use the failover protocol, make sure that both failover peers are running the same version of the ISC DHCP server. .PP The failover protocol allows two DHCP servers (and no more than two) to share a common address pool. Each server will have about half of the available IP addresses in the pool at any given time for allocation. If one server fails, the other server will continue to renew leases out of the pool, and will allocate new addresses out of the roughly half of available addresses that it had when communications with the other server were lost. .PP It is possible during a prolonged failure to tell the remaining server that the other server is down, in which case the remaining server will (over time) reclaim all the addresses the other server had available for allocation, and begin to reuse them. This is called putting the server into the PARTNER-DOWN state. .PP You can put the server into the PARTNER-DOWN state either by using the .B omshell (8) command or by stopping the server, editing the last peer state declaration in the lease file, and restarting the server. If you use this last method, be sure to leave the date and time of the start of the state blank: .PP .nf .B failover peer "\fIname\fB" state { .B my state partner-down; .B peer state \fIstate\fB at \fIdate\fB; .B } .fi .PP When the other server comes back online, it should automatically detect that it has been offline and request a complete update from the server that was running in the PARTNER-DOWN state, and then both servers will resume processing together. .PP It is possible to get into a dangerous situation: if you put one server into the PARTNER-DOWN state, and then *that* server goes down, and the other server comes back up, the other server will not know that the first server was in the PARTNER-DOWN state, and may issue addresses previously issued by the other server to different clients, resulting in IP address conflicts. Before putting a server into PARTNER-DOWN state, therefore, make .I sure that the other server will not restart automatically. .PP The failover protocol defines a primary server role and a secondary server role. There are some differences in how primaries and secondaries act, but most of the differences simply have to do with providing a way for each peer to behave in the opposite way from the other. So one server must be configured as primary, and the other must be configured as secondary, and it doesn't matter too much which one is which. .SH FAILOVER STARTUP When a server starts that has not previously communicated with its failover peer, it must establish communications with its failover peer and synchronize with it before it can serve clients. This can happen either because you have just configured your DHCP servers to perform failover for the first time, or because one of your failover servers has failed catastrophically and lost its database. .PP The initial recovery process is designed to ensure that when one failover peer loses its database and then resynchronizes, any leases that the failed server gave out before it failed will be honored. When the failed server starts up, it notices that it has no saved failover state, and attempts to contact its peer. .PP When it has established contact, it asks the peer for a complete copy its peer's lease database. The peer then sends its complete database, and sends a message indicating that it is done. The failed server then waits until MCLT has passed, and once MCLT has passed both servers make the transition back into normal operation. This waiting period ensures that any leases the failed server may have given out while out of contact with its partner will have expired. .PP While the failed server is recovering, its partner remains in the partner-down state, which means that it is serving all clients. The failed server provides no service at all to DHCP clients until it has made the transition into normal operation. .PP In the case where both servers detect that they have never before communicated with their partner, they both come up in this recovery state and follow the procedure we have just described. In this case, no service will be provided to DHCP clients until MCLT has expired. .SH CONFIGURING FAILOVER In order to configure failover, you need to write a peer declaration that configures the failover protocol, and you need to write peer references in each pool declaration for which you want to do failover. You do not have to do failover for all pools on a given network segment. You must not tell one server it's doing failover on a particular address pool and tell the other it is not. You must not have any common address pools on which you are not doing failover. .PP The server currently does very little sanity checking, so if you configure it wrong, it will just fail in odd ways. I would recommend therefore that you either do failover or don't do failover, but don't do any mixed pools. Also, use the same master configuration file for both servers, and have a separate file that contains the peer declaration and includes the master file. This will help you to avoid configuration mismatches. As our implementation evolves, this will become less of a problem. A basic sample dhcpd.conf file for a primary server might look like this: .PP .nf failover peer "foo" { primary; address anthrax.rc.vix.com; port 519; peer address trantor.rc.vix.com; peer port 520; max-response-delay 60; max-unacked-updates 10; mclt 3600; hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00; load balance max seconds 3; } include "/etc/dhcpd.master"; .fi .PP The statements in the peer declaration are as follows: .PP The .I primary and .I secondary statements .RS 0.25i .PP [ \fBprimary\fR | \fBsecondary\fR ]\fB;\fR .PP This determines whether the server is primary or secondary, as described earlier under DHCP FAILOVER. .RE .PP The .I address statement .RS 0.25i .PP .B address \fIaddress\fR\fB;\fR .PP The \fBaddress\fR statement declares the IP address on which the server should listen for connections from its failover peer, and also the value to use for the DHCP Failover Protocol server identifier. Because this value is used as an identifier, it may not be omitted. .RE .PP The .I peer address statement .RS 0.25i .PP .B peer address \fIaddress\fR\fB;\fR .PP The \fBpeer address\fR statement declares the IP address to which the server should connect to reach its failover peer for failover messages. .RE .PP The .I port statement .RS 0.25i .PP .B port \fIport-number\fR\fB;\fR .PP The \fBport\fR statement declares the TCP port on which the server should listen for connections from its failover peer. This statement may not currently be omitted, because the failover protocol does not yet have a reserved TCP port number. .RE .PP The .I peer port statement .RS 0.25i .PP .B peer port \fIport-number\fR\fB;\fR .PP The \fBpeer port\fR statement declares the TCP port to which the server should connect to reach its failover peer for failover messages. This statement may not be omitted because the failover protocol does not yet have a reserved TCP port number. The port number declared in the \fBpeer port\fR statement may be the same as the port number declared in the \fBport\fR statement. .RE .PP The .I max-response-delay statement .RS 0.25i .PP .B max-response-delay \fIseconds\fR\fB;\fR .PP The \fBmax-response-delay\fR statement tells the DHCP server how many seconds may pass without receiving a message from its failover peer before it assumes that connection has failed. This number should be small enough that a transient network failure that breaks the connection will not result in the servers being out of communication for a long time, but large enough that the server isn't constantly making and breaking connections. This parameter must be specified. .RE .PP The .I max-unacked-updates statement .RS 0.25i .PP .B max-unacked-updates \fIcount\fR\fB;\fR .PP The \fBmax-unacked-updates\fR statement tells the DHCP server how many BNDUPD messages it can send before it receives a BNDACK from the failover peer. We don't have enough operational experience to say what a good value for this is, but 10 seems to work. This parameter must be specified. .RE .PP The .I mclt statement .RS 0.25i .PP .B mclt \fIseconds\fR\fB;\fR .PP The \fBmclt\fR statement defines the Maximum Client Lead Time. It must be specified on the primary, and may not be specified on the secondary. This is the length of time for which a lease may be renewed by either failover peer without contacting the other. The longer you set this, the longer it will take for the running server to recover IP addresses after moving into PARTNER-DOWN state. The shorter you set it, the more load your servers will experience when they are not communicating. A value of something like 3600 is probably reasonable, but again bear in mind that we have no real operational experience with this. .RE .PP The .I split statement .RS 0.25i .PP .B split \fIindex\fR\fB;\fR .PP The split statement specifies the split between the primary and secondary for the purposes of load balancing. Whenever a client makes a DHCP request, the DHCP server runs a hash on the client identification. If the hash comes out to less than the split value, the primary answers. If it comes out to equal to or more than the split, the secondary answers. This value should generally be set to 128, and can only be configured on the primary. .RE .PP The .I hba statement .RS 0.25i .PP .B hba \fIcolon-separated-hex-list\fB;\fR .PP The hba statement specifies the split between the primary and secondary as a bitmap rather than a cutoff, which theoretically allows for finer-grained control. In practice, there is probably no need for such fine-grained control, however. An example hba statement: .PP .nf hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00; .fi .RE .PP The .I load balance max seconds statement .RS 0.25i .PP .B load balance max seconds \fIseconds\fR\fB;\fR .PP This statement allows you to configure a cutoff after which load balancing is disabled. The cutoff is based on the number of seconds since the client sent its first DHCPDISCOVER or DHCPREQUEST message, and only works with clients that correctly implement the \fIsecs\fR field - fortunately most clients do. We recommend setting this to something like 3 or 5. The effect of this is that if one of the failover peers gets into a state where it is responding to failover messages but not responding to some client requests, the other failover peer will take over its client load automatically as the clients retry. .RE .SH CLIENT CLASSING Clients can be separated into classes, and treated differently depending on what class they are in. This seperation can be done either with a conditional statement, or with a match statement within the class declaration. It is possible to specify a limit on the total number of clients within a particular class or subclass that may hold leases at one time, and it is possible to specify automatic subclassing based on the contents of the client packet. .PP To add clients to classes based on conditional evaluation, you can specify a matching expression in the class statement: .PP .nf class "ras-clients" { match if substring (option dhcp-client-identifier, 1, 3) = "RAS"; } .fi Note that whether you use matching expressions or add statements (or both) to classify clients, you must always write a class declaration for any class that you use. If there will be no match statement and no in-scope statements for a class, the declaration should look like this: .nf class "ras-clients" { } .fi .SH SUBCLASSES .PP In addition to classes, it is possible to declare subclasses. A subclass is a class with the same name as a regular class, but with a specific submatch expression which is hashed for quick matching. This is essentially a speed hack - the main difference between five classes with match expressions and one class with five subclasses is that it will be quicker to find the subclasses. Subclasses work as follows: .PP .nf class "allocation-class-1" { match pick-first-value (option dhcp-client-identifier, hardware); } class "allocation-class-2" { match pick-first-value (option dhcp-client-identifier, hardware); } subclass "allocation-class-1" 1:8:0:2b:4c:39:ad; subclass "allocation-class-2" 1:8:0:2b:a9:cc:e3; subclass "allocation-class-1" 1:0:0:c4:aa:29:44; subnet 10.0.0.0 netmask 255.255.255.0 { pool { allow members of "allocation-class-1"; range 10.0.0.11 10.0.0.50; } pool { allow members of "allocation-class-2"; range 10.0.0.51 10.0.0.100; } } .fi .PP The data following the class name in the subclass declaration is a constant value to use in matching the match expression for the class. When class matching is done, the server will evaluate the match expression and then look the result up in the hash table. If it finds a match, the client is considered a member of both the class and the subclass. .PP Subclasses can be declared with or without scope. In the above example, the sole purpose of the subclass is to allow some clients access to one address pool, while other clients are given access to the other pool, so these subclasses are declared without scopes. If part of the purpose of the subclass were to define different parameter values for some clients, you might want to declare some subclasses with scopes. .PP In the above example, if you had a single client that needed some configuration parameters, while most didn't, you might write the following subclass declaration for that client: .PP .nf subclass "allocation-class-2" 1:08:00:2b:a1:11:31 { option root-path "samsara:/var/diskless/alphapc"; filename "/tftpboot/netbsd.alphapc-diskless"; } .fi .PP In this example, we've used subclassing as a way to control address allocation on a per-client basis. However, it's also possible to use subclassing in ways that are not specific to clients - for example, to use the value of the vendor-class-identifier option to determine what values to send in the vendor-encapsulated-options option. An example of this is shown under the VENDOR ENCAPSULATED OPTIONS head in the .B dhcp-options(5) manual page. .SH PER-CLASS LIMITS ON DYNAMIC ADDRESS ALLOCATION .PP You may specify a limit to the number of clients in a class that can be assigned leases. The effect of this will be to make it difficult for a new client in a class to get an address. Once a class with such a limit has reached its limit, the only way a new client in that class can get a lease is for an existing client to relinquish its lease, either by letting it expire, or by sending a DHCPRELEASE packet. Classes with lease limits are specified as follows: .PP .nf class "limited-1" { lease limit 4; } .fi .PP This will produce a class in which a maximum of four members may hold a lease at one time. .SH SPAWNING CLASSES .PP It is possible to declare a .I spawning class\fR. A spawning class is a class that automatically produces subclasses based on what the client sends. The reason that spawning classes were created was to make it possible to create lease-limited classes on the fly. The envisioned application is a cable-modem environment where the ISP wishes to provide clients at a particular site with more than one IP address, but does not wish to provide such clients with their own subnet, nor give them an unlimited number of IP addresses from the network segment to which they are connected. .PP Many cable modem head-end systems can be configured to add a Relay Agent Information option to DHCP packets when relaying them to the DHCP server. These systems typically add a circuit ID or remote ID option that uniquely identifies the customer site. To take advantage of this, you can write a class declaration as follows: .PP .nf class "customer" { spawn with option agent.circuit-id; lease limit 4; } .fi .PP Now whenever a request comes in from a customer site, the circuit ID option will be checked against the class's hash table. If a subclass is found that matches the circuit ID, the client will be classified in that subclass and treated accordingly. If no subclass is found matching the circuit ID, a new one will be created and logged in the .B dhcpd.leases file, and the client will be classified in this new class. Once the client has been classified, it will be treated according to the rules of the class, including, in this case, being subject to the per-site limit of four leases. .PP The use of the subclass spawning mechanism is not restricted to relay agent options - this particular example is given only because it is a fairly straightforward one. .SH COMBINING MATCH, MATCH IF AND SPAWN WITH .PP In some cases, it may be useful to use one expression to assign a client to a particular class, and a second expression to put it into a subclass of that class. This can be done by combining the \fBmatch if\fR and \fBspawn with\fR statements, or the \fBmatch if\fR and \fBmatch\fR statements. For example: .PP .nf class "jr-cable-modems" { match if option dhcp-vendor-identifier = "jrcm"; spawn with option agent.circuit-id; lease limit 4; } class "dv-dsl-modems" { match if opton dhcp-vendor-identifier = "dvdsl"; spawn with option agent.circuit-id; lease limit 16; } .fi .PP This allows you to have two classes that both have the same \fBspawn with\fR expression without getting the clients in the two classes confused with each other. .SH DYNAMIC DNS UPDATES .PP The DHCP server has the ability to dynamically update the Domain Name System. Within the configuration files, you can define how you want the Domain Name System to be updated. These updates are RFC 2136 compliant so any DNS server supporting RFC 2136 should be able to accept updates from the DHCP server. .PP Two DNS update schemes are currently implemented, and another is planned. The two that are currently available are the ad-hoc DNS update mode and the interim DHCP-DNS interaction draft update mode. If and when the DHCP-DNS interaction draft and the DHCID draft make it through the IETF standards process, there will be a third mode, which will be the standard DNS update method. The DHCP server must be configured to use one of the two currently-supported methods, or not to do dns updates. This can be done with the .I ddns-update-style configuration parameter. .SH THE AD-HOC DNS UPDATE SCHEME The ad-hoc Dynamic DNS update scheme implemented in this version of the ISC DHCP server is a prototype design, which does not have much to do with the standard update method that is being standardized in the IETF DHC working group, but rather implements some very basic, yet useful, update capabilities. This mode .B does not work with the .I failover protocol because it does not account for the possibility of two different DHCP servers updating the same set of DNS records. .PP For the ad-hoc DNS update method, the client's FQDN is derived in two parts. First, the hostname is determined. Then, the domain name is determined, and appended to the hostname. .PP The DHCP server determines the client's hostname by first looking for a \fIddns-hostname\fR configuration option, and using that if it is present. If no such option is present, the server looks for a valid hostname in the FQDN option sent by the client. If one is found, it is used; otherwise, if the client sent a host-name option, that is used. Otherwise, if there is a host declaration that applies to the client, the name from that declaration will be used. If none of these applies, the server will not have a hostname for the client, and will not be able to do a DNS update. .PP The domain name is determined based strictly on the server configuration, not on what the client sends. First, if there is a .I ddns-domainname configuration option, it is used. Second, if there is a \fIdomain-name\fR option configured, that is used. Otherwise, the server will not do the DNS update. .PP The client's fully-qualified domain name, derived as we have described, is used as the name on which an "A" record will be stored. The A record will contain the IP address that the client was assigned in its lease. If there is already an A record with the same name in the DNS server, no update of either the A or PTR records will occur - this prevents a client from claiming that its hostname is the name of some network server. For example, if you have a fileserver called "fs.sneedville.edu", and the client claims its hostname is "fs", no DNS update will be done for that client, and an error message will be logged. .PP If the A record update succeeds, a PTR record update for the assigned IP address will be done, pointing to the A record. This update is unconditional - it will be done even if another PTR record of the same name exists. Since the IP address has been assigned to the DHCP server, this should be safe. .PP Please note that the current implementation assumes clients only have a single network interface. A client with two network interfaces will see unpredictable behavior. This is considered a bug, and will be fixed in a later release. It may be helpful to enable the .I one-lease-per-client parameter so that roaming clients do not trigger this same behavior. .PP The DHCP protocol normally involves a four-packet exchange - first the client sends a DHCPDISCOVER message, then the server sends a DHCPOFFER, then the client sends a DHCPREQUEST, then the server sends a DHCPACK. In the current version of the server, the server will do a DNS update after it has received the DHCPREQUEST, and before it has sent the DHCPOFFER. It only sends the DNS update if it has not sent one for the client's address before, in order to minimize the impact on the DHCP server. .PP When the client's lease expires, the DHCP server (if it is operating at the time, or when next it operates) will remove the client's A and PTR records from the DNS database. If the client releases its lease by sending a DHCPRELEASE message, the server will likewise remove the A and PTR records. .SH THE INTERIM DNS UPDATE SCHEME The interim DNS update scheme operates mostly according to several drafts that are being considered by the IETF and are expected to become standards, but are not yet standards, and may not be standardized exactly as currently proposed. These are: .PP .nf .ce 3 draft-ietf-dhc-ddns-resolution-??.txt draft-ietf-dhc-fqdn-option-??.txt draft-ietf-dnsext-dhcid-rr-??.txt .fi .PP Because our implementation is slightly different than the standard, we will briefly document the operation of this update style here. .PP The first point to understand about this style of DNS update is that unlike the ad-hoc style, the DHCP server does not necessarily always update both the A and the PTR records. The FQDN option includes a flag which, when sent by the client, indicates that the client wishes to update its own A record. In that case, the server can be configured either to honor the client's intentions or ignore them. This is done with the statement \fIallow client-updates;\fR or the statement \fIignore client-updates;\fR. By default, client updates are allowed. .PP If the server is configured to allow client updates, then if the client sends a fully-qualified domain name in the FQDN option, the server will use that name the client sent in the FQDN option to update the PTR record. For example, let us say that the client is a visitor from the "radish.org" domain, whose hostname is "jschmoe". The server is for the "example.org" domain. The DHCP client indicates in the FQDN option that its FQDN is "jschmoe.radish.org.". It also indicates that it wants to update its own A record. The DHCP server therefore does not attempt to set up an A record for the client, but does set up a PTR record for the IP address that it assigns the client, pointing at jschmoe.radish.org. Once the DHCP client has an IP address, it can update its own A record, assuming that the "radish.org" DNS server will allow it to do so. .PP If the server is configured not to allow client updates, or if the client doesn't want to do its own update, the server will simply choose a name for the client, possibly using the hostname supplied by the client ("jschmoe" in the previous example). It will use its own domain name for the client, just as in the ad-hoc update scheme. It will then update both the A and PTR record, using the name that it chose for the client. If the client sends a fully-qualified domain name in the fqdn option, the server uses only the leftmost part of the domain name - in the example above, "jschmoe" instead of "jschmoe.radish.org". .PP The other difference between the ad-hoc scheme and the interim scheme is that with the interim scheme, a method is used that allows more than one DHCP server to update the DNS database without accidentally deleting A records that shouldn't be deleted nor failing to add A records that should be added. The scheme works as follows: .PP When the DHCP server issues a client a new lease, it creates a text string that is an MD5 hash over the DHCP client's identification (see draft-ietf-dnsext-dhcid-rr-??.txt for details). The update adds an A record with the name the server chose and a TXT record containing the hashed identifier string (hashid). If this update succeeds, the server is done. .PP If the update fails because the A record already exists, then the DHCP server attempts to add the A record with the prerequisite that there must be a TXT record in the same name as the new A record, and that TXT record's contents must be equal to hashid. If this update succeeds, then the client has its A record and PTR record. If it fails, then the name the client has been assigned (or requested) is in use, and can't be used by the client. At this point the DHCP server gives up trying to do a DNS update for the client until the client chooses a new name. .PP The interim DNS update scheme is called interim for two reasons. First, it does not quite follow the drafts. The current versions of the drafts call for a new DHCID RRtype, but this is not yet available. The interim DNS update scheme uses a TXT record instead. Also, the existing ddns-resolution draft calls for the DHCP server to put a DHCID RR on the PTR record, but the \fIinterim\fR update method does not do this. It is our position that this is not useful, and we are working with the author in hopes of removing it from the next version of the draft, or better understanding why it is considered useful. .PP In addition to these differences, the server also does not update very aggressively. Because each DNS update involves a round trip to the DNS server, there is a cost associated with doing updates even if they do not actually modify the DNS database. So the DHCP server tracks whether or not it has updated the record in the past (this information is stored on the lease) and does not attempt to update records that it thinks it has already updated. .PP This can lead to cases where the DHCP server adds a record, and then the record is deleted through some other mechanism, but the server never again updates the DNS because it thinks the data is already there. In this case the data can be removed from the lease through operator intervention, and once this has been done, the DNS will be updated the next time the client renews. .SH DYNAMIC DNS UPDATE SECURITY .PP When you set your DNS server up to allow updates from the DHCP server, you may be exposing it to unauthorized updates. To avoid this, you should use TSIG signatures - a method of cryptographically signing updates using a shared secret key. As long as you protect the secrecy of this key, your updates should also be secure. Note, however, that the DHCP protocol itself provides no security, and that clients can therefore provide information to the DHCP server which the DHCP server will then use in its updates, with the constraints described previously. .PP The DNS server must be configured to allow updates for any zone that the DHCP server will be updating. For example, let us say that clients in the sneedville.edu domain will be assigned addresses on the 10.10.17.0/24 subnet. In that case, you will need a key declaration for the TSIG key you will be using, and also two zone declarations - one for the zone containing A records that will be updates and one for the zone containing PTR records - for ISC BIND, something like this: .PP .nf key DHCP_UPDATER { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret pRP5FapFoJ95JEL06sv4PQ==; }; zone "example.org" { type master; file "example.org.db"; allow-update { key DHCP_UPDATER; }; }; zone "17.10.10.in-addr.arpa" { type master; file "10.10.17.db"; allow-update { key DHCP_UPDATER; }; }; .fi .PP You will also have to configure your DHCP server to do updates to these zones. To do so, you need to add something like this to your dhcpd.conf file: .PP .nf key DHCP_UPDATER { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret pRP5FapFoJ95JEL06sv4PQ==; }; zone EXAMPLE.ORG. { primary 127.0.0.1; key DHCP_UPDATER; } zone 17.127.10.in-addr.arpa. { primary 127.0.0.1; key DHCP_UPDATER; } .fi .PP Note that the zone declarations have to correspond to authority records in your name server - in the above example, there must be an SOA record for "example.org." and for "17.10.10.in-addr.arpa.". For example, if there were a subdoman "foo.example.org" with no separate SOA, you could not write a zone declaration for "foo.example.org." Also keep in mind that zone names in your DHCP configuration should end in a "."; this is the preferred syntax. If you do not end your zone name in a ".", the DHCP server will figure it out. Also note that in the DHCP configuration, zone names are not encapsulated in quotes where there are in the DNS configuration. .PP You should choose your own secret key, of course. The ISC BIND 8 and 9 distributions come with a program for generating secret keys called dnssec-keygen. The version that comes with BIND 9 is likely to produce a substantially more random key, so we recommend you use that one even if you are not using BIND 9 as your DNS server. If you are using BIND 9's dnssec-keygen, the above key would be created as follows: .nf dnssec-keygen -a HMAC-MD5 -b 128 -n USER DHCP_UPDATER If you are using the BIND 8 dnskeygen program, the following command will generate a key as seen above: .nf dnskeygen -H 128 -u -c -n DHCP_UPDATER .fi .PP You may wish to enable logging of DNS updates on your DNS server. To do so, you might write a logging statement like the following: .PP .nf logging { channel update_debug { file "/var/log/update-debug.log"; severity debug 3; print-category yes; print-severity yes; print-time yes; }; channel security_info { file "/var/log/named-auth.info"; severity info; print-category yes; print-severity yes; print-time yes; }; category update { update_debug; }; category security { security_info; }; }; .fi .PP You must create the /var/log/named-auth.info and /var/log/update-debug.log files before starting the name server. For more information on configuring ISC BIND, consult the documentation that accompanies it. .SH REFERENCE: EVENTS .PP There are three kinds of events that can happen regarding a lease, and it is possible to declare statements that occur when any of these events happen. These events are the commit event, when the server has made a commitment of a certain lease to a client, the release event, when the client has released the server from its commitment, and the expiry event, when the commitment expires. .PP To declare a set of statements to execute when an event happens, you must use the \fBon\fR statement, followed by the name of the event, followed by a series of statements to execute when the event happens, enclosed in braces. Events are used to implement DNS updates, so you should not define your own event handlers if you are using the built-in DNS update mechanism. .PP The built-in version of the DNS update mechanism is in a text string towards the top of server/dhcpd.c. If you want to use events for things other than DNS updates, and you also want DNS updates, you will have to start out by copying this code into your dhcpd.conf file and modifying it. .SH REFERENCE: DECLARATIONS .PP .B The .I shared-network .B statement .PP .nf \fBshared-network\fR \fIname\fR \fB{\fR [ \fIparameters\fR ] [ \fIdeclarations\fR ] \fB}\fR .fi .PP The \fIshared-network\fR statement is used to inform the DHCP server that some IP subnets actually share the same physical network. Any subnets in a shared network should be declared within a \fIshared-network\fR statement. Parameters specified in the \fIshared-network\fR statement will be used when booting clients on those subnets unless parameters provided at the subnet or host level override them. If any subnet in a shared network has addresses available for dynamic allocation, those addresses are collected into a common pool for that shared network and assigned to clients as needed. There is no way to distinguish on which subnet of a shared network a client should boot. .PP .I Name should be the name of the shared network. This name is used when printing debugging messages, so it should be descriptive for the shared network. The name may have the syntax of a valid domain name (although it will never be used as such), or it may be any arbitrary name, enclosed in quotes. .PP .B The .I subnet .B statement .PP .nf \fBsubnet\fR \fIsubnet-number\fR \fBnetmask\fR \fInetmask\fR \fB{\fR [ \fIparameters\fR ] [ \fIdeclarations\fR ] \fB}\fR .fi .PP The \fIsubnet\fR statement is used to provide dhcpd with enough information to tell whether or not an IP address is on that subnet. It may also be used to provide subnet-specific parameters and to specify what addresses may be dynamically allocated to clients booting on that subnet. Such addresses are specified using the \fIrange\fR declaration. .PP The .I subnet-number should be an IP address or domain name which resolves to the subnet number of the subnet being described. The .I netmask should be an IP address or domain name which resolves to the subnet mask of the subnet being described. The subnet number, together with the netmask, are sufficient to determine whether any given IP address is on the specified subnet. .PP Although a netmask must be given with every subnet declaration, it is recommended that if there is any variance in subnet masks at a site, a subnet-mask option statement be used in each subnet declaration to set the desired subnet mask, since any subnet-mask option statement will override the subnet mask declared in the subnet statement. .PP .B The .I range .B statement .PP .nf .B range\fR [ \fBdynamic-bootp\fR ] \fIlow-address\fR [ \fIhigh-address\fR]\fB;\fR .fi .PP For any subnet on which addresses will be assigned dynamically, there must be at least one \fIrange\fR statement. The range statement gives the lowest and highest IP addresses in a range. All IP addresses in the range should be in the subnet in which the \fIrange\fR statement is declared. The \fIdynamic-bootp\fR flag may be specified if addresses in the specified range may be dynamically assigned to BOOTP clients as well as DHCP clients. When specifying a single address, \fIhigh-address\fR can be omitted. .PP .B The .I host .B statement .PP .nf \fBhost\fR \fIhostname\fR { [ \fIparameters\fR ] [ \fIdeclarations\fR ] \fB}\fR .fi .PP There must be at least one .B host statement for every BOOTP client that is to be served. .B host statements may also be specified for DHCP clients, although this is not required unless booting is only enabled for known hosts. .PP If it is desirable to be able to boot a DHCP or BOOTP client on more than one subnet with fixed addresses, more than one address may be specified in the .I fixed-address parameter, or more than one .B host statement may be specified. .PP If client-specific boot parameters must change based on the network to which the client is attached, then multiple .B host statements should be used. .PP If a client is to be booted using a fixed address if it's possible, but should be allocated a dynamic address otherwise, then a .B host statement must be specified without a .B fixed-address clause. .I hostname should be a name identifying the host. If a \fIhostname\fR option is not specified for the host, \fIhostname\fR is used. .PP \fIHost\fR declarations are matched to actual DHCP or BOOTP clients by matching the \fRdhcp-client-identifier\fR option specified in the \fIhost\fR declaration to the one supplied by the client, or, if the \fIhost\fR declaration or the client does not provide a \fRdhcp-client-identifier\fR option, by matching the \fIhardware\fR parameter in the \fIhost\fR declaration to the network hardware address supplied by the client. BOOTP clients do not normally provide a \fIdhcp-client-identifier\fR, so the hardware address must be used for all clients that may boot using the BOOTP protocol. .PP .B The .I group .B statement .PP .nf \fBgroup\fR { [ \fIparameters\fR ] [ \fIdeclarations\fR ] \fB}\fR .fi .PP The group statement is used simply to apply one or more parameters to a group of declarations. It can be used to group hosts, shared networks, subnets, or even other groups. .SH REFERENCE: ALLOW AND DENY The .I allow and .I deny statements can be used to control the response of the DHCP server to various sorts of requests. The allow and deny keywords actually have different meanings depending on the context. In a pool context, these keywords can be used to set up access lists for address allocation pools. In other contexts, the keywords simply control general server behavior with respect to clients based on scope. In a non-pool context, the .I ignore keyword can be used in place of the .I deny keyword to prevent logging of denied requests. .PP .SH ALLOW DENY AND IGNORE IN SCOPE The following usages of allow and deny will work in any scope, although it is not recommended that they be used in pool declarations. .PP .B The .I unknown-clients .B keyword .PP \fBallow unknown-clients;\fR \fBdeny unknown-clients;\fR \fBignore unknown-clients;\fR .PP The \fBunknown-clients\fR flag is used to tell dhcpd whether or not to dynamically assign addresses to unknown clients. Dynamic address assignment to unknown clients is \fBallow\fRed by default. An unknown client is simply a client that has no host declaration. .PP .B The .I bootp .B keyword .PP \fBallow bootp;\fR \fBdeny bootp;\fR \fBignore bootp;\fR .PP The \fBbootp\fR flag is used to tell dhcpd whether or not to respond to bootp queries. Bootp queries are \fBallow\fRed by default. .PP .B The .I booting .B keyword .PP \fBallow booting;\fR \fBdeny booting;\fR \fBignore booting;\fR .PP The \fBbooting\fR flag is used to tell dhcpd whether or not to respond to queries from a particular client. This keyword only has meaning when it appears in a host declaration. By default, booting is \fBallow\fRed, but if it is disabled for a particular client, then that client will not be able to get and address from the DHCP server. .B The .I duplicates .B keyword .PP \fBallow duplicates;\fR \fBdeny duplicates;\fR .PP Host declarations can match client messages based on the DHCP Client Identifer option or based on the client's network hardware type and MAC address. If the MAC address is used, the host declaration will match any client with that MAC address - even clients with different client identifiers. This doesn't normally happen, but is possible when one computer has more than one operating system installed on it - for example, Microsoft Windows and NetBSD or Linux. .PP The \fBduplicates\fR flag tells the DHCP server that if a request is received from a client that matches the MAC address of a host declaration, any other leases matching that MAC address should be discarded by the server, even if the UID is not the same. This is a violation of the DHCP protocol, but can prevent clients whose client identifiers change regularly from holding many leases at the same time. By default, duplicates are \fBallow\fRed. .B The .I declines .B keyword .PP \fBallow declines;\fR \fBdeny declines;\fR \fBignore declines;\fR .PP The DHCPDECLINE message is used by DHCP clients to indicate that the lease the server has offered is not valid. When the server receives a DHCPDECLINE for a particular address, it normally abandons that address, assuming that some unauthorized system is using it. Unfortunately, a malicious or buggy client can, using DHCPDECLINE messages, completely exhaust the DHCP server's allocation pool. The server will reclaim these leases, but while the client is running through the pool, it may cause serious thrashing in the DNS, and it will also cause the DHCP server to forget old DHCP client address allocations. .PP The \fBdeclines\fR flag tells the DHCP server whether or not to honor DHCPDECLINE messages. If it is set to \fBdeny\fR or \fBignore\fR in a particular scope, the DHCP server will not respond to DHCPDECLINE messages. .B The .I client-updates .B keyword .PP \fBallow client-updates;\fR \fBdeny client-updates;\fR .PP The \fBclient-updates\fR flag tells the DHCP server whether or not to honor the client's intention to do its own update of its A record. This is only relevant when doing \fIinterim\fR DNS updates. See the documentation under the heading THE INTERIM DNS UPDATE SCHEME for details. .SH ALLOW AND DENY WITHIN POOL DECLARATIONS .PP The uses of the allow and deny keywords shown in the previous section work pretty much the same way whether the client is sending a DHCPDISCOVER or a DHCPREQUEST message - an address will be allocated to the client (either the old address it's requesting, or a new address) and then that address will be tested to see if it's okay to let the client have it. If the client requested it, and it's not okay, the server will send a DHCPNAK message. Otherwise, the server will simply not respond to the client. If it is okay to give the address to the client, the server will send a DHCPACK message. .PP The primary motivation behind pool declarations is to have address allocation pools whose allocation policies are different. A client may be denied access to one pool, but allowed access to another pool on the same network segment. In order for this to work, access control has to be done during address allocation, not after address allocation is done. .PP When a DHCPREQUEST message is processed, address allocation simply consists of looking up the address the client is requesting and seeing if it's still available for the client. If it is, then the DHCP server checks both the address pool permit lists and the relevant in-scope allow and deny statements to see if it's okay to give the lease to the client. In the case of a DHCPDISCOVER message, the allocation process is done as described previously in the ADDRESS ALLOCATION section. .PP When declaring permit lists for address allocation pools, the following syntaxes are recognized following the allow or deny keywords: .PP \fBknown clients;\fR .PP If specified, this statement either allows or prevents allocation from this pool to any client that has a host declaration (i.e., is known). A client is known if it has a host declaration in \fIany\fR scope, not just the current scope. .PP \fBunknown clients;\fR .PP If specified, this statement either allows or prevents allocation from this pool to any client that has no host declaration (i.e., is not known). .PP \fBmembers of "\fRclass\fB";\fR .PP If specified, this statement either allows or prevents allocation from this pool to any client that is a member of the named class. .PP \fBdynamic bootp clients;\fR .PP If specified, this statement either allows or prevents allocation from this pool to any bootp client. .PP \fBauthenticated clients;\fR .PP If specified, this statement either allows or prevents allocation from this pool to any client that has been authenticated using the DHCP authentication protocol. This is not yet supported. .PP \fBunauthenticated clients;\fR .PP If specified, this statement either allows or prevents allocation from this pool to any client that has not been authenticated using the DHCP authentication protocol. This is not yet supported. .PP \fBall clients;\fR .PP If specified, this statement either allows or prevents allocation from this pool to all clients. This can be used when you want to write a pool declaration for some reason, but hold it in reserve, or when you want to renumber your network quickly, and thus want the server to force all clients that have been allocated addresses from this pool to obtain new addresses immediately when they next renew. .SH REFERENCE: PARAMETERS The .I always-broadcast statement .RS 0.25i .PP .B always-broadcast \fIflag\fR\fB;\fR .PP The DHCP and BOOTP protocols both require DHCP and BOOTP clients to set the broadcast bit in the flags field of the BOOTP message header. Unfortunately, some DHCP and BOOTP clients do not do this, and therefore may not receive responses from the DHCP server. The DHCP server can be made to always broadcast its responses to clients by setting this flag to 'on' for the relevant scope. To avoid creating excess broadcast traffic on your network, we recommend that you restrict the use of this option to as few clients as possible. For example, the Microsoft DHCP client is known not to have this problem, as are the OpenTransport and ISC DHCP clients. .RE .PP The .I always-reply-rfc1048 statement .RS 0.25i .PP .B always-reply-rfc1048 \fIflag\fR\fB;\fR .PP Some BOOTP clients expect RFC1048-style responses, but do not follow RFC1048 when sending their requests. You can tell that a client is having this problem if it is not getting the options you have configured for it and if you see in the server log the message "(non-rfc1048)" printed with each BOOTREQUEST that is logged. .PP If you want to send rfc1048 options to such a client, you can set the .B always-reply-rfc1048 option in that client's host declaration, and the DHCP server will respond with an RFC-1048-style vendor options field. This flag can be set in any scope, and will affect all clients covered by that scope. .RE .PP The .I authoritative statement .RS 0.25i .PP .B authoritative; .PP .B not authoritative; .PP The DHCP server will normally assume that the configuration information about a given network segment is not known to be correct and is not authoritative. This is so that if a naive user installs a DHCP server not fully understanding how to configure it, it does not send spurious DHCPNAK messages to clients that have obtained addresses from a legitimate DHCP server on the network. .PP Network administrators setting up authoritative DHCP servers for their networks should always write \fBauthoritative;\fR at the top of their configuration file to indicate that the DHCP server \fIshould\fR send DHCPNAK messages to misconfigured clients. If this is not done, clients will be unable to get a correct IP address after changing subnets until their old lease has expired, which could take quite a long time. .PP Usually, writing \fBauthoritative;\fR at the top level of the file should be sufficient. However, if a DHCP server is to be set up so that it is aware of some networks for which it is authoritative and some networks for which it is not, it may be more appropriate to declare authority on a per-network-segment basis. .PP Note that the most specific scope for which the concept of authority makes any sense is the physical network segment - either a shared-network statement or a subnet statement that is not contained within a shared-network statement. It is not meaningful to specify that the server is authoritative for some subnets within a shared network, but not authoritative for others, nor is it meaningful to specify that the server is authoritative for some host declarations and not others. .RE .PP The \fIboot-unknown-clients\fR statement .RS 0.25i .PP .B boot-unknown-clients \fIname\fB;\fR .PP If the \fIboot-unknown-clients\fR statement is present and has a value of \fIfalse\fR or \fIoff\fR, then clients for which there is no .I host declaration will not be allowed to obtain IP addresses. If this statement is not present or has a value of \fItrue\fR or \fIon\fR, then clients without host declarations will be allowed to obtain IP addresses, as long as those addresses are not restricted by .I allow and \fIdeny\fR statements within their \fIpool\fR declarations. .RE .PP The \fIddns-hostname\fR statement .RS 0.25i .PP .B ddns-hostname \fIname\fB;\fR .PP The \fIname\fR parameter should be the hostname that will be used in setting up the client's A and PTR records. If no ddns-hostname is specified in scope, then the server will derive the hostname automatically, using an algorithm that varies for each of the different update methods. .RE .PP The \fIddns-domainname\fR statement .RS 0.25i .PP .B ddns-domainname \fIname\fB;\fR .PP The \fIname\fR parameter should be the domain name that will be appended to the client's hostname to form a fully-qualified domain-name (FQDN). .RE .PP The \fIddns-rev-domainname\fR statement .RS 0.25i .PP .B ddns-rev-domainname \fIname\fB;\fR The \fIname\fR parameter should be the domain name that will be appended to the client's reversed IP address to produce a name for use in the client's PTR record. By default, this is "in-addr.arpa.", but the default can be overridden here. .PP The reversed IP address to which this domain name is appended is always the IP address of the client, in dotted quad notation, reversed - for example, if the IP address assigned to the client is 10.17.92.74, then the reversed IP address is 74.92.17.10. So a client with that IP address would, by default, be given a PTR record of 10.17.92.74.in-addr.arpa. .RE .PP The \fIddns-update-style\fR parameter .RS 0.25i .PP .B ddns-update-style \fIstyle\fB;\fR .PP The .I style parameter must be one of \fBad-hoc\fR, \fBinterim\fR or \fBnone\fR. The \fIddns-update-style\fR statement is only meaningful in the outer scope - it is evaluated once after reading the dhcpd.conf file, rather than each time a client is assigned an IP address, so there is no way to use different DNS update styles for different clients. .RE .PP .B The .I ddns-updates .B statement .RS 0.25i .PP \fBddns-updates \fIflag\fR\fB;\fR .PP The \fIddns-updates\fR parameter controls whether or not the server will attempt to do a DNS update when a lease is confirmed. Set this to \fIoff\fR if the server should not attempt to do updates within a certain scope. The \fIddns-updates\fR parameter is on by default. To disable DNS updates in all scopes, it is preferable to use the \fIddns-update-style\fR statement, setting the style to \fInone\fR. .RE .PP The .I default-lease-time statement .RS 0.25i .PP .B default-lease-time \fItime\fR\fB;\fR .PP .I Time should be the length in seconds that will be assigned to a lease if the client requesting the lease does not ask for a specific expiration time. .RE .PP The .I dynamic-bootp-lease-cutoff statement .RS 0.25i .PP .B dynamic-bootp-lease-cutoff \fIdate\fB;\fR .PP The \fIdynamic-bootp-lease-cutoff\fR statement sets the ending time for all leases assigned dynamically to BOOTP clients. Because BOOTP clients do not have any way of renewing leases, and don't know that their leases could expire, by default dhcpd assignes infinite leases to all BOOTP clients. However, it may make sense in some situations to set a cutoff date for all BOOTP leases - for example, the end of a school term, or the time at night when a facility is closed and all machines are required to be powered off. .PP .I Date should be the date on which all assigned BOOTP leases will end. The date is specified in the form: .PP .ce 1 W YYYY/MM/DD HH:MM:SS .PP W is the day of the week expressed as a number from zero (Sunday) to six (Saturday). YYYY is the year, including the century. MM is the month expressed as a number from 1 to 12. DD is the day of the month, counting from 1. HH is the hour, from zero to 23. MM is the minute and SS is the second. The time is always in Universal Coordinated Time (UTC), not local time. .RE .PP The .I dynamic-bootp-lease-length statement .RS 0.25i .PP .B dynamic-bootp-lease-length\fR \fIlength\fR\fB;\fR .PP The \fIdynamic-bootp-lease-length\fR statement is used to set the length of leases dynamically assigned to BOOTP clients. At some sites, it may be possible to assume that a lease is no longer in use if its holder has not used BOOTP or DHCP to get its address within a certain time period. The period is specified in \fIlength\fR as a number of seconds. If a client reboots using BOOTP during the timeout period, the lease duration is reset to \fIlength\fR, so a BOOTP client that boots frequently enough will never lose its lease. Needless to say, this parameter should be adjusted with extreme caution. .RE .PP The .I filename statement .RS 0.25i .PP .B filename\fR \fB"\fR\fIfilename\fR\fB";\fR .PP The \fIfilename\fR statement can be used to specify the name of the initial boot file which is to be loaded by a client. The .I filename should be a filename recognizable to whatever file transfer protocol the client can be expected to use to load the file. .RE .PP The .I fixed-address statement .RS 0.25i .PP .B fixed-address address\fR [\fB,\fR \fIaddress\fR ... ]\fB;\fR .PP The \fIfixed-address\fR statement is used to assign one or more fixed IP addresses to a client. It should only appear in a \fIhost\fR declaration. If more than one address is supplied, then when the client boots, it will be assigned the address which corresponds to the network on which it is booting. If none of the addresses in the \fIfixed-address\fR statement are on the network on which the client is booting, that client will not match the \fIhost\fR declaration containing that \fIfixed-address\fR statement. Each \fIaddress\fR should be either an IP address or a domain name which resolves to one or more IP addresses. .RE .PP The .I get-lease-hostnames statement .RS 0.25i .PP .B get-lease-hostnames\fR \fIflag\fR\fB;\fR .PP The \fIget-lease-hostnames\fR statement is used to tell dhcpd whether or not to look up the domain name corresponding to the IP address of each address in the lease pool and use that address for the DHCP \fIhostname\fR option. If \fIflag\fR is true, then this lookup is done for all addresses in the current scope. By default, or if \fIflag\fR is false, no lookups are done. .RE .PP The .I hardware statement .RS 0.25i .PP .B hardware \fIhardware-type hardware-address\fB;\fR .PP In order for a BOOTP client to be recognized, its network hardware address must be declared using a \fIhardware\fR clause in the .I host statement. .I hardware-type must be the name of a physical hardware interface type. Currently, only the .B ethernet and .B token-ring types are recognized, although support for a .B fddi hardware type (and others) would also be desirable. The .I hardware-address should be a set of hexadecimal octets (numbers from 0 through ff) separated by colons. The \fIhardware\fR statement may also be used for DHCP clients. .RE .PP The .I lease-file-name statement .RS 0.25i .PP .B lease-file-name \fIname\fB;\fR .PP .I Name should be the name of the DHCP server's lease file. By default, this is DBDIR/dhcpd.leases. This statement \fBmust\fR appear in the outer scope of the configuration file - if it appears in some other scope, it will have no effect. .RE .PP The .I local-port statement .RS 0.25i .PP .B local-port \fIport\fB;\fR .PP This statement causes the DHCP server to listen for DHCP requests on the UDP port specified in \fIport\fR, rather than on port 67. .RE .PP The .I log-facility statement .RS 0.25i .PP .B log-facility \fIfacility\fB;\fR .PP This statement causes the DHCP server to do all of its logging on the specified log facility once the dhcpd.conf file has been read. By default the DHCP server logs to the daemon facility. Possible log facilities include auth, authpriv, cron, daemon, ftp, kern, lpr, mail, mark, news, ntp, security, syslog, user, uucp, and local0 through local7. Not all of these facilities are available on all systems, and there may be other facilities available on other systems. .PP In addition to setting this value, you may need to modify your .I syslog.conf file to configure logging of the DHCP server. For example, you might add a line like this: .PP .nf local7.debug /var/log/dhcpd.log .fi .PP The syntax of the \fIsyslog.conf\fR file may be different on some operating systems - consult the \fIsyslog.conf\fR manual page to be sure. To get syslog to start logging to the new file, you must first create the file with correct ownership and permissions (usually, the same owner and permissions of your /var/log/messages or /usr/adm/messages file should be fine) and send a SIGHUP to syslogd. Some systems support log rollover using a shell script or program called newsyslog or logrotate, and you may be able to configure this as well so that your log file doesn't grow uncontrollably. .PP Because the \fIlog-facility\fR setting is controlled by the dhcpd.conf file, log messages printed while parsing the dhcpd.conf file or before parsing it are logged to the default log facility. To prevent this, see the README file included with this distribution, which describes how to change the default log facility. When this parameter is used, the DHCP server prints its startup message a second time after parsing the configuration file, so that the log will be as complete as possible. .RE .PP The .I max-lease-time statement .RS 0.25i .PP .B max-lease-time \fItime\fR\fB;\fR .PP .I Time should be the maximum length in seconds that will be assigned to a lease. The only exception to this is that Dynamic BOOTP lease lengths, which are not specified by the client, are not limited by this maximum. .RE .PP The .I min-lease-time statement .RS 0.25i .PP .B min-lease-time \fItime\fR\fB;\fR .PP .I Time should be the minimum length in seconds that will be assigned to a lease. .RE .PP The .I min-secs statement .RS 0.25i .PP .B min-secs \fIseconds\fR\fB;\fR .PP .I Seconds should be the minimum number of seconds since a client began trying to acquire a new lease before the DHCP server will respond to its request. The number of seconds is based on what the client reports, and the maximum value that the client can report is 255 seconds. Generally, setting this to one will result in the DHCP server not responding to the client's first request, but always responding to its second request. .PP This can be used to set up a secondary DHCP server which never offers an address to a client until the primary server has been given a chance to do so. If the primary server is down, the client will bind to the secondary server, but otherwise clients should always bind to the primary. Note that this does not, by itself, permit a primary server and a secondary server to share a pool of dynamically-allocatable addresses. .RE .PP The .I next-server statement .RS 0.25i .PP .B next-server\fR \fIserver-name\fR\fB;\fR .PP The \fInext-server\fR statement is used to specify the host address of the server from which the initial boot file (specified in the \fIfilename\fR statement) is to be loaded. \fIServer-name\fR should be a numeric IP address or a domain name. If no \fInext-server\fR parameter applies to a given client, the DHCP server's IP address is used. .RE .PP The .I omapi-port statement .RS 0.25i .PP .B omapi-port\fR \fIport\fR\fB;\fR .PP The \fIomapi-port\fR statement causes the DHCP server to listen for OMAPI connections on the specified port. This statement is required to enable the OMAPI protocol, which is used to examine and modify the state of the DHCP server as it is running. .RE .PP The .I one-lease-per-client statement .RS 0.25i .PP .B one-lease-per-client \fIflag\fR\fB;\fR .PP If this flag is enabled, whenever a client sends a DHCPREQUEST for a particular lease, the server will automatically free any other leases the client holds. This presumes that when the client sends a DHCPREQUEST, it has forgotten any lease not mentioned in the DHCPREQUEST - i.e., the client has only a single network interface .I and it does not remember leases it's holding on networks to which it is not currently attached. Neither of these assumptions are guaranteed or provable, so we urge caution in the use of this statement. .RE .PP The .I pid-file-name statement .RS 0.25i .PP .B pid-file-name .I name\fR\fB;\fR .PP .I Name should be the name of the DHCP server's process ID file. This is the file in which the DHCP server's process ID is stored when the server starts. By default, this is RUNDIR/dhcpd.pid. Like the lease-file-name statement, this statement must appear in the outer scope of the configuration file. .RE .PP The .I ping-check statement .RS 0.25i .PP .B ping-check .I flag\fR\fB;\fR .PP When the DHCP server is considering dynamically allocating an IP address to a client, it first sends an ICMP Echo request (a \fIping\fR) to the address being assigned. It waits for a second, and if no ICMP Echo response has been heard, it assigns the address. If a response \fIis\fR heard, the lease is abandoned, and the server does not respond to the client. .PP This \fIping check\fR introduces a one-second delay in responding to DHCPDISCOVER messages, which can be a problem for some clients. The ping-check configuration parameter can be used to control checking - if its value is false, no ping check is done. .RE .PP The .I server-identifier statement .RS 0.25i .PP .B server-identifier \fIhostname\fR\fB;\fR .PP The server-identifier statement can be used to define the value that is sent in the DHCP Server Identifier option for a given scope. The value specified \fBmust\fR be an IP address for the DHCP server, and must be reachable by all clients served by a particular scope. .PP The use of the server-identifier statement is not recommended - the only reason to use it is to force a value other than the default value to be sent on occasions where the default value would be incorrect. The default value is the first IP address associated with the physical network interface on which the request arrived. .PP The usual case where the \fIserver-identifier\fR statement needs to be sent is when a physical interface has more than one IP address, and the one being sent by default isn't appropriate for some or all clients served by that interface. Another common case is when an alias is defined for the purpose of having a consistent IP address for the DHCP server, and it is desired that the clients use this IP address when contacting the server. .PP Supplying a value for the dhcp-server-identifier option is equivalent to using the server-identifier statement. .RE .PP The .I server-name statement .RS 0.25i .PP .B server-name "\fIname\fB";\fR .PP The \fIserver-name\fR statement can be used to inform the client of the name of the server from which it is booting. \fIName\fR should be the name that will be provided to the client. .RE .PP The .I site-option-space statement .RS 0.25i .PP .B site-option-space "\fIname\fB";\fR .PP The \fIsite-option-space\fR statement can be used to determine from what option space site-local options will be taken. This can be used in much the same way as the \fIvendor-option-space\fR statement. Site-local options in DHCP are those options whose numeric codes are greater than 128. These options are intended for site-specific uses, but are frequently used by vendors of embedded hardware that contains DHCP clients. Because site-specific options are allocated on an ad hoc basis, it is quite possible that one vendor's DHCP client might use the same option code that another vendor's client uses, for different purposes. The \fIsite-option-space\fR option can be used to assign a different set of site-specific options for each such vendor, using conditional evaluation (see \fIdhcp-eval.5\fR for details). .RE .PP The .I stash-agent-options statement .RS 0.25i .PP .B stash-agent-options \fIflag\fB;\fR .PP If the \fIstash-agent-options\fR parameter is true for a given client, the server will record the relay agent information options sent during the client's initial DHCPREQUEST message when the client was in the SELECTING state and behave as if those options are included in all subsequent DHCPREQUEST messages sent in the RENEWING state. This works around a problem with relay agent information options, which is that they usually not appear in DHCPREQUEST messages sent by the client in the RENEWING state, because such messages are unicast directly to the server and not sent through a relay agent. .RE .PP The .I update-optimization statement .RS 0.25i .PP .B update-optimization \fIflag\fB;\fR .PP If the \fIupdate-optimization\fR parameter is false for a given client, the server will attempt a DNS update for that client each time the client renews its lease, rather than only attempting an update when it appears to be necessary. This will allow the DNS to heal from database inconsistencies more easily, but the cost is that the DHCP server must do many more DNS updates. We do not recommend enabling this on large networks with the current DHCP server. This option only affects the behavior of the interim DNS update scheme, and has no effect on the ad-hoc DNS update scheme. If this parameter is not specified, or is false, the DHCP server will only update when the client information changes, the client gets a different lease, or the client's lease expires. .RE .PP The .I update-static-leases statement .RS 0.25i .PP .B update-static-leases \fIflag\fB;\fR .PP The \fIupdate-static-leases\fR flag, if enabled, causes the DHCP server to do DNS updates for clients even if those clients are being assigned their IP address using a \fIfixed-address\fR statement - that is, the client is being given a static assignment. This can only work with the \fIinterim\fR DNS update scheme. It is not recommended because the DHCP server has no way to tell that the update has been done, and therefore will not delete the record when it is not in use. Also, the server must attempt the update each time the client renews its lease, which could have a significant performance impact in environments that place heavy demands on the DHCP server. .RE .PP The .I use-host-decl-names statement .RS 0.25i .PP .B use-host-decl-names \fIflag\fB;\fR .PP If the \fIuse-host-decl-names\fR parameter is true in a given scope, then for every host declaration within that scope, the name provided for the host declaration will be supplied to the client as its hostname. So, for example, .PP .nf group { use-host-decl-names on; host joe { hardware ethernet 08:00:2b:4c:29:32; fixed-address joe.fugue.com; } } is equivalent to host joe { hardware ethernet 08:00:2b:4c:29:32; fixed-address joe.fugue.com; option host-name "joe"; } .fi .PP An \fIoption host-name\fR statement within a host declaration will override the use of the name in the host declaration. .PP It should be noted here that most DHCP clients completely ignore the host-name option sent by the DHCP server, and there is no way to configure them not to do this. So you generally have a choice of either not having any hostname to client IP address mapping that the client will recognize, or doing DNS updates. It is beyond the scope of this document to describe how to make this determination. .RE .PP The .I use-lease-addr-for-default-route statement .RS 0.25i .PP .B use-lease-addr-for-default-route \fIflag\fR\fB;\fR .PP If the \fIuse-lease-addr-for-default-route\fR parameter is true in a given scope, then instead of sending the value specified in the routers option (or sending no value at all), the IP address of the lease being assigned is sent to the client. This supposedly causes Win95 machines to ARP for all IP addresses, which can be helpful if your router is configured for proxy ARP. The use of this feature is not recommended, because it won't work for many DHCP clients. .RE .PP The .I vendor-option-space statement .RS 0.25i .PP .B vendor-option-space \fIstring\fR\fB;\fR .PP The \fIvendor-option-space\fR parameter determines from what option space vendor options are taken. The use of this configuration parameter is illustrated in the \fIdhcp-options(5)\fR manual page, in the \fIVENDOR ENCAPSULATED OPTIONS\fR section. .RE .SH SETTING PARAMETER VALUES USING EXPRESSIONS Sometimes it's helpful to be able to set the value of a DHCP server parameter based on some value that the client has sent. To do this, you can use expression evaluation. The .B dhcp-eval(5) manual page describes how to write expressions. To assign the result of an evaluation to an option, define the option as follows: .nf .sp 1 \fImy-parameter \fB= \fIexpression \fB;\fR .fi .PP For example: .nf .sp 1 ddns-hostname = binary-to-ascii (16, 8, "-", substring (hardware, 1, 6)); .fi .SH REFERENCE: OPTION STATEMENTS DHCP option statements are documented in the .B dhcp-options(5) manual page. .SH REFERENCE: EXPRESSIONS Expressions used in DHCP option statements and elsewhere are documented in the .B dhcp-eval(5) manual page. .SH SEE ALSO dhcpd(8), dhcpd.leases(5), dhcp-options(5), dhcp-eval(5), RFC2132, RFC2131. .SH AUTHOR .B dhcpd.conf(5) was written by Ted Lemon under a contract with Vixie Labs. Funding for this project was provided by the Internet Software Consortium. Information about the Internet Software Consortium can be found at .B http://www.isc.org/isc. @ 1.17 log @seperate -> separate @ text @@ 1.16 log @merge 3.0rc8 @ text @d507 1 a507 1 both servers, and have a seperate file that contains the peer d670 1 a670 1 .B hba \fIcolon-seperated-hex-list\fB;\fR d702 1 a702 1 Clients can be seperated into classes, and treated differently d1130 1 a1130 1 example, if there were a subdoman "foo.example.org" with no seperate d1842 1 a1842 1 seperated by colons. The \fIhardware\fR statement may also be used @ 1.15 log @Merge of 3.0b2pl23 @ text @d426 14 d462 31 d710 2 a711 14 To add clients to classes based on conditional evaluation, you would write a conditional statement to match the clients you wanted in the class, and then put an .B add statement in the conditional's list of statements: .PP .nf if substring (option dhcp-client-identifier, 1, 3) = "RAS " { add "ras-clients"; } .fi .PP A nearly equivalent way to do this is to simply specify the conditional expression as a matching expression in the class statement: a726 10 .PP Also, the .B add statement adds the client to the class as the client's scopes are being evaluated - after any address assignment decision has been made. This means that a client that's a member of a class due to an add statement will not be affected by pool permits related to that class - when the pool permit list is computed, the client will not yet be a member of the pool. This is an inconsistency that will probably be addressed in later versions of the DHCP server, but it is important to be aware of it at least for the time being. d1131 6 a1136 1 SOA, you could not write a zone declaration for "foo.example.org." d1140 1 a1140 1 dnskeygen. The version that comes with BIND 9 is likely to produce a d1142 7 a1148 2 if you are not using BIND 9 as your DNS server. The key above was generated with the command: d2028 1 a2028 1 .I ping-checks d2032 1 a2032 1 .B ping-checks d2044 1 a2044 1 ping-checks configuration parameter can be used to control checking - d2128 1 d2149 1 d2168 1 @ 1.14 log @Merge 3.0b2pl9 with head. @ text @d3 4 a6 6 .\" Copyright (c) 1996-1999 Internet Software Consortium. .\" Use is subject to license terms which appear in the file named .\" ISC-LICENSE that should have accompanied this file when you .\" received it. If a file named ISC-LICENSE did not accompany this .\" file, or you are not sure the one you have is correct, you may .\" obtain an applicable copy of the license at: d8 8 a15 1 .\" http://www.isc.org/isc-license-1.0.html. d17 13 a29 3 .\" This file is part of the ISC DHCP distribution. The documentation .\" associated with this file is listed in the file DOCUMENTATION, .\" included in the top-level directory of this release. d31 6 a36 2 .\" Support and other services are available for ISC products - see .\" http://www.isc.org for more information. d106 1 a106 1 consulting the any \fIclass\fR declarations matching the client, d111 1 a111 1 client option declarations as well. Scopes are never considered d220 1 a220 1 the behaviour of the DHCP server (e.g., how long a lease dhcpd will d234 1 a234 1 boot files for each models. One way to do this would be to have host d313 1 a313 1 elegible to be assigned addresses from the pool. If a pool has a d315 1 a315 1 the deny list will be elegible. If both permit and deny lists exist d318 1 a318 1 .SH ADDRESS ALLOCATION d325 19 a343 9 the address for a while. If the server finds the address the client is requesting, and that address is available to the client, the server will send a DHCPACK. If the address is no longer available, or the client isn't permitted to have it, the server will send a DHCPNAK. If the server knows nothing about the, it will remain silent, unless the address is incorrect for the network segment to which the client has been attached and the server is authoritative for that network segment, in which case the server will send a DHCPNAK even though it doesn't know about the address. d376 27 d488 1 a488 1 .B The d490 1 a490 1 .B and d492 2 a493 1 .B statements d495 1 a495 1 [ \fBprimary\fR | \fBsecondary\fR ] d499 1 d501 1 a501 1 .B The d503 2 a504 1 .B statement d506 1 a506 2 .B address .I address d512 1 d514 1 a514 1 .B The d516 2 a517 1 .B statement d519 1 a519 2 .B peer address .I address d524 1 d526 1 a526 1 .B The d528 2 a529 1 .B statement d531 1 a531 2 .B port .I port-number d537 1 d539 1 a539 1 .B The d541 2 a542 1 .B statement d544 1 a544 2 .B peer port .I port-number d552 1 d554 1 a554 1 .B The d556 2 a557 1 .B statement d559 1 a559 4 .nf .B max-response-delay .I seconds .fi d569 1 d571 1 a571 1 .B The d573 2 a574 1 .B statement d576 1 a576 2 .B max-unacked-updates .I count d579 1 a579 1 many many BINDUPD messages it can send before it receives a BNDACK d583 1 d585 1 a585 1 .B The d587 2 a588 1 .B statement d590 1 a590 2 .B mclt .I seconds d602 1 d604 1 a604 1 .B The d606 2 a607 1 .B statement d609 1 a609 2 .B split .I index d618 1 d620 1 a620 1 .B The d622 2 a623 1 .B statement d625 1 a625 2 .B hba .I colon-seperated-hex-list d636 1 d638 1 a638 1 .B The d640 2 a641 1 .B statement d643 1 a643 2 .B load balance max seconds .I seconds d655 1 d666 1 a666 1 write an conditional statement to match the clients you wanted in the d672 1 a672 1 if substring (option dhcp-client-identifier, 0, 3) = "RAS" { d682 1 a682 1 match if substring (option dhcp-client-identifier, 0, 3) = "RAS"; d703 1 a703 1 server, but it important to be aware of it at lease for the time being. d770 3 a772 2 of this is shown under the VENDOR ENCAPSULATED OPTIONS head later on in this document. d864 35 a898 5 The Dynamic DNS update scheme implemented in this version of the ISC DHCP server is an interim implementation, which does not implement any of the standard update methods that have been discussed in the working group, but rather implements some very basic, yet useful, update capabilities. d900 2 a901 10 There are three parameters, which may vary according to the scope, that control how DDNS updates will be done. The first two are the .I ddns-domainname and .I ddns-rev-domainname statements. The .I ddns-domainname parameter sets the domain name that will be appended to the client's hostname to form a fully-qualified domain-name (FQDN). For example, if the client's hostname is "hutson" and the d903 14 a916 30 is set to "sneedville.edu", then the client's FQDN will be "hutson.sneedville.edu". .PP The .I ddns-rev-domainname parameter sets the domain name that will be appended to the client's reversed IP address to produce a name for use in the client's PTR record. Normally, you would set this to "in-addr.arpa", but this is not required. .PP A third parameter, .I ddns-hostname can be used to specify the hostname that will be used as the client's hostname. If no ddns-hostname is specified in scope, then the server will use a host-name option sent by the client. If the client did not send a host-name option, then if there is a host declaration that applies to the client, the name from that declaration will be used. If none of these applies, the server will not have a hostname for the client, and will not be able to do a DDNS update. .SH HOW DNS UPDATES WORK .PP The client's FQDN, derived as we have described, is used as the name on which an "A" record will be stored. The A record will contain the IP address that the client was assigned in its lease. If there is already an A record with the same name in the DNS server, no update of either the A or PTR records will occur - this prevents a client from claiming that its hostname is the name of some network server. For example, if you have a fileserver called "fs.sneedville.edu", and the client claims its hostname is "fs", no DNS update will be done for that client, and an error message will be logged. d926 1 a926 1 will see unpredictable behaviour. This is considered a bug, and will d945 99 d1104 6 d1120 1 a1120 1 You may wish to enable logging of DNS transactions on your DNS server. d1161 1 a1161 1 enclosed in braces. Events are used to implement dynamic DNS d1163 1 a1163 1 using the built-in dynamic DNS update mechanism. d1165 1 a1165 1 The built-in version of the dynamic DNS update mechanism is in a text d1329 1 a1329 1 behaviour with respect to clients based on scope. In a non-pool d1352 1 d1424 12 d1438 1 a1438 1 The uses of the allow and deny keyword shown in the previous section d1465 1 a1465 1 following syntaxes are recognized following the allow or deny keyword: d1511 4 d1516 1 a1516 3 .B The .I lease-file-name .B statement d1518 11 a1528 2 .B lease-file-name .I name\fR\fB;\fR d1530 4 a1533 5 .I Name should be the name of the DHCP server's lease file. By default, this is /var/db/dhcpd.leases. This statement \fBmust\fR appear in the outer scope of the configuration file - if it appears in some other scope, it will have no effect. d1535 1 a1535 3 .B The .I pid-file-name .B statement d1537 5 a1541 2 .B pid-file-name .I name\fR\fB;\fR d1543 7 a1549 6 .I Name should be the name of the DHCP server's process ID file. This is the file in which the DHCP server's process ID is stored when the server starts. By default, this is /var/run/dhcpd.pid. Like the lease-file-name statement, this statement must appear in the outer scope of the configuration file. d1551 4 a1554 3 .B The .I default-lease-time .B statement d1556 1 a1556 1 \fBdefault-lease-time\fR \fItime\fR\fB;\fR d1558 1 a1558 4 .I Time should be the length in seconds that will be assigned to a lease if the client requesting the lease does not ask for a specific expiration time. d1560 6 a1565 3 .B The .I max-lease-time .B statement d1567 7 a1573 1 \fBmax-lease-time\fR \fItime\fR\fB;\fR d1575 5 a1579 5 .I Time should be the maximum length in seconds that will be assigned to a lease. The only exception to this is that Dynamic BOOTP lease lengths, which are not specified by the client, are not limited by this maximum. d1581 9 a1589 3 .B The .I min-lease-time .B statement d1591 2 a1592 1 \fBmin-lease-time\fR \fItime\fR\fB;\fR d1594 1 a1594 3 .I Time should be the minimum length in seconds that will be assigned to a lease. d1596 10 a1605 3 .B The .I min-secs .B statement d1607 2 a1608 1 \fBmin-secs\fR \fIseconds\fR\fB;\fR d1610 1 a1610 7 .I Seconds should be the minimum number of seconds since a client began trying to acquire a new lease before the DHCP server will respond to its request. The number of seconds is based on what the client reports, and the maximum value that the client can report is 255 seconds. Generally, setting this to one will result in the DHCP server not responding to the client's first request, but always responding to its second request. d1612 33 a1644 7 This can be used to set up a secondary DHCP server which never offers an address to a client until the primary server has been given a chance to do so. If the primary server is down, the client will bind to the secondary server, but otherwise clients should always bind to the primary. Note that this does not, by itself, permit a primary server and a secondary server to share a pool of dynamically-allocatable addresses. d1646 2 a1647 3 .B The .I hardware .B statement d1649 1 a1649 1 \fBhardware\fR \fIhardware-type\fR \fIhardware-address\fR\fB;\fR a1650 13 In order for a BOOTP client to be recognized, its network hardware address must be declared using a \fIhardware\fR clause in the .I host statement. .I hardware-type must be the name of a physical hardware interface type. Currently, only the .B ethernet and .B token-ring types are recognized, although support for a .B fddi hardware type (and others) would also be desirable. d1652 7 a1658 4 .I hardware-address should be a set of hexadecimal octets (numbers from 0 through ff) seperated by colons. The \fIhardware\fR statement may also be used for DHCP clients. d1660 2 a1661 2 .B The .I filename d1663 1 d1665 1 a1665 1 \fBfilename\fR \fB"\fR\fIfilename\fR\fB";\fR d1667 7 a1673 5 The \fIfilename\fR statement can be used to specify the name of the initial boot file which is to be loaded by a client. The .I filename should be a filename recognizable to whatever file transfer protocol the client can be expected to use to load the file. d1675 4 a1678 3 .B The .I server-name .B statement d1680 1 a1680 1 \fBserver-name\fR \fB"\fR\fIname\fR\fB";\fR d1682 5 a1686 3 The \fIserver-name\fR statement can be used to inform the client of the name of the server from which it is booting. \fIName\fR should be the name that will be provided to the client. d1688 1 a1688 31 .B The .I next-server .B statement .PP \fBnext-server\fR \fIserver-name\fR\fB;\fR .PP The \fInext-server\fR statement is used to specify the host address of the server from which the initial boot file (specified in the \fIfilename\fR statement) is to be loaded. \fIServer-name\fR should be a numeric IP address or a domain name. If no \fInext-server\fR parameter applies to a given client, the DHCP server's IP address is used. .PP .B The .I fixed-address .B statement .PP \fBfixed-address\fR \fIaddress\fR [\fB,\fR \fIaddress\fR ... ]\fB;\fR .PP The \fIfixed-address\fR statement is used to assign one or more fixed IP addresses to a client. It should only appear in a \fIhost\fR declaration. If more than one address is supplied, then when the client boots, it will be assigned the address which corresponds to the network on which it is booting. If none of the addresses in the \fIfixed-address\fR statement are on the network on which the client is booting, that client will not match the \fIhost\fR declaration containing that \fIfixed-address\fR statement. Each \fIaddress\fR should be either an IP address or a domain name which resolves to one or more IP addresses. .PP .B The d1690 2 a1691 1 .B statement d1693 1 a1693 1 \fBdynamic-bootp-lease-cutoff\fR \fIdate\fR\fB;\fR d1717 1 d1719 1 a1719 1 .B The d1721 2 a1722 1 .B statement d1724 1 a1724 1 \fBdynamic-bootp-lease-length\fR \fIlength\fR\fB;\fR d1736 8 d1745 27 a1771 1 .B The d1773 2 a1774 1 .B statement d1776 1 a1776 1 \fBget-lease-hostnames\fR \fIflag\fR\fB;\fR d1784 8 d1793 24 a1816 3 .B The .I use-host-decl-names .B statement d1818 1 a1818 1 \fBuse-host-decl-names\fR \fIflag\fR\fB;\fR d1820 6 a1825 4 If the \fIuse-host-decl-names\fR parameter is true in a given scope, then for every host declaration within that scope, the name provided for the host declaration will be supplied to the client as its hostname. So, for example, d1827 10 a1836 18 .nf group { use-host-decl-names on; host joe { hardware ethernet 08:00:2b:4c:29:32; fixed-address joe.fugue.com; } } is equivalent to host joe { hardware ethernet 08:00:2b:4c:29:32; fixed-address joe.fugue.com; option host-name "joe"; } .fi d1838 43 a1880 2 An \fIoption host-name\fR statement within a host declaration will override the use of the name in the host declaration. d1882 4 a1885 3 .B The .I authoritative .B statement d1887 1 a1887 1 \fBauthoritative;\fR d1889 6 a1894 1 \fBnot authoritative;\fR d1896 4 a1899 6 The DHCP server will normally assume that the configuration information about a given network segment is not known to be correct and is not authoritative. This is so that if a naive user installs a DHCP server not fully understanding how to configure it, it does not send spurious DHCPNAK messages to clients that have obtained addresses from a legitimate DHCP server on the network. d1901 1 a1901 7 Network administrators setting up authoritative DHCP servers for their networks should always write \fBauthoritative;\fR at the top of their configuration file to indicate that the DHCP server \fIshould\fR send DHCPNAK messages to misconfigured clients. If this is not done, clients will be unable to get a correct IP address after changing subnets until their old lease has expired, which could take quite a long time. d1903 4 a1906 5 Usually, writing \fBauthoritative;\fR at the top level of the file should be sufficient. However, if a DHCP server is to be set up so that it is aware of some networks for which it is authoritative and some networks for which it is not, it may be more appropriate to declare authority on a per-network-segment basis. d1908 4 a1911 8 Note that the most specific scope for which the concept of authority makes any sense is the physical network segment - either a shared-network statement or a subnet statement that is not contained within a shared-network statement. It is not meaningful to specify that the server is authoritative for some subnets within a shared network, but not authoritative for others, nor is it meaningful to specify that the server is authoritative for some host declarations and not others. d1913 1 a1913 3 .B The .I always-reply-rfc1048 .B statement d1915 7 a1921 1 \fBalways-reply-rfc1048\fR \fIflag\fR\fB;\fR d1923 8 a1930 5 Some BOOTP clients expect RFC1048-style responses, but do not follow RFC1048 when sending their requests. You can tell that a client is having this problem if it is not getting the options you have configured for it and if you see in the server log the message "(non-rfc1048)" printed with each BOOTREQUEST that is logged. d1932 4 a1935 6 If you want to send rfc1048 options to such a client, you can set the .B always-reply-rfc1048 option in that client's host declaration, and the DHCP server will respond with an RFC-1048-style vendor options field. This flag can be set in any scope, and will affect all clients covered by that scope. d1937 1 a1937 3 .B The .I always-broadcast .B statement d1939 7 a1945 1 \fBalways-broadcast\fR \fIflag\fR\fB;\fR d1947 12 a1958 10 The DHCP and BOOTP protocols both require DHCP and BOOTP clients to set the broadcast bit in the flags field of the BOOTP message header. Unfortunately, some DHCP and BOOTP clients do not do this, and therefore may not receive responses from the DHCP server. The DHCP server can be made to always broadcast its responses to clients by setting this flag to 'on' for the relevant scope. To avoid creating excess broadcast traffic on your network, we recommend that you restrict the use of this option to as few clients as possible. For example, the Microsoft DHCP client is known not to have this problem, as are the OpenTransport and ISC DHCP clients. d1960 1 a1960 1 .B The d1962 2 a1963 1 .B statement d1965 1 a1965 1 \fBone-lease-per-client\fR \fIflag\fR\fB;\fR d1976 1 d1978 4 a1981 3 .B The .I use-lease-addr-for-default-route .B statement d1983 2 a1984 1 \fBuse-lease-addr-for-default-route\fR \fIflag\fR\fB;\fR d1986 28 a2013 6 If the \fIuse-lease-addr-for-default-route\fR parameter is true in a given scope, then instead of sending the value specified in the routers option (or sending no value at all), the IP address of the lease being assigned is sent to the client. This supposedly causes Win95 machines to ARP for all IP addresses, which can be helpful if your router is configured for proxy ARP. d2015 1 a2015 1 .B The d2017 2 a2018 1 .B statement d2020 1 a2020 1 \fBserver-identifier \fIhostname\fR\fB;\fR d2043 8 d2052 131 a2182 3 .B The .I ddns-updates .B statement d2184 8 a2191 1 \fBddns-updates \fIflag\fR\fB;\fR d2193 12 a2204 4 The \fIddns-updates\fR parameter controls whether or not the server will attempt to do a ddns update when a lease is confirmed. Set this to \fIoff\fR if the server should not attempt to do updates within a certain scope. The \fIddns-updates\fR parameter is on by default. a2223 1 .PP d2227 5 d2233 1 a2233 1 dhcpd(8), dhcpd.leases(5), RFC2132, RFC2131. d2235 1 a2235 1 .B dhcpd(8) @ 1.13 log @- replace DBDIR, ETCDIR and RUNDIR with /var/db, /etc, /var/run. Original dhcp package, those strings are replaced with real pathname when creating catman files. Since we install man files, those strings should be replaced with real pathname. @ text @d102 1 a102 3 parameter. If no such entry is found, then dhcpd acts as if there is no entry in the dhcpd.conf file for that client, even if there is an entry for that client on a different subnet or shared network. d450 4 a453 4 The \fBaddress\fR statement declares the IP address on which the server should listen for connections from its failover peer. This statement can be omitted, in which case the server will accept connections to any of its configured IP addresses. d764 25 @ 1.12 log @Merge 3.0b2pl2 with head. @ text @d1307 1 a1307 1 is DBDIR/dhcpd.leases. This statement \fBmust\fR appear in the outer d1321 1 a1321 1 starts. By default, this is RUNDIR/dhcpd.pid. Like the @ 1.11 log @Fix circular reference. Instead of cross referencing itself, dhcpd.conf(5) now cross-references dhcpd(8). @ text @d349 243 d772 1 a772 3 accept updates from the DHCP server. The DHCP server will only perform DNS updates if it has been built with DNS updates enabled as described in the README file that comes with the DHCP distribution. d851 9 a859 5 Support for TSIG and DNSSEC is not yet available. When you set your DNS server up to allow updates from the DHCP server, you may be exposing it to unauthorized updates. To avoid this, the best you can do right now is to use IP address-based packet filtering to prevent unauthorized hosts from submitting update requests. d864 4 a867 3 10.10.17.0/24 subnet. In that case, assuming you are using ISC BIND 8.2.1 or later, you would need to have the following declarations in your /etc/named.conf file: d870 6 a875 1 zone "sneedville.edu" { d877 2 a878 2 file "sneedville.edu.db"; allow-update { localhost; }; d884 12 a895 1 allow-update { localhost; }; d897 10 d909 9 a917 4 This assumes that your DHCP server and your name server will be running on the same computer - the "localhost" name is taken in the DNS server as an alias for all of that host's IP addresses, and updates from any of those addresses will be accepted. d963 6 @ 1.10 log @Merge 20000719 changes @ text @d1431 1 a1431 1 dhcpd.conf(5), dhcpd.leases(5), RFC2132, RFC2131. @ 1.9 log @Fix conflicts in latest import. @ text @d1407 18 @ 1.8 log @Fix conflicts in merge. @ text @d71 1 a71 1 this case, the \fIsubnet\fR declarations for these two networks may be @ 1.8.2.1 log @Pull up to head @ text @d71 1 a71 1 this case, the \fIsubnet\fR declarations for these two networks must be @ 1.8.2.2 log @Pull up differences between 1.8 and 1.10 @ text @a1406 18 .SH SETTING PARAMETER VALUES USING EXPRESSIONS Sometimes it's helpful to be able to set the value of a DHCP server parameter based on some value that the client has sent. To do this, you can use expression evaluation. The .B dhcp-eval(5) manual page describes how to write expressions. To assign the result of an evaluation to an option, define the option as follows: .nf .sp 1 \fImy-parameter \fB= \fIexpression \fB;\fR .fi .PP For example: .nf .sp 1 ddns-hostname = binary-to-ascii (16, 8, "-", substring (hardware, 1, 6)); .fi @ 1.8.2.3 log @Pullup 1.13 [taca]: - replace DBDIR, ETCDIR and RUNDIR with /var/db, /etc, /var/run. Original dhcp package, those strings are replaced with real pathname when creating catman files. Since we install man files, those strings should be replaced with real pathname. @ text @d1024 1 a1024 1 is /var/db/dhcpd.leases. This statement \fBmust\fR appear in the outer d1038 1 a1038 1 starts. By default, this is /var/run/dhcpd.pid. Like the @ 1.8.2.4 log @Pull up HEAD [taca]: There are some inconsistencies with the branch vs. the trunk, so pull up the whole of dhcp to get it in sync as of this commit. (We're expecting more pullups further down the branch, so this will help future merges.) @ text @d102 3 a104 1 parameter. a348 243 .SH DHCP FAILOVER This version of the ISC DHCP server supports the DHCP failover protocol as documented in draft-ietf-dhc-failover-07.txt. This is not a final protocol document, and we have not done interoperability testing with other vendors' implementations of this protocol, so you must not assume that this implementation conforms to the standard. If you wish to use the failover protocol, make sure that both failover peers are running the same version of the ISC DHCP server. .PP The failover protocol allows two DHCP servers (and no more than two) to share a common address pool. Each server will have about half of the available IP addresses in the pool at any given time for allocation. If one server fails, the other server will continue to renew leases out of the pool, and will allocate new addresses out of the roughly half of available addresses that it had when communications with the other server were lost. .PP It is possible during a prolonged failure to tell the remaining server that the other server is down, in which case the remaining server will (over time) reclaim all the addresses the other server had available for allocation, and begin to reuse them. This is called putting the server into the PARTNER-DOWN state. .PP When the other server comes back online, it should automatically detect that it has been offline and request a complete update from the server that was running in the PARTNER-DOWN state, and then both servers will resume processing together. .PP It is possible to get into a dangerous situation: if you put one server into the PARTNER-DOWN state, and then *that* server goes down, and the other server comes back up, the other server will not know that the first server was in the PARTNER-DOWN state, and may issue addresses previously issued by the other server to different clients, resulting in IP address conflicts. Before putting a server into PARTNER-DOWN state, therefore, make .I sure that the other server will not restart automatically. .PP The failover protocol defines a primary server role and a secondary server role. There are some differences in how primaries and secondaries act, but most of the differences simply have to do with providing a way for each peer to behave in the opposite way from the other. So one server must be configured as primary, and the other must be configured as secondary, and it doesn't matter too much which one is which. .SH CONFIGURING FAILOVER In order to configure failover, you need to write a peer declaration that configures the failover protocol, and you need to write peer references in each pool declaration for which you want to do failover. You do not have to do failover for all pools on a given network segment. You must not tell one server it's doing failover on a particular address pool and tell the other it is not. You must not have any common address pools on which you are not doing failover. .PP The server currently does very little sanity checking, so if you configure it wrong, it will just fail in odd ways. I would recommend therefore that you either do failover or don't do failover, but don't do any mixed pools. Also, use the same master configuration file for both servers, and have a seperate file that contains the peer declaration and includes the master file. This will help you to avoid configuration mismatches. As our implementation evolves, this will become less of a problem. A basic sample dhcpd.conf file for a primary server might look like this: .PP .nf failover peer "foo" { primary; address anthrax.rc.vix.com; port 519; peer address trantor.rc.vix.com; peer port 520; max-response-delay 60; max-unacked-updates 10; mclt 3600; hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00; load balance max seconds 3; } include "/etc/dhcpd.master"; .fi .PP The statements in the peer declaration are as follows: .PP .B The .I primary .B and .I secondary .B statements .PP [ \fBprimary\fR | \fBsecondary\fR ] .PP This determines whether the server is primary or secondary, as described earlier under DHCP FAILOVER. .PP .B The .I address .B statement .PP .B address .I address .PP The \fBaddress\fR statement declares the IP address on which the server should listen for connections from its failover peer, and also the value to use for the DHCP Failover Protocol server identifier. Because this value is used as an identifier, it may not be omitted. .PP .B The .I peer address .B statement .PP .B peer address .I address .PP The \fBpeer address\fR statement declares the IP address to which the server should connect to reach its failover peer for failover messages. .PP .B The .I port .B statement .PP .B port .I port-number .PP The \fBport\fR statement declares the TCP port on which the server should listen for connections from its failover peer. This statement may not currently be omitted, because the failover protocol does not yet have a reserved TCP port number. .PP .B The .I peer port .B statement .PP .B peer port .I port-number .PP The \fBpeer port\fR statement declares the TCP port to which the server should connect to reach its failover peer for failover messages. This statement may not be omitted because the failover protocol does not yet have a reserved TCP port number. The port number declared in the \fBpeer port\fR statement may be the same as the port number declared in the \fBport\fR statement. .PP .B The .I max-response-delay .B statement .PP .nf .B max-response-delay .I seconds .fi .PP The \fBmax-response-delay\fR statement tells the DHCP server how many seconds may pass without receiving a message from its failover peer before it assumes that connection has failed. This number should be small enough that a transient network failure that breaks the connection will not result in the servers being out of communication for a long time, but large enough that the server isn't constantly making and breaking connections. This parameter must be specified. .PP .B The .I max-unacked-updates .B statement .PP .B max-unacked-updates .I count .PP The \fBmax-unacked-updates\fR statement tells the DHCP server how many many BINDUPD messages it can send before it receives a BNDACK from the failover peer. We don't have enough operational experience to say what a good value for this is, but 10 seems to work. This parameter must be specified. .PP .B The .I mclt .B statement .PP .B mclt .I seconds .PP The \fBmclt\fR statement defines the Maximum Client Lead Time. It must be specified on the primary, and may not be specified on the secondary. This is the length of time for which a lease may be renewed by either failover peer without contacting the other. The longer you set this, the longer it will take for the running server to recover IP addresses after moving into PARTNER-DOWN state. The shorter you set it, the more load your servers will experience when they are not communicating. A value of something like 3600 is probably reasonable, but again bear in mind that we have no real operational experience with this. .PP .B The .I split .B statement .PP .B split .I index .PP The split statement specifies the split between the primary and secondary for the purposes of load balancing. Whenever a client makes a DHCP request, the DHCP server runs a hash on the client identification. If the hash comes out to less than the split value, the primary answers. If it comes out to equal to or more than the split, the secondary answers. This value should generally be set to 128, and can only be configured on the primary. .PP .B The .I hba .B statement .PP .B hba .I colon-seperated-hex-list .PP The hba statement specifies the split between the primary and secondary as a bitmap rather than a cutoff, which theoretically allows for finer-grained control. In practice, there is probably no need for such fine-grained control, however. An example hba statement: .PP .nf hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00; .fi .PP .B The .I load balance max seconds .B statement .PP .B load balance max seconds .I seconds .PP This statement allows you to configure a cutoff after which load balancing is disabled. The cutoff is based on the number of seconds since the client sent its first DHCPDISCOVER or DHCPREQUEST message, and only works with clients that correctly implement the \fIsecs\fR field - fortunately most clients do. We recommend setting this to something like 3 or 5. The effect of this is that if one of the failover peers gets into a state where it is responding to failover messages but not responding to some client requests, the other failover peer will take over its client load automatically as the clients retry. a522 25 .SH COMBINING MATCH, MATCH IF AND SPAWN WITH .PP In some cases, it may be useful to use one expression to assign a client to a particular class, and a second expression to put it into a subclass of that class. This can be done by combining the \fBmatch if\fR and \fBspawn with\fR statements, or the \fBmatch if\fR and \fBmatch\fR statements. For example: .PP .nf class "jr-cable-modems" { match if option dhcp-vendor-identifier = "jrcm"; spawn with option agent.circuit-id; lease limit 4; } class "dv-dsl-modems" { match if opton dhcp-vendor-identifier = "dvdsl"; spawn with option agent.circuit-id; lease limit 16; } .fi .PP This allows you to have two classes that both have the same \fBspawn with\fR expression without getting the clients in the two classes confused with each other. d529 3 a531 1 accept updates from the DHCP server. d610 5 a614 9 When you set your DNS server up to allow updates from the DHCP server, you may be exposing it to unauthorized updates. To avoid this, you should use TSIG signatures - a method of cryptographically signing updates using a shared secret key. As long as you protect the secrecy of this key, your updates should also be secure. Note, however, that the DHCP protocol itself provides no security, and that clients can therefore provide information to the DHCP server which the DHCP server will then use in its updates, with the constraints described previously. d619 3 a621 4 10.10.17.0/24 subnet. In that case, you will need a key declaration for the TSIG key you will be using, and also two zone declarations - one for the zone containing A records that will be updates and one for the zone containing PTR records - for ISC BIND, something like this: d624 1 a624 6 key DHCP_UPDATER { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret pRP5FapFoJ95JEL06sv4PQ==; }; zone "example.org" { d626 2 a627 2 file "example.org.db"; allow-update { key DHCP_UPDATER; }; d633 1 a633 12 allow-update { key DHCP_UPDATER; }; }; .fi .PP You will also have to configure your DHCP server to do updates to these zones. To do so, you need to add something like this to your dhcpd.conf file: .PP .nf key DHCP_UPDATER { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret pRP5FapFoJ95JEL06sv4PQ==; a634 10 zone EXAMPLE.ORG. { primary 127.0.0.1; key DHCP_UPDATER; } zone 17.127.10.in-addr.arpa. { primary 127.0.0.1; key DHCP_UPDATER; } d637 4 a640 9 You should choose your own secret key, of course. The ISC BIND 8 and 9 distributions come with a program for generating secret keys called dnskeygen. The version that comes with BIND 9 is likely to produce a substantially more random key, so we recommend you use that one even if you are not using BIND 9 as your DNS server. The key above was generated with the command: .nf dnskeygen -H 128 -u -c -n DHCP_UPDATER .fi a685 6 .PP The built-in version of the dynamic DNS update mechanism is in a text string towards the top of server/dhcpd.c. If you want to use events for things other than DNS updates, and you also want DNS updates, you will have to start out by copying this code into your dhcpd.conf file and modifying it. d1431 1 a1431 1 dhcpd(8), dhcpd.leases(5), RFC2132, RFC2131. @ 1.8.2.5 log @Pull up revision 1.15 (requested by mellon): Update DHCP software to ISC version 3, Beta 2, Patchlevel 23. @ text @d3 6 a8 4 .\" Copyright (c) 1996-2001 Internet Software Consortium. .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: d10 1 a10 8 .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of The Internet Software Consortium nor the names .\" of its contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. d12 3 a14 13 .\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE .\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR .\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. d16 2 a17 6 .\" This software has been written for the Internet Software Consortium .\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc. .\" To learn more about the Internet Software Consortium, see .\" ``http://www.isc.org/''. To learn more about Vixie Enterprises, .\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see .\" ``http://www.nominum.com''. d87 1 a87 1 consulting any \fIclass\fR declarations matching the client, d92 1 a92 1 client option declarations. Scopes are never considered d201 1 a201 1 the behavior of the DHCP server (e.g., how long a lease dhcpd will d215 1 a215 1 boot files for each model. One way to do this would be to have host d294 1 a294 1 eligible to be assigned addresses from the pool. If a pool has a d296 1 a296 1 the deny list will be eligible. If both permit and deny lists exist d299 1 a299 1 .SH DYNAMIC ADDRESS ALLOCATION d306 9 a314 19 the address for a while. .PP If the server finds the address the client is requesting, and that address is available to the client, the server will send a DHCPACK. If the address is no longer available, or the client isn't permitted to have it, the server will send a DHCPNAK. If the server knows nothing about the address, it will remain silent, unless the address is incorrect for the network segment to which the client has been attached and the server is authoritative for that network segment, in which case the server will send a DHCPNAK even though it doesn't know about the address. .PP There may be a host declaration matching the client's identification, and that host declaration contains a fixed-address declaration that is valid for the network segment to which the client is connected. In this case, the DHCP server will never do dynamic address allocation. In this case, the client is \fIrequired\fB to take the address specified in the host declaration. If the client is requesting some other address, the server will respond with a DHCPNAK. a346 27 .SH IP ADDRESS CONFLICT PREVENTION The DHCP server checks IP addresses to see if they are in use before allocating them to clients. It does this by sending an ICMP Echo request message to the IP address being allocated. If no ICMP Echo reply is received within a second, the address is assumed to be free. This is only done for leases that have been specified in range statements, and only when the lease is thought by the DHCP server to be free - i.e., the DHCP server or its failover peer has not listed the lease as in use. .PP If a response is received to an ICMP Echo request, the DHCP server assumes that there is a configuration error - the IP address is in use by some host on the network that is not a DHCP client. It marks the address as abandoned, and will not assign it to clients. .PP If a DHCP client tries to get an IP address, but none are available, but there are abandoned IP addresses, then the DHCP server will attempt to reclaim an abandoned IP address. It marks one IP address as free, and then does the same ICMP Echo request check described previously. If there is no answer to the ICMP Echo request, the address is assigned to the client. .PP The DHCP server does not cycle through abandoned IP addresses if the first IP address it tries to reclaim is free. Rather, when the next DHCPDISCOVER comes in from the client, it will attempt a new allocation using the same method described here, and will typically try a new IP address. d432 1 a432 1 The d434 1 a434 1 and d436 1 a436 2 statements .RS 0.25i d438 1 a438 1 [ \fBprimary\fR | \fBsecondary\fR ]\fB;\fR a441 1 .RE d443 1 a443 1 The d445 1 a445 2 statement .RS 0.25i d447 2 a448 1 .B address \fIaddress\fR\fB;\fR a453 1 .RE d455 1 a455 1 The d457 1 a457 2 statement .RS 0.25i d459 2 a460 1 .B peer address \fIaddress\fR\fB;\fR a464 1 .RE d466 1 a466 1 The d468 1 a468 2 statement .RS 0.25i d470 2 a471 1 .B port \fIport-number\fR\fB;\fR a476 1 .RE d478 1 a478 1 The d480 1 a480 2 statement .RS 0.25i d482 2 a483 1 .B peer port \fIport-number\fR\fB;\fR a490 1 .RE d492 1 a492 1 The d494 1 a494 2 statement .RS 0.25i d496 4 a499 1 .B max-response-delay \fIseconds\fR\fB;\fR a508 1 .RE d510 1 a510 1 The d512 1 a512 2 statement .RS 0.25i d514 2 a515 1 .B max-unacked-updates \fIcount\fR\fB;\fR d518 1 a518 1 many BNDUPD messages it can send before it receives a BNDACK a521 1 .RE d523 1 a523 1 The d525 1 a525 2 statement .RS 0.25i d527 2 a528 1 .B mclt \fIseconds\fR\fB;\fR a539 1 .RE d541 1 a541 1 The d543 1 a543 2 statement .RS 0.25i d545 2 a546 1 .B split \fIindex\fR\fB;\fR a554 1 .RE d556 1 a556 1 The d558 1 a558 2 statement .RS 0.25i d560 2 a561 1 .B hba \fIcolon-seperated-hex-list\fB;\fR a571 1 .RE d573 1 a573 1 The d575 1 a575 2 statement .RS 0.25i d577 2 a578 1 .B load balance max seconds \fIseconds\fR\fB;\fR a589 1 .RE d600 1 a600 1 write a conditional statement to match the clients you wanted in the d606 1 a606 1 if substring (option dhcp-client-identifier, 1, 3) = "RAS " { d616 1 a616 1 match if substring (option dhcp-client-identifier, 1, 3) = "RAS"; d637 1 a637 1 server, but it is important to be aware of it at least for the time being. d704 2 a705 3 of this is shown under the VENDOR ENCAPSULATED OPTIONS head in the .B dhcp-options(5) manual page. d797 5 a801 35 Two DNS update schemes are currently implemented, and another is planned. The two that are currently available are the ad-hoc DNS update mode and the interim DHCP-DNS interaction draft update mode. If and when the DHCP-DNS interaction draft and the DHCID draft make it through the IETF standards process, there will be a third mode, which will be the standard DNS update method. The DHCP server must be configured to use one of the two currently-supported methods, or not to do dns updates. This can be done with the .I ddns-update-style configuration parameter. .SH THE AD-HOC DNS UPDATE SCHEME The ad-hoc Dynamic DNS update scheme implemented in this version of the ISC DHCP server is a prototype design, which does not have much to do with the standard update method that is being standardized in the IETF DHC working group, but rather implements some very basic, yet useful, update capabilities. This mode .B does not work with the .I failover protocol because it does not account for the possibility of two different DHCP servers updating the same set of DNS records. .PP For the ad-hoc DNS update method, the client's FQDN is derived in two parts. First, the hostname is determined. Then, the domain name is determined, and appended to the hostname. .PP The DHCP server determines the client's hostname by first looking for a \fIddns-hostname\fR configuration option, and using that if it is present. If no such option is present, the server looks for a valid hostname in the FQDN option sent by the client. If one is found, it is used; otherwise, if the client sent a host-name option, that is used. Otherwise, if there is a host declaration that applies to the client, the name from that declaration will be used. If none of these applies, the server will not have a hostname for the client, and will not be able to do a DNS update. d803 10 a812 2 The domain name is determined based strictly on the server configuration, not on what the client sends. First, if there is a d814 30 a843 14 configuration option, it is used. Second, if there is a \fIdomain-name\fR option configured, that is used. Otherwise, the server will not do the DNS update. .PP The client's fully-qualified domain name, derived as we have described, is used as the name on which an "A" record will be stored. The A record will contain the IP address that the client was assigned in its lease. If there is already an A record with the same name in the DNS server, no update of either the A or PTR records will occur - this prevents a client from claiming that its hostname is the name of some network server. For example, if you have a fileserver called "fs.sneedville.edu", and the client claims its hostname is "fs", no DNS update will be done for that client, and an error message will be logged. d853 1 a853 1 will see unpredictable behavior. This is considered a bug, and will a871 99 .SH THE INTERIM DNS UPDATE SCHEME The interim DNS update scheme operates mostly according to several drafts that are being considered by the IETF and are expected to become standards, but are not yet standards, and may not be standardized exactly as currently proposed. These are: .PP .nf .ce 3 draft-ietf-dhc-ddns-resolution-??.txt draft-ietf-dhc-fqdn-option-??.txt draft-ietf-dnsext-dhcid-rr-??.txt .fi .PP Because our implementation is slightly different than the standard, we will briefly document the operation of this update style here. .PP The first point to understand about this style of DNS update is that unlike the ad-hoc style, the DHCP server does not necessarily always update both the A and the PTR records. The FQDN option includes a flag which, when sent by the client, indicates that the client wishes to update its own A record. In that case, the server can be configured either to honor the client's intentions or ignore them. This is done with the statement \fIallow client-updates;\fR or the statement \fIignore client-updates;\fR. By default, client updates are allowed. .PP If the server is configured to allow client updates, then if the client sends a fully-qualified domain name in the FQDN option, the server will use that name the client sent in the FQDN option to update the PTR record. For example, let us say that the client is a visitor from the "radish.org" domain, whose hostname is "jschmoe". The server is for the "example.org" domain. The DHCP client indicates in the FQDN option that its FQDN is "jschmoe.radish.org.". It also indicates that it wants to update its own A record. The DHCP server therefore does not attempt to set up an A record for the client, but does set up a PTR record for the IP address that it assigns the client, pointing at jschmoe.radish.org. Once the DHCP client has an IP address, it can update its own A record, assuming that the "radish.org" DNS server will allow it to do so. .PP If the server is configured not to allow client updates, or if the client doesn't want to do its own update, the server will simply choose a name for the client, possibly using the hostname supplied by the client ("jschmoe" in the previous example). It will use its own domain name for the client, just as in the ad-hoc update scheme. It will then update both the A and PTR record, using the name that it chose for the client. If the client sends a fully-qualified domain name in the fqdn option, the server uses only the leftmost part of the domain name - in the example above, "jschmoe" instead of "jschmoe.radish.org". .PP The other difference between the ad-hoc scheme and the interim scheme is that with the interim scheme, a method is used that allows more than one DHCP server to update the DNS database without accidentally deleting A records that shouldn't be deleted nor failing to add A records that should be added. The scheme works as follows: .PP When the DHCP server issues a client a new lease, it creates a text string that is an MD5 hash over the DHCP client's identification (see draft-ietf-dnsext-dhcid-rr-??.txt for details). The update adds an A record with the name the server chose and a TXT record containing the hashed identifier string (hashid). If this update succeeds, the server is done. .PP If the update fails because the A record already exists, then the DHCP server attempts to add the A record with the prerequisite that there must be a TXT record in the same name as the new A record, and that TXT record's contents must be equal to hashid. If this update succeeds, then the client has its A record and PTR record. If it fails, then the name the client has been assigned (or requested) is in use, and can't be used by the client. At this point the DHCP server gives up trying to do a DNS update for the client until the client chooses a new name. .PP The interim DNS update scheme is called interim for two reasons. First, it does not quite follow the drafts. The current versions of the drafts call for a new DHCID RRtype, but this is not yet available. The interim DNS update scheme uses a TXT record instead. Also, the existing ddns-resolution draft calls for the DHCP server to put a DHCID RR on the PTR record, but the \fIinterim\fR update method does not do this. It is our position that this is not useful, and we are working with the author in hopes of removing it from the next version of the draft, or better understanding why it is considered useful. .PP In addition to these differences, the server also does not update very aggressively. Because each DNS update involves a round trip to the DNS server, there is a cost associated with doing updates even if they do not actually modify the DNS database. So the DHCP server tracks whether or not it has updated the record in the past (this information is stored on the lease) and does not attempt to update records that it thinks it has already updated. .PP This can lead to cases where the DHCP server adds a record, and then the record is deleted through some other mechanism, but the server never again updates the DNS because it thinks the data is already there. In this case the data can be removed from the lease through operator intervention, and once this has been done, the DNS will be updated the next time the client renews. a931 6 Note that the zone declarations have to correspond to authority records in your name server - in the above example, there must be an SOA record for "example.org." and for "17.10.10.in-addr.arpa.". For example, if there were a subdoman "foo.example.org" with no seperate SOA, you could not write a zone declaration for "foo.example.org." .PP d942 1 a942 1 You may wish to enable logging of DNS updates on your DNS server. d983 1 a983 1 enclosed in braces. Events are used to implement DNS d985 1 a985 1 using the built-in DNS update mechanism. d987 1 a987 1 The built-in version of the DNS update mechanism is in a text d1151 1 a1151 1 behavior with respect to clients based on scope. In a non-pool a1173 1 An unknown client is simply a client that has no host declaration. a1244 12 .B The .I client-updates .B keyword .PP \fBallow client-updates;\fR \fBdeny client-updates;\fR .PP The \fBclient-updates\fR flag tells the DHCP server whether or not to honor the client's intention to do its own update of its A record. This is only relevant when doing \fIinterim\fR DNS updates. See the documentation under the heading THE INTERIM DNS UPDATE SCHEME for details. d1247 1 a1247 1 The uses of the allow and deny keywords shown in the previous section d1274 1 a1274 1 following syntaxes are recognized following the allow or deny keywords: a1319 4 The .I always-broadcast statement .RS 0.25i d1321 30 a1350 1 .B always-broadcast \fIflag\fR\fB;\fR d1352 1 a1352 11 The DHCP and BOOTP protocols both require DHCP and BOOTP clients to set the broadcast bit in the flags field of the BOOTP message header. Unfortunately, some DHCP and BOOTP clients do not do this, and therefore may not receive responses from the DHCP server. The DHCP server can be made to always broadcast its responses to clients by setting this flag to 'on' for the relevant scope. To avoid creating excess broadcast traffic on your network, we recommend that you restrict the use of this option to as few clients as possible. For example, the Microsoft DHCP client is known not to have this problem, as are the OpenTransport and ISC DHCP clients. .RE d1354 4 a1357 4 The .I always-reply-rfc1048 statement .RS 0.25i d1359 3 a1361 1 .B always-reply-rfc1048 \fIflag\fR\fB;\fR d1363 1 a1363 5 Some BOOTP clients expect RFC1048-style responses, but do not follow RFC1048 when sending their requests. You can tell that a client is having this problem if it is not getting the options you have configured for it and if you see in the server log the message "(non-rfc1048)" printed with each BOOTREQUEST that is logged. d1365 5 a1369 7 If you want to send rfc1048 options to such a client, you can set the .B always-reply-rfc1048 option in that client's host declaration, and the DHCP server will respond with an RFC-1048-style vendor options field. This flag can be set in any scope, and will affect all clients covered by that scope. .RE d1371 3 a1373 4 The .I authoritative statement .RS 0.25i d1375 1 a1375 1 .B authoritative; d1377 3 a1379 1 .B not authoritative; d1381 3 a1383 6 The DHCP server will normally assume that the configuration information about a given network segment is not known to be correct and is not authoritative. This is so that if a naive user installs a DHCP server not fully understanding how to configure it, it does not send spurious DHCPNAK messages to clients that have obtained addresses from a legitimate DHCP server on the network. d1385 1 a1385 7 Network administrators setting up authoritative DHCP servers for their networks should always write \fBauthoritative;\fR at the top of their configuration file to indicate that the DHCP server \fIshould\fR send DHCPNAK messages to misconfigured clients. If this is not done, clients will be unable to get a correct IP address after changing subnets until their old lease has expired, which could take quite a long time. d1387 7 a1393 5 Usually, writing \fBauthoritative;\fR at the top level of the file should be sufficient. However, if a DHCP server is to be set up so that it is aware of some networks for which it is authoritative and some networks for which it is not, it may be more appropriate to declare authority on a per-network-segment basis. d1395 7 a1401 9 Note that the most specific scope for which the concept of authority makes any sense is the physical network segment - either a shared-network statement or a subnet statement that is not contained within a shared-network statement. It is not meaningful to specify that the server is authoritative for some subnets within a shared network, but not authoritative for others, nor is it meaningful to specify that the server is authoritative for some host declarations and not others. .RE d1403 3 a1405 2 The \fIboot-unknown-clients\fR statement .RS 0.25i d1407 1 a1407 1 .B boot-unknown-clients \fIname\fB;\fR d1409 2 a1410 2 If the \fIboot-unknown-clients\fR statement is present and has a value of \fIfalse\fR or \fIoff\fR, then clients for which there is no d1412 15 a1426 7 declaration will not be allowed to obtain IP addresses. If this statement is not present or has a value of \fItrue\fR or \fIon\fR, then clients without host declarations will be allowed to obtain IP addresses, as long as those addresses are not restricted by .I allow and \fIdeny\fR statements within their \fIpool\fR declarations. .RE d1428 3 a1430 2 The \fIddns-hostname\fR statement .RS 0.25i d1432 1 a1432 1 .B ddns-hostname \fIname\fB;\fR d1434 5 a1438 33 The \fIname\fR parameter should be the hostname that will be used in setting up the client's A and PTR records. If no ddns-hostname is specified in scope, then the server will derive the hostname automatically, using an algorithm that varies for each of the different update methods. .RE .PP The \fIddns-domainname\fR statement .RS 0.25i .PP .B ddns-domainname \fIname\fB;\fR .PP The \fIname\fR parameter should be the domain name that will be appended to the client's hostname to form a fully-qualified domain-name (FQDN). .RE .PP The \fIddns-rev-domainname\fR statement .RS 0.25i .PP .B ddns-rev-domainname \fIname\fB;\fR The \fIname\fR parameter should be the domain name that will be appended to the client's reversed IP address to produce a name for use in the client's PTR record. By default, this is "in-addr.arpa.", but the default can be overridden here. .PP The reversed IP address to which this domain name is appended is always the IP address of the client, in dotted quad notation, reversed - for example, if the IP address assigned to the client is 10.17.92.74, then the reversed IP address is 74.92.17.10. So a client with that IP address would, by default, be given a PTR record of 10.17.92.74.in-addr.arpa. .RE d1440 3 a1442 2 The \fIddns-update-style\fR parameter .RS 0.25i d1444 1 a1444 1 .B ddns-update-style \fIstyle\fB;\fR d1446 3 a1448 8 The .I style parameter must be one of \fBad-hoc\fR, \fBinterim\fR or \fBnone\fR. The \fIddns-update-style\fR statement is only meaningful in the outer scope - it is evaluated once after reading the dhcpd.conf file, rather than each time a client is assigned an IP address, so there is no way to use different DNS update styles for different clients. .RE d1450 2 a1451 2 .B The .I ddns-updates a1452 1 .RS 0.25i d1454 1 a1454 1 \fBddns-updates \fIflag\fR\fB;\fR d1456 6 a1461 7 The \fIddns-updates\fR parameter controls whether or not the server will attempt to do a DNS update when a lease is confirmed. Set this to \fIoff\fR if the server should not attempt to do updates within a certain scope. The \fIddns-updates\fR parameter is on by default. To disable DNS updates in all scopes, it is preferable to use the \fIddns-update-style\fR statement, setting the style to \fInone\fR. .RE d1463 3 a1465 4 The .I default-lease-time statement .RS 0.25i d1467 1 a1467 1 .B default-lease-time \fItime\fR\fB;\fR d1469 10 a1478 5 .I Time should be the length in seconds that will be assigned to a lease if the client requesting the lease does not ask for a specific expiration time. .RE d1480 1 a1480 1 The d1482 1 a1482 2 statement .RS 0.25i d1484 1 a1484 1 .B dynamic-bootp-lease-cutoff \fIdate\fB;\fR a1507 1 .RE d1509 1 a1509 1 The d1511 1 a1511 2 statement .RS 0.25i d1513 1 a1513 1 .B dynamic-bootp-lease-length\fR \fIlength\fR\fB;\fR a1524 1 .RE d1526 1 a1526 34 The .I filename statement .RS 0.25i .PP .B filename\fR \fB"\fR\fIfilename\fR\fB";\fR .PP The \fIfilename\fR statement can be used to specify the name of the initial boot file which is to be loaded by a client. The .I filename should be a filename recognizable to whatever file transfer protocol the client can be expected to use to load the file. .RE .PP The .I fixed-address statement .RS 0.25i .PP .B fixed-address address\fR [\fB,\fR \fIaddress\fR ... ]\fB;\fR .PP The \fIfixed-address\fR statement is used to assign one or more fixed IP addresses to a client. It should only appear in a \fIhost\fR declaration. If more than one address is supplied, then when the client boots, it will be assigned the address which corresponds to the network on which it is booting. If none of the addresses in the \fIfixed-address\fR statement are on the network on which the client is booting, that client will not match the \fIhost\fR declaration containing that \fIfixed-address\fR statement. Each \fIaddress\fR should be either an IP address or a domain name which resolves to one or more IP addresses. .RE .PP The d1528 1 a1528 2 statement .RS 0.25i d1530 1 a1530 1 .B get-lease-hostnames\fR \fIflag\fR\fB;\fR a1537 1 .RE d1539 3 a1541 4 The .I hardware statement .RS 0.25i d1543 1 a1543 1 .B hardware \fIhardware-type hardware-address\fB;\fR d1545 4 a1548 19 In order for a BOOTP client to be recognized, its network hardware address must be declared using a \fIhardware\fR clause in the .I host statement. .I hardware-type must be the name of a physical hardware interface type. Currently, only the .B ethernet and .B token-ring types are recognized, although support for a .B fddi hardware type (and others) would also be desirable. The .I hardware-address should be a set of hexadecimal octets (numbers from 0 through ff) seperated by colons. The \fIhardware\fR statement may also be used for DHCP clients. .RE d1550 18 a1567 4 The .I lease-file-name statement .RS 0.25i d1569 2 a1570 1 .B lease-file-name \fIname\fB;\fR d1572 3 a1574 6 .I Name should be the name of the DHCP server's lease file. By default, this is DBDIR/dhcpd.leases. This statement \fBmust\fR appear in the outer scope of the configuration file - if it appears in some other scope, it will have no effect. .RE d1576 1 a1576 10 The .I local-port statement .RS 0.25i .PP .B local-port \fIport\fB;\fR .PP This statement causes the DHCP server to listen for DHCP requests on the UDP port specified in \fIport\fR, rather than on port 67. .RE d1578 1 a1578 43 The .I log-facility statement .RS 0.25i .PP .B log-facility \fIfacility\fB;\fR .PP This statement causes the DHCP server to do all of its logging on the specified log facility once the dhcpd.conf file has been read. By default the DHCP server logs to the daemon facility. Possible log facilities include auth, authpriv, cron, daemon, ftp, kern, lpr, mail, mark, news, ntp, security, syslog, user, uucp, and local0 through local7. Not all of these facilities are available on all systems, and there may be other facilities available on other systems. .PP In addition to setting this value, you may need to modify your .I syslog.conf file to configure logging of the DHCP server. For example, you might add a line like this: .PP .nf local7.debug /var/log/dhcpd.log .fi .PP The syntax of the \fIsyslog.conf\fR file may be different on some operating systems - consult the \fIsyslog.conf\fR manual page to be sure. To get syslog to start logging to the new file, you must first create the file with correct ownership and permissions (usually, the same owner and permissions of your /var/log/messages or /usr/adm/messages file should be fine) and send a SIGHUP to syslogd. Some systems support log rollover using a shell script or program called newsyslog or logrotate, and you may be able to configure this as well so that your log file doesn't grow uncontrollably. .PP Because the \fIlog-facility\fR setting is controlled by the dhcpd.conf file, log messages printed while parsing the dhcpd.conf file or before parsing it are logged to the default log facility. To prevent this, see the README file included with this distribution, which describes how to change the default log facility. When this parameter is used, the DHCP server prints its startup message a second time after parsing the configuration file, so that the log will be as complete as possible. .RE d1580 6 a1585 4 The .I max-lease-time statement .RS 0.25i d1587 7 a1593 1 .B max-lease-time \fItime\fR\fB;\fR d1595 5 a1599 6 .I Time should be the maximum length in seconds that will be assigned to a lease. The only exception to this is that Dynamic BOOTP lease lengths, which are not specified by the client, are not limited by this maximum. .RE d1601 8 a1608 4 The .I min-lease-time statement .RS 0.25i d1610 3 a1612 1 .B min-lease-time \fItime\fR\fB;\fR d1614 1 a1614 4 .I Time should be the minimum length in seconds that will be assigned to a lease. .RE d1616 5 a1620 4 The .I min-secs statement .RS 0.25i d1622 6 a1627 1 .B min-secs \fIseconds\fR\fB;\fR d1629 3 a1631 7 .I Seconds should be the minimum number of seconds since a client began trying to acquire a new lease before the DHCP server will respond to its request. The number of seconds is based on what the client reports, and the maximum value that the client can report is 255 seconds. Generally, setting this to one will result in the DHCP server not responding to the client's first request, but always responding to its second request. d1633 1 a1633 8 This can be used to set up a secondary DHCP server which never offers an address to a client until the primary server has been given a chance to do so. If the primary server is down, the client will bind to the secondary server, but otherwise clients should always bind to the primary. Note that this does not, by itself, permit a primary server and a secondary server to share a pool of dynamically-allocatable addresses. .RE d1635 10 a1644 4 The .I next-server statement .RS 0.25i d1646 1 a1646 24 .B next-server\fR \fIserver-name\fR\fB;\fR .PP The \fInext-server\fR statement is used to specify the host address of the server from which the initial boot file (specified in the \fIfilename\fR statement) is to be loaded. \fIServer-name\fR should be a numeric IP address or a domain name. If no \fInext-server\fR parameter applies to a given client, the DHCP server's IP address is used. .RE .PP The .I omapi-port statement .RS 0.25i .PP .B omapi-port\fR \fIport\fR\fB;\fR .PP The \fIomapi-port\fR statement causes the DHCP server to listen for OMAPI connections on the specified port. This statement is required to enable the OMAPI protocol, which is used to examine and modify the state of the DHCP server as it is running. .RE .PP The d1648 1 a1648 2 statement .RS 0.25i d1650 1 a1650 1 .B one-lease-per-client \fIflag\fR\fB;\fR a1660 1 .RE d1662 3 a1664 4 The .I pid-file-name statement .RS 0.25i d1666 1 a1666 2 .B pid-file-name .I name\fR\fB;\fR d1668 6 a1673 7 .I Name should be the name of the DHCP server's process ID file. This is the file in which the DHCP server's process ID is stored when the server starts. By default, this is RUNDIR/dhcpd.pid. Like the lease-file-name statement, this statement must appear in the outer scope of the configuration file. .RE d1675 1 a1675 22 The .I ping-checks statement .RS 0.25i .PP .B ping-checks .I flag\fR\fB;\fR .PP When the DHCP server is considering dynamically allocating an IP address to a client, it first sends an ICMP Echo request (a \fIping\fR) to the address being assigned. It waits for a second, and if no ICMP Echo response has been heard, it assigns the address. If a response \fIis\fR heard, the lease is abandoned, and the server does not respond to the client. .PP This \fIping check\fR introduces a one-second delay in responding to DHCPDISCOVER messages, which can be a problem for some clients. The ping-checks configuration parameter can be used to control checking - if its value is false, no ping check is done. .RE .PP The d1677 1 a1677 2 statement .RS 0.25i d1679 1 a1679 1 .B server-identifier \fIhostname\fR\fB;\fR a1701 1 .RE d1703 3 a1705 4 The .I server-name statement .RS 0.25i d1707 1 a1707 1 .B server-name "\fIname\fB";\fR d1709 4 a1712 153 The \fIserver-name\fR statement can be used to inform the client of the name of the server from which it is booting. \fIName\fR should be the name that will be provided to the client. .RE .PP The .I site-option-space statement .RS 0.25i .PP .B site-option-space "\fIname\fB";\fR .PP The \fIsite-option-space\fR statement can be used to determine from what option space site-local options will be taken. This can be used in much the same way as the \fIvendor-option-space\fR statement. Site-local options in DHCP are those options whose numeric codes are greater than 128. These options are intended for site-specific uses, but are frequently used by vendors of embedded hardware that contains DHCP clients. Because site-specific options are allocated on an ad hoc basis, it is quite possible that one vendor's DHCP client might use the same option code that another vendor's client uses, for different purposes. The \fIsite-option-space\fR option can be used to assign a different set of site-specific options for each such vendor, using conditional evaluation (see \fIdhcp-eval.5\fR for details). .RE .PP The .I stash-agent-options statement .RS 0.25i .PP .B stash-agent-options \fIflag\fB;\fR .PP If the \fIstash-agent-options\fR parameter is true for a given client, the server will record the relay agent information options sent during the client's initial DHCPREQUEST message when the client was in the SELECTING state and behave as if those options are included in all subsequent DHCPREQUEST messages sent in the RENEWING state. This works around a problem with relay agent information options, which is that they usually not appear in DHCPREQUEST messages sent by the client in the RENEWING state, because such messages are unicast directly to the server and not sent through a relay agent. .PP The .I update-optimization statement .RS 0.25i .PP .B update-optimization \fIflag\fB;\fR .PP If the \fIupdate-optimization\fR parameter is false for a given client, the server will attempt a DNS update for that client each time the client renews its lease, rather than only attempting an update when it appears to be necessary. This will allow the DNS to heal from database inconsistencies more easily, but the cost is that the DHCP server must do many more DNS updates. We do not recommend enabling this on large networks with the current DHCP server. This option only affects the behavior of the interim DNS update scheme, and has no effect on the ad-hoc DNS update scheme. If this parameter is not specified, or is false, the DHCP server will only update when the client information changes, the client gets a different lease, or the client's lease expires. .PP The .I update-static-leases statement .RS 0.25i .PP .B update-static-leases \fIflag\fB;\fR .PP The \fIupdate-static-leases\fR flag, if enabled, causes the DHCP server to do DNS updates for clients even if those clients are being assigned their IP address using a \fIfixed-address\fR statement - that is, the client is being given a static assignment. This can only work with the \fIinterim\fR DNS update scheme. It is not recommended because the DHCP server has no way to tell that the update has been done, and therefore will not delete the record when it is not in use. Also, the server must attempt the update each time the client renews its lease, which could have a significant performance impact in environments that place heavy demands on the DHCP server. .PP The .I use-host-decl-names statement .RS 0.25i .PP .B use-host-decl-names \fIflag\fB;\fR .PP If the \fIuse-host-decl-names\fR parameter is true in a given scope, then for every host declaration within that scope, the name provided for the host declaration will be supplied to the client as its hostname. So, for example, .PP .nf group { use-host-decl-names on; host joe { hardware ethernet 08:00:2b:4c:29:32; fixed-address joe.fugue.com; } } is equivalent to host joe { hardware ethernet 08:00:2b:4c:29:32; fixed-address joe.fugue.com; option host-name "joe"; } .fi .PP An \fIoption host-name\fR statement within a host declaration will override the use of the name in the host declaration. .PP It should be noted here that most DHCP clients completely ignore the host-name option sent by the DHCP server, and there is no way to configure them not to do this. So you generally have a choice of either not having any hostname to client IP address mapping that the client will recognize, or doing DNS updates. It is beyond the scope of this document to describe how to make this determination. .RE .PP The .I use-lease-addr-for-default-route statement .RS 0.25i .PP .B use-lease-addr-for-default-route \fIflag\fR\fB;\fR .PP If the \fIuse-lease-addr-for-default-route\fR parameter is true in a given scope, then instead of sending the value specified in the routers option (or sending no value at all), the IP address of the lease being assigned is sent to the client. This supposedly causes Win95 machines to ARP for all IP addresses, which can be helpful if your router is configured for proxy ARP. The use of this feature is not recommended, because it won't work for many DHCP clients. .RE .PP The .I vendor-option-space statement .RS 0.25i .PP .B vendor-option-space \fIstring\fR\fB;\fR .PP The \fIvendor-option-space\fR parameter determines from what option space vendor options are taken. The use of this configuration parameter is illustrated in the \fIdhcp-options(5)\fR manual page, in the \fIVENDOR ENCAPSULATED OPTIONS\fR section. .RE d1732 1 a1735 5 .SH REFERENCE: EXPRESSIONS Expressions used in DHCP option statements and elsewhere are documented in the .B dhcp-eval(5) manual page. d1737 1 a1737 1 dhcpd(8), dhcpd.leases(5), dhcp-options(5), dhcp-eval(5), RFC2132, RFC2131. d1739 1 a1739 1 .B dhcpd.conf(5) @ 1.8.2.6 log @Pullup [drochner]: distrib/notes/common/main patch distrib/sets/lists/base/mi 1.270 by patch distrib/sets/lists/man/mi 1.390 by patch usr.sbin/dhcp/Makefile sync with 1.12 usr.sbin/dhcp/Makefile.inc sync with 1.15 usr.sbin/dhcp/client/Makefile 1.13-1.14 usr.sbin/dhcp/clientscript/Makefile 1.1-1.2 usr.sbin/dhcp/clientscript/dhclient-script 1.1 usr.sbin/dhcp/common/Makefile 1.19 usr.sbin/dhcp/dhcpctl/Makefile 1.2 usr.sbin/dhcp/dst/Makefile 1.3-1.4 usr.sbin/dhcp/minires/Makefile 1.4-1.5 usr.sbin/dhcp/omapip/Makefile 1.4-1.5 usr.sbin/dhcp/omshell/Makefile 1.1-1.2 usr.sbin/dhcp/relay/Makefile 1.3 usr.sbin/dhcp/server/Makefile 1.11-1.12 usr.sbin/dhcp/(others) remove Update dhcp to Version 3, Release Candidate 10. @ text @@ 1.7 log @Initial merge of ISC DHCP 3.0 into NetBSD tree (incomplete) @ text @d1275 5 a1279 5 information about a given network segment is known to be correct and is authoritative. So if a client requests an IP address on a given network segment that the server knows is not valid for that segment, the server will respond with a DHCPNAK message, causing the client to forget its IP address and try to get a new one. d1281 7 a1287 4 If a DHCP server is being configured by somebody who is not the network administrator and who therefore does not wish to assert this level of authority, then the statement "not authoritative" should be written in the appropriate scope in the configuration file. d1289 1 a1289 1 Usually, writing \fBnot authoritative;\fR at the top level of the file @ 1.7.2.1 log @Sync w/ netbsd-1-5-base. @ text @d1275 5 a1279 5 information about a given network segment is not known to be correct and is not authoritative. This is so that if a naive user installs a DHCP server not fully understanding how to configure it, it does not send spurious DHCPNAK messages to clients that have obtained addresses from a legitimate DHCP server on the network. d1281 4 a1284 7 Network administrators setting up authoritative DHCP servers for their networks should always write \fBauthoritative;\fR at the top of their configuration file to indicate that the DHCP server \fIshould\fR send DHCPNAK messages to misconfigured clients. If this is not done, clients will be unable to get a correct IP address after changing subnets until their old lease has expired, which could take quite a long time. d1286 1 a1286 1 Usually, writing \fBauthoritative;\fR at the top level of the file @ 1.6 log @Resolve conflicts from Patchlevel 25 import. @ text @d3 6 a8 2 .\" Copyright (c) 1995, 1996, 1997, 1998, 1998, 1999 .\" The Internet Software Consortium. All rights reserved. d10 1 a10 3 .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: d12 3 a14 8 .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of The Internet Software Consortium nor the names .\" of its contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. d16 2 a17 19 .\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE .\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR .\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" This software has been written for the Internet Software Consortium .\" by Ted Lemon in cooperation with Vixie .\" Enterprises. To learn more about the Internet Software Consortium, .\" see ``http://www.isc.org/isc''. To learn more about Vixie .\" Enterprises, see ``http://www.vix.com''. d81 3 a83 2 whose addresses will be dynamically assigned, there is currently no way to group parameter assignments other than by network topology. d86 10 a95 7 first consulting that client's \fIhost\fR declaration (if any), then consulting the \fIgroup\fR declaration (if any) which enclosed that \fIhost\fR declaration, then consulting the \fIsubnet\fR declaration for the subnet on which the client is booting, then consulting the \fIshared-network\fR declaration (if any) containing that subnet, and finally consulting the top-level parameters which may be specified outside of any declaration. d112 8 a119 10 shared-network ISC-BIGGIE { \fIshared-network-specific parameters...\fR subnet 204.254.239.0 netmask 255.255.255.224 { \fIsubnet-specific parameters...\fR range 204.254.239.10 204.254.239.30; } subnet 204.254.239.32 netmask 255.255.255.224 { \fIsubnet-specific parameters...\fR range 204.254.239.42 204.254.239.62; } d158 5 a162 19 As you can see in Figure 2, it's legal to specify host addresses in parameters as domain names rather than as numeric IP addresses. If a given hostname resolves to more than one IP address (for example, if that host has two ethernet interfaces), both addresses are supplied to the client. .PP In Figure 1, you can see that both the shared-network statement and the subnet statements can have parameters. Let us say that the shared network \fIISC-BIGGIE\fR supports an entire department - perhaps the accounting department. If accounting has its own domain, then a shared-network-specific parameter might be: .nf option domain-name "accounting.isc.org"; .fi .PP All subnet declarations appearing in the shared-network declaration would then have the domain-name option set to "accounting.isc.org" instead of just "isc.org". d247 439 d757 1 a757 1 \fBrange\fR [ \fBdynamic-bootp\fR ] \fIlow-address\fR [ \fIhigh-address\fR]\fB;\fR d835 1 a835 2 .SH REFERENCE: ALLOW and DENY .PP d840 11 a850 2 statements can be used to control the behaviour of dhcpd to various sorts of requests. d852 4 d863 1 d875 1 d887 1 d894 119 d1016 27 d1061 35 a1095 2 lease if the client requesting the lease asks for a specific expiration time. a1301 21 .I use-lease-addr-for-default-route .B statement .PP \fBuse-lease-addr-for-default-route\fR \fIflag\fR\fB;\fR .PP If the \fIuse-lease-addr-for-default-route\fR parameter is true in a given scope, then instead of sending the value specified in the routers option (or sending no value at all), the IP address of the lease being assigned is sent to the client. This supposedly causes Win95 machines to ARP for all IP addresses, which can be helpful if your router is configured for proxy ARP. .PP If use-lease-addr-for-default-route is enabled and an option routers statement are both in scope, the routers option will be preferred. The rationale for this is that in situations where you want to use this feature, you probably want it enabled for a whole bunch of Windows 95 machines, and you want to override it for a few other machines. Unfortunately, if the opposite happens to be true for you site, you are probably better off not trying to use this flag. .PP .B The d1321 46 d1393 11 d1415 1 a1415 1 for this project was provided by the Internet Software Corporation. @ 1.5 log @Fix conflicts in merge. @ text @d722 19 @ 1.5.2.1 log @Pull up 1.6 (patchlevel 25) @ text @a721 19 .I always-reply-rfc1048 .B statement .PP \fBalways-reply-rfc1048\fR \fIflag\fR\fB;\fR .PP Some BOOTP clients expect RFC1048-style responses, but do not follow RFC1048 when sending their requests. You can tell that a client is having this problem if it is not getting the options you have configured for it and if you see in the server log the message "(non-rfc1048)" printed with each BOOTREQUEST that is logged. .PP If you want to send rfc1048 options to such a client, you can set the .B always-reply-rfc1048 option in that client's host declaration, and the DHCP server will respond with an RFC-1048-style vendor options field. This flag can be set in any scope, and will affect all clients covered by that scope. .PP .B The @ 1.5.2.2 log @Apply patch (requested by mellon): Merge/update DHCP client and server software to ISC 2.0pl3. @ text @d600 1 a600 1 Coordinated Universal Time (UTC), not local time. @ 1.4 log @Resolve conflicts in 2.0b1pl15 @ text @d518 1 a518 1 seperated by colons. The \fIhardwarefR statement may also be used @ 1.3 log @Resolve conflicts in 2.0b1pl13 import @ text @d3 1 a3 1 .\" Copyright (c) 1995, 1996, 1997, 1998, 1998 d736 3 a738 1 on which the request arrived. The usual case where the d742 6 @ 1.2 log @GMT -> UTC @ text @d3 2 a4 2 .\" Copyright (c) 1995, 1996 The Internet Software Consortium. .\" All rights reserved. d510 1 a510 1 type is recognized, although support for d512 1 a512 1 and d514 1 a514 1 hardware types would also be desirable. d666 56 d727 13 a739 2 The server-identifier statement is now obsolete and is ignored by the DHCP server. @ 1.1 log @Initial revision @ text @d69 1 a69 1 \fIserver-identifier\fR, the \fIshared-network\fR and the \fIsubnet\fR d79 1 a79 4 Each dhcpd.conf file must have one (and only one) .I server-identifier declaration, which tells dhcpd the identifier to use when issuing leases. For every subnet which will be served, and for every subnet a125 1 server-identifier dhcps.isc.org; d163 1 a163 1 Notice that after the server-identifier declaration, there's a place d170 1 a170 1 option name-servers ns1.isc.org, ns2.isc.org; a280 14 .B The .I server-identifier .B statement .PP \fBserver-identifier \fIhostname\fR\fB;\fR .PP The server-identifier declaration must be used exactly once in each dhcpd.conf file to tell dhcpd what IP address to use as its server identifier, as required by the DHCP protocol. On a machine with a single interface, the server identifier should be the primary address of that interface. On machines with multiple interfaces, the address of one such interface must be chosen. Any address may be chosen, as long as it is the address of one of the interfaces of that machine. .PP d553 2 a554 2 parameter applies to a given client, the address specified in the \fIserver-identifier\fR statement is used. d600 1 a600 1 Greenwich Mean Time (GMT), not local time. a663 1 .SH REFERENCE: OPTION STATEMENTS d665 3 a667 5 DHCP \fIoption\fR statements always start with the \fIoption\fR keyword, followed by an option name, followed by option data. The option names and data formats are described below. It is not necessary to exhaustively specify all DHCP options - only those options which are needed by clients must be specified. d669 1 a669 1 Option data comes in a variety of formats, as defined below: d671 3 a673 376 The .B ip-address data type can be entered either as an explicit IP address (e.g., 239.254.197.10) or as a domain name (e.g., haagen.isc.org). When entering a domain name, be sure that that domain name resolves to a single IP address. .PP The .B int32 data type specifies a signed 32-bit integer. The .B uint32 data type specifies an unsigned 32-bit integer. The .B int16 and .B uint16 data types specify signed and unsigned 16-bit integers. The .B int8 and .B uint8 data types specify signed and unsigned 8-bit integers. Unsigned 8-bit integers are also sometimes referred to as octets. .PP The .B string data type specifies an NVT ASCII string, which must be enclosed in double quotes - for example, to specify a domain-name option, the syntax would be .nf .sp 1 option domain-name "isc.org"; .fi .PP The .B flag data type specifies a boolean value. Booleans can be either true or false (or on or off, if that makes more sense to you). .PP The .B data-string data type specifies either an NVT ASCII string enclosed in double quotes, or a series of octets specified in hexadecimal, seperated by colons. For example: .nf .sp 1 option client-identifier "CLIENT-FOO"; or option client-identifier 43:4c:49:45:54:2d:46:4f:4f; .fi .PP The documentation for the various options mentioned below is taken from the latest IETF draft document on DHCP options. Options which are not listed by name may be defined by the name option-\fInnn\fR, where \fInnn\fI is the decimal number of the option code. These options may be followed either by a string, enclosed in quotes, or by a series of octets, expressed as two-digit hexadecimal numbers seperated by colons. For example: .PP .nf option option-133 "my-option-133-text"; option option-129 1:54:c9:2b:47; .fi .PP Because dhcpd does not know the format of these undefined option codes, no checking is done to ensure the correctness of the entered data. .PP The standard options are: .PP \fBoption subnet-mask\fR \fIip-address\fR\fB;\fR .PP The subnet mask option specifies the client's subnet mask as per RFC 950. If no subnet mask option is provided anywhere in scope, as a last resort dhcpd will use the subnet mask from the subnet declaration for the network on which an address is being assigned. However, .I any subnet-mask option declaration that is in scope for the address being assigned will override the subnet mask specified in the subnet declaration. .PP \fBoption time-offset\fR \fIint32\fR\fB;\fR .PP The time-offset option specifies the offset of the client's subnet in seconds from Coordinated Universal Time (UTC). .PP \fBoption routers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]\fB;\fR .PP The routers option specifies a list of IP addresses for routers on the client's subnet. Routers should be listed in order of preference. .PP \fBoption time-servers\fR \fIip-address [, \fIip-address\fR ... ]\fB;\fR .PP The time-server option specifies a list of RFC 868 time servers available to the client. Servers should be listed in order of preference. .PP \fBoption\fR \fBname-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]; .PP The name-servers option specifies a list of IEN 116 name servers available to the client. Servers should be listed in order of preference. .PP \fBoption\fR \fBdomain-name-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]\fB;\fR .PP The domain-name-servers option specifies a list of Domain Name System (STD 13, RFC 1035) name servers available to the client. Servers should be listed in order of preference. .PP \fBoption\fR \fBlog-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]\fB;\fR .PP The log-server option specifies a list of MIT-LCS UDP log servers available to the client. Servers should be listed in order of preference. .PP \fBoption\fR \fBcookie-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]\fB;\fR .PP The cookie server option specifies a list of RFC 865 cookie servers available to the client. Servers should be listed in order of preference. .PP \fBoption\fR \fBlpr-servers\fR \fIip-address \fR [\fB,\fR \fIip-address\fR ... ]\fB;\fR .PP The LPR server option specifies a list of RFC 1179 line printer servers available to the client. Servers should be listed in order of preference. .PP \fBoption\fR \fBimpress-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]\fB;\fR .PP The impress-server option specifies a list of Imagen Impress servers available to the client. Servers should be listed in order of preference. .PP \fBoption\fR \fBresource-location-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]\fB;\fR .PP This option specifies a list of RFC 887 Resource Location servers available to the client. Servers should be listed in order of preference. .PP \fBoption\fR \fBhost-name\fR \fIstring\fR\fB;\fR .PP This option specifies the name of the client. The name may or may not be qualified with the local domain name (it is preferable to use the domain-name option to specify the domain name). See RFC 1035 for character set restrictions. .PP \fBoption\fR \fBboot-size\fR \fIuint16\fR\fB;\fR .PP This option specifies the length in 512-octet blocks of the default boot image for the client. .PP \fBoption\fR \fBmerit-dump\fR \fIstring\fR\fB;\fR .PP This option specifies the path-name of a file to which the client's core image should be dumped in the event the client crashes. The path is formatted as a character string consisting of characters from the NVT ASCII character set. .PP \fBoption\fR \fBdomain-name\fR \fIstring\fR\fB;\fR .PP This option specifies the domain name that client should use when resolving hostnames via the Domain Name System. .PP \fBoption\fR \fBswap-server\fR \fIip-address\fR\fB;\fR .PP This specifies the IP address of the client's swap server. .PP \fBoption\fR \fBroot-path\fR \fIstring\fB;\fR\fR .PP This option specifies the path-name that contains the client's root disk. The path is formatted as a character string consisting of characters from the NVT ASCII character set. .PP \fBoption\fR \fBip-forwarding\fR \fIflag\fR\fB;\fR .PP This option specifies whether the client should configure its IP layer for packet forwarding. A value of 0 means disable IP forwarding, and a value of 1 means enable IP forwarding. .PP \fBoption\fR \fBnon-local-source-routing\fR \fIflag\fR\fB;\fR .PP This option specifies whether the client should configure its IP layer to allow forwarding of datagrams with non-local source routes (see Section 3.3.5 of [4] for a discussion of this topic). A value of 0 means disallow forwarding of such datagrams, and a value of 1 means allow forwarding. .PP \fBoption\fR \fBpolicy-filter\fR \fIip-address ip-address\fR [\fB,\fR \fIip-address ip-address\fR ... ]\fB;\fR .PP This option specifies policy filters for non-local source routing. The filters consist of a list of IP addresses and masks which specify destination/mask pairs with which to filter incoming source routes. .PP Any source routed datagram whose next-hop address does not match one of the filters should be discarded by the client. .PP See STD 3 (RFC1122) for further information. .PP \fBoption\fR \fBmax-dgram-reassembly\fR \fIuint16\fR\fB;\fR .PP This option specifies the maximum size datagram that the client should be prepared to reassemble. The minimum value legal value is 576. .PP \fBoption\fR \fBdefault-ip-ttl\fR \fIuint8;\fR .PP This option specifies the default time-to-live that the client should use on outgoing datagrams. .PP \fBoption\fR \fBpath-mtu-aging-timeout\fR \fIuint32\fR\fB;\fR .PP This option specifies the timeout (in seconds) to use when aging Path MTU values discovered by the mechanism defined in RFC 1191. .PP \fBoption\fR \fBpath-mtu-plateau-table\fR \fIuint16\fR [\fB,\fR \fIuint16\fR ... ]\fB;\fR .PP This option specifies a table of MTU sizes to use when performing Path MTU Discovery as defined in RFC 1191. The table is formatted as a list of 16-bit unsigned integers, ordered from smallest to largest. The minimum MTU value cannot be smaller than 68. .PP \fBoption\fR \fBinterface-mtu\fR \fIuint16\fR\fB;\fR .PP This option specifies the MTU to use on this interface. The minimum legal value for the MTU is 68. .PP \fBoption\fR \fBall-subnets-local\fR \fIflag\fR\fB;\fR .PP This option specifies whether or not the client may assume that all subnets of the IP network to which the client is connected use the same MTU as the subnet of that network to which the client is directly connected. A value of 1 indicates that all subnets share the same MTU. A value of 0 means that the client should assume that some subnets of the directly connected network may have smaller MTUs. .PP \fBoption\fR \fBbroadcast-address\fR \fIip-address\fR\fB;\fR .PP This option specifies the broadcast address in use on the client's subnet. Legal values for broadcast addresses are specified in section 3.2.1.3 of STD 3 (RFC1122). .PP \fBoption\fR \fBperform-mask-discovery\fR \fIflag\fR\fB;\fR .PP This option specifies whether or not the client should perform subnet mask discovery using ICMP. A value of 0 indicates that the client should not perform mask discovery. A value of 1 means that the client should perform mask discovery. .PP \fBoption\fR \fBmask-supplier\fR \fIflag\fR\fB;\fR .PP This option specifies whether or not the client should respond to subnet mask requests using ICMP. A value of 0 indicates that the client should not respond. A value of 1 means that the client should respond. .PP \fBoption\fR \fBrouter-discovery\fR \fIflag\fR\fB;\fR .PP This option specifies whether or not the client should solicit routers using the Router Discovery mechanism defined in RFC 1256. A value of 0 indicates that the client should not perform router discovery. A value of 1 means that the client should perform router discovery. .PP \fBoption\fR \fBrouter-solicitation-address\fR \fIip-address\fR\fB;\fR .PP This option specifies the address to which the client should transmit router solicitation requests. .PP \fBoption\fR \fBstatic-routes\fR \fIip-address ip-address\fR [\fB,\fR \fIip-address ip-address\fR ... ]\fB;\fR .PP This option specifies a list of static routes that the client should install in its routing cache. If multiple routes to the same destination are specified, they are listed in descending order of priority. .PP The routes consist of a list of IP address pairs. The first address is the destination address, and the second address is the router for the destination. .PP The default route (0.0.0.0) is an illegal destination for a static route. To specify the default route, use the .B routers option. .PP \fBoption\fR \fBtrailer-encapsulation\fR \fIflag\fR\fB;\fR .PP This option specifies whether or not the client should negotiate the use of trailers (RFC 893 [14]) when using the ARP protocol. A value of 0 indicates that the client should not attempt to use trailers. A value of 1 means that the client should attempt to use trailers. .PP \fBoption\fR \fBarp-cache-timeout\fR \fIuint32\fR\fB;\fR .PP This option specifies the timeout in seconds for ARP cache entries. .PP \fBoption\fR \fBieee802-3-encapsulation\fR \fIflag\fR\fB;\fR .PP This option specifies whether or not the client should use Ethernet Version 2 (RFC 894) or IEEE 802.3 (RFC 1042) encapsulation if the interface is an Ethernet. A value of 0 indicates that the client should use RFC 894 encapsulation. A value of 1 means that the client should use RFC 1042 encapsulation. .PP \fBoption\fR \fBdefault-tcp-ttl\fR \fIuint8\fR\fB;\fR .PP This option specifies the default TTL that the client should use when sending TCP segments. The minimum value is 1. .PP \fBoption\fR \fBtcp-keepalive-interval\fR \fIuint32\fR\fB;\fR .PP This option specifies the interval (in seconds) that the client TCP should wait before sending a keepalive message on a TCP connection. The time is specified as a 32-bit unsigned integer. A value of zero indicates that the client should not generate keepalive messages on connections unless specifically requested by an application. .PP \fBoption\fR \fBtcp-keepalive-garbage\fR \fIflag\fR\fB;\fR .PP This option specifies the whether or not the client should send TCP keepalive messages with a octet of garbage for compatibility with older implementations. A value of 0 indicates that a garbage octet should not be sent. A value of 1 indicates that a garbage octet should be sent. .PP \fBoption\fR \fBnis-domain\fR \fIstring\fR\fB;\fR .PP This option specifies the name of the client's NIS (Sun Network Information Services) domain. The domain is formatted as a character string consisting of characters from the NVT ASCII character set. .PP \fBoption\fR \fBnis-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]\fB;\fR .PP This option specifies a list of IP addresses indicating NIS servers available to the client. Servers should be listed in order of preference. .PP \fBoption\fR \fBntp-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]\fB;\fR .PP This option specifies a list of IP addresses indicating NTP (RFC 1035) servers available to the client. Servers should be listed in order of preference. .PP \fBoption\fR \fBnetbios-name-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]\fB;\fR .PP The NetBIOS name server (NBNS) option specifies a list of RFC 1001/1002 NBNS name servers listed in order of preference. .PP \fBoption\fR \fBnetbios-dd-server\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]\fB;\fR .PP The NetBIOS datagram distribution server (NBDD) option specifies a list of RFC 1001/1002 NBDD servers listed in order of preference. .PP \fBoption\fR \fBnetbios-node-type\fR \fIuint8\fR\fB;\fR .PP The NetBIOS node type option allows NetBIOS over TCP/IP clients which are configurable to be configured as described in RFC 1001/1002. The value is specified as a single octet which identifies the client type. A value of 1 corresponds to a NetBIOS B-node; a value of 2 corresponds to a P-node; a value of 4 corresponds to an M-node; a value of 8 corresponds to an H-node. .PP \fBoption\fR \fBnetbios-scope\fR \fIstring\fR\fB;\fR .PP The NetBIOS scope option specifies the NetBIOS over TCP/IP scope parameter for the client as specified in RFC 1001/1002. See RFC1001, RFC1002, and RFC1035 for character-set restrictions. .PP \fBoption\fR \fBfont-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]\fB;\fR .PP This option specifies a list of X Window System Font servers available to the client. Servers should be listed in order of preference. .PP \fBoption\fR \fBx-display-manager\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]\fB;\fR .PP This option specifies a list of systems that are running the X Window System Display Manager and are available to the client. Addresses should be listed in order of preference. .PP \fBoption\fR \fBdhcp-client-identifier\fR \fIdata-string\fR\fB;\fR d675 3 a677 3 This option can be used to specify the a DHCP client identifier in a host declaration, so that dhcpd can find the host record by matching against the client identifier. d679 1 a679 2 dhcpd.conf(5), dhcpd.leases(5), draft-ietf-dhc-options-1533update-04.txt, draft-ietf-dhc-dhcp-07.txt. @ 1.1.1.1 log @March 29 snapshot @ text @@ 1.1.1.2 log @970602 snapshot @ text @d174 1 a174 1 option domain-name-servers ns1.isc.org, ns2.isc.org; d786 1 a786 1 \fBoption\fR \fBien116-name-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR ... ]; d788 1 a788 1 The ien116-name-servers option specifies a list of IEN 116 name servers @ 1.1.1.2.2.1 log @Pull latest DHCP snapshot up from release branch @ text @d69 1 a69 1 \fIshared-network\fR and the \fIsubnet\fR d79 4 a82 1 For every subnet which will be served, and for every subnet d129 1 d167 1 a167 1 Notice that at the beginning of the file, there's a place d285 14 d571 2 a572 2 parameter applies to a given client, the DHCP server's IP address is used. d682 175 d858 204 a1061 3 .B The .I server-identifier .B statement d1063 3 a1065 1 \fBserver-identifier \fIhostname\fR\fB;\fR d1067 1 a1067 3 The server-identifier statement is now obsolete and is ignored by the DHCP server. .SH REFERENCE: OPTION STATEMENTS d1069 3 a1071 3 DHCP option statements are documented in the .B dhcp-options(5) manual page. d1073 2 a1074 1 dhcpd.conf(5), dhcpd.leases(5), RFC2132, RFC2131. @ 1.1.1.3 log @ISC DHCP Snapshot on November 22, 1997 @ text @d69 1 a69 1 \fIshared-network\fR and the \fIsubnet\fR d79 4 a82 1 For every subnet which will be served, and for every subnet d129 1 d167 1 a167 1 Notice that at the beginning of the file, there's a place d285 14 d571 2 a572 2 parameter applies to a given client, the DHCP server's IP address is used. d682 175 d858 204 a1061 3 .B The .I server-identifier .B statement d1063 3 a1065 1 \fBserver-identifier \fIhostname\fR\fB;\fR d1067 1 a1067 3 The server-identifier statement is now obsolete and is ignored by the DHCP server. .SH REFERENCE: OPTION STATEMENTS d1069 3 a1071 3 DHCP option statements are documented in the .B dhcp-options(5) manual page. d1073 2 a1074 1 dhcpd.conf(5), dhcpd.leases(5), RFC2132, RFC2131. @ 1.1.1.4 log @DHCP 2.0b1pl13 @ text @d3 2 a4 2 .\" Copyright (c) 1995, 1996, 1997, 1998, 1998 .\" The Internet Software Consortium. All rights reserved. d510 2 a512 2 .B token-ring types are recognized, although support for a d514 1 a514 1 hardware type (and others) would also be desirable. a665 56 .I authoritative .B statement .PP \fBauthoritative;\fR .PP \fBnot authoritative;\fR .PP The DHCP server will normally assume that the configuration information about a given network segment is known to be correct and is authoritative. So if a client requests an IP address on a given network segment that the server knows is not valid for that segment, the server will respond with a DHCPNAK message, causing the client to forget its IP address and try to get a new one. .PP If a DHCP server is being configured by somebody who is not the network administrator and who therefore does not wish to assert this level of authority, then the statement "not authoritative" should be written in the appropriate scope in the configuration file. .PP Usually, writing \fBnot authoritative;\fR at the top level of the file should be sufficient. However, if a DHCP server is to be set up so that it is aware of some networks for which it is authoritative and some networks for which it is not, it may be more appropriate to declare authority on a per-network-segment basis. .PP Note that the most specific scope for which the concept of authority makes any sense is the physical network segment - either a shared-network statement or a subnet statement that is not contained within a shared-network statement. It is not meaningful to specify that the server is authoritative for some subnets within a shared network, but not authoritative for others, nor is it meaningful to specify that the server is authoritative for some host declarations and not others. .PP .B The .I use-lease-addr-for-default-route .B statement .PP \fBuse-lease-addr-for-default-route\fR \fIflag\fR\fB;\fR .PP If the \fIuse-lease-addr-for-default-route\fR parameter is true in a given scope, then instead of sending the value specified in the routers option (or sending no value at all), the IP address of the lease being assigned is sent to the client. This supposedly causes Win95 machines to ARP for all IP addresses, which can be helpful if your router is configured for proxy ARP. .PP If use-lease-addr-for-default-route is enabled and an option routers statement are both in scope, the routers option will be preferred. The rationale for this is that in situations where you want to use this feature, you probably want it enabled for a whole bunch of Windows 95 machines, and you want to override it for a few other machines. Unfortunately, if the opposite happens to be true for you site, you are probably better off not trying to use this flag. .PP .B The d671 2 a672 13 The server-identifier statement can be used to define the value that is sent in the DHCP Server Identifier option for a given scope. The value specified \fBmust\fR be an IP address for the DHCP server, and must be reachable by all clients served by a particular scope. .PP The use of the server-identifier statement is not recommended - the only reason to use it is to force a value other than the default value to be sent on occasions where the default value would be incorrect. The default value is the first IP address associated with the physical network interface on which the request arrived. The usual case where the \fIserver-identifier\fR statement needs to be sent is when a physical interface has more than one IP address, and the one being sent by default isn't appropriate for some or all clients served by that interface. @ 1.1.1.5 log @V2 Beta 1 Patchlevel 15 @ text @d3 1 a3 1 .\" Copyright (c) 1995, 1996, 1997, 1998, 1998, 1999 d736 1 a736 3 on which the request arrived. .PP The usual case where the a739 6 Another common case is when an alias is defined for the purpose of having a consistent IP address for the DHCP server, and it is desired that the clients use this IP address when contacting the server. .PP Supplying a value for the dhcp-server-identifier option is equivalent to using the server-identifier statement. @ 1.1.1.6 log @Patchlevel 19 @ text @d518 1 a518 1 seperated by colons. The \fIhardware\fR statement may also be used @ 1.1.1.7 log @Patchlevel 25 @ text @a721 19 .I always-reply-rfc1048 .B statement .PP \fBalways-reply-rfc1048\fR \fIflag\fR\fB;\fR .PP Some BOOTP clients expect RFC1048-style responses, but do not follow RFC1048 when sending their requests. You can tell that a client is having this problem if it is not getting the options you have configured for it and if you see in the server log the message "(non-rfc1048)" printed with each BOOTREQUEST that is logged. .PP If you want to send rfc1048 options to such a client, you can set the .B always-reply-rfc1048 option in that client's host declaration, and the DHCP server will respond with an RFC-1048-style vendor options field. This flag can be set in any scope, and will affect all clients covered by that scope. .PP .B The @ 1.1.1.8 log @Initial import of version 3 of the ISC DHCP distribution. @ text @d3 2 a4 6 .\" Copyright (c) 1996-1999 Internet Software Consortium. .\" Use is subject to license terms which appear in the file named .\" ISC-LICENSE that should have accompanied this file when you .\" received it. If a file named ISC-LICENSE did not accompany this .\" file, or you are not sure the one you have is correct, you may .\" obtain an applicable copy of the license at: d6 3 a8 1 .\" http://www.isc.org/isc-license-1.0.html. d10 8 a17 3 .\" This file is part of the ISC DHCP distribution. The documentation .\" associated with this file is listed in the file DOCUMENTATION, .\" included in the top-level directory of this release. d19 19 a37 2 .\" Support and other services are available for ISC products - see .\" http://www.isc.org for more information. d101 2 a102 3 whose addresses will be dynamically assigned, class declarations and conditional declarations may be used to group parameter assignments based on information the client sends. d105 7 a111 10 consulting that client's \fIhost\fR declaration (if any), and then consulting the any \fIclass\fR declarations matching the client, followed by the \fIpool\fR, \fIsubnet\fR and \fIshared-network\fR declarations for the IP address assigned to the client. Each of these declarations itself appears within a lexical scope, and all declarations at less specific lexical scopes are also consulted for client option declarations as well. Scopes are never considered twice, and if parameters are declared in more than one scope, the parameter declared in the most specific scope is the one that is used. d128 10 a137 8 subnet 204.254.239.0 netmask 255.255.255.224 { \fIsubnet-specific parameters...\fR range 204.254.239.10 204.254.239.30; } subnet 204.254.239.32 netmask 255.255.255.224 { \fIsubnet-specific parameters...\fR range 204.254.239.42 204.254.239.62; d176 19 a194 5 As you can see in Figure 2, you can specify host addresses in parameters using their domain names rather than their numeric IP addresses. If a given hostname resolves to more than one IP address (for example, if that host has two ethernet interfaces), then where possible, both addresses are supplied to the client. a278 439 .SH ADDRESS POOLS .PP The .B pool declaration can be used to specify a pool of addresses that will be treated differently than another pool of addresses, even on the same network segment or subnet. For example, you may want to provide a large set of addresses that can be assigned to DHCP clients that are registered to your DHCP server, while providing a smaller set of addresses, possibly with short lease times, that are available for unknown clients. If you have a firewall, you may be able to arrange for addresses from one pool to be allowed access to the Internet, while addresses in another pool are not, thus encouraging users to register their DHCP clients. To do this, you would set up a pair of pool declarations: .PP .nf subnet 10.0.0.0 netmask 255.255.255.0 { option routers 10.0.0.254; # Unknown clients get this pool. pool { option domain-name-servers bogus.example.com; max-lease-time 300; range 10.0.0.200 10.0.0.253; allow unknown clients; } # Known clients get this pool. pool { option domain-name-servers ns1.example.com, ns2.example.com; max-lease-time 28800; range 10.0.0.5 10.0.0.199; deny unknown clients; } } .fi .PP It is also possible to set up entirely different subnets for known and unknown clients - address pools exist at the level of shared networks, so address ranges within pool declarations can be on different subnets. .PP As you can see in the preceding example, pools can have permit lists that control which clients are allowed access to the pool and which aren't. Each entry in a pool's permit list is introduced with the .I allow or \fIdeny\fR keyword. If a pool has a permit list, then only those clients that match specific entries on the permit list will be elegible to be assigned addresses from the pool. If a pool has a deny list, then only those clients that do not match any entries on the deny list will be elegible. If both permit and deny lists exist for a pool, then only clients that match the permit list and do not match the deny list will be allowed access. .SH ADDRESS ALLOCATION Address allocation is actually only done when a client is in the INIT state and has sent a DHCPDISCOVER message. If the client thinks it has a valid lease and sends a DHCPREQUEST to initiate or renew that lease, the server has only three choices - it can ignore the DHCPREQUEST, send a DHCPNAK to tell the client it should stop using the address, or send a DHCPACK, telling the client to go ahead and use the address for a while. If the server finds the address the client is requesting, and that address is available to the client, the server will send a DHCPACK. If the address is no longer available, or the client isn't permitted to have it, the server will send a DHCPNAK. If the server knows nothing about the, it will remain silent, unless the address is incorrect for the network segment to which the client has been attached and the server is authoritative for that network segment, in which case the server will send a DHCPNAK even though it doesn't know about the address. .PP When the DHCP server allocates a new address for a client (remember, this only happens if the client has sent a DHCPDISCOVER), it first looks to see if the client already has a valid lease on an IP address, or if there is an old IP address the client had before that hasn't yet been reassigned. In that case, the server will take that address and check it to see if the client is still permitted to use it. If the client is no longer permitted to use it, the lease is freed if the server thought it was still in use - the fact that the client has sent a DHCPDISCOVER proves to the server that the client is no longer using the lease. .PP If no existing lease is found, or if the client is forbidden to receive the existing lease, then the server will look in the list of address pools for the network segment to which the client is attached for a lease that is not in use and that the client is permitted to have. It looks through each pool declaration in sequence (all .I range declarations that appear outside of pool declarations are grouped into a single pool with no permit list). If the permit list for the pool allows the client to be allocated an address from that pool, the pool is examined to see if there is an address available. If so, then the client is tentatively assigned that address. Otherwise, the next pool is tested. If no addresses are found that can be assigned to the client, no response is sent to the client. .PP If an address is found that the client is permitted to have, and that has never been assigned to any client before, the address is immediately allocated to the client. If the address is available for allocation but has been previously assigned to a different client, the server will keep looking in hopes of finding an address that has never before been assigned to a client. .SH CLIENT CLASSING Clients can be seperated into classes, and treated differently depending on what class they are in. This seperation can be done either with a conditional statement, or with a match statement within the class declaration. It is possible to specify a limit on the total number of clients within a particular class or subclass that may hold leases at one time, and it is possible to specify automatic subclassing based on the contents of the client packet. .PP To add clients to classes based on conditional evaluation, you would write an conditional statement to match the clients you wanted in the class, and then put an .B add statement in the conditional's list of statements: .PP .nf if substring (option dhcp-client-identifier, 0, 3) = "RAS" { add "ras-clients"; } .fi .PP A nearly equivalent way to do this is to simply specify the conditional expression as a matching expression in the class statement: .PP .nf class "ras-clients" { match if substring (option dhcp-client-identifier, 0, 3) = "RAS"; } .fi Note that whether you use matching expressions or add statements (or both) to classify clients, you must always write a class declaration for any class that you use. If there will be no match statement and no in-scope statements for a class, the declaration should look like this: .nf class "ras-clients" { } .fi .PP Also, the .B add statement adds the client to the class as the client's scopes are being evaluated - after any address assignment decision has been made. This means that a client that's a member of a class due to an add statement will not be affected by pool permits related to that class - when the pool permit list is computed, the client will not yet be a member of the pool. This is an inconsistency that will probably be addressed in later versions of the DHCP server, but it important to be aware of it at lease for the time being. .SH SUBCLASSES .PP In addition to classes, it is possible to declare subclasses. A subclass is a class with the same name as a regular class, but with a specific submatch expression which is hashed for quick matching. This is essentially a speed hack - the main difference between five classes with match expressions and one class with five subclasses is that it will be quicker to find the subclasses. Subclasses work as follows: .PP .nf class "allocation-class-1" { match pick-first-value (option dhcp-client-identifier, hardware); } class "allocation-class-2" { match pick-first-value (option dhcp-client-identifier, hardware); } subclass "allocation-class-1" 1:8:0:2b:4c:39:ad; subclass "allocation-class-2" 1:8:0:2b:a9:cc:e3; subclass "allocation-class-1" 1:0:0:c4:aa:29:44; subnet 10.0.0.0 netmask 255.255.255.0 { pool { allow members of "allocation-class-1"; range 10.0.0.11 10.0.0.50; } pool { allow members of "allocation-class-2"; range 10.0.0.51 10.0.0.100; } } .fi .PP The data following the class name in the subclass declaration is a constant value to use in matching the match expression for the class. When class matching is done, the server will evaluate the match expression and then look the result up in the hash table. If it finds a match, the client is considered a member of both the class and the subclass. .PP Subclasses can be declared with or without scope. In the above example, the sole purpose of the subclass is to allow some clients access to one address pool, while other clients are given access to the other pool, so these subclasses are declared without scopes. If part of the purpose of the subclass were to define different parameter values for some clients, you might want to declare some subclasses with scopes. .PP In the above example, if you had a single client that needed some configuration parameters, while most didn't, you might write the following subclass declaration for that client: .PP .nf subclass "allocation-class-2" 1:08:00:2b:a1:11:31 { option root-path "samsara:/var/diskless/alphapc"; filename "/tftpboot/netbsd.alphapc-diskless"; } .fi .PP In this example, we've used subclassing as a way to control address allocation on a per-client basis. However, it's also possible to use subclassing in ways that are not specific to clients - for example, to use the value of the vendor-class-identifier option to determine what values to send in the vendor-encapsulated-options option. An example of this is shown under the VENDOR ENCAPSULATED OPTIONS head later on in this document. .SH PER-CLASS LIMITS ON DYNAMIC ADDRESS ALLOCATION .PP You may specify a limit to the number of clients in a class that can be assigned leases. The effect of this will be to make it difficult for a new client in a class to get an address. Once a class with such a limit has reached its limit, the only way a new client in that class can get a lease is for an existing client to relinquish its lease, either by letting it expire, or by sending a DHCPRELEASE packet. Classes with lease limits are specified as follows: .PP .nf class "limited-1" { lease limit 4; } .fi .PP This will produce a class in which a maximum of four members may hold a lease at one time. .SH SPAWNING CLASSES .PP It is possible to declare a .I spawning class\fR. A spawning class is a class that automatically produces subclasses based on what the client sends. The reason that spawning classes were created was to make it possible to create lease-limited classes on the fly. The envisioned application is a cable-modem environment where the ISP wishes to provide clients at a particular site with more than one IP address, but does not wish to provide such clients with their own subnet, nor give them an unlimited number of IP addresses from the network segment to which they are connected. .PP Many cable modem head-end systems can be configured to add a Relay Agent Information option to DHCP packets when relaying them to the DHCP server. These systems typically add a circuit ID or remote ID option that uniquely identifies the customer site. To take advantage of this, you can write a class declaration as follows: .PP .nf class "customer" { spawn with option agent.circuit-id; lease limit 4; } .fi .PP Now whenever a request comes in from a customer site, the circuit ID option will be checked against the class's hash table. If a subclass is found that matches the circuit ID, the client will be classified in that subclass and treated accordingly. If no subclass is found matching the circuit ID, a new one will be created and logged in the .B dhcpd.leases file, and the client will be classified in this new class. Once the client has been classified, it will be treated according to the rules of the class, including, in this case, being subject to the per-site limit of four leases. .PP The use of the subclass spawning mechanism is not restricted to relay agent options - this particular example is given only because it is a fairly straightforward one. .SH DYNAMIC DNS UPDATES .PP The DHCP server has the ability to dynamically update the Domain Name System. Within the configuration files, you can define how you want the Domain Name System to be updated. These updates are RFC 2136 compliant so any DNS server supporting RFC 2136 should be able to accept updates from the DHCP server. The DHCP server will only perform DNS updates if it has been built with DNS updates enabled as described in the README file that comes with the DHCP distribution. .PP The Dynamic DNS update scheme implemented in this version of the ISC DHCP server is an interim implementation, which does not implement any of the standard update methods that have been discussed in the working group, but rather implements some very basic, yet useful, update capabilities. .PP There are three parameters, which may vary according to the scope, that control how DDNS updates will be done. The first two are the .I ddns-domainname and .I ddns-rev-domainname statements. The .I ddns-domainname parameter sets the domain name that will be appended to the client's hostname to form a fully-qualified domain-name (FQDN). For example, if the client's hostname is "hutson" and the .I ddns-domainname is set to "sneedville.edu", then the client's FQDN will be "hutson.sneedville.edu". .PP The .I ddns-rev-domainname parameter sets the domain name that will be appended to the client's reversed IP address to produce a name for use in the client's PTR record. Normally, you would set this to "in-addr.arpa", but this is not required. .PP A third parameter, .I ddns-hostname can be used to specify the hostname that will be used as the client's hostname. If no ddns-hostname is specified in scope, then the server will use a host-name option sent by the client. If the client did not send a host-name option, then if there is a host declaration that applies to the client, the name from that declaration will be used. If none of these applies, the server will not have a hostname for the client, and will not be able to do a DDNS update. .SH HOW DNS UPDATES WORK .PP The client's FQDN, derived as we have described, is used as the name on which an "A" record will be stored. The A record will contain the IP address that the client was assigned in its lease. If there is already an A record with the same name in the DNS server, no update of either the A or PTR records will occur - this prevents a client from claiming that its hostname is the name of some network server. For example, if you have a fileserver called "fs.sneedville.edu", and the client claims its hostname is "fs", no DNS update will be done for that client, and an error message will be logged. .PP If the A record update succeeds, a PTR record update for the assigned IP address will be done, pointing to the A record. This update is unconditional - it will be done even if another PTR record of the same name exists. Since the IP address has been assigned to the DHCP server, this should be safe. .PP Please note that the current implementation assumes clients only have a single network interface. A client with two network interfaces will see unpredictable behaviour. This is considered a bug, and will be fixed in a later release. It may be helpful to enable the .I one-lease-per-client parameter so that roaming clients do not trigger this same behavior. .PP The DHCP protocol normally involves a four-packet exchange - first the client sends a DHCPDISCOVER message, then the server sends a DHCPOFFER, then the client sends a DHCPREQUEST, then the server sends a DHCPACK. In the current version of the server, the server will do a DNS update after it has received the DHCPREQUEST, and before it has sent the DHCPOFFER. It only sends the DNS update if it has not sent one for the client's address before, in order to minimize the impact on the DHCP server. .PP When the client's lease expires, the DHCP server (if it is operating at the time, or when next it operates) will remove the client's A and PTR records from the DNS database. If the client releases its lease by sending a DHCPRELEASE message, the server will likewise remove the A and PTR records. .SH DYNAMIC DNS UPDATE SECURITY .PP Support for TSIG and DNSSEC is not yet available. When you set your DNS server up to allow updates from the DHCP server, you may be exposing it to unauthorized updates. To avoid this, the best you can do right now is to use IP address-based packet filtering to prevent unauthorized hosts from submitting update requests. .PP The DNS server must be configured to allow updates for any zone that the DHCP server will be updating. For example, let us say that clients in the sneedville.edu domain will be assigned addresses on the 10.10.17.0/24 subnet. In that case, assuming you are using ISC BIND 8.2.1 or later, you would need to have the following declarations in your /etc/named.conf file: .PP .nf zone "sneedville.edu" { type master; file "sneedville.edu.db"; allow-update { localhost; }; }; zone "17.10.10.in-addr.arpa" { type master; file "10.10.17.db"; allow-update { localhost; }; }; .fi .PP This assumes that your DHCP server and your name server will be running on the same computer - the "localhost" name is taken in the DNS server as an alias for all of that host's IP addresses, and updates from any of those addresses will be accepted. .PP You may wish to enable logging of DNS transactions on your DNS server. To do so, you might write a logging statement like the following: .PP .nf logging { channel update_debug { file "/var/log/update-debug.log"; severity debug 3; print-category yes; print-severity yes; print-time yes; }; channel security_info { file "/var/log/named-auth.info"; severity info; print-category yes; print-severity yes; print-time yes; }; category update { update_debug; }; category security { security_info; }; }; .fi .PP You must create the /var/log/named-auth.info and /var/log/update-debug.log files before starting the name server. For more information on configuring ISC BIND, consult the documentation that accompanies it. .SH REFERENCE: EVENTS .PP There are three kinds of events that can happen regarding a lease, and it is possible to declare statements that occur when any of these events happen. These events are the commit event, when the server has made a commitment of a certain lease to a client, the release event, when the client has released the server from its commitment, and the expiry event, when the commitment expires. .PP To declare a set of statements to execute when an event happens, you must use the \fBon\fR statement, followed by the name of the event, followed by a series of statements to execute when the event happens, enclosed in braces. Events are used to implement dynamic DNS updates, so you should not define your own event handlers if you are using the built-in dynamic DNS update mechanism. d350 1 a350 1 .B range\fR [ \fBdynamic-bootp\fR ] \fIlow-address\fR [ \fIhigh-address\fR]\fB;\fR d428 2 a429 1 .SH REFERENCE: ALLOW AND DENY d434 2 a435 11 statements can be used to control the response of the DHCP server to various sorts of requests. The allow and deny keywords actually have different meanings depending on the context. In a pool context, these keywords can be used to set up access lists for address allocation pools. In other contexts, the keywords simply control general server behaviour with respect to clients based on scope. In a non-pool context, the .I ignore keyword can be used in place of the .I deny keyword to prevent logging of denied requests. a436 4 .SH ALLOW DENY AND IGNORE IN SCOPE The following usages of allow and deny will work in any scope, although it is not recommended that they be used in pool declarations. a443 1 \fBignore unknown-clients;\fR a454 1 \fBignore bootp;\fR a465 1 \fBignore booting;\fR a471 119 .B The .I duplicates .B keyword .PP \fBallow duplicates;\fR \fBdeny duplicates;\fR .PP Host declarations can match client messages based on the DHCP Client Identifer option or based on the client's network hardware type and MAC address. If the MAC address is used, the host declaration will match any client with that MAC address - even clients with different client identifiers. This doesn't normally happen, but is possible when one computer has more than one operating system installed on it - for example, Microsoft Windows and NetBSD or Linux. .PP The \fBduplicates\fR flag tells the DHCP server that if a request is received from a client that matches the MAC address of a host declaration, any other leases matching that MAC address should be discarded by the server, even if the UID is not the same. This is a violation of the DHCP protocol, but can prevent clients whose client identifiers change regularly from holding many leases at the same time. By default, duplicates are \fBallow\fRed. .B The .I declines .B keyword .PP \fBallow declines;\fR \fBdeny declines;\fR \fBignore declines;\fR .PP The DHCPDECLINE message is used by DHCP clients to indicate that the lease the server has offered is not valid. When the server receives a DHCPDECLINE for a particular address, it normally abandons that address, assuming that some unauthorized system is using it. Unfortunately, a malicious or buggy client can, using DHCPDECLINE messages, completely exhaust the DHCP server's allocation pool. The server will reclaim these leases, but while the client is running through the pool, it may cause serious thrashing in the DNS, and it will also cause the DHCP server to forget old DHCP client address allocations. .PP The \fBdeclines\fR flag tells the DHCP server whether or not to honor DHCPDECLINE messages. If it is set to \fBdeny\fR or \fBignore\fR in a particular scope, the DHCP server will not respond to DHCPDECLINE messages. .SH ALLOW AND DENY WITHIN POOL DECLARATIONS .PP The uses of the allow and deny keyword shown in the previous section work pretty much the same way whether the client is sending a DHCPDISCOVER or a DHCPREQUEST message - an address will be allocated to the client (either the old address it's requesting, or a new address) and then that address will be tested to see if it's okay to let the client have it. If the client requested it, and it's not okay, the server will send a DHCPNAK message. Otherwise, the server will simply not respond to the client. If it is okay to give the address to the client, the server will send a DHCPACK message. .PP The primary motivation behind pool declarations is to have address allocation pools whose allocation policies are different. A client may be denied access to one pool, but allowed access to another pool on the same network segment. In order for this to work, access control has to be done during address allocation, not after address allocation is done. .PP When a DHCPREQUEST message is processed, address allocation simply consists of looking up the address the client is requesting and seeing if it's still available for the client. If it is, then the DHCP server checks both the address pool permit lists and the relevant in-scope allow and deny statements to see if it's okay to give the lease to the client. In the case of a DHCPDISCOVER message, the allocation process is done as described previously in the ADDRESS ALLOCATION section. .PP When declaring permit lists for address allocation pools, the following syntaxes are recognized following the allow or deny keyword: .PP \fBknown clients;\fR .PP If specified, this statement either allows or prevents allocation from this pool to any client that has a host declaration (i.e., is known). A client is known if it has a host declaration in \fIany\fR scope, not just the current scope. .PP \fBunknown clients;\fR .PP If specified, this statement either allows or prevents allocation from this pool to any client that has no host declaration (i.e., is not known). .PP \fBmembers of "\fRclass\fB";\fR .PP If specified, this statement either allows or prevents allocation from this pool to any client that is a member of the named class. .PP \fBdynamic bootp clients;\fR .PP If specified, this statement either allows or prevents allocation from this pool to any bootp client. .PP \fBauthenticated clients;\fR .PP If specified, this statement either allows or prevents allocation from this pool to any client that has been authenticated using the DHCP authentication protocol. This is not yet supported. .PP \fBunauthenticated clients;\fR .PP If specified, this statement either allows or prevents allocation from this pool to any client that has not been authenticated using the DHCP authentication protocol. This is not yet supported. .PP \fBall clients;\fR .PP If specified, this statement either allows or prevents allocation from this pool to all clients. This can be used when you want to write a pool declaration for some reason, but hold it in reserve, or when you want to renumber your network quickly, and thus want the server to force all clients that have been allocated addresses from this pool to obtain new addresses immediately when they next renew. a474 27 .I lease-file-name .B statement .PP .B lease-file-name .I name\fR\fB;\fR .PP .I Name should be the name of the DHCP server's lease file. By default, this is DBDIR/dhcpd.leases. This statement \fBmust\fR appear in the outer scope of the configuration file - if it appears in some other scope, it will have no effect. .PP .B The .I pid-file-name .B statement .PP .B pid-file-name .I name\fR\fB;\fR .PP .I Name should be the name of the DHCP server's process ID file. This is the file in which the DHCP server's process ID is stored when the server starts. By default, this is RUNDIR/dhcpd.pid. Like the lease-file-name statement, this statement must appear in the outer scope of the configuration file. .PP .B The d493 2 a494 35 lease. The only exception to this is that Dynamic BOOTP lease lengths, which are not specified by the client, are not limited by this maximum. .PP .B The .I min-lease-time .B statement .PP \fBmin-lease-time\fR \fItime\fR\fB;\fR .PP .I Time should be the minimum length in seconds that will be assigned to a lease. .PP .B The .I min-secs .B statement .PP \fBmin-secs\fR \fIseconds\fR\fB;\fR .PP .I Seconds should be the minimum number of seconds since a client began trying to acquire a new lease before the DHCP server will respond to its request. The number of seconds is based on what the client reports, and the maximum value that the client can report is 255 seconds. Generally, setting this to one will result in the DHCP server not responding to the client's first request, but always responding to its second request. .PP This can be used to set up a secondary DHCP server which never offers an address to a client until the primary server has been given a chance to do so. If the primary server is down, the client will bind to the secondary server, but otherwise clients should always bind to the primary. Note that this does not, by itself, permit a primary server and a secondary server to share a pool of dynamically-allocatable addresses. d701 21 a740 46 .I always-broadcast .B statement .PP \fBalways-broadcast\fR \fIflag\fR\fB;\fR .PP The DHCP and BOOTP protocols both require DHCP and BOOTP clients to set the broadcast bit in the flags field of the BOOTP message header. Unfortunately, some DHCP and BOOTP clients do not do this, and therefore may not receive responses from the DHCP server. The DHCP server can be made to always broadcast its responses to clients by setting this flag to 'on' for the relevant scope. To avoid creating excess broadcast traffic on your network, we recommend that you restrict the use of this option to as few clients as possible. For example, the Microsoft DHCP client is known not to have this problem, as are the OpenTransport and ISC DHCP clients. .PP .B The .I one-lease-per-client .B statement .PP \fBone-lease-per-client\fR \fIflag\fR\fB;\fR .PP If this flag is enabled, whenever a client sends a DHCPREQUEST for a particular lease, the server will automatically free any other leases the client holds. This presumes that when the client sends a DHCPREQUEST, it has forgotten any lease not mentioned in the DHCPREQUEST - i.e., the client has only a single network interface .I and it does not remember leases it's holding on networks to which it is not currently attached. Neither of these assumptions are guaranteed or provable, so we urge caution in the use of this statement. .PP .B The .I use-lease-addr-for-default-route .B statement .PP \fBuse-lease-addr-for-default-route\fR \fIflag\fR\fB;\fR .PP If the \fIuse-lease-addr-for-default-route\fR parameter is true in a given scope, then instead of sending the value specified in the routers option (or sending no value at all), the IP address of the lease being assigned is sent to the client. This supposedly causes Win95 machines to ARP for all IP addresses, which can be helpful if your router is configured for proxy ARP. .PP .B The a766 11 .PP .B The .I ddns-updates .B statement .PP \fBddns-updates \fIflag\fR\fB;\fR .PP The \fIddns-updates\fR parameter controls whether or not the server will attempt to do a ddns update when a lease is confirmed. Set this to \fIoff\fR if the server should not attempt to do updates within a certain scope. The \fIddns-updates\fR parameter is on by default. d778 1 a778 1 for this project was provided by the Internet Software Consortium. @ 1.1.1.9 log @Belated import of recent DHCP core dumps, etc. Approved by releng. @ text @d1275 5 a1279 5 information about a given network segment is not known to be correct and is not authoritative. This is so that if a naive user installs a DHCP server not fully understanding how to configure it, it does not send spurious DHCPNAK messages to clients that have obtained addresses from a legitimate DHCP server on the network. d1281 4 a1284 7 Network administrators setting up authoritative DHCP servers for their networks should always write \fBauthoritative;\fR at the top of their configuration file to indicate that the DHCP server \fIshould\fR send DHCPNAK messages to misconfigured clients. If this is not done, clients will be unable to get a correct IP address after changing subnets until their old lease has expired, which could take quite a long time. d1286 1 a1286 1 Usually, writing \fBauthoritative;\fR at the top level of the file @ 1.1.1.10 log @Latest revision of the ISC DHCP Distribution, with many bug fixes. @ text @d71 1 a71 1 this case, the \fIsubnet\fR declarations for these two networks must be @ 1.1.1.11 log @Final (I hope) DHCP client security fix. @ text @a1406 18 .SH SETTING PARAMETER VALUES USING EXPRESSIONS Sometimes it's helpful to be able to set the value of a DHCP server parameter based on some value that the client has sent. To do this, you can use expression evaluation. The .B dhcp-eval(5) manual page describes how to write expressions. To assign the result of an evaluation to an option, define the option as follows: .nf .sp 1 \fImy-parameter \fB= \fIexpression \fB;\fR .fi .PP For example: .nf .sp 1 ddns-hostname = binary-to-ascii (16, 8, "-", substring (hardware, 1, 6)); .fi @ 1.1.1.12 log @DHCP 3.0 Beta 2 Patchlevel 2 @ text @a348 243 .SH DHCP FAILOVER This version of the ISC DHCP server supports the DHCP failover protocol as documented in draft-ietf-dhc-failover-07.txt. This is not a final protocol document, and we have not done interoperability testing with other vendors' implementations of this protocol, so you must not assume that this implementation conforms to the standard. If you wish to use the failover protocol, make sure that both failover peers are running the same version of the ISC DHCP server. .PP The failover protocol allows two DHCP servers (and no more than two) to share a common address pool. Each server will have about half of the available IP addresses in the pool at any given time for allocation. If one server fails, the other server will continue to renew leases out of the pool, and will allocate new addresses out of the roughly half of available addresses that it had when communications with the other server were lost. .PP It is possible during a prolonged failure to tell the remaining server that the other server is down, in which case the remaining server will (over time) reclaim all the addresses the other server had available for allocation, and begin to reuse them. This is called putting the server into the PARTNER-DOWN state. .PP When the other server comes back online, it should automatically detect that it has been offline and request a complete update from the server that was running in the PARTNER-DOWN state, and then both servers will resume processing together. .PP It is possible to get into a dangerous situation: if you put one server into the PARTNER-DOWN state, and then *that* server goes down, and the other server comes back up, the other server will not know that the first server was in the PARTNER-DOWN state, and may issue addresses previously issued by the other server to different clients, resulting in IP address conflicts. Before putting a server into PARTNER-DOWN state, therefore, make .I sure that the other server will not restart automatically. .PP The failover protocol defines a primary server role and a secondary server role. There are some differences in how primaries and secondaries act, but most of the differences simply have to do with providing a way for each peer to behave in the opposite way from the other. So one server must be configured as primary, and the other must be configured as secondary, and it doesn't matter too much which one is which. .SH CONFIGURING FAILOVER In order to configure failover, you need to write a peer declaration that configures the failover protocol, and you need to write peer references in each pool declaration for which you want to do failover. You do not have to do failover for all pools on a given network segment. You must not tell one server it's doing failover on a particular address pool and tell the other it is not. You must not have any common address pools on which you are not doing failover. .PP The server currently does very little sanity checking, so if you configure it wrong, it will just fail in odd ways. I would recommend therefore that you either do failover or don't do failover, but don't do any mixed pools. Also, use the same master configuration file for both servers, and have a seperate file that contains the peer declaration and includes the master file. This will help you to avoid configuration mismatches. As our implementation evolves, this will become less of a problem. A basic sample dhcpd.conf file for a primary server might look like this: .PP .nf failover peer "foo" { primary; address anthrax.rc.vix.com; port 519; peer address trantor.rc.vix.com; peer port 520; max-response-delay 60; max-unacked-updates 10; mclt 3600; hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00; load balance max seconds 3; } include "/etc/dhcpd.master"; .fi .PP The statements in the peer declaration are as follows: .PP .B The .I primary .B and .I secondary .B statements .PP [ \fBprimary\fR | \fBsecondary\fR ] .PP This determines whether the server is primary or secondary, as described earlier under DHCP FAILOVER. .PP .B The .I address .B statement .PP .B address .I address .PP The \fBaddress\fR statement declares the IP address on which the server should listen for connections from its failover peer. This statement can be omitted, in which case the server will accept connections to any of its configured IP addresses. .PP .B The .I peer address .B statement .PP .B peer address .I address .PP The \fBpeer address\fR statement declares the IP address to which the server should connect to reach its failover peer for failover messages. .PP .B The .I port .B statement .PP .B port .I port-number .PP The \fBport\fR statement declares the TCP port on which the server should listen for connections from its failover peer. This statement may not currently be omitted, because the failover protocol does not yet have a reserved TCP port number. .PP .B The .I peer port .B statement .PP .B peer port .I port-number .PP The \fBpeer port\fR statement declares the TCP port to which the server should connect to reach its failover peer for failover messages. This statement may not be omitted because the failover protocol does not yet have a reserved TCP port number. The port number declared in the \fBpeer port\fR statement may be the same as the port number declared in the \fBport\fR statement. .PP .B The .I max-response-delay .B statement .PP .nf .B max-response-delay .I seconds .fi .PP The \fBmax-response-delay\fR statement tells the DHCP server how many seconds may pass without receiving a message from its failover peer before it assumes that connection has failed. This number should be small enough that a transient network failure that breaks the connection will not result in the servers being out of communication for a long time, but large enough that the server isn't constantly making and breaking connections. This parameter must be specified. .PP .B The .I max-unacked-updates .B statement .PP .B max-unacked-updates .I count .PP The \fBmax-unacked-updates\fR statement tells the DHCP server how many many BINDUPD messages it can send before it receives a BNDACK from the failover peer. We don't have enough operational experience to say what a good value for this is, but 10 seems to work. This parameter must be specified. .PP .B The .I mclt .B statement .PP .B mclt .I seconds .PP The \fBmclt\fR statement defines the Maximum Client Lead Time. It must be specified on the primary, and may not be specified on the secondary. This is the length of time for which a lease may be renewed by either failover peer without contacting the other. The longer you set this, the longer it will take for the running server to recover IP addresses after moving into PARTNER-DOWN state. The shorter you set it, the more load your servers will experience when they are not communicating. A value of something like 3600 is probably reasonable, but again bear in mind that we have no real operational experience with this. .PP .B The .I split .B statement .PP .B split .I index .PP The split statement specifies the split between the primary and secondary for the purposes of load balancing. Whenever a client makes a DHCP request, the DHCP server runs a hash on the client identification. If the hash comes out to less than the split value, the primary answers. If it comes out to equal to or more than the split, the secondary answers. This value should generally be set to 128, and can only be configured on the primary. .PP .B The .I hba .B statement .PP .B hba .I colon-seperated-hex-list .PP The hba statement specifies the split between the primary and secondary as a bitmap rather than a cutoff, which theoretically allows for finer-grained control. In practice, there is probably no need for such fine-grained control, however. An example hba statement: .PP .nf hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00; .fi .PP .B The .I load balance max seconds .B statement .PP .B load balance max seconds .I seconds .PP This statement allows you to configure a cutoff after which load balancing is disabled. The cutoff is based on the number of seconds since the client sent its first DHCPDISCOVER or DHCPREQUEST message, and only works with clients that correctly implement the \fIsecs\fR field - fortunately most clients do. We recommend setting this to something like 3 or 5. The effect of this is that if one of the failover peers gets into a state where it is responding to failover messages but not responding to some client requests, the other failover peer will take over its client load automatically as the clients retry. d529 3 a531 1 accept updates from the DHCP server. d610 5 a614 9 When you set your DNS server up to allow updates from the DHCP server, you may be exposing it to unauthorized updates. To avoid this, you should use TSIG signatures - a method of cryptographically signing updates using a shared secret key. As long as you protect the secrecy of this key, your updates should also be secure. Note, however, that the DHCP protocol itself provides no security, and that clients can therefore provide information to the DHCP server which the DHCP server will then use in its updates, with the constraints described previously. d619 3 a621 4 10.10.17.0/24 subnet. In that case, you will need a key declaration for the TSIG key you will be using, and also two zone declarations - one for the zone containing A records that will be updates and one for the zone containing PTR records - for ISC BIND, something like this: d624 1 a624 6 key DHCP_UPDATER { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret pRP5FapFoJ95JEL06sv4PQ==; }; zone "example.org" { d626 2 a627 2 file "example.org.db"; allow-update { key DHCP_UPDATER; }; d633 1 a633 12 allow-update { key DHCP_UPDATER; }; }; .fi .PP You will also have to configure your DHCP server to do updates to these zones. To do so, you need to add something like this to your dhcpd.conf file: .PP .nf key DHCP_UPDATER { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret pRP5FapFoJ95JEL06sv4PQ==; a634 10 zone EXAMPLE.ORG. { primary 127.0.0.1; key DHCP_UPDATER; } zone 17.127.10.in-addr.arpa. { primary 127.0.0.1; key DHCP_UPDATER; } d637 4 a640 9 You should choose your own secret key, of course. The ISC BIND 8 and 9 distributions come with a program for generating secret keys called dnskeygen. The version that comes with BIND 9 is likely to produce a substantially more random key, so we recommend you use that one even if you are not using BIND 9 as your DNS server. The key above was generated with the command: .nf dnskeygen -H 128 -u -c -n DHCP_UPDATER .fi a685 6 .PP The built-in version of the dynamic DNS update mechanism is in a text string towards the top of server/dhcpd.c. If you want to use events for things other than DNS updates, and you also want DNS updates, you will have to start out by copying this code into your dhcpd.conf file and modifying it. d1201 1 a1201 1 Coordinated Universal Time (UTC), not local time. @ 1.1.1.13 log @DHCP 3.0 Beta 2 Patchlevel 9 @ text @d102 3 a104 1 parameter. d452 4 a455 4 The \fBaddress\fR statement declares the IP address on which the server should listen for connections from its failover peer, and also the value to use for the DHCP Failover Protocol server identifier. Because this value is used as an identifier, it may not be omitted. a765 25 .SH COMBINING MATCH, MATCH IF AND SPAWN WITH .PP In some cases, it may be useful to use one expression to assign a client to a particular class, and a second expression to put it into a subclass of that class. This can be done by combining the \fBmatch if\fR and \fBspawn with\fR statements, or the \fBmatch if\fR and \fBmatch\fR statements. For example: .PP .nf class "jr-cable-modems" { match if option dhcp-vendor-identifier = "jrcm"; spawn with option agent.circuit-id; lease limit 4; } class "dv-dsl-modems" { match if opton dhcp-vendor-identifier = "dvdsl"; spawn with option agent.circuit-id; lease limit 16; } .fi .PP This allows you to have two classes that both have the same \fBspawn with\fR expression without getting the clients in the two classes confused with each other. @ 1.1.1.14 log @ISC DHCP 3.0b2pl23 @ text @d3 6 a8 4 .\" Copyright (c) 1996-2001 Internet Software Consortium. .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: d10 1 a10 8 .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of The Internet Software Consortium nor the names .\" of its contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. d12 3 a14 13 .\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE .\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR .\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. d16 2 a17 6 .\" This software has been written for the Internet Software Consortium .\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc. .\" To learn more about the Internet Software Consortium, see .\" ``http://www.isc.org/''. To learn more about Vixie Enterprises, .\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see .\" ``http://www.nominum.com''. d87 1 a87 1 consulting any \fIclass\fR declarations matching the client, d92 1 a92 1 client option declarations. Scopes are never considered d201 1 a201 1 the behavior of the DHCP server (e.g., how long a lease dhcpd will d215 1 a215 1 boot files for each model. One way to do this would be to have host d294 1 a294 1 eligible to be assigned addresses from the pool. If a pool has a d296 1 a296 1 the deny list will be eligible. If both permit and deny lists exist d299 1 a299 1 .SH DYNAMIC ADDRESS ALLOCATION d306 9 a314 19 the address for a while. .PP If the server finds the address the client is requesting, and that address is available to the client, the server will send a DHCPACK. If the address is no longer available, or the client isn't permitted to have it, the server will send a DHCPNAK. If the server knows nothing about the address, it will remain silent, unless the address is incorrect for the network segment to which the client has been attached and the server is authoritative for that network segment, in which case the server will send a DHCPNAK even though it doesn't know about the address. .PP There may be a host declaration matching the client's identification, and that host declaration contains a fixed-address declaration that is valid for the network segment to which the client is connected. In this case, the DHCP server will never do dynamic address allocation. In this case, the client is \fIrequired\fB to take the address specified in the host declaration. If the client is requesting some other address, the server will respond with a DHCPNAK. a346 27 .SH IP ADDRESS CONFLICT PREVENTION The DHCP server checks IP addresses to see if they are in use before allocating them to clients. It does this by sending an ICMP Echo request message to the IP address being allocated. If no ICMP Echo reply is received within a second, the address is assumed to be free. This is only done for leases that have been specified in range statements, and only when the lease is thought by the DHCP server to be free - i.e., the DHCP server or its failover peer has not listed the lease as in use. .PP If a response is received to an ICMP Echo request, the DHCP server assumes that there is a configuration error - the IP address is in use by some host on the network that is not a DHCP client. It marks the address as abandoned, and will not assign it to clients. .PP If a DHCP client tries to get an IP address, but none are available, but there are abandoned IP addresses, then the DHCP server will attempt to reclaim an abandoned IP address. It marks one IP address as free, and then does the same ICMP Echo request check described previously. If there is no answer to the ICMP Echo request, the address is assigned to the client. .PP The DHCP server does not cycle through abandoned IP addresses if the first IP address it tries to reclaim is free. Rather, when the next DHCPDISCOVER comes in from the client, it will attempt a new allocation using the same method described here, and will typically try a new IP address. d432 1 a432 1 The d434 1 a434 1 and d436 1 a436 2 statements .RS 0.25i d438 1 a438 1 [ \fBprimary\fR | \fBsecondary\fR ]\fB;\fR a441 1 .RE d443 1 a443 1 The d445 1 a445 2 statement .RS 0.25i d447 2 a448 1 .B address \fIaddress\fR\fB;\fR a453 1 .RE d455 1 a455 1 The d457 1 a457 2 statement .RS 0.25i d459 2 a460 1 .B peer address \fIaddress\fR\fB;\fR a464 1 .RE d466 1 a466 1 The d468 1 a468 2 statement .RS 0.25i d470 2 a471 1 .B port \fIport-number\fR\fB;\fR a476 1 .RE d478 1 a478 1 The d480 1 a480 2 statement .RS 0.25i d482 2 a483 1 .B peer port \fIport-number\fR\fB;\fR a490 1 .RE d492 1 a492 1 The d494 1 a494 2 statement .RS 0.25i d496 4 a499 1 .B max-response-delay \fIseconds\fR\fB;\fR a508 1 .RE d510 1 a510 1 The d512 1 a512 2 statement .RS 0.25i d514 2 a515 1 .B max-unacked-updates \fIcount\fR\fB;\fR d518 1 a518 1 many BNDUPD messages it can send before it receives a BNDACK a521 1 .RE d523 1 a523 1 The d525 1 a525 2 statement .RS 0.25i d527 2 a528 1 .B mclt \fIseconds\fR\fB;\fR a539 1 .RE d541 1 a541 1 The d543 1 a543 2 statement .RS 0.25i d545 2 a546 1 .B split \fIindex\fR\fB;\fR a554 1 .RE d556 1 a556 1 The d558 1 a558 2 statement .RS 0.25i d560 2 a561 1 .B hba \fIcolon-seperated-hex-list\fB;\fR a571 1 .RE d573 1 a573 1 The d575 1 a575 2 statement .RS 0.25i d577 2 a578 1 .B load balance max seconds \fIseconds\fR\fB;\fR a589 1 .RE d600 1 a600 1 write a conditional statement to match the clients you wanted in the d606 1 a606 1 if substring (option dhcp-client-identifier, 1, 3) = "RAS " { d616 1 a616 1 match if substring (option dhcp-client-identifier, 1, 3) = "RAS"; d637 1 a637 1 server, but it is important to be aware of it at least for the time being. d704 2 a705 3 of this is shown under the VENDOR ENCAPSULATED OPTIONS head in the .B dhcp-options(5) manual page. d797 5 a801 35 Two DNS update schemes are currently implemented, and another is planned. The two that are currently available are the ad-hoc DNS update mode and the interim DHCP-DNS interaction draft update mode. If and when the DHCP-DNS interaction draft and the DHCID draft make it through the IETF standards process, there will be a third mode, which will be the standard DNS update method. The DHCP server must be configured to use one of the two currently-supported methods, or not to do dns updates. This can be done with the .I ddns-update-style configuration parameter. .SH THE AD-HOC DNS UPDATE SCHEME The ad-hoc Dynamic DNS update scheme implemented in this version of the ISC DHCP server is a prototype design, which does not have much to do with the standard update method that is being standardized in the IETF DHC working group, but rather implements some very basic, yet useful, update capabilities. This mode .B does not work with the .I failover protocol because it does not account for the possibility of two different DHCP servers updating the same set of DNS records. .PP For the ad-hoc DNS update method, the client's FQDN is derived in two parts. First, the hostname is determined. Then, the domain name is determined, and appended to the hostname. .PP The DHCP server determines the client's hostname by first looking for a \fIddns-hostname\fR configuration option, and using that if it is present. If no such option is present, the server looks for a valid hostname in the FQDN option sent by the client. If one is found, it is used; otherwise, if the client sent a host-name option, that is used. Otherwise, if there is a host declaration that applies to the client, the name from that declaration will be used. If none of these applies, the server will not have a hostname for the client, and will not be able to do a DNS update. d803 10 a812 2 The domain name is determined based strictly on the server configuration, not on what the client sends. First, if there is a d814 30 a843 14 configuration option, it is used. Second, if there is a \fIdomain-name\fR option configured, that is used. Otherwise, the server will not do the DNS update. .PP The client's fully-qualified domain name, derived as we have described, is used as the name on which an "A" record will be stored. The A record will contain the IP address that the client was assigned in its lease. If there is already an A record with the same name in the DNS server, no update of either the A or PTR records will occur - this prevents a client from claiming that its hostname is the name of some network server. For example, if you have a fileserver called "fs.sneedville.edu", and the client claims its hostname is "fs", no DNS update will be done for that client, and an error message will be logged. d853 1 a853 1 will see unpredictable behavior. This is considered a bug, and will a871 99 .SH THE INTERIM DNS UPDATE SCHEME The interim DNS update scheme operates mostly according to several drafts that are being considered by the IETF and are expected to become standards, but are not yet standards, and may not be standardized exactly as currently proposed. These are: .PP .nf .ce 3 draft-ietf-dhc-ddns-resolution-??.txt draft-ietf-dhc-fqdn-option-??.txt draft-ietf-dnsext-dhcid-rr-??.txt .fi .PP Because our implementation is slightly different than the standard, we will briefly document the operation of this update style here. .PP The first point to understand about this style of DNS update is that unlike the ad-hoc style, the DHCP server does not necessarily always update both the A and the PTR records. The FQDN option includes a flag which, when sent by the client, indicates that the client wishes to update its own A record. In that case, the server can be configured either to honor the client's intentions or ignore them. This is done with the statement \fIallow client-updates;\fR or the statement \fIignore client-updates;\fR. By default, client updates are allowed. .PP If the server is configured to allow client updates, then if the client sends a fully-qualified domain name in the FQDN option, the server will use that name the client sent in the FQDN option to update the PTR record. For example, let us say that the client is a visitor from the "radish.org" domain, whose hostname is "jschmoe". The server is for the "example.org" domain. The DHCP client indicates in the FQDN option that its FQDN is "jschmoe.radish.org.". It also indicates that it wants to update its own A record. The DHCP server therefore does not attempt to set up an A record for the client, but does set up a PTR record for the IP address that it assigns the client, pointing at jschmoe.radish.org. Once the DHCP client has an IP address, it can update its own A record, assuming that the "radish.org" DNS server will allow it to do so. .PP If the server is configured not to allow client updates, or if the client doesn't want to do its own update, the server will simply choose a name for the client, possibly using the hostname supplied by the client ("jschmoe" in the previous example). It will use its own domain name for the client, just as in the ad-hoc update scheme. It will then update both the A and PTR record, using the name that it chose for the client. If the client sends a fully-qualified domain name in the fqdn option, the server uses only the leftmost part of the domain name - in the example above, "jschmoe" instead of "jschmoe.radish.org". .PP The other difference between the ad-hoc scheme and the interim scheme is that with the interim scheme, a method is used that allows more than one DHCP server to update the DNS database without accidentally deleting A records that shouldn't be deleted nor failing to add A records that should be added. The scheme works as follows: .PP When the DHCP server issues a client a new lease, it creates a text string that is an MD5 hash over the DHCP client's identification (see draft-ietf-dnsext-dhcid-rr-??.txt for details). The update adds an A record with the name the server chose and a TXT record containing the hashed identifier string (hashid). If this update succeeds, the server is done. .PP If the update fails because the A record already exists, then the DHCP server attempts to add the A record with the prerequisite that there must be a TXT record in the same name as the new A record, and that TXT record's contents must be equal to hashid. If this update succeeds, then the client has its A record and PTR record. If it fails, then the name the client has been assigned (or requested) is in use, and can't be used by the client. At this point the DHCP server gives up trying to do a DNS update for the client until the client chooses a new name. .PP The interim DNS update scheme is called interim for two reasons. First, it does not quite follow the drafts. The current versions of the drafts call for a new DHCID RRtype, but this is not yet available. The interim DNS update scheme uses a TXT record instead. Also, the existing ddns-resolution draft calls for the DHCP server to put a DHCID RR on the PTR record, but the \fIinterim\fR update method does not do this. It is our position that this is not useful, and we are working with the author in hopes of removing it from the next version of the draft, or better understanding why it is considered useful. .PP In addition to these differences, the server also does not update very aggressively. Because each DNS update involves a round trip to the DNS server, there is a cost associated with doing updates even if they do not actually modify the DNS database. So the DHCP server tracks whether or not it has updated the record in the past (this information is stored on the lease) and does not attempt to update records that it thinks it has already updated. .PP This can lead to cases where the DHCP server adds a record, and then the record is deleted through some other mechanism, but the server never again updates the DNS because it thinks the data is already there. In this case the data can be removed from the lease through operator intervention, and once this has been done, the DNS will be updated the next time the client renews. a931 6 Note that the zone declarations have to correspond to authority records in your name server - in the above example, there must be an SOA record for "example.org." and for "17.10.10.in-addr.arpa.". For example, if there were a subdoman "foo.example.org" with no seperate SOA, you could not write a zone declaration for "foo.example.org." .PP d942 1 a942 1 You may wish to enable logging of DNS updates on your DNS server. d983 1 a983 1 enclosed in braces. Events are used to implement DNS d985 1 a985 1 using the built-in DNS update mechanism. d987 1 a987 1 The built-in version of the DNS update mechanism is in a text d1151 1 a1151 1 behavior with respect to clients based on scope. In a non-pool a1173 1 An unknown client is simply a client that has no host declaration. a1244 12 .B The .I client-updates .B keyword .PP \fBallow client-updates;\fR \fBdeny client-updates;\fR .PP The \fBclient-updates\fR flag tells the DHCP server whether or not to honor the client's intention to do its own update of its A record. This is only relevant when doing \fIinterim\fR DNS updates. See the documentation under the heading THE INTERIM DNS UPDATE SCHEME for details. d1247 1 a1247 1 The uses of the allow and deny keywords shown in the previous section d1274 1 a1274 1 following syntaxes are recognized following the allow or deny keywords: a1319 4 The .I always-broadcast statement .RS 0.25i d1321 30 a1350 1 .B always-broadcast \fIflag\fR\fB;\fR d1352 1 a1352 11 The DHCP and BOOTP protocols both require DHCP and BOOTP clients to set the broadcast bit in the flags field of the BOOTP message header. Unfortunately, some DHCP and BOOTP clients do not do this, and therefore may not receive responses from the DHCP server. The DHCP server can be made to always broadcast its responses to clients by setting this flag to 'on' for the relevant scope. To avoid creating excess broadcast traffic on your network, we recommend that you restrict the use of this option to as few clients as possible. For example, the Microsoft DHCP client is known not to have this problem, as are the OpenTransport and ISC DHCP clients. .RE d1354 4 a1357 4 The .I always-reply-rfc1048 statement .RS 0.25i d1359 3 a1361 1 .B always-reply-rfc1048 \fIflag\fR\fB;\fR d1363 1 a1363 5 Some BOOTP clients expect RFC1048-style responses, but do not follow RFC1048 when sending their requests. You can tell that a client is having this problem if it is not getting the options you have configured for it and if you see in the server log the message "(non-rfc1048)" printed with each BOOTREQUEST that is logged. d1365 5 a1369 7 If you want to send rfc1048 options to such a client, you can set the .B always-reply-rfc1048 option in that client's host declaration, and the DHCP server will respond with an RFC-1048-style vendor options field. This flag can be set in any scope, and will affect all clients covered by that scope. .RE d1371 3 a1373 4 The .I authoritative statement .RS 0.25i d1375 1 a1375 1 .B authoritative; d1377 3 a1379 1 .B not authoritative; d1381 3 a1383 6 The DHCP server will normally assume that the configuration information about a given network segment is not known to be correct and is not authoritative. This is so that if a naive user installs a DHCP server not fully understanding how to configure it, it does not send spurious DHCPNAK messages to clients that have obtained addresses from a legitimate DHCP server on the network. d1385 1 a1385 7 Network administrators setting up authoritative DHCP servers for their networks should always write \fBauthoritative;\fR at the top of their configuration file to indicate that the DHCP server \fIshould\fR send DHCPNAK messages to misconfigured clients. If this is not done, clients will be unable to get a correct IP address after changing subnets until their old lease has expired, which could take quite a long time. d1387 7 a1393 5 Usually, writing \fBauthoritative;\fR at the top level of the file should be sufficient. However, if a DHCP server is to be set up so that it is aware of some networks for which it is authoritative and some networks for which it is not, it may be more appropriate to declare authority on a per-network-segment basis. d1395 7 a1401 9 Note that the most specific scope for which the concept of authority makes any sense is the physical network segment - either a shared-network statement or a subnet statement that is not contained within a shared-network statement. It is not meaningful to specify that the server is authoritative for some subnets within a shared network, but not authoritative for others, nor is it meaningful to specify that the server is authoritative for some host declarations and not others. .RE d1403 3 a1405 2 The \fIboot-unknown-clients\fR statement .RS 0.25i d1407 1 a1407 1 .B boot-unknown-clients \fIname\fB;\fR d1409 2 a1410 2 If the \fIboot-unknown-clients\fR statement is present and has a value of \fIfalse\fR or \fIoff\fR, then clients for which there is no d1412 15 a1426 7 declaration will not be allowed to obtain IP addresses. If this statement is not present or has a value of \fItrue\fR or \fIon\fR, then clients without host declarations will be allowed to obtain IP addresses, as long as those addresses are not restricted by .I allow and \fIdeny\fR statements within their \fIpool\fR declarations. .RE d1428 3 a1430 2 The \fIddns-hostname\fR statement .RS 0.25i d1432 1 a1432 1 .B ddns-hostname \fIname\fB;\fR d1434 5 a1438 33 The \fIname\fR parameter should be the hostname that will be used in setting up the client's A and PTR records. If no ddns-hostname is specified in scope, then the server will derive the hostname automatically, using an algorithm that varies for each of the different update methods. .RE .PP The \fIddns-domainname\fR statement .RS 0.25i .PP .B ddns-domainname \fIname\fB;\fR .PP The \fIname\fR parameter should be the domain name that will be appended to the client's hostname to form a fully-qualified domain-name (FQDN). .RE .PP The \fIddns-rev-domainname\fR statement .RS 0.25i .PP .B ddns-rev-domainname \fIname\fB;\fR The \fIname\fR parameter should be the domain name that will be appended to the client's reversed IP address to produce a name for use in the client's PTR record. By default, this is "in-addr.arpa.", but the default can be overridden here. .PP The reversed IP address to which this domain name is appended is always the IP address of the client, in dotted quad notation, reversed - for example, if the IP address assigned to the client is 10.17.92.74, then the reversed IP address is 74.92.17.10. So a client with that IP address would, by default, be given a PTR record of 10.17.92.74.in-addr.arpa. .RE d1440 3 a1442 2 The \fIddns-update-style\fR parameter .RS 0.25i d1444 1 a1444 1 .B ddns-update-style \fIstyle\fB;\fR d1446 3 a1448 8 The .I style parameter must be one of \fBad-hoc\fR, \fBinterim\fR or \fBnone\fR. The \fIddns-update-style\fR statement is only meaningful in the outer scope - it is evaluated once after reading the dhcpd.conf file, rather than each time a client is assigned an IP address, so there is no way to use different DNS update styles for different clients. .RE d1450 2 a1451 2 .B The .I ddns-updates a1452 1 .RS 0.25i d1454 1 a1454 1 \fBddns-updates \fIflag\fR\fB;\fR d1456 6 a1461 7 The \fIddns-updates\fR parameter controls whether or not the server will attempt to do a DNS update when a lease is confirmed. Set this to \fIoff\fR if the server should not attempt to do updates within a certain scope. The \fIddns-updates\fR parameter is on by default. To disable DNS updates in all scopes, it is preferable to use the \fIddns-update-style\fR statement, setting the style to \fInone\fR. .RE d1463 3 a1465 4 The .I default-lease-time statement .RS 0.25i d1467 1 a1467 1 .B default-lease-time \fItime\fR\fB;\fR d1469 10 a1478 5 .I Time should be the length in seconds that will be assigned to a lease if the client requesting the lease does not ask for a specific expiration time. .RE d1480 1 a1480 1 The d1482 1 a1482 2 statement .RS 0.25i d1484 1 a1484 1 .B dynamic-bootp-lease-cutoff \fIdate\fB;\fR a1507 1 .RE d1509 1 a1509 1 The d1511 1 a1511 2 statement .RS 0.25i d1513 1 a1513 1 .B dynamic-bootp-lease-length\fR \fIlength\fR\fB;\fR a1524 1 .RE d1526 1 a1526 34 The .I filename statement .RS 0.25i .PP .B filename\fR \fB"\fR\fIfilename\fR\fB";\fR .PP The \fIfilename\fR statement can be used to specify the name of the initial boot file which is to be loaded by a client. The .I filename should be a filename recognizable to whatever file transfer protocol the client can be expected to use to load the file. .RE .PP The .I fixed-address statement .RS 0.25i .PP .B fixed-address address\fR [\fB,\fR \fIaddress\fR ... ]\fB;\fR .PP The \fIfixed-address\fR statement is used to assign one or more fixed IP addresses to a client. It should only appear in a \fIhost\fR declaration. If more than one address is supplied, then when the client boots, it will be assigned the address which corresponds to the network on which it is booting. If none of the addresses in the \fIfixed-address\fR statement are on the network on which the client is booting, that client will not match the \fIhost\fR declaration containing that \fIfixed-address\fR statement. Each \fIaddress\fR should be either an IP address or a domain name which resolves to one or more IP addresses. .RE .PP The d1528 1 a1528 2 statement .RS 0.25i d1530 1 a1530 1 .B get-lease-hostnames\fR \fIflag\fR\fB;\fR a1537 1 .RE d1539 3 a1541 4 The .I hardware statement .RS 0.25i d1543 1 a1543 1 .B hardware \fIhardware-type hardware-address\fB;\fR d1545 4 a1548 19 In order for a BOOTP client to be recognized, its network hardware address must be declared using a \fIhardware\fR clause in the .I host statement. .I hardware-type must be the name of a physical hardware interface type. Currently, only the .B ethernet and .B token-ring types are recognized, although support for a .B fddi hardware type (and others) would also be desirable. The .I hardware-address should be a set of hexadecimal octets (numbers from 0 through ff) seperated by colons. The \fIhardware\fR statement may also be used for DHCP clients. .RE d1550 18 a1567 4 The .I lease-file-name statement .RS 0.25i d1569 2 a1570 1 .B lease-file-name \fIname\fB;\fR d1572 3 a1574 6 .I Name should be the name of the DHCP server's lease file. By default, this is DBDIR/dhcpd.leases. This statement \fBmust\fR appear in the outer scope of the configuration file - if it appears in some other scope, it will have no effect. .RE d1576 1 a1576 10 The .I local-port statement .RS 0.25i .PP .B local-port \fIport\fB;\fR .PP This statement causes the DHCP server to listen for DHCP requests on the UDP port specified in \fIport\fR, rather than on port 67. .RE d1578 1 a1578 43 The .I log-facility statement .RS 0.25i .PP .B log-facility \fIfacility\fB;\fR .PP This statement causes the DHCP server to do all of its logging on the specified log facility once the dhcpd.conf file has been read. By default the DHCP server logs to the daemon facility. Possible log facilities include auth, authpriv, cron, daemon, ftp, kern, lpr, mail, mark, news, ntp, security, syslog, user, uucp, and local0 through local7. Not all of these facilities are available on all systems, and there may be other facilities available on other systems. .PP In addition to setting this value, you may need to modify your .I syslog.conf file to configure logging of the DHCP server. For example, you might add a line like this: .PP .nf local7.debug /var/log/dhcpd.log .fi .PP The syntax of the \fIsyslog.conf\fR file may be different on some operating systems - consult the \fIsyslog.conf\fR manual page to be sure. To get syslog to start logging to the new file, you must first create the file with correct ownership and permissions (usually, the same owner and permissions of your /var/log/messages or /usr/adm/messages file should be fine) and send a SIGHUP to syslogd. Some systems support log rollover using a shell script or program called newsyslog or logrotate, and you may be able to configure this as well so that your log file doesn't grow uncontrollably. .PP Because the \fIlog-facility\fR setting is controlled by the dhcpd.conf file, log messages printed while parsing the dhcpd.conf file or before parsing it are logged to the default log facility. To prevent this, see the README file included with this distribution, which describes how to change the default log facility. When this parameter is used, the DHCP server prints its startup message a second time after parsing the configuration file, so that the log will be as complete as possible. .RE d1580 6 a1585 4 The .I max-lease-time statement .RS 0.25i d1587 7 a1593 1 .B max-lease-time \fItime\fR\fB;\fR d1595 5 a1599 6 .I Time should be the maximum length in seconds that will be assigned to a lease. The only exception to this is that Dynamic BOOTP lease lengths, which are not specified by the client, are not limited by this maximum. .RE d1601 8 a1608 4 The .I min-lease-time statement .RS 0.25i d1610 3 a1612 1 .B min-lease-time \fItime\fR\fB;\fR d1614 1 a1614 4 .I Time should be the minimum length in seconds that will be assigned to a lease. .RE d1616 5 a1620 4 The .I min-secs statement .RS 0.25i d1622 6 a1627 1 .B min-secs \fIseconds\fR\fB;\fR d1629 3 a1631 7 .I Seconds should be the minimum number of seconds since a client began trying to acquire a new lease before the DHCP server will respond to its request. The number of seconds is based on what the client reports, and the maximum value that the client can report is 255 seconds. Generally, setting this to one will result in the DHCP server not responding to the client's first request, but always responding to its second request. d1633 1 a1633 8 This can be used to set up a secondary DHCP server which never offers an address to a client until the primary server has been given a chance to do so. If the primary server is down, the client will bind to the secondary server, but otherwise clients should always bind to the primary. Note that this does not, by itself, permit a primary server and a secondary server to share a pool of dynamically-allocatable addresses. .RE d1635 10 a1644 4 The .I next-server statement .RS 0.25i d1646 1 a1646 24 .B next-server\fR \fIserver-name\fR\fB;\fR .PP The \fInext-server\fR statement is used to specify the host address of the server from which the initial boot file (specified in the \fIfilename\fR statement) is to be loaded. \fIServer-name\fR should be a numeric IP address or a domain name. If no \fInext-server\fR parameter applies to a given client, the DHCP server's IP address is used. .RE .PP The .I omapi-port statement .RS 0.25i .PP .B omapi-port\fR \fIport\fR\fB;\fR .PP The \fIomapi-port\fR statement causes the DHCP server to listen for OMAPI connections on the specified port. This statement is required to enable the OMAPI protocol, which is used to examine and modify the state of the DHCP server as it is running. .RE .PP The d1648 1 a1648 2 statement .RS 0.25i d1650 1 a1650 1 .B one-lease-per-client \fIflag\fR\fB;\fR a1660 1 .RE d1662 3 a1664 4 The .I pid-file-name statement .RS 0.25i d1666 1 a1666 2 .B pid-file-name .I name\fR\fB;\fR d1668 6 a1673 7 .I Name should be the name of the DHCP server's process ID file. This is the file in which the DHCP server's process ID is stored when the server starts. By default, this is RUNDIR/dhcpd.pid. Like the lease-file-name statement, this statement must appear in the outer scope of the configuration file. .RE d1675 1 a1675 22 The .I ping-checks statement .RS 0.25i .PP .B ping-checks .I flag\fR\fB;\fR .PP When the DHCP server is considering dynamically allocating an IP address to a client, it first sends an ICMP Echo request (a \fIping\fR) to the address being assigned. It waits for a second, and if no ICMP Echo response has been heard, it assigns the address. If a response \fIis\fR heard, the lease is abandoned, and the server does not respond to the client. .PP This \fIping check\fR introduces a one-second delay in responding to DHCPDISCOVER messages, which can be a problem for some clients. The ping-checks configuration parameter can be used to control checking - if its value is false, no ping check is done. .RE .PP The d1677 1 a1677 2 statement .RS 0.25i d1679 1 a1679 1 .B server-identifier \fIhostname\fR\fB;\fR a1701 1 .RE d1703 3 a1705 4 The .I server-name statement .RS 0.25i d1707 1 a1707 1 .B server-name "\fIname\fB";\fR d1709 4 a1712 153 The \fIserver-name\fR statement can be used to inform the client of the name of the server from which it is booting. \fIName\fR should be the name that will be provided to the client. .RE .PP The .I site-option-space statement .RS 0.25i .PP .B site-option-space "\fIname\fB";\fR .PP The \fIsite-option-space\fR statement can be used to determine from what option space site-local options will be taken. This can be used in much the same way as the \fIvendor-option-space\fR statement. Site-local options in DHCP are those options whose numeric codes are greater than 128. These options are intended for site-specific uses, but are frequently used by vendors of embedded hardware that contains DHCP clients. Because site-specific options are allocated on an ad hoc basis, it is quite possible that one vendor's DHCP client might use the same option code that another vendor's client uses, for different purposes. The \fIsite-option-space\fR option can be used to assign a different set of site-specific options for each such vendor, using conditional evaluation (see \fIdhcp-eval.5\fR for details). .RE .PP The .I stash-agent-options statement .RS 0.25i .PP .B stash-agent-options \fIflag\fB;\fR .PP If the \fIstash-agent-options\fR parameter is true for a given client, the server will record the relay agent information options sent during the client's initial DHCPREQUEST message when the client was in the SELECTING state and behave as if those options are included in all subsequent DHCPREQUEST messages sent in the RENEWING state. This works around a problem with relay agent information options, which is that they usually not appear in DHCPREQUEST messages sent by the client in the RENEWING state, because such messages are unicast directly to the server and not sent through a relay agent. .PP The .I update-optimization statement .RS 0.25i .PP .B update-optimization \fIflag\fB;\fR .PP If the \fIupdate-optimization\fR parameter is false for a given client, the server will attempt a DNS update for that client each time the client renews its lease, rather than only attempting an update when it appears to be necessary. This will allow the DNS to heal from database inconsistencies more easily, but the cost is that the DHCP server must do many more DNS updates. We do not recommend enabling this on large networks with the current DHCP server. This option only affects the behavior of the interim DNS update scheme, and has no effect on the ad-hoc DNS update scheme. If this parameter is not specified, or is false, the DHCP server will only update when the client information changes, the client gets a different lease, or the client's lease expires. .PP The .I update-static-leases statement .RS 0.25i .PP .B update-static-leases \fIflag\fB;\fR .PP The \fIupdate-static-leases\fR flag, if enabled, causes the DHCP server to do DNS updates for clients even if those clients are being assigned their IP address using a \fIfixed-address\fR statement - that is, the client is being given a static assignment. This can only work with the \fIinterim\fR DNS update scheme. It is not recommended because the DHCP server has no way to tell that the update has been done, and therefore will not delete the record when it is not in use. Also, the server must attempt the update each time the client renews its lease, which could have a significant performance impact in environments that place heavy demands on the DHCP server. .PP The .I use-host-decl-names statement .RS 0.25i .PP .B use-host-decl-names \fIflag\fB;\fR .PP If the \fIuse-host-decl-names\fR parameter is true in a given scope, then for every host declaration within that scope, the name provided for the host declaration will be supplied to the client as its hostname. So, for example, .PP .nf group { use-host-decl-names on; host joe { hardware ethernet 08:00:2b:4c:29:32; fixed-address joe.fugue.com; } } is equivalent to host joe { hardware ethernet 08:00:2b:4c:29:32; fixed-address joe.fugue.com; option host-name "joe"; } .fi .PP An \fIoption host-name\fR statement within a host declaration will override the use of the name in the host declaration. .PP It should be noted here that most DHCP clients completely ignore the host-name option sent by the DHCP server, and there is no way to configure them not to do this. So you generally have a choice of either not having any hostname to client IP address mapping that the client will recognize, or doing DNS updates. It is beyond the scope of this document to describe how to make this determination. .RE .PP The .I use-lease-addr-for-default-route statement .RS 0.25i .PP .B use-lease-addr-for-default-route \fIflag\fR\fB;\fR .PP If the \fIuse-lease-addr-for-default-route\fR parameter is true in a given scope, then instead of sending the value specified in the routers option (or sending no value at all), the IP address of the lease being assigned is sent to the client. This supposedly causes Win95 machines to ARP for all IP addresses, which can be helpful if your router is configured for proxy ARP. The use of this feature is not recommended, because it won't work for many DHCP clients. .RE .PP The .I vendor-option-space statement .RS 0.25i .PP .B vendor-option-space \fIstring\fR\fB;\fR .PP The \fIvendor-option-space\fR parameter determines from what option space vendor options are taken. The use of this configuration parameter is illustrated in the \fIdhcp-options(5)\fR manual page, in the \fIVENDOR ENCAPSULATED OPTIONS\fR section. .RE d1732 1 a1735 5 .SH REFERENCE: EXPRESSIONS Expressions used in DHCP option statements and elsewhere are documented in the .B dhcp-eval(5) manual page. d1737 1 a1737 1 dhcpd(8), dhcpd.leases(5), dhcp-options(5), dhcp-eval(5), RFC2132, RFC2131. d1739 1 a1739 1 .B dhcpd.conf(5) @ 1.1.1.15 log @ISC DHCP 3.0rc8 @ text @a425 14 You can put the server into the PARTNER-DOWN state either by using the .B omshell (8) command or by stopping the server, editing the last peer state declaration in the lease file, and restarting the server. If you use this last method, be sure to leave the date and time of the start of the state blank: .PP .nf .B failover peer "\fIname\fB" state { .B my state partner-down; .B peer state \fIstate\fB at \fIdate\fB; .B } .fi .PP a447 31 .SH FAILOVER STARTUP When a server starts that has not previously communicated with its failover peer, it must establish communications with its failover peer and synchronize with it before it can serve clients. This can happen either because you have just configured your DHCP servers to perform failover for the first time, or because one of your failover servers has failed catastrophically and lost its database. .PP The initial recovery process is designed to ensure that when one failover peer loses its database and then resynchronizes, any leases that the failed server gave out before it failed will be honored. When the failed server starts up, it notices that it has no saved failover state, and attempts to contact its peer. .PP When it has established contact, it asks the peer for a complete copy its peer's lease database. The peer then sends its complete database, and sends a message indicating that it is done. The failed server then waits until MCLT has passed, and once MCLT has passed both servers make the transition back into normal operation. This waiting period ensures that any leases the failed server may have given out while out of contact with its partner will have expired. .PP While the failed server is recovering, its partner remains in the partner-down state, which means that it is serving all clients. The failed server provides no service at all to DHCP clients until it has made the transition into normal operation. .PP In the case where both servers detect that they have never before communicated with their partner, they both come up in this recovery state and follow the procedure we have just described. In this case, no service will be provided to DHCP clients until MCLT has expired. d665 14 a678 2 To add clients to classes based on conditional evaluation, you can specify a matching expression in the class statement: d694 10 d1108 1 a1108 6 SOA, you could not write a zone declaration for "foo.example.org." Also keep in mind that zone names in your DHCP configuration should end in a "."; this is the preferred syntax. If you do not end your zone name in a ".", the DHCP server will figure it out. Also note that in the DHCP configuration, zone names are not encapsulated in quotes where there are in the DNS configuration. d1112 1 a1112 1 dnssec-keygen. The version that comes with BIND 9 is likely to produce a d1114 2 a1115 7 if you are not using BIND 9 as your DNS server. If you are using BIND 9's dnssec-keygen, the above key would be created as follows: .nf dnssec-keygen -a HMAC-MD5 -b 128 -n USER DHCP_UPDATER If you are using the BIND 8 dnskeygen program, the following command will generate a key as seen above: d1995 1 a1995 1 .I ping-check d1999 1 a1999 1 .B ping-check d2011 1 a2011 1 ping-check configuration parameter can be used to control checking - a2094 1 .RE a2114 1 .RE a2132 1 .RE @