1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
|
DHCPD.CONF(5) OpenBSD Programmer's Manual DHCPD.CONF(5)
NNAAMMEE
ddhhccppdd..ccoonnff - dhcpd configuration file
DDEESSCCRRIIPPTTIIOONN
The ddhhccppdd..ccoonnff file contains configuration information for dhcpd(8), the
Internet Software Consortium DHCP Server.
The ddhhccppdd..ccoonnff file is a free-form ASCII text file. It is parsed by the
recursive-descent parser built into dhcpd(8). 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 (ex-
cept within quotes). Comments begin with the `#' character and end at
the end of the line.
The file essentially consists of a list of statements. Statements fall
into two broad categories - parameters and declarations.
Parameter statements say how to do something (e.g., how long a lease to
offer), whether to do something (e.g., should dhcpd(8) provide addresses
to unknown clients), or what parameters to provide to the client (e.g.,
use gateway 220.177.244.7).
Declarations are used to describe the topology of the network, to de-
scribe 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 spec-
ified before any declarations which depend on those parameters may be
specified.
Declarations about network topology include the sshhaarreedd--nneettwwoorrkk and the
ssuubbnneett declarations. If clients on a subnet are to be assigned addresses
dynamically, a rraannggee declaration must appear within the ssuubbnneett declara-
tion. For clients with statically assigned addresses, or for installa-
tions where only known clients will be served, each such client must have
a hhoosstt declaration. If parameters are to be applied to a group of decla-
rations which are not related strictly on a per-subnet basis, the ggrroouupp
declaration can be used.
For every subnet which will be served, and for every subnet to which the
dhcp server is connected, there must be one ssuubbnneett declaration, which
tells dhcpd(8) how to recognize that an address is on that subnet. A
ssuubbnneett declaration is required for each subnet even if no addresses will
be dynamically allocated on that subnet.
Some installations have physical networks on which more than one IP sub-
net operates. For example, if there is a site-wide requirement that
8-bit subnet masks be used, but a department with a single physical eth-
ernet 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 ssuubbnneett
declarations for these two networks may be enclosed in a sshhaarreedd--nneettwwoorrkk
declaration.
Some sites may have departments which have clients on more than one sub-
net, but it may be desirable to offer those clients a uniform set of pa-
rameters 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 hhoosstt declarations, these declarations can be enclosed in
a ggrroouupp declaration along with the parameters which are common to that
department. For clients whose addresses will be dynamically assigned,
there is currently no way to group parameter assignments other than by
network topology.
When a client is to be booted, its boot parameters are determined by
first consulting that client's hhoosstt declaration (if any), then consulting
the ggrroouupp declaration (if any) which enclosed that hhoosstt declaration, then
consulting the ssuubbnneett declaration for the subnet on which the client is
booting, then consulting the sshhaarreedd--nneettwwoorrkk declaration (if any) contain-
ing that subnet, and finally consulting the top-level parameters which
may be specified outside of any declaration.
When dhcpd(8) tries to find a hhoosstt declaration for a client, it first
looks for a hhoosstt declaration which has a _f_i_x_e_d_-_a_d_d_r_e_s_s 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 _f_i_x_e_d_-_a_d_d_r_e_s_s parameter. If no such entry is found, then dhcpd(8)
acts as if there is no entry in the ddhhccppdd..ccoonnff file for that client, even
if there is an entry for that client on a different subnet or shared net-
work.
EEXXAAMMPPLLEESS
A typical ddhhccppdd..ccoonnff file will look something like this:
Example 1
_g_l_o_b_a_l _p_a_r_a_m_e_t_e_r_s_._._.
shared-network ISC-BIGGIE {
_s_h_a_r_e_d_-_n_e_t_w_o_r_k_-_s_p_e_c_i_f_i_c _p_a_r_a_m_e_t_e_r_s_._._.
subnet 204.254.239.0 netmask 255.255.255.224 {
_s_u_b_n_e_t_-_s_p_e_c_i_f_i_c _p_a_r_a_m_e_t_e_r_s_._._.
range 204.254.239.10 204.254.239.30;
}
subnet 204.254.239.32 netmask 255.255.255.224 {
_s_u_b_n_e_t_-_s_p_e_c_i_f_i_c _p_a_r_a_m_e_t_e_r_s_._._.
range 204.254.239.42 204.254.239.62;
}
}
subnet 204.254.239.64 netmask 255.255.255.224 {
_s_u_b_n_e_t_-_s_p_e_c_i_f_i_c _p_a_r_a_m_e_t_e_r_s_._._.
range 204.254.239.74 204.254.239.94;
}
group {
_g_r_o_u_p_-_s_p_e_c_i_f_i_c _p_a_r_a_m_e_t_e_r_s_._._.
host zappo.test.isc.org {
_h_o_s_t_-_s_p_e_c_i_f_i_c _p_a_r_a_m_e_t_e_r_s_._._.
}
host beppo.test.isc.org {
_h_o_s_t_-_s_p_e_c_i_f_i_c _p_a_r_a_m_e_t_e_r_s_._._.
}
host harpo.test.isc.org {
_h_o_s_t_-_s_p_e_c_i_f_i_c _p_a_r_a_m_e_t_e_r_s_._._.
}
}
Notice that at the beginning of the file, there's a place for global pa-
rameters. These might be things like the organization's domain name, the
addresses of the name servers (if they are common to the entire organiza-
tion), and so on. So, for example:
Example 2
option domain-name "isc.org";
option domain-name-servers ns1.isc.org, ns2.isc.org;
As you can see in Example 2, it's legal to specify host addresses in pa-
rameters 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.
In Example 1, you can see that both the shared-network statement and the
subnet statements can have parameters. Let us say that the shared net-
work ISC-BIGGIE supports an entire department - perhaps the accounting
department. If accounting has its own domain, then a shared-network-spe-
cific parameter might be:
option domain-name "accounting.isc.org";
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''.
The most obvious reason for having subnet-specific parameters as shown in
Example 1 is that each subnet, of necessity, has its own router. So for
the first subnet, for example, there should be something like:
option routers 204.254.239.1;
Note that the address here is specified numerically. This is not re-
quired - if you have a different domain name for each interface on your
router, it's perfectly legitimate to use the domain name for that inter-
face 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.
In Example 1 there is also a ggrroouupp statement, which provides common pa-
rameters 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:
option domain-name "test.isc.org";
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:
max-lease-time 120;
default-lease-time 120;
You may have noticed that while some parameters start with the ooppttiioonn
keyword, some do not. Parameters starting with the ooppttiioonn keyword corre-
spond to actual DHCP options, while parameters that do not start with the
option keyword either control the behaviour of the DHCP server (e.g., how
long a lease dhcpd(8) will give out), or specify client parameters that
are not optional in the DHCP protocol (for example, server-name and file-
name).
In Example 1, each host had _h_o_s_t_-_s_p_e_c_i_f_i_c _p_a_r_a_m_e_t_e_r_s. These could in-
clude such things as the hhoossttnnaammee option, the name of a file to upload
(the _f_i_l_e_n_a_m_e parameter) and the address of the server from which to up-
load the file (the _n_e_x_t_-_s_e_r_v_e_r parameter). In general, any parameter can
appear anywhere that parameters are allowed, and will be applied accord-
ing to the scope in which the parameter appears.
Imagine that you have a site with a lot of NCD X-Terminals. These termi-
nals 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:
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 ncd5 { hardware ethernet 0:c0:c3:11:90:23; }
host ncd6 { hardware ethernet 0:c0:c3:91:a7:8; }
host ncd7 { hardware ethernet 0:c0:c3:cc:a:8f; }
}
RREEFFEERREENNCCEE:: DDEECCLLAARRAATTIIOONNSS
The sshhaarreedd--nneettwwoorrkk statement
sshhaarreedd--nneettwwoorrkk _n_a_m_e {
[_p_a_r_a_m_e_t_e_r_s]
[_d_e_c_l_a_r_a_t_i_o_n_s]
}
The sshhaarreedd--nneettwwoorrkk 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 sshhaarreedd--nneettwwoorrkk statement. Pa-
rameters specified in the sshhaarreedd--nneettwwoorrkk 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 ad-
dresses 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 net-
work a client should boot.
_n_a_m_e 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.
The ssuubbnneett statement
ssuubbnneett _s_u_b_n_e_t_-_n_u_m_b_e_r nneettmmaasskk _n_e_t_m_a_s_k {
[_p_a_r_a_m_e_t_e_r_s]
[_d_e_c_l_a_r_a_t_i_o_n_s]
}
The ssuubbnneett statement is used to provide dhcpd(8) 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 ad-
dresses are specified using the rraannggee declaration.
The _s_u_b_n_e_t_-_n_u_m_b_e_r should be an IP address or domain name which resolves
to the subnet number of the subnet being described. The _n_e_t_m_a_s_k 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 speci-
fied subnet.
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.
The rraannggee statement
rraannggee [ddyynnaammiicc--bboooottpp] _l_o_w_-_a_d_d_r_e_s_s [_h_i_g_h_-_a_d_d_r_e_s_s];
For any subnet on which addresses will be assigned dynamically, there
must be at least one rraannggee statement. The range statement gives the low-
est and highest IP addresses in a range. All IP addresses in the range
should be in the subnet in which the rraannggee statement is declared. The
ddyynnaammiicc--bboooottpp 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, _h_i_g_h_-_a_d_d_r_e_s_s can be omitted.
The hhoosstt statement
hhoosstt _h_o_s_t_n_a_m_e {
[_p_a_r_a_m_e_t_e_r_s]
[_d_e_c_l_a_r_a_t_i_o_n_s]
}
There must be at least one hhoosstt statement for every BOOTP client that is
to be served. hhoosstt statements may also be specified for DHCP clients,
although this is not required unless booting is only enabled for known
hosts.
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 _f_i_x_e_d_-_a_d_d_r_e_s_s parameter, or more than one hhoosstt statement may be
specified.
If client-specific boot parameters must change based on the network to
which the client is attached, then multiple hhoosstt statements should be
used.
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 hhoosstt statement
must be specified without a _f_i_x_e_d_-_a_d_d_r_e_s_s clause. _h_o_s_t_n_a_m_e should be a
name identifying the host. If a _h_o_s_t_n_a_m_e option is not specified for the
host, _h_o_s_t_n_a_m_e is used.
hhoosstt declarations are matched to actual DHCP or BOOTP clients by matching
the ddhhccpp--cclliieenntt--iiddeennttiiffiieerr option specified in the hhoosstt declaration to
the one supplied by the client, or, if the hhoosstt declaration or the client
does not provide a ddhhccpp--cclliieenntt--iiddeennttiiffiieerr option, by matching the
_h_a_r_d_w_a_r_e parameter in the hhoosstt declaration to the network hardware ad-
dress supplied by the client. BOOTP clients do not normally provide a
_d_h_c_p_-_c_l_i_e_n_t_-_i_d_e_n_t_i_f_i_e_r, so the hardware address must be used for all
clients that may boot using the BOOTP protocol.
The ggrroouupp statement
ggrroouupp {
[_p_a_r_a_m_e_t_e_r_s]
[_d_e_c_l_a_r_a_t_i_o_n_s]
}
The ggrroouupp 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.
RREEFFEERREENNCCEE:: AALLLLOOWW aanndd DDEENNYY
The aallllooww and ddeennyy statements can be used to control the behaviour of
dhcpd(8) to various sorts of requests.
The _u_n_k_n_o_w_n_-_c_l_i_e_n_t_s keyword
allow unknown-clients;
deny unknown-clients;
The _u_n_k_n_o_w_n_-_c_l_i_e_n_t_s flag is used to tell dhcpd(8) whether or not to dy-
namically assign addresses to unknown clients. Dynamic address assign-
ment to unknown clients is allowed by default.
The _b_o_o_t_p keyword
allow bootp;
deny bootp;
The _b_o_o_t_p flag is used to tell dhcpd(8) whether or not to respond to
bootp queries. Bootp queries are allowed by default.
The _b_o_o_t_i_n_g keyword
allow booting;
deny booting;
The _b_o_o_t_i_n_g flag is used to tell dhcpd(8) 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 allowed, but if it
is disabled for a particular client, then that client will not be able to
get an address from the DHCP server.
RREEFFEERREENNCCEE:: PPAARRAAMMEETTEERRSS
The ddeeffaauulltt--lleeaassee--ttiimmee statement
ddeeffaauulltt--lleeaassee--ttiimmee _t_i_m_e;
_t_i_m_e 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.
The mmaaxx--lleeaassee--ttiimmee statement
mmaaxx--lleeaassee--ttiimmee _t_i_m_e;
_t_i_m_e should be the maximum length in seconds that will be assigned to a
lease if the client requesting the lease asks for a specific expiration
time.
The hhaarrddwwaarree statement
hhaarrddwwaarree _h_a_r_d_w_a_r_e_-_t_y_p_e _h_a_r_d_w_a_r_e_-_a_d_d_r_e_s_s;
In order for a BOOTP client to be recognized, its network hardware ad-
dress must be declared using a hhaarrddwwaarree clause in the hhoosstt statement.
_h_a_r_d_w_a_r_e_-_t_y_p_e must be the name of a physical hardware interface type.
Currently, only the _e_t_h_e_r_n_e_t and _t_o_k_e_n_-_r_i_n_g types are recognized, al-
though support for an _f_d_d_i hardware type (and others) would also be de-
sirable. The _h_a_r_d_w_a_r_e_-_a_d_d_r_e_s_s should be a set of hexadecimal octets
(numbers from 0 through ff) separated by colons. The hhaarrddwwaarree statement
may also be used for DHCP clients.
The ffiilleennaammee statement
ffiilleennaammee _"_f_i_l_e_n_a_m_e_";
The ffiilleennaammee statement can be used to specify the name of the initial
boot file which is to be loaded by a client. The _f_i_l_e_n_a_m_e should be a
filename recognizable to whatever file transfer protocol the client can
be expected to use to load the file.
The sseerrvveerr--nnaammee statement
sseerrvveerr--nnaammee _"_n_a_m_e_";
The sseerrvveerr--nnaammee statement can be used to inform the client of the name of
the server from which it is booting. _n_a_m_e should be the name that will
be provided to the client.
The nneexxtt--sseerrvveerr statement
nneexxtt--sseerrvveerr _s_e_r_v_e_r_-_n_a_m_e;
The nneexxtt--sseerrvveerr statement is used to specify the host address of the
server from which the initial boot file (specified in the ffiilleennaammee state-
ment) is to be loaded. _s_e_r_v_e_r_-_n_a_m_e should be a numeric IP address or a
domain name. If no nneexxtt--sseerrvveerr parameter applies to a given client, the
DHCP server's IP address is used.
The ffiixxeedd--aaddddrreessss statement
ffiixxeedd--aaddddrreessss _a_d_d_r_e_s_s [, _a_d_d_r_e_s_s _._._.];
The ffiixxeedd--aaddddrreessss statement is used to assign one or more fixed IP ad-
dresses to a client. It should only appear in a hhoosstt 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 ffiixxeedd--aaddddrreessss statement are on
the network on which the client is booting, that client will not match
the hhoosstt declaration containing that ffiixxeedd--aaddddrreessss statement. Each
_a_d_d_r_e_s_s should be either an IP address or a domain name which resolves to
one or more IP addresses.
The ddyynnaammiicc--bboooottpp--lleeaassee--ccuuttooffff statement
ddyynnaammiicc--bboooottpp--lleeaassee--ccuuttooffff _d_a_t_e;
The ddyynnaammiicc--bboooottpp--lleeaassee--ccuuttooffff 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(8) assigns 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.
_d_a_t_e should be the date on which all assigned BOOTP leases will end. The
date is specified in the form:
W YYYY/MM/DD HH:MM:SS
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 Coordinated Universal Time (UTC), not lo-
cal time.
The ddyynnaammiicc--bboooottpp--lleeaassee--lleennggtthh statement
ddyynnaammiicc--bboooottpp--lleeaassee--lleennggtthh _l_e_n_g_t_h;
The ddyynnaammiicc--bboooottpp--lleeaassee--lleennggtthh 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 _l_e_n_g_t_h as a number of seconds. If a client re-
boots using BOOTP during the timeout period, the lease duration is reset
to _l_e_n_g_t_h, so a BOOTP client that boots frequently enough will never lose
its lease. Needless to say, this parameter should be adjusted with ex-
treme caution.
The ggeett--lleeaassee--hhoossttnnaammeess statement
ggeett--lleeaassee--hhoossttnnaammeess _f_l_a_g;
The ggeett--lleeaassee--hhoossttnnaammeess statement is used to tell dhcpd(8) whether or not
to look up the domain name corresponding to the IP address of each ad-
dress in the lease pool and use that address for the DHCP hhoossttnnaammee op-
tion. If _f_l_a_g is true, then this lookup is done for all addresses in the
current scope. By default, or if _f_l_a_g is false, no lookups are done.
The uussee--hhoosstt--ddeeccll--nnaammeess statement
uussee--hhoosstt--ddeeccll--nnaammeess _f_l_a_g;
If the uussee--hhoosstt--ddeeccll--nnaammeess 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 ex-
ample,
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";
}
An ooppttiioonn hhoosstt--nnaammee statement within a host declaration will override the
use of the name in the host declaration.
The aauutthhoorriittaattiivvee statement
aauutthhoorriittaattiivvee;
nnoott aauutthhoorriittaattiivvee;
The DHCP server will normally assume that the configuration information
about a given network segment is known to be correct and is authorita-
tive. 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 re-
spond with a DHCPNAK message, causing the client to forget its IP address
and try to get a new one.
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 au-
thority, then the statement ``not authoritative'' should be written in
the appropriate scope in the configuration file.
Usually, writing _n_o_t _a_u_t_h_o_r_i_t_a_t_i_v_e_; 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.
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 authori-
tative for others, nor is it meaningful to specify that the server is au-
thoritative for some host declarations and not others.
The uussee--lleeaassee--aaddddrr--ffoorr--ddeeffaauulltt--rroouuttee statement
uussee--lleeaassee--aaddddrr--ffoorr--ddeeffaauulltt--rroouuttee _f_l_a_g;
If the uussee--lleeaassee--aaddddrr--ffoorr--ddeeffaauulltt--rroouuttee 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.
If uussee--lleeaassee--aaddddrr--ffoorr--ddeeffaauulltt--rroouuttee 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 fea-
ture, you probably want it enabled for a whole bunch of Windows 95 ma-
chines, and you want to override it for a few other machines. Unfortu-
nately, if the opposite happens to be true for your site, you are proba-
bly better off not trying to use this flag.
The aallwwaayyss--rreeppllyy--rrffcc11004488 statement
aallwwaayyss--rreeppllyy--rrffcc11004488 _f_l_a_g;
Some BOOTP clients expect RFC 1048-style responses, but do not follow RFC
1048 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.
If you want to send RFC 1048 options to such a client, you can set the
aallwwaayyss--rreeppllyy--rrffcc11004488 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.
The sseerrvveerr--iiddeennttiiffiieerr statement
sseerrvveerr--iiddeennttiiffiieerr _h_o_s_t_n_a_m_e;
The sseerrvveerr--iiddeennttiiffiieerr statement can be used to define the value that is
sent in the DHCP Server Identifier option for a given scope. The value
specified _m_u_s_t be an IP address for the DHCP server, and must be reach-
able by all clients served by a particular scope.
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 de-
fault value is the first IP address associated with the physical network
interface on which the request arrived.
The usual case where the sseerrvveerr--iiddeennttiiffiieerr 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 pur-
pose of having a consistent IP address for the DHCP server, and it is de-
sired that the clients use this IP address when contacting the server.
Supplying a value for the ddhhccpp--sseerrvveerr--iiddeennttiiffiieerr option is equivalent to
using the sseerrvveerr--iiddeennttiiffiieerr statement.
RREEFFEERREENNCCEE:: OOPPTTIIOONN SSTTAATTEEMMEENNTTSS
DHCP option statements are documented in the dhcp-options(5) manual page.
SSEEEE AALLSSOO
dhcp-options(5), dhcpd.leases(5), dhcpd(8)
RFC 2132, RFC 2131.
AAUUTTHHOORRSS
dhcpd(8) was written by Ted Lemon <mellon@vix.com> under a contract with
Vixie Labs. Funding for this project was provided by the Internet Soft-
ware Corporation. Information about the Internet Software Consortium can
be found at _h_t_t_p_:_/_/_w_w_w_._i_s_c_._o_r_g_/_i_s_c.
OpenBSD 3.5 January 1, 1995 10
|