xref: /openbsd/usr.sbin/dhcpd/dhcpd.conf.5 (revision 73471bf0)
1.\"	$OpenBSD: dhcpd.conf.5,v 1.26 2020/05/16 16:58:11 jmc Exp $
2.\"
3.\" Copyright (c) 1995, 1996, 1997, 1998, 1998, 1999
4.\" The Internet Software Consortium.    All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\"
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. Neither the name of The Internet Software Consortium nor the names
16.\"    of its contributors may be used to endorse or promote products derived
17.\"    from this software without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
20.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23.\" DISCLAIMED.  IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
24.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
27.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
28.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
30.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31.\" SUCH DAMAGE.
32.\"
33.\" This software has been written for the Internet Software Consortium
34.\" by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
35.\" Enterprises.  To learn more about the Internet Software Consortium,
36.\" see ``http://www.isc.org/isc''.  To learn more about Vixie
37.\" Enterprises, see ``http://www.vix.com''.
38.\"
39.Dd $Mdocdate: May 16 2020 $
40.Dt DHCPD.CONF 5
41.Os
42.Sh NAME
43.Nm dhcpd.conf
44.Nd DHCP server configuration file
45.Sh DESCRIPTION
46The
47.Nm
48file contains configuration information for
49.Xr dhcpd 8 ,
50the Internet Software Consortium DHCP Server.
51.Pp
52The
53.Nm
54file is a free-form ASCII text file.
55It is parsed by the recursive-descent parser built into
56.Xr dhcpd 8 .
57The file may contain extra tabs and newlines for formatting purposes.
58Keywords in the file are case-insensitive.
59Comments may be placed anywhere within the file (except within quotes).
60Comments begin with the
61.Sq #
62character and end at the end of the line.
63.Pp
64The file essentially consists of a list of statements.
65Statements fall into two broad categories \- parameters and declarations.
66.Pp
67Parameter statements say how to do something (e.g., how long a
68lease to offer), whether to do something (e.g., should
69.Xr dhcpd 8
70provide addresses to unknown clients), or what parameters to provide to the
71client (e.g., use gateway 220.177.244.7).
72.Pp
73Declarations are used to describe the topology of the
74network, to describe clients on the network, to provide addresses that
75can be assigned to clients, or to apply a group of parameters to a
76group of declarations.
77In any group of parameters and declarations, all parameters must be specified
78before any declarations which depend on those parameters may be specified.
79.Pp
80Declarations about network topology include the
81.Ic shared-network
82and the
83.Ic subnet
84declarations.
85If clients on a subnet are to be assigned addresses dynamically, a
86.Ic range
87declaration must appear within the
88.Ic subnet
89declaration.
90For clients with statically assigned addresses, or for installations where
91only known clients will be served, each such client must have a
92.Ic host
93declaration.
94If parameters are to be applied to a group of declarations which are not
95related strictly on a per-subnet basis, the
96.Ic group
97declaration can be used.
98.Pp
99For every subnet which will be served, and for every subnet
100to which the dhcp server is connected, there must be one
101.Ic subnet
102declaration, which tells
103.Xr dhcpd 8
104how to recognize that an address is on that subnet.
105A
106.Ic subnet
107declaration is required for each subnet even if no addresses will be
108dynamically allocated on that subnet.
109.Pp
110Some installations have physical networks on which more than one IP
111subnet operates.
112For example, if there is a site-wide requirement that 8-bit subnet masks
113be used, but a department with a single physical Ethernet network expands
114to the point where it has more than 254 nodes, it may be necessary to run
115two 8-bit subnets on the same Ethernet until such time as a new physical
116network can be added.
117In this case, the
118.Ic subnet
119declarations for these two networks may be enclosed in a
120.Ic shared-network
121declaration.
122.Pp
123Some sites may have departments which have clients on more than one
124subnet, but it may be desirable to offer those clients a uniform set
125of parameters which are different than what would be offered to
126clients from other departments on the same subnet.
127For clients which will be declared explicitly with
128.Ic host
129declarations, these declarations can be enclosed in a
130.Ic group
131declaration along with the parameters which are common to that department.
132For clients whose addresses will be dynamically assigned, there is currently no
133way to group parameter assignments other than by network topology.
134.Pp
135When a client is to be booted, its boot parameters are determined by
136first consulting that client's
137.Ic host
138declaration (if any), then consulting the
139.Ic group
140declaration (if any) which enclosed that
141.Ic host
142declaration, then consulting the
143.Ic subnet
144declaration for the subnet on which the client is booting, then consulting the
145.Ic shared-network
146declaration (if any) containing that subnet, and finally consulting the
147top-level parameters which may be specified outside of any declaration.
148.Pp
149When
150.Xr dhcpd 8
151tries to find a
152.Ic host
153declaration for a client, it first looks for a
154.Ic host
155declaration which has a
156.Ar fixed-address
157parameter which matches the subnet or shared network on which the client
158is booting.
159If it doesn't find any such entry, it then tries to find an entry which has no
160.Ar fixed-address
161parameter.
162If no such entry is found, then
163.Xr dhcpd 8
164acts as if there is no entry in the
165.Nm
166file for that client, even if there is an entry for that client on a
167different subnet or shared network.
168.Sh EXAMPLES
169A typical
170.Nm
171file will look something like this:
172.Pp
173Example 1
174.Bd -unfilled -offset indent
175.Ar global parameters...
176
177shared-network ISC-BIGGIE {
178.Pf "  " Ar shared-network-specific parameters ...
179  subnet 204.254.239.0 netmask 255.255.255.224 {
180.Pf "    " Ar subnet-specific parameters ...
181    range 204.254.239.10 204.254.239.30;
182  }
183  subnet 204.254.239.32 netmask 255.255.255.224 {
184.Pf "    " Ar subnet-specific parameters ...
185    range 204.254.239.42 204.254.239.62;
186  }
187}
188
189subnet 204.254.239.64 netmask 255.255.255.224 {
190.Pf "  " Ar subnet-specific parameters ...
191  range 204.254.239.74 204.254.239.94;
192}
193
194group {
195.Pf "  " Ar group-specific parameters ...
196  host zappo.test.isc.org {
197.Pf "    " Ar host-specific parameters ...
198  }
199  host beppo.test.isc.org {
200.Pf "    " Ar host-specific parameters ...
201  }
202  host harpo.test.isc.org {
203.Pf "    " Ar host-specific parameters ...
204  }
205}
206.Ed
207.Pp
208Notice that at the beginning of the file, there's a place
209for global parameters.
210These might be things like the organization's domain name,
211the addresses of the name servers
212(if they are common to the entire organization), and so on.
213So, for example:
214.Pp
215Example 2
216.Bd -literal -offset indent
217option domain-name \&"isc.org\&";
218option domain-name-servers ns1.isc.org, ns2.isc.org;
219.Ed
220.Pp
221As you can see in Example 2, it's legal to specify host addresses in
222parameters as hostnames rather than as numeric IP addresses.
223.Pp
224In Example 1, you can see that both the shared-network statement and
225the subnet statements can have parameters.
226Let us say that the shared network ISC-BIGGIE supports an entire department \-
227perhaps the accounting department.
228If accounting has its own domain, then a shared-network-specific parameter
229might be:
230.Pp
231.Dl option domain-name \&"accounting.isc.org\&";
232.Pp
233All subnet declarations appearing in the shared-network declaration
234would then have the domain-name option set to
235.Dq accounting.isc.org
236instead of just
237.Dq isc.org .
238.Pp
239The most obvious reason for having subnet-specific parameters as
240shown in Example 1 is that each subnet, of necessity, has its own router.
241So for the first subnet, for example, there should be something like:
242.Pp
243.Dl option routers 204.254.239.1;
244.Pp
245Note that the address here is specified numerically.
246This is not required \- if you have a different hostname for each
247interface on your router, it's perfectly legitimate to use the hostname
248for that interface instead of the numeric address.
249However, in many cases there may be only one hostname for all of a router's
250IP addresses, and it would not be appropriate to use that name here.
251.Pp
252In Example 1 there is also a
253.Ic group
254statement, which provides common parameters for a set of three hosts \- zappo,
255beppo and harpo.
256As you can see, these hosts are all in the test.isc.org domain, so it
257might make sense for a group-specific parameter to override the domain
258name supplied to these hosts:
259.Pp
260.Dl option domain-name \&"test.isc.org\&";
261.Pp
262Also, given the domain they're in, these are probably test machines.
263If we wanted to test the DHCP leasing mechanism, we might set the
264lease timeout somewhat shorter than the default:
265.Bd -literal -offset indent
266max-lease-time 120;
267default-lease-time 120;
268.Ed
269.Pp
270You may have noticed that while some parameters start with the
271.Ic option
272keyword, some do not.
273Parameters starting with the
274.Ic option
275keyword correspond to actual DHCP options, while parameters that do not start
276with the option keyword either control the behaviour of the DHCP server
277(e.g., how long a lease
278.Xr dhcpd 8
279will give out), or specify client parameters that are not optional in the
280DHCP protocol (for example, server-name and filename).
281.Pp
282In Example 1, each host had
283.Ar host-specific parameters .
284These could include such things as the
285.Ic hostname
286option, the name of a file to download (the
287.Ar filename
288parameter) and the address of the server from which to download the file (the
289.Ar next-server
290parameter).
291In general, any parameter can appear anywhere that parameters are allowed,
292and will be applied according to the scope in which the parameter appears.
293.Pp
294Imagine that you have a site with a lot of NCD X-Terminals.
295These terminals come in a variety of models, and you want to specify the
296boot files for each model.
297One way to do this would be to have host declarations for each server
298and group them by model:
299.Bd -literal -offset indent
300group {
301  filename "Xncd19r";
302  next-server ncd-booter;
303
304  host ncd1 { hardware ethernet 0:c0:c3:49:2b:57; }
305  host ncd4 { hardware ethernet 0:c0:c3:80:fc:32; }
306  host ncd8 { hardware ethernet 0:c0:c3:22:46:81; }
307}
308
309group {
310  filename "Xncd19c";
311  next-server ncd-booter;
312
313  host ncd2 { hardware ethernet 0:c0:c3:88:2d:81; }
314  host ncd3 { hardware ethernet 0:c0:c3:00:14:11; }
315}
316
317group {
318  filename "XncdHMX";
319  next-server ncd-booter;
320
321  host ncd5 { hardware ethernet 0:c0:c3:11:90:23; }
322  host ncd6 { hardware ethernet 0:c0:c3:91:a7:8; }
323  host ncd7 { hardware ethernet 0:c0:c3:cc:a:8f; }
324}
325.Ed
326.Sh REFERENCE: DECLARATIONS
327The
328.Ic shared-network
329statement informs the DHCP server that some IP subnets actually
330share the same physical network:
331.Bd -unfilled -offset indent
332.Ic shared-network Ar name No {
333.Pf "  " Op Ar parameters
334.Pf "  " Op Ar declarations
335}
336.Ed
337.Pp
338Any subnets in a shared network should be declared within a
339.Ic shared-network
340statement.
341Parameters specified in the
342.Ic shared-network
343statement will be used when booting clients on those subnets unless
344parameters provided at the subnet or host level override them.
345If any subnet in a shared network has addresses available for dynamic
346allocation, those addresses are collected into a common pool for that
347shared network and assigned to clients as needed.
348There is no way to distinguish on which subnet of a shared network a
349client should boot.
350.Pp
351.Ar name
352should be the name of the shared network.
353This name is used when printing debugging messages, so it should be
354descriptive for the shared network.
355The name may have the syntax of a valid hostname
356(although it will never be used as such), or it may be any arbitrary
357name, enclosed in quotes.
358.Pp
359The
360.Ic subnet
361statement provides
362.Xr dhcpd 8
363with enough information to tell whether or not an IP address is on that subnet:
364.Bd -unfilled -offset indent
365.Ic subnet Ar subnet-number Ic netmask Ar netmask No {
366.Pf "  " Op Ar parameters
367.Pf "  " Op Ar declarations
368}
369.Ed
370.Pp
371It may also be used to provide subnet-specific parameters and to
372specify what addresses may be dynamically allocated to clients booting
373on that subnet.
374Such addresses are specified using the
375.Ic range
376declaration.
377.Pp
378The
379.Ar subnet-number
380and
381.Ar netmask
382should be specified as numeric IP addresses.
383The subnet number, together with the netmask, are sufficient to determine
384whether any given IP address is on the specified subnet.
385.Pp
386Although a netmask must be given with every subnet declaration, it is
387recommended that if there is any variance in subnet masks at a site, a
388subnet-mask option statement be used in each subnet declaration to set
389the desired subnet mask, since any subnet-mask option statement will
390override the subnet mask declared in the subnet statement.
391.Pp
392The
393.Ic range
394statement gives the lowest and highest IP addresses in a range:
395.Bd -filled -offset indent
396.Ic range Op Ic dynamic-bootp
397.Ar low-address Oo Ar high-address Oc ;
398.Ed
399.Pp
400For any subnet on which addresses will be assigned dynamically, there
401must be at least one
402.Ic range
403statement.
404All IP addresses in the range should be in the subnet in which the
405.Ic range
406statement is declared.
407The
408.Ic dynamic-bootp
409flag may be specified if addresses in the specified range may be dynamically
410assigned to BOOTP clients as well as DHCP clients.
411When specifying a single address,
412.Ar high-address
413can be omitted.
414.Pp
415There must be at least one
416.Ic host
417statement for every BOOTP client that is to be served:
418.Bd -unfilled -offset indent
419.Ic host Ar hostname No {
420.Pf "  " Op Ar parameters
421.Pf "  " Op Ar declarations
422}
423.Ed
424.Pp
425.Ic host
426statements may also be specified for DHCP clients, although this is
427not required unless booting is only enabled for known hosts.
428.Pp
429If it is desirable to be able to boot a DHCP or BOOTP
430client on more than one subnet with fixed addresses, more than one
431address may be specified in the
432.Ar fixed-address
433parameter, or more than one
434.Ic host
435statement may be specified.
436.Pp
437If client-specific boot parameters must change based on the network
438to which the client is attached, then multiple
439.Ic host
440statements should be used.
441.Pp
442If a client is to be booted using a fixed address if it's
443possible, but should be allocated a dynamic address otherwise, then a
444.Ic host
445statement must be specified without a
446.Ar fixed-address
447clause.
448.Ar hostname
449should be a name identifying the host.
450If a
451.Ar hostname
452option is not specified for the host,
453.Ar hostname
454is used.
455.Pp
456.Ic host
457declarations are matched to actual DHCP or BOOTP clients by matching the
458.Ic dhcp-client-identifier
459option specified in the
460.Ic host
461declaration to the one supplied by the client or, if the
462.Ic host
463declaration or the client does not provide a
464.Ic dhcp-client-identifier
465option, by matching the
466.Ar hardware
467parameter in the
468.Ic host
469declaration to the network hardware address supplied by the client.
470BOOTP clients do not normally provide a
471.Ar dhcp-client-identifier ,
472so the hardware address must be used for all clients that may boot using
473the BOOTP protocol.
474.Pp
475The
476.Ic group
477statement is used simply to apply one or more parameters to a group of
478declarations:
479.Bd -unfilled -offset indent
480.Ic group No {
481.Pf "  " Op Ar parameters
482.Pf "  " Op Ar declarations
483}
484.Ed
485.Pp
486It can be used to group hosts, shared networks, subnets, or even other groups.
487.Sh REFERENCE: ALLOW and DENY
488The
489.Ic allow
490and
491.Ic deny
492statements can be used to control the behaviour of
493.Xr dhcpd 8
494to various sorts of requests.
495.Pp
496The
497.Ar unknown-clients
498flag tells
499.Xr dhcpd 8
500whether or not to dynamically assign addresses to unknown clients:
501.Bd -literal -offset indent
502allow unknown-clients;
503deny unknown-clients;
504.Ed
505.Pp
506Dynamic address assignment to unknown clients is allowed by default.
507.Pp
508The
509.Ar bootp
510flag tells
511.Xr dhcpd 8
512whether or not to respond to bootp queries:
513.Bd -literal -offset indent
514allow bootp;
515deny bootp;
516.Ed
517.Pp
518Bootp queries are allowed by default.
519.Pp
520The
521.Ar booting
522flag tells
523.Xr dhcpd 8
524whether or not to respond to queries from a particular client:
525.Bd -literal -offset indent
526allow booting;
527deny booting;
528.Ed
529.Pp
530This keyword only has meaning when it appears in a host declaration.
531By default, booting is allowed, but if it is disabled for a particular client,
532then that client will not be able to get an address from the DHCP server.
533.Sh REFERENCE: PARAMETERS
534The
535.Ic default-lease-time
536statement specifies the
537.Ar time
538in seconds that will be assigned to a lease
539if the client requesting the lease does not ask for a specific expiration time:
540.Pp
541.D1 Ic default-lease-time Ar time ;
542.Pp
543The
544.Ic max-lease-time
545statement specifies the maximum
546.Ar time
547in seconds that will be assigned to a lease
548if the client requesting the lease asks for a specific expiration time:
549.Pp
550.D1 Ic max-lease-time Ar time ;
551.Pp
552The
553.Ic hardware
554statement allows a
555BOOTP client to be recognized in a
556.Ic host
557statement:
558.Pp
559.D1 Ic hardware Ar hardware-type hardware-address ;
560.Pp
561.Ar hardware-type
562must be the name of a hardware interface type.
563Currently, the
564.Cm ethernet ,
565.Cm token-ring
566and
567.Cm fddi
568physical interface types are recognized,
569although support for DHCP-over-IPsec virtual interface type
570.Cm ipsec-tunnel
571is provided.
572The
573.Ar hardware-address
574should be a set of colon-separated hexadecimal octets (0-ff)
575or a hostname that can be looked up in
576.Xr ethers 5
577when the configuration is read.
578The
579.Ic hardware
580statement may also be used for DHCP clients.
581.Pp
582The
583.Ic filename
584statement can be used to specify the name of the initial boot file which
585is to be loaded by a client:
586.Pp
587.D1 Ic filename Qq Ar filename ;
588.Pp
589The
590.Ar filename
591should be a filename recognizable to whatever file transfer protocol
592the client can be expected to use to load the file.
593.Pp
594The
595.Ic server-name
596statement can be used to inform the client of the name of the server
597from which it is booting:
598.Pp
599.D1 Ic server-name Qq Ar name ;
600.Pp
601.Ar name
602should be the name that will be provided to the client.
603.Pp
604The
605.Ic next-server
606statement specifies the host address of
607the server from which the initial boot file (specified in the
608.Ic filename
609statement) is to be loaded:
610.Pp
611.D1 Ic next-server Ar server-name ;
612.Pp
613.Ar server-name
614should be a numeric IP address or a hostname.
615If no
616.Ic next-server
617parameter applies to a given client, the DHCP server's IP address is used.
618.Pp
619The
620.Ic fixed-address
621statement assigns one or more fixed IP addresses to a client:
622.Pp
623.D1 Ic fixed-address Ar address Op , Ar address ... ;
624.Pp
625It should only appear in a
626.Ic host
627declaration.
628If more than one address is supplied, then when the client boots, it will be
629assigned the address which corresponds to the network on which it is booting.
630If none of the addresses in the
631.Ic fixed-address
632statement are on the network on which the client is booting, that client will
633not match the
634.Ic host
635declaration containing that
636.Ic fixed-address
637statement.
638Each
639.Ar address
640should be either an IP address or a hostname which resolves to one
641or more IP addresses.
642.Pp
643Clients with fixed addresses are not assigned DHCP leases,
644and may therefore not be used with the
645.Fl ACL
646table options of
647.Xr dhcpd 8 .
648.Pp
649The
650.Ic dynamic-bootp-lease-cutoff
651statement sets the ending time for all leases assigned dynamically to
652BOOTP clients:
653.Pp
654.D1 Ic dynamic-bootp-lease-cutoff Ar date ;
655.Pp
656Because BOOTP clients do not have any way of renewing leases,
657and don't know that their leases could expire, by default
658.Xr dhcpd 8
659assigns infinite leases to all BOOTP clients.
660However, it may make sense in some situations to set a cutoff date for all
661BOOTP leases \- for example, the end of a school term,
662or the time at night when a facility is closed and all
663machines are required to be powered off.
664.Pp
665.Ar date
666should be the date on which all assigned BOOTP leases will end.
667The date is specified in the form:
668.Pp
669.Dl W YYYY/MM/DD HH:MM:SS
670.Pp
671W is the day of the week expressed as a number from zero (Sunday)
672to six (Saturday).
673YYYY is the year, including the century.
674MM is the month expressed as a number from 1 to 12.
675DD is the day of the month, counting from 1.
676HH is the hour, from zero to 23.
677MM is the minute and SS is the second.
678The time is always in Coordinated Universal Time (UTC), not local time.
679.Pp
680The
681.Ic dynamic-bootp-lease-length
682statement sets the length of leases dynamically assigned to BOOTP clients:
683.Pp
684.D1 Ic dynamic-bootp-lease-length Ar length ;
685.Pp
686At some sites, it may be possible to assume that a lease is no longer in
687use if its holder has not used BOOTP or DHCP to get its address within
688a certain time period.
689The period is specified in
690.Ar length
691as a number of seconds.
692If a client reboots using BOOTP during the timeout period, the lease
693duration is reset to
694.Ar length ,
695so a BOOTP client that boots frequently enough will never lose its lease.
696Needless to say, this parameter should be adjusted with extreme caution.
697.Pp
698The
699.Ic get-lease-hostnames
700statement tells
701.Xr dhcpd 8
702whether or not to look up the hostname corresponding to the IP address of
703each address in the lease pool and use that address for the DHCP
704.Ic hostname
705option:
706.Pp
707.D1 Ic get-lease-hostnames Ar flag ;
708.Pp
709If
710.Ar flag
711is true, then this lookup is done for all addresses in the current scope.
712By default, or if
713.Ar flag
714is false, no lookups are done.
715.Pp
716If the
717.Ic use-host-decl-names
718parameter is true in a given scope, then for every host declaration within
719that scope, the name provided for the host declaration will be supplied to
720the client as its hostname:
721.Pp
722.D1 Ic use-host-decl-names Ar flag ;
723.Pp
724So, for example:
725.Bd -literal -offset indent
726group {
727  use-host-decl-names on;
728
729  host joe {
730    hardware ethernet 08:00:2b:4c:29:32;
731    fixed-address joe.fugue.com;
732  }
733}
734.Ed
735.Pp
736is equivalent to:
737.Bd -literal -offset indent
738host joe {
739  hardware ethernet 08:00:2b:4c:29:32;
740  fixed-address joe.fugue.com;
741  option host-name "joe";
742}
743.Ed
744.Pp
745An
746.Ic option host-name
747statement within a host declaration will override the use of the name
748in the host declaration.
749.Pp
750The
751.Ic authoritative
752statement:
753.Pp
754.D1 Ic authoritative ;
755.D1 Ic not authoritative ;
756.Pp
757The DHCP server will normally assume that the configuration
758information about a given network segment is known to be correct and
759is authoritative.
760So if a client requests an IP address on a given network segment that the
761server knows is not valid for that segment, the server will respond with a
762DHCPNAK message, causing the client to forget its IP address and try to get
763a new one.
764.Pp
765If a DHCP server is being configured by somebody who is not the
766network administrator and who therefore does not wish to assert this
767level of authority, then the statement
768.Dq not authoritative
769should be written in the appropriate scope in the configuration file.
770.Pp
771Usually, writing
772.Ic not authoritative;
773at the top level of the file should be sufficient.
774However, if a DHCP server is to be set up so that it is aware of some
775networks for which it is authoritative and some networks for which it is not,
776it may be more appropriate to declare authority on a per-network-segment basis.
777.Pp
778Note that the most specific scope for which the concept of authority
779makes any sense is the physical network segment \- either a
780shared-network statement or a subnet statement that is not contained
781within a shared-network statement.
782It is not meaningful to specify that the server is authoritative for some
783subnets within a shared network, but not authoritative for others,
784nor is it meaningful to specify that the server is authoritative for some
785host declarations and not others.
786.Pp
787The
788.Ic use-lease-addr-for-default-route
789statement:
790.Pp
791.D1 Ic use-lease-addr-for-default-route Ar flag ;
792.Pp
793If the
794.Ic use-lease-addr-for-default-route
795parameter is true in a given scope, then instead of sending the value
796specified in the routers option (or sending no value at all),
797the IP address of the lease being assigned is sent to the client.
798This supposedly causes Win95 machines to ARP for all IP addresses,
799which can be helpful if your router is configured for proxy ARP.
800.Pp
801If
802.Ic use-lease-addr-for-default-route
803is enabled and an option routers statement are both in scope,
804the routers option will be preferred.
805The rationale for this is that in situations where you want to use
806this feature, you probably want it enabled for a whole bunch of
807Windows 95 machines, and you want to override it for a few other machines.
808Unfortunately, if the opposite happens to be true for your
809site, you are probably better off not trying to use this flag.
810.Pp
811The
812.Ic always-reply-rfc1048
813statement:
814.Pp
815.D1 Ic always-reply-rfc1048 Ar flag ;
816.Pp
817Some BOOTP clients expect RFC 1048-style responses, but do not follow
818RFC 1048 when sending their requests.
819You can tell that a client is having this problem if it is not getting
820the options you have configured for it and if you see in the server log
821the message
822.Dq (non-rfc1048)
823printed with each BOOTREQUEST that is logged.
824.Pp
825If you want to send RFC 1048 options to such a client, you can set the
826.Ic always-reply-rfc1048
827option in that client's host declaration, and the DHCP server will
828respond with an RFC 1048-style vendor options field.
829This flag can be set in any scope, and will affect all clients covered
830by that scope.
831.Pp
832The
833.Ic server-identifier
834statement can be used to define the value that is sent in the
835DHCP Server Identifier option for a given scope:
836.Pp
837.D1 Ic server-identifier Ar hostname ;
838.Pp
839The value specified
840.Em must
841be an IP address for the DHCP server, and must be reachable by all
842clients served by a particular scope.
843.Pp
844The use of the server-identifier statement is not recommended \- the only
845reason to use it is to force a value other than the default value to be
846sent on occasions where the default value would be incorrect.
847The default value is the first IP address associated with the physical
848network interface on which the request arrived.
849.Pp
850The usual case where the
851.Ic server-identifier
852statement needs to be sent is when a physical interface has more than one
853IP address, and the one being sent by default isn't appropriate for some
854or all clients served by that interface.
855Another common case is when an alias is defined for the purpose of
856having a consistent IP address for the DHCP server, and it is desired
857that the clients use this IP address when contacting the server.
858.Pp
859Supplying a value for the
860.Ic dhcp-server-identifier
861option is equivalent to using the
862.Ic server-identifier
863statement.
864.Pp
865The
866.Ic echo-client-id
867statement controls RFC 6842 compliant behavior and has a default
868value of true:
869.Pp
870.D1 Ic echo-client-id Ar flag ;
871.Pp
872Some devices, especially old printers, require
873.Ic echo-client-id
874to be false.
875.Pp
876When
877.Ic echo-client-id
878is true
879.Xr dhcpd 8
880copies option dhcp-client-identifier (code 61)
881from
882DHCP DISCOVER or REQUEST messages into
883the DHCP ACK or NAK reply sent to the client.
884.Sh REFERENCE: OPTION STATEMENTS
885DHCP option statements are documented in the
886.Xr dhcp-options 5
887manual page.
888.Sh FILES
889.Bl -tag -width /etc/examples/dhcpd.conf -compact
890.It Pa /etc/examples/dhcpd.conf
891Example configuration file.
892.El
893.Sh SEE ALSO
894.Xr dhcp-options 5 ,
895.Xr dhcpd.leases 5 ,
896.Xr dhcpd 8
897.Sh STANDARDS
898.Rs
899.%A R. Droms
900.%D March 1997
901.%R RFC 2131
902.%T Dynamic Host Configuration Protocol
903.Re
904.Pp
905.Rs
906.%A S. Alexander
907.%A R. Droms
908.%D March 1997
909.%R RFC 2132
910.%T DHCP Options and BOOTP Vendor Extensions
911.Re
912.Pp
913.Rs
914.%A M. Patrick
915.%D January 2001
916.%R RFC 3046
917.%T DHCP Relay Agent Information Option
918.Re
919.Pp
920.Rs
921.%A B. Patel
922.%A B. Aboba
923.%A S. Kelly
924.%A V. Gupta
925.%D January 2003
926.%R RFC 3456
927.%T Dynamic Host Configuration Protocol (DHCPv4) Configuration of IPsec Tunnel Mode
928.Re
929.Sh AUTHORS
930.An -nosplit
931.Xr dhcpd 8
932was written by
933.An Ted Lemon Aq Mt mellon@vix.com
934under a contract with Vixie Labs.
935.Pp
936The current implementation was reworked by
937.An Henning Brauer Aq Mt henning@openbsd.org .
938