xref: /openbsd-src/usr.sbin/dhcpd/dhcpd.conf.5 (revision d13be5d47e4149db2549a9828e244d59dbc43f15)
1.\"	$OpenBSD: dhcpd.conf.5,v 1.10 2009/09/01 08:42:31 reyk 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: September 1 2009 $
40.Dt DHCPD.CONF 5
41.Os
42.Sh NAME
43.Nm dhcpd.conf
44.Nd dhcpd 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.Ar \ \&\ \&shared-network-specific parameters...
179  subnet 204.254.239.0 netmask 255.255.255.224 {
180.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.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.Ar \ \&\ \&subnet-specific parameters...
191  range 204.254.239.74 204.254.239.94;
192}
193
194group {
195.Ar \ \&\ \&group-specific parameters...
196  host zappo.test.isc.org {
197.Ar \ \&\ \&\ \&\ \&host-specific parameters...
198  }
199  host beppo.test.isc.org {
200.Ar \ \&\ \&\ \&\ \&host-specific parameters...
201  }
202  host harpo.test.isc.org {
203.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 domain names rather than as numeric IP addresses.
223If a given hostname resolves to more than one IP address (for example, if
224that host has two Ethernet interfaces), both addresses are supplied to
225the client.
226.Pp
227In Example 1, you can see that both the shared-network statement and
228the subnet statements can have parameters.
229Let us say that the shared network ISC-BIGGIE supports an entire department \-
230perhaps the accounting department.
231If accounting has its own domain, then a shared-network-specific parameter
232might be:
233.Pp
234.Dl option domain-name \&"accounting.isc.org\&";
235.Pp
236All subnet declarations appearing in the shared-network declaration
237would then have the domain-name option set to
238.Dq accounting.isc.org
239instead of just
240.Dq isc.org .
241.Pp
242The most obvious reason for having subnet-specific parameters as
243shown in Example 1 is that each subnet, of necessity, has its own router.
244So for the first subnet, for example, there should be something like:
245.Pp
246.Dl option routers 204.254.239.1;
247.Pp
248Note that the address here is specified numerically.
249This is not required \- if you have a different domain name for each
250interface on your router, it's perfectly legitimate to use the domain name
251for that interface instead of the numeric address.
252However, in many cases there may be only one domain name for all of a router's
253IP addresses, and it would not be appropriate to use that name here.
254.Pp
255In Example 1 there is also a
256.Ic group
257statement, which provides common parameters for a set of three hosts \- zappo,
258beppo and harpo.
259As you can see, these hosts are all in the test.isc.org domain, so it
260might make sense for a group-specific parameter to override the domain
261name supplied to these hosts:
262.Pp
263.Dl option domain-name \&"test.isc.org\&";
264.Pp
265Also, given the domain they're in, these are probably test machines.
266If we wanted to test the DHCP leasing mechanism, we might set the
267lease timeout somewhat shorter than the default:
268.Bd -literal -offset indent
269max-lease-time 120;
270default-lease-time 120;
271.Ed
272.Pp
273You may have noticed that while some parameters start with the
274.Ic option
275keyword, some do not.
276Parameters starting with the
277.Ic option
278keyword correspond to actual DHCP options, while parameters that do not start
279with the option keyword either control the behaviour of the DHCP server
280(e.g., how long a lease
281.Xr dhcpd 8
282will give out), or specify client parameters that are not optional in the
283DHCP protocol (for example, server-name and filename).
284.Pp
285In Example 1, each host had
286.Ar host-specific parameters .
287These could include such things as the
288.Ic hostname
289option, the name of a file to download (the
290.Ar filename
291parameter) and the address of the server from which to download the file (the
292.Ar next-server
293parameter).
294In general, any parameter can appear anywhere that parameters are allowed,
295and will be applied according to the scope in which the parameter appears.
296.Pp
297Imagine that you have a site with a lot of NCD X-Terminals.
298These terminals come in a variety of models, and you want to specify the
299boot files for each model.
300One way to do this would be to have host declarations for each server
301and group them by model:
302.Bd -literal -offset indent
303group {
304  filename "Xncd19r";
305  next-server ncd-booter;
306
307  host ncd1 { hardware ethernet 0:c0:c3:49:2b:57; }
308  host ncd4 { hardware ethernet 0:c0:c3:80:fc:32; }
309  host ncd8 { hardware ethernet 0:c0:c3:22:46:81; }
310}
311
312group {
313  filename "Xncd19c";
314  next-server ncd-booter;
315
316  host ncd2 { hardware ethernet 0:c0:c3:88:2d:81; }
317  host ncd3 { hardware ethernet 0:c0:c3:00:14:11; }
318}
319
320group {
321  filename "XncdHMX";
322  next-server ncd-booter;
323
324  host ncd5 { hardware ethernet 0:c0:c3:11:90:23; }
325  host ncd6 { hardware ethernet 0:c0:c3:91:a7:8; }
326  host ncd7 { hardware ethernet 0:c0:c3:cc:a:8f; }
327}
328.Ed
329.Sh REFERENCE: DECLARATIONS
330The
331.Ic shared-network
332statement
333.Bd -unfilled -offset indent
334.Ic shared-network Ar name No {
335.Pf \ \&\ \& Op Ar parameters
336.Pf \ \&\ \& Op Ar declarations
337}
338.Ed
339.Pp
340The
341.Ic shared-network
342statement is used to inform the DHCP server that some IP subnets actually
343share the same physical network.
344Any subnets in a shared network should be declared within a
345.Ic shared-network
346statement.
347Parameters specified in the
348.Ic shared-network
349statement will be used when booting clients on those subnets unless
350parameters provided at the subnet or host level override them.
351If any subnet in a shared network has addresses available for dynamic
352allocation, those addresses are collected into a common pool for that
353shared network and assigned to clients as needed.
354There is no way to distinguish on which subnet of a shared network a
355client should boot.
356.Pp
357.Ar name
358should be the name of the shared network.
359This name is used when printing debugging messages, so it should be
360descriptive for the shared network.
361The name may have the syntax of a valid domain name
362(although it will never be used as such), or it may be any arbitrary
363name, enclosed in quotes.
364.Pp
365The
366.Ic subnet
367statement
368.Bd -unfilled -offset indent
369.Ic subnet Ar subnet-number Ic netmask Ar netmask No {
370.Pf \ \&\ \& Op Ar parameters
371.Pf \ \&\ \& Op Ar declarations
372}
373.Ed
374.Pp
375The
376.Ic subnet
377statement is used to provide
378.Xr dhcpd 8
379with enough information to tell whether or not an IP address is on that subnet.
380It may also be used to provide subnet-specific parameters and to
381specify what addresses may be dynamically allocated to clients booting
382on that subnet.
383Such addresses are specified using the
384.Ic range
385declaration.
386.Pp
387The
388.Ar subnet-number
389and
390.Ar netmask
391should be specified as numeric IP addresses.
392The subnet number, together with the netmask, are sufficient to determine
393whether any given IP address is on the specified subnet.
394.Pp
395Although a netmask must be given with every subnet declaration, it is
396recommended that if there is any variance in subnet masks at a site, a
397subnet-mask option statement be used in each subnet declaration to set
398the desired subnet mask, since any subnet-mask option statement will
399override the subnet mask declared in the subnet statement.
400.Pp
401The
402.Ic range
403statement
404.Pp
405.Xo
406.Ic range Op Ic dynamic-bootp
407.Ar low-address Oo Ar high-address Oc ;
408.Xc
409.Pp
410For any subnet on which addresses will be assigned dynamically, there
411must be at least one
412.Ic range
413statement.
414The range statement gives the lowest and highest IP addresses in a range.
415All IP addresses in the range should be in the subnet in which the
416.Ic range
417statement is declared.
418The
419.Ic dynamic-bootp
420flag may be specified if addresses in the specified range may be dynamically
421assigned to BOOTP clients as well as DHCP clients.
422When specifying a single address,
423.Ar high-address
424can be omitted.
425.Pp
426The
427.Ic host
428statement
429.Bd -unfilled -offset indent
430.Ic host Ar hostname No {
431.Pf \ \&\ \& Op Ar parameters
432.Pf \ \&\ \& Op Ar declarations
433}
434.Ed
435.Pp
436There must be at least one
437.Ic host
438statement for every BOOTP client that is to be served.
439.Ic host
440statements may also be specified for DHCP clients, although this is
441not required unless booting is only enabled for known hosts.
442.Pp
443If it is desirable to be able to boot a DHCP or BOOTP
444client on more than one subnet with fixed addresses, more than one
445address may be specified in the
446.Ar fixed-address
447parameter, or more than one
448.Ic host
449statement may be specified.
450.Pp
451If client-specific boot parameters must change based on the network
452to which the client is attached, then multiple
453.Ic host
454statements should be used.
455.Pp
456If a client is to be booted using a fixed address if it's
457possible, but should be allocated a dynamic address otherwise, then a
458.Ic host
459statement must be specified without a
460.Ar fixed-address
461clause.
462.Ar hostname
463should be a name identifying the host.
464If a
465.Ar hostname
466option is not specified for the host,
467.Ar hostname
468is used.
469.Pp
470.Ic host
471declarations are matched to actual DHCP or BOOTP clients by matching the
472.Ic dhcp-client-identifier
473option specified in the
474.Ic host
475declaration to the one supplied by the client, or, if the
476.Ic host
477declaration or the client does not provide a
478.Ic dhcp-client-identifier
479option, by matching the
480.Ar hardware
481parameter in the
482.Ic host
483declaration to the network hardware address supplied by the client.
484BOOTP clients do not normally provide a
485.Ar dhcp-client-identifier ,
486so the hardware address must be used for all clients that may boot using
487the BOOTP protocol.
488.Pp
489The
490.Ic group
491statement
492.Bd -unfilled -offset indent
493.Ic group No {
494.Pf \ \&\ \& Op Ar parameters
495.Pf \ \&\ \& Op Ar declarations
496}
497.Ed
498.Pp
499The
500.Ic group
501statement is used simply to apply one or more parameters to a group of
502declarations.
503It can be used to group hosts, shared networks, subnets, or even other groups.
504.Sh REFERENCE: ALLOW and DENY
505The
506.Ic allow
507and
508.Ic deny
509statements can be used to control the behaviour of
510.Xr dhcpd 8
511to various sorts of requests.
512.Pp
513The
514.Ar unknown-clients
515keyword
516.Bd -literal -offset indent
517allow unknown-clients;
518deny unknown-clients;
519.Ed
520.Pp
521The
522.Ar unknown-clients
523flag is used to tell
524.Xr dhcpd 8
525whether or not to dynamically assign addresses to unknown clients.
526Dynamic address assignment to unknown clients is allowed by default.
527.Pp
528The
529.Ar bootp
530keyword
531.Bd -literal -offset indent
532allow bootp;
533deny bootp;
534.Ed
535.Pp
536The
537.Ar bootp
538flag is used to tell
539.Xr dhcpd 8
540whether or not to respond to bootp queries.
541Bootp queries are allowed by default.
542.Pp
543The
544.Ar booting
545keyword
546.Bd -literal -offset indent
547allow booting;
548deny booting;
549.Ed
550.Pp
551The
552.Ar booting
553flag is used to tell
554.Xr dhcpd 8
555whether or not to respond to queries from a particular client.
556This keyword only has meaning when it appears in a host declaration.
557By default, booting is allowed, but if it is disabled for a particular client,
558then that client will not be able to get an address from the DHCP server.
559.Sh REFERENCE: PARAMETERS
560The
561.Ic default-lease-time
562statement
563.Pp
564.D1 Ic default-lease-time Ar time ;
565.Pp
566.Ar time
567should be the length in seconds that will be assigned to a lease if
568the client requesting the lease does not ask for a specific expiration time.
569.Pp
570The
571.Ic max-lease-time
572statement
573.Pp
574.D1 Ic max-lease-time Ar time ;
575.Pp
576.Ar time
577should be the maximum length in seconds that will be assigned to a
578lease if the client requesting the lease asks for a specific expiration time.
579.Pp
580The
581.Ic hardware
582statement
583.Pp
584.D1 Ic hardware Ar hardware-type hardware-address ;
585.Pp
586In order for a BOOTP client to be recognized, its network hardware
587address must be declared using a
588.Ic hardware
589clause in the
590.Ic host
591statement.
592.Ar hardware-type
593must be the name of a hardware interface type.
594Currently, the
595.Ar ethernet ,
596.Ar token-ring
597and
598.Ar fddi
599physical interface types are recognized,
600although support for DHCP-over-IPSec virtual interface type
601.Ar ipsec-tunnel
602is provided.
603The
604.Ar hardware-address
605should be a set of hexadecimal octets (numbers from 0 through ff)
606separated by colons.
607The
608.Ic hardware
609statement may also be used for DHCP clients.
610.Pp
611The
612.Ic filename
613statement
614.Pp
615.D1 Ic filename Ar \&"filename\&" ;
616.Pp
617The
618.Ic filename
619statement can be used to specify the name of the initial boot file which
620is to be loaded by a client.
621The
622.Ar filename
623should be a filename recognizable to whatever file transfer protocol
624the client can be expected to use to load the file.
625.Pp
626The
627.Ic server-name
628statement
629.Pp
630.D1 Ic server-name Ar \&"name\&" ;
631.Pp
632The
633.Ic server-name
634statement can be used to inform the client of the name of the server
635from which it is booting.
636.Ar name
637should be the name that will be provided to the client.
638.Pp
639The
640.Ic next-server
641statement
642.Pp
643.D1 Ic next-server Ar server-name ;
644.Pp
645The
646.Ic next-server
647statement is used to specify the host address of
648the server from which the initial boot file (specified in the
649.Ic filename
650statement) is to be loaded.
651.Ar server-name
652should be a numeric IP address or a domain name.
653If no
654.Ic next-server
655parameter applies to a given client, the DHCP server's IP address is used.
656.Pp
657The
658.Ic fixed-address
659statement
660.Pp
661.Xo
662.Ic \	\&fixed-address Ar address
663.Op , Ar address ... ;
664.Xc
665.Pp
666The
667.Ic fixed-address
668statement is used to assign one or more fixed IP addresses to a client.
669It should only appear in a
670.Ic host
671declaration.
672If more than one address is supplied, then when the client boots, it will be
673assigned the address which corresponds to the network on which it is booting.
674If none of the addresses in the
675.Ic fixed-address
676statement are on the network on which the client is booting, that client will
677not match the
678.Ic host
679declaration containing that
680.Ic fixed-address
681statement.
682Each
683.Ar address
684should be either an IP address or a domain name which resolves to one
685or more IP addresses.
686.Pp
687Clients with fixed addresses are not assigned DHCP leases,
688and may therefore not be used with the
689.Fl ACL
690table options of
691.Xr dhcpd 8 .
692.Pp
693The
694.Ic dynamic-bootp-lease-cutoff
695statement
696.Pp
697.D1 Ic dynamic-bootp-lease-cutoff Ar date ;
698.Pp
699The
700.Ic dynamic-bootp-lease-cutoff
701statement sets the ending time for all leases assigned dynamically to
702BOOTP clients.
703Because BOOTP clients do not have any way of renewing leases,
704and don't know that their leases could expire, by default
705.Xr dhcpd 8
706assigns infinite leases to all BOOTP clients.
707However, it may make sense in some situations to set a cutoff date for all
708BOOTP leases \- for example, the end of a school term,
709or the time at night when a facility is closed and all
710machines are required to be powered off.
711.Pp
712.Ar date
713should be the date on which all assigned BOOTP leases will end.
714The date is specified in the form:
715.Pp
716.Dl W YYYY/MM/DD HH:MM:SS
717.Pp
718W is the day of the week expressed as a number from zero (Sunday)
719to six (Saturday).
720YYYY is the year, including the century.
721MM is the month expressed as a number from 1 to 12.
722DD is the day of the month, counting from 1.
723HH is the hour, from zero to 23.
724MM is the minute and SS is the second.
725The time is always in Coordinated Universal Time (UTC), not local time.
726.Pp
727The
728.Ic dynamic-bootp-lease-length
729statement
730.Pp
731.D1 Ic dynamic-bootp-lease-length Ar length ;
732.Pp
733The
734.Ic dynamic-bootp-lease-length
735statement is used to set the length of leases dynamically assigned to
736BOOTP clients.
737At some sites, it may be possible to assume that a lease is no longer in
738use if its holder has not used BOOTP or DHCP to get its address within
739a certain time period.
740The period is specified in
741.Ar length
742as a number of seconds.
743If a client reboots using BOOTP during the timeout period, the lease
744duration is reset to
745.Ar length ,
746so a BOOTP client that boots frequently enough will never lose its lease.
747Needless to say, this parameter should be adjusted with extreme caution.
748.Pp
749The
750.Ic get-lease-hostnames
751statement
752.Pp
753.D1 Ic get-lease-hostnames Ar flag ;
754.Pp
755The
756.Ic get-lease-hostnames
757statement is used to tell
758.Xr dhcpd 8
759whether or not to look up the domain name corresponding to the IP address of
760each address in the lease pool and use that address for the DHCP
761.Ic hostname
762option.
763If
764.Ar flag
765is true, then this lookup is done for all addresses in the current scope.
766By default, or if
767.Ar flag
768is false, no lookups are done.
769.Pp
770The
771.Ic use-host-decl-names
772statement
773.Pp
774.D1 Ic use-host-decl-names Ar flag ;
775.Pp
776If the
777.Ic use-host-decl-names
778parameter is true in a given scope, then for every host declaration within
779that scope, the name provided for the host declaration will be supplied to
780the client as its hostname.
781So, for example,
782.Bd -literal -offset indent
783group {
784  use-host-decl-names on;
785
786  host joe {
787    hardware ethernet 08:00:2b:4c:29:32;
788    fixed-address joe.fugue.com;
789  }
790}
791.Ed
792.Pp
793is equivalent to
794.Bd -literal -offset indent
795host joe {
796  hardware ethernet 08:00:2b:4c:29:32;
797  fixed-address joe.fugue.com;
798  option host-name "joe";
799}
800.Ed
801.Pp
802An
803.Ic option host-name
804statement within a host declaration will override the use of the name
805in the host declaration.
806.Pp
807The
808.Ic authoritative
809statement
810.Pp
811.D1 Ic authoritative ;
812.Pp
813.D1 Ic not authoritative ;
814.Pp
815The DHCP server will normally assume that the configuration
816information about a given network segment is known to be correct and
817is authoritative.
818So if a client requests an IP address on a given network segment that the
819server knows is not valid for that segment, the server will respond with a
820DHCPNAK message, causing the client to forget its IP address and try to get
821a new one.
822.Pp
823If a DHCP server is being configured by somebody who is not the
824network administrator and who therefore does not wish to assert this
825level of authority, then the statement
826.Dq not authoritative
827should be written in the appropriate scope in the configuration file.
828.Pp
829Usually, writing
830.Em not authoritative;
831at the top level of the file should be sufficient.
832However, if a DHCP server is to be set up so that it is aware of some
833networks for which it is authoritative and some networks for which it is not,
834it may be more appropriate to declare authority on a per-network-segment basis.
835.Pp
836Note that the most specific scope for which the concept of authority
837makes any sense is the physical network segment \- either a
838shared-network statement or a subnet statement that is not contained
839within a shared-network statement.
840It is not meaningful to specify that the server is authoritative for some
841subnets within a shared network, but not authoritative for others,
842nor is it meaningful to specify that the server is authoritative for some
843host declarations and not others.
844.Pp
845The
846.Ic use-lease-addr-for-default-route
847statement
848.Pp
849.D1 Ic use-lease-addr-for-default-route Ar flag ;
850.Pp
851If the
852.Ic use-lease-addr-for-default-route
853parameter is true in a given scope, then instead of sending the value
854specified in the routers option (or sending no value at all),
855the IP address of the lease being assigned is sent to the client.
856This supposedly causes Win95 machines to ARP for all IP addresses,
857which can be helpful if your router is configured for proxy ARP.
858.Pp
859If
860.Ic use-lease-addr-for-default-route
861is enabled and an option routers statement are both in scope,
862the routers option will be preferred.
863The rationale for this is that in situations where you want to use
864this feature, you probably want it enabled for a whole bunch of
865Windows 95 machines, and you want to override it for a few other machines.
866Unfortunately, if the opposite happens to be true for your
867site, you are probably better off not trying to use this flag.
868.Pp
869The
870.Ic always-reply-rfc1048
871statement
872.Pp
873.D1 Ic always-reply-rfc1048 Ar flag ;
874.Pp
875Some BOOTP clients expect RFC 1048-style responses, but do not follow
876RFC 1048 when sending their requests.
877You can tell that a client is having this problem if it is not getting
878the options you have configured for it and if you see in the server log
879the message
880.Dq (non-rfc1048)
881printed with each BOOTREQUEST that is logged.
882.Pp
883If you want to send RFC 1048 options to such a client, you can set the
884.Ic always-reply-rfc1048
885option in that client's host declaration, and the DHCP server will
886respond with an RFC 1048-style vendor options field.
887This flag can be set in any scope, and will affect all clients covered
888by that scope.
889.Pp
890The
891.Ic server-identifier
892statement
893.Pp
894.D1 Ic server-identifier Ar hostname ;
895.Pp
896The
897.Ic server-identifier
898statement can be used to define the value that is sent in the
899DHCP Server Identifier option for a given scope.
900The value specified
901.Em must
902be an IP address for the DHCP server, and must be reachable by all
903clients served by a particular scope.
904.Pp
905The use of the server-identifier statement is not recommended \- the only
906reason to use it is to force a value other than the default value to be
907sent on occasions where the default value would be incorrect.
908The default value is the first IP address associated with the physical
909network interface on which the request arrived.
910.Pp
911The usual case where the
912.Ic server-identifier
913statement needs to be sent is when a physical interface has more than one
914IP address, and the one being sent by default isn't appropriate for some
915or all clients served by that interface.
916Another common case is when an alias is defined for the purpose of
917having a consistent IP address for the DHCP server, and it is desired
918that the clients use this IP address when contacting the server.
919.Pp
920Supplying a value for the
921.Ic dhcp-server-identifier
922option is equivalent to using the
923.Ic server-identifier
924statement.
925.Sh REFERENCE: OPTION STATEMENTS
926DHCP option statements are documented in the
927.Xr dhcp-options 5
928manual page.
929.Sh SEE ALSO
930.Xr dhcp-options 5 ,
931.Xr dhcpd.leases 5 ,
932.Xr dhcpd 8
933.Pp
934RFC 2132, RFC 2131, RFC 3046, RFC 3456
935.Sh AUTHORS
936.An -nosplit
937.Xr dhcpd 8
938was written by
939.An Ted Lemon Aq mellon@vix.com
940under a contract with Vixie Labs.
941.Pp
942The current implementation was reworked by
943.An Henning Brauer Aq henning@openbsd.org .
944