xref: /freebsd/libexec/bootpd/bootptab.5 (revision 6780ab54325a71e7e70112b11657973edde8655e)
1.\" Copyright (c) 1988, 1989, 1991 Carnegie Mellon University
2.\"
3.\" $FreeBSD$
4.\"
5.Dd October 31, 1991
6.Dt BOOTPTAB 5
7.Os
8.Sh NAME
9.Nm bootptab
10.Nd Internet Bootstrap Protocol server database
11.Sh DESCRIPTION
12The
13.Nm
14file is the configuration database file for
15.Xr bootpd 8 ,
16the Internet Bootstrap Protocol server.
17Its format is similar to that of
18.Xr termcap 5
19in which two-character case-sensitive tag symbols are used to
20represent host parameters.  These parameter declarations are separated by
21colons (:), with a general format of:
22.Pp
23.Dl "hostname:tg=value. . . :tg=value. . . :tg=value. . . ."
24.Pp
25where
26.Em hostname
27is the actual name of a bootp client (or a "dummy entry"), and
28.Em tg
29is a two-character tag symbol.  Dummy entries have an invalid hostname
30(one with a "." as the first character) and are used to provide
31default values used by other entries via the
32.Em tc=.dummy-entry
33mechanism.  Most tags must be followed by an equals-sign
34and a value as above.  Some may also appear in a boolean form with no
35value (i.e.\&
36.Em :tg: ) .
37The currently recognized tags are:
38.Pp
39.Bl -tag -width xxx -compact
40.It bf
41Bootfile
42.It bs
43Bootfile size in 512-octet blocks
44.It cs
45Cookie server address list
46.It df
47Merit dump file
48.It dn
49Domain name
50.It ds
51Domain name server address list
52.It ef
53Extension file
54.It gw
55Gateway address list
56.It ha
57Host hardware address
58.It hd
59Bootfile home directory
60.It hn
61Send client's hostname to client
62.It ht
63Host hardware type (see Assigned Numbers RFC)
64.It im
65Impress server address list
66.It ip
67Host IP address
68.It lg
69Log server address list
70.It lp
71LPR server address list
72.It ns
73IEN-116 name server address list
74.It nt
75NTP (time) Server (RFC 1129)
76.It ra
77Reply address override
78.It rl
79Resource location protocol server address list
80.It rp
81Root path to mount as root
82.It sa
83TFTP server address client should use
84.It sm
85Host subnet mask
86.It sw
87Swap server address
88.It tc
89Table continuation (points to similar "template" host entry)
90.It td
91TFTP root directory used by "secure" TFTP servers
92.It to
93Time offset in seconds from UTC
94.It ts
95Time server address list
96.It vm
97Vendor magic cookie selector
98.It yd
99YP (NIS) domain name
100.It ys
101YP (NIS) server address
102.El
103.Pp
104There is also a generic tag,
105.Pf T Em n ,
106where
107.Em n
108is an RFC1084 vendor field tag number.  Thus it is possible to immediately
109take advantage of future extensions to RFC1084 without being forced to modify
110.Nm bootpd
111first.  Generic data may be represented as either a stream of hexadecimal
112numbers or as a quoted string of
113.Tn ASCII
114characters.  The length of the generic
115data is automatically determined and inserted into the proper field(s) of the
116RFC1084-style bootp reply.
117.Pp
118The following tags take a whitespace-separated list of IP addresses:
119.Em cs ,
120.Em ds ,
121.Em gw ,
122.Em im ,
123.Em lg ,
124.Em lp ,
125.Em ns ,
126.Em nt ,
127.Em ra ,
128.Em rl ,
129and
130.Em ts .
131The
132.Em ip ,
133.Em sa ,
134.Em sw ,
135.Em sm ,
136and
137.Em ys
138tags each take a single IP address.
139All IP addresses are specified in standard Internet "dot" notation
140and may use decimal, octal, or hexadecimal numbers
141(octal numbers begin with 0, hexadecimal numbers begin with '0x' or '0X').
142Any IP addresses may alternatively be specified as a hostname, causing
143.Nm bootpd
144to lookup the IP address for that host name using
145.Xr gethostbyname 3 .
146If the
147.Em ip
148tag is not specified,
149.Nm bootpd
150will determine the IP address using the entry name as the host name.
151(Dummy entries use an invalid host name to avoid automatic IP lookup.)
152.Pp
153The
154.Em ht
155tag specifies the hardware type code as either an unsigned decimal, octal, or
156hexadecimal integer or one of the following symbolic names:
157.Em ethernet
158or
159.Em ether
160for 10Mb Ethernet,
161.Em ethernet3
162or
163.Em ether3
164for 3Mb experimental Ethernet,
165.Em ieee802 ,
166.Em tr ,
167or
168.Em token-ring
169for IEEE 802 networks,
170.Em pronet
171for Proteon ProNET Token Ring, or
172.Em chaos ,
173.Em arcnet ,
174or
175.Em ax.25
176for Chaos, ARCNET, and AX.25 Amateur Radio networks, respectively.
177The
178.Em ha
179tag takes a hardware address which may be specified as a host name
180or in numeric form.  Note that the numeric form
181.Em must
182be specified in hexadecimal; optional periods and/or a leading '0x' may be
183included for readability.  The
184.Em ha
185tag must be preceded by the
186.Em ht
187tag (either explicitly or implicitly; see
188.Em tc
189below).
190If the hardware address is not specified and the type is specified
191as either "ethernet" or "ieee802", then
192.Nm bootpd
193will try to determine the hardware address using
194.Xr ether_hostton 3 .
195.Pp
196The hostname, home directory, and bootfile are
197.Tn ASCII
198strings which may be
199optionally surrounded by double quotes (").  The client's request and the
200values of the
201.Em hd
202and
203.Em bf
204symbols determine how the server fills in the bootfile field of the bootp
205reply packet.
206.Pp
207If the client provides a file name it is left as is.
208Otherwise, if the
209.Em bf
210option is specified its value is copied into the reply packet.
211If the
212.Em hd
213option is specified as well, its value is prepended to the
214boot file copied into the reply packet.
215The existence of the boot file is checked only if the
216.Em bs Ns =auto
217option is used (to determine the boot file size).
218A reply may be sent whether or not the boot file exists.
219.Pp
220Some newer versions of
221.Xr tftpd 8
222provide a security feature to change their root directory using
223the
224.Xr chroot 2
225system call.
226The
227.Em td
228tag may be used to inform
229.Nm bootpd
230of this special root directory used by
231.Nm tftpd .
232(One may alternatively use the
233.Nm bootpd
234.Fl c Ar chdir
235option.)
236The
237.Em hd
238tag is actually relative to the root directory specified by the
239.Em td
240tag.
241For example, if the real absolute path to your BOOTP client bootfile is
242.Pa /tftpboot/bootfiles/bootimage ,
243and
244.Nm tftpd
245uses
246.Pa /tftpboot
247as its "secure" directory, then specify the following in
248.Pa bootptab :
249.Pp
250.Dl :td=/tftpboot:hd=/bootfiles:bf=bootimage:
251.Pp
252If your bootfiles are located directly in
253.Pa /tftpboot ,
254use:
255.Pp
256.Dl :td=/tftpboot:hd=/:bf=bootimage:
257.Pp
258The
259.Em sa
260tag may be used to specify the IP address of the particular TFTP server
261you wish the client to use.  In the absence of this tag,
262.Nm bootpd
263will tell the client to perform TFTP to the same machine
264.Nm bootpd
265is running on.
266.Pp
267The time offset
268.Em to
269may be either a signed decimal integer specifying the client's
270time zone offset in seconds from UTC, or the keyword
271.Em auto
272which uses the server's time zone offset.  Specifying the
273.Em to
274symbol as a boolean has the same effect as specifying
275.Em auto
276as its value.
277.Pp
278The bootfile size
279.Em bs
280may be either a decimal, octal, or hexadecimal integer specifying the size of
281the bootfile in 512-octet blocks, or the keyword
282.Em auto
283which causes the server to automatically calculate the bootfile size at each
284request.  As with the time offset, specifying the
285.Em bs
286symbol as a boolean has the same effect as specifying
287.Em auto
288as its value.
289.Pp
290The vendor magic cookie selector (the
291.Em vm
292tag) may take one of the following keywords:
293.Em auto
294(indicating that vendor information is determined by the client's request),
295.Em rfc1048
296or
297.Em rfc1084
298(which always forces an RFC1084-style reply), or
299.Em cmu
300(which always forces a CMU-style reply).
301.Pp
302The
303.Em hn
304tag is strictly a boolean tag; it does not take the usual equals-sign and
305value.  Its presence indicates that the hostname should be sent to RFC1084
306clients.
307.Nm Bootpd
308attempts to send the entire hostname as it is specified in the configuration
309file; if this will not fit into the reply packet, the name is shortened to
310just the host field (up to the first period, if present) and then tried.
311In no case is an arbitrarily-truncated hostname sent (if nothing reasonable
312will fit, nothing is sent).
313.Pp
314Often, many host entries share common values for certain tags (such as name
315servers, etc.).  Rather than repeatedly specifying these tags, a full
316specification can be listed for one host entry and shared by others via the
317.Em tc
318(table continuation) mechanism.
319Often, the template entry is a dummy host which doesn't actually exist and
320never sends bootp requests.  This feature is similar to the
321.Em tc
322feature of
323.Xr termcap 5
324for similar terminals.  Note that
325.Nm bootpd
326allows the
327.Em tc
328tag symbol to appear anywhere in the host entry, unlike
329.Pa termcap
330which requires it to be the last tag.  Information explicitly specified for a
331host always overrides information implied by a
332.Em tc
333tag symbol, regardless of its location within the entry.  The
334value of the
335.Em tc
336tag may be the hostname or IP address of any host entry
337previously listed in the configuration file.
338.Pp
339Sometimes it is necessary to delete a specific tag after it has been inferred
340via
341.Em tc .
342This can be done using the construction
343.Em tag Ns @
344which removes the effect of
345.Em tag
346as in
347.Xr termcap 5 .
348For example, to completely undo an IEN-116 name server specification, use
349.Em :ns@:
350at an appropriate place in the configuration entry.  After removal
351with
352.Em @ ,
353a tag is eligible to be set again through the
354.Em tc
355mechanism.
356.Pp
357Blank lines and lines beginning with "#" are ignored in the configuration
358file.  Host entries are separated from one another by newlines; a single host
359entry may be extended over multiple lines if the lines end with a backslash
360(\\).  It is also acceptable for lines to be longer than 80 characters.  Tags
361may appear in any order, with the following exceptions:  the hostname must be
362the very first field in an entry, and the hardware type must precede the
363hardware address.
364.Pp
365An example
366.Pa /etc/bootptab
367file follows:
368.Pp
369.Bd -literal -offset indent
370# Sample bootptab file (domain=andrew.cmu.edu)
371
372\&.default:\\
373	:hd=/usr/boot:bf=null:\\
374	:ds=netserver, lancaster:\\
375	:ns=pcs2, pcs1:\\
376	:ts=pcs2, pcs1:\\
377	:sm=255.255.255.0:\\
378	:gw=gw.cs.cmu.edu:\\
379	:hn:to=-18000:
380
381carnegie:ht=6:ha=7FF8100000AF:tc=.default:
382baldwin:ht=1:ha=0800200159C3:tc=.default:
383wylie:ht=1:ha=00DD00CADF00:tc=.default:
384arnold:ht=1:ha=0800200102AD:tc=.default:
385bairdford:ht=1:ha=08002B02A2F9:tc=.default:
386bakerstown:ht=1:ha=08002B0287C8:tc=.default:
387
388# Special domain name server and option tags for next host
389butlerjct:ha=08002001560D:ds=128.2.13.42:\\
390	:T37=0x12345927AD3BCF:\\
391	:T99="Special ASCII string":\\
392	:tc=.default:
393
394gastonville:ht=6:ha=7FFF81000A47:tc=.default:
395hahntown:ht=6:ha=7FFF81000434:tc=.default:
396hickman:ht=6:ha=7FFF810001BA:tc=.default:
397lowber:ht=1:ha=00DD00CAF000:tc=.default:
398mtoliver:ht=1:ha=00DD00FE1600:tc=.default:
399.Ed
400.Sh FILES
401.Bl -tag -width /etc/bootptab -compact
402.It /etc/bootptab
403.El
404.Sh "SEE ALSO"
405.Xr bootpd 8 ,
406.Xr tftpd 8
407.Pp
408DARPA Internet Request For Comments RFC951, RFC1048, RFC1084, Assigned Numbers
409