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
|
.\" $OpenBSD: bootptab.5,v 1.8 2003/05/29 18:31:53 jmc Exp $
.\"
.\" Copyright (c) 1988, 1989, 1991 Carnegie Mellon University
.\"
.Dd October 31, 1991
.Dt BOOTPTAB 5
.Os
.Sh NAME
.Nm bootptab
.Nd Internet Bootstrap Protocol server database
.Sh DESCRIPTION
The
.Nm bootptab
file is the configuration database file for
.Xr bootpd 8 ,
the Internet Bootstrap Protocol server.
Its format is similar to that of
.Xr termcap 5
in which two-character case-sensitive tag symbols are used to
represent host parameters.
These parameter declarations are separated by colons (:),
with a general format of:
.Pp
.Dl hostname:tg=value:tg=value:tg=value:
.Pp
where
.Ar hostname
is the actual name of a bootp client (or a "dummy entry"), and
.Ar tg
is a two-character tag symbol.
Replies are returned to clients only if an entry with the client's Ethernet
or IP address exists in the
.Nm booptab
file.
Dummy entries have an invalid hostname
(one with a "." as the first character)
and are used to provide default values used by other entries via the
.Ar tc=.dummy-entry
mechanism.
Most tags must be followed by an equal sign and a value, as above.
Some may also appear in a boolean form with no value (i.e.,
.Pf : Ns Ar tg Ns : ) .
The currently recognized tags are:
.Pp
.Bd -literal -offset indent
bf Bootfile
bs Bootfile size in 512-octet blocks
cs Cookie server address list
df Merit dump file
dn Domain name
ds Domain name server address list
ef Extension file
gw Gateway address list
ha Host hardware address
hd Bootfile home directory
hn Send client's hostname to client
ht Host hardware type (see Assigned Numbers RFC)
im Impress server address list
ip Host IP address
lg Log server address list
lp LPR server address list
ns IEN-116 name server address list
nt NTP (time) Server (RFC 1129)
ra Reply address override
rl Resource location protocol server address list
rp Root path to mount as root
sa TFTP server address client should use
sm Host subnet mask
sw Swap server address
tc Table continuation (points to similar "template" host entry)
td TFTP root directory used by "secure" TFTP servers
to Time offset in seconds from UTC
ts Time server address list
vm Vendor magic cookie selector
yd YP (NIS) domain name
ys YP (NIS) server address
.Ed
.Pp
There is also a generic tag,
.Pf T Ns Ar n ,
where
.Ar n
is an RFC 1084 vendor field tag number.
Thus it is possible to immediately take advantage of future extensions
to RFC 1084 without being forced to modify
.Xr bootpd 8
first.
Generic data may be represented as either a stream of hexadecimal
numbers or as a quoted string of ASCII characters.
The length of the generic data is automatically determined and inserted into
the proper field(s) of the RFC 1084-style bootp reply.
.Pp
The following tags take a whitespace-separated list of IP addresses:
.Ar cs ,
.Ar ds ,
.Ar gw ,
.Ar im ,
.Ar lg ,
.Ar lp ,
.Ar ns ,
.Ar nt ,
.Ar ra ,
.Ar rl ,
and
.Ar ts .
The
.Ar ip ,
.Ar sa ,
.Ar sw ,
.Ar sm ,
and
.Ar ys
tags each take a single IP address.
All IP addresses are specified in standard Internet "dot" notation
and may use decimal, octal, or hexadecimal numbers
(octal numbers begin with 0, hexadecimal numbers begin with '0x' or '0X').
Any IP addresses may alternatively be specified as a hostname, causing
.Xr bootpd 8
to look up the IP address for that host name using
.Xr gethostbyname 3 .
If the
.Ar ip
tag is not specified,
.Xr bootpd 8
will determine the IP address using the entry name as the host name.
(Dummy entries use an invalid host name to avoid automatic IP lookup.)
.Pp
The
.Ar ht
tag specifies the hardware type code as either an unsigned decimal, octal, or
hexadecimal integer or one of the following symbolic names:
.Em ethernet
or
.Em ether
for 10Mb Ethernet,
.Em ethernet3
or
.Em ether3
for 3Mb experimental Ethernet,
.Em ieee802 ,
.Em tr ,
or
.Em token-ring
for IEEE 802 networks,
.Em pronet
for Proteon ProNET Token Ring, or
.Em chaos ,
.Em arcnet ,
or
.Em ax.25
for Chaos, ARCNET, and AX.25 Amateur Radio networks, respectively.
The
.Ar ha
tag takes a hardware address which may be specified as a host name
or in numeric form.
Note that the numeric form
.Em must
be specified in hexadecimal; optional periods and/or a leading '0x' may be
included for readability.
The
.Ar ha
tag must be preceded by the
.Ar ht
tag (either explicitly or implicitly; see
.Ar tc
below).
If the hardware address is not specified and the type is specified
as either "ethernet" or "ieee802", then
.Xr bootpd 8
will try to determine the hardware address using
.Xr ether_hostton 3 .
.Pp
The hostname, home directory, and bootfile are ASCII strings which may be
optionally surrounded by double quotes (").
The client's request and the values of the
.Ar hd
and
.Ar bf
symbols determine how the server fills in the bootfile field of the bootp
reply packet.
.Pp
If the
.Ar bf
option is specified, its value is copied into the reply packet.
Otherwise, the name supplied in the client request is used.
If the
.Ar hd
option is specified, its value is prepended to the boot file in the reply
packet, otherwise the path supplied in the client request is used.
The existence of the boot file is NOT verified by
.Xr bootpd 8
because the boot file may be on some other machine.
.Pp
The
.Ar bs
option specifies the size of the boot file.
It can be written as
.Ar bs =auto
which causes
.Xr bootpd 8
to determine the boot file size automatically.
.Pp
Some newer versions of
.Xr tftpd 8
provide a security feature to change their root directory using the
.Xr chroot 2
system call.
The
.Ar td
tag may be used to inform
.Xr bootpd 8
of this special root directory used by
.Xr tftpd 8 .
(One may alternatively use the bootpd
.Qq -c chdir
option.)
The
.Ar hd
tag is actually relative to the root directory specified by the
.Ar td
tag.
For example, if the real absolute path to your BOOTP client bootfile is
.Pa /tftpboot/bootfiles/bootimage ,
and
.Xr tftpd 8
uses
.Pa /tftpboot
as its "secure" directory, then specify the following in
.Nm bootptab :
.Pp
.Dl :td=/tftpboot:hd=/bootfiles:bf=bootimage:
.Pp
If your bootfiles are located directly in
.Pa /tftpboot ,
use:
.Pp
.Dl :td=/tftpboot:hd=/:bf=bootimage:
.Pp
The
.Ar sa
tag may be used to specify the IP address of the particular TFTP server
you wish the client to use.
In the absence of this tag,
.Xr bootpd 8
will tell the client to perform TFTP to the same machine
.Xr bootpd 8
is running on.
.Pp
The time offset
.Ar to
may be either a signed decimal integer specifying the client's
time zone offset in seconds from UTC, or the keyword
.Ar auto
which uses the server's time zone offset.
Specifying the
.Ar to
symbol as a boolean has the same effect as specifying
.Ar auto
as its value.
.Pp
The bootfile size
.Ar bs
may be either a decimal, octal, or hexadecimal integer specifying the size of
the bootfile in 512-octet blocks, or the keyword
.Ar auto
which causes the server to automatically calculate the bootfile size at each
request.
As with the time offset, specifying the
.Ar bs
symbol as a boolean has the same effect as specifying
.Ar auto
as its value.
.Pp
The vendor magic cookie selector (the
.Ar vm
tag) may take one of the following keywords:
.Ar auto
(indicating that vendor information is determined by the client's request),
.Ar rfc1048
or
.Ar rfc1084
(which always forces an RFC 1084-style reply), or
.Ar cmu
(which always forces a CMU-style reply).
.Pp
The
.Ar hn
tag is strictly a boolean tag; it does not take the usual equals sign and
value.
Its presence indicates that the hostname should be sent to RFC 1084 clients.
.Xr bootpd 8
attempts to send the entire hostname as it is specified in the configuration
file; if this will not fit into the reply packet, the name is shortened to
just the host field (up to the first period, if present) and then tried.
In no case is an arbitrarily truncated hostname sent (if nothing reasonable
will fit, nothing is sent).
.Pp
Often, many host entries share common values for certain tags (such as name
servers, etc.).
Rather than repeatedly specifying these tags, a full specification can be
listed for one host entry and shared by others via the
.Ar tc
(table continuation) mechanism.
Often, the template entry is a dummy host which doesn't actually exist and
never sends bootp requests.
This feature is similar to the
.Ar tc
feature of
.Xr termcap 5
for similar terminals.
Note that
.Xr bootpd 8
allows the
.Ar tc
tag symbol to appear anywhere in the host entry, unlike
.Xr termcap 5
which requires it to be the last tag.
Information explicitly specified for a host always overrides information
implied by a
.Ar tc
tag symbol, regardless of its location within the entry.
The value of the
.Ar tc
tag may be the hostname or IP address of any host entry
previously listed in the configuration file.
.Pp
Sometimes it is necessary to delete a specific tag after it has been inferred
via
.Ar tc .
This can be done using the construction
.Ar tag @
which removes the effect of
.Ar tag
as in
.Xr termcap 5 .
For example, to completely undo an IEN-116 name server specification, use
.Qq :ns@:
at an appropriate place in the configuration entry.
After removal with
.Ar @ ,
a tag is eligible to be set again through the
.Ar tc
mechanism.
.Pp
Blank lines and lines beginning with "#" are ignored in the configuration
file.
Host entries are separated from one another by newlines; a single host
entry may be extended over multiple lines if the lines end with a backslash
(\\).
It is also acceptable for lines to be longer than 80 characters.
Tags may appear in any order, with the following exceptions:
the hostname must be the very first field in an entry,
and the hardware type must precede the hardware address.
.Pp
An example
.Pa /etc/bootptab
file follows:
.Pp
.Bd -literal -offset indent
# Sample bootptab file (domain=andrew.cmu.edu)
\&.default:\\
:hd=/usr/boot:bf=null:\\
:ds=netserver, lancaster:\\
:ns=pcs2, pcs1:\\
:ts=pcs2, pcs1:\\
:sm=255.255.255.0:\\
:gw=gw.cs.cmu.edu:\\
:hn:to=-18000:
carnegie:ht=6:ha=7FF8100000AF:tc=.default:
baldwin:ht=1:ha=0800200159C3:tc=.default:
wylie:ht=1:ha=00DD00CADF00:tc=.default:
arnold:ht=1:ha=0800200102AD:tc=.default:
bairdford:ht=1:ha=08002B02A2F9:tc=.default:
bakerstown:ht=1:ha=08002B0287C8:tc=.default:
# Special domain name server and option tags for next host
butlerjct:ha=08002001560D:ds=128.2.13.42:\\
:T37=0x12345927AD3BCF:\\
:T99="Special ASCII string":\\
:tc=.default:
gastonville:ht=6:ha=7FFF81000A47:tc=.default:
hahntown:ht=6:ha=7FFF81000434:tc=.default:
hickman:ht=6:ha=7FFF810001BA:tc=.default:
lowber:ht=1:ha=00DD00CAF000:tc=.default:
mtoliver:ht=1:ha=00DD00FE1600:tc=.default:
.Ed
.Sh FILES
/etc/bootptab
.Sh SEE ALSO
.Xr bootpd 8 ,
.Xr tftpd 8
.Pp
DARPA Internet Request For Comments RFC 951, RFC 1048, RFC 1084,
Assigned Numbers
|