1in.dhcpd(1M) System Administration Commands in.dhcpd(1M)
2
3
4
6 in.dhcpd - Dynamic Host Configuration Protocol server
7
9 /usr/lib/inet/in.dhcpd [-denv] [-h relay_hops] [-i interface, ...]
10 [-l syslog_local_facility] [-b automatic | manual]
11 [-o DHCP_offer_time] [-t dhcptab_rescan_interval]
12
13
14 /usr/lib/inet/in.dhcpd [-dv] [-h relay_hops] [-i interface,]...
15 [-l syslog_local_facility] -r IP_address | hostname, ...
16
17
19 in.dhcpd is a daemon that responds to Dynamic Host Configuration Proto‐
20 col (DHCP) requests and optionally to BOOTP protocol requests. The dae‐
21 mon forks a copy of itself that runs as a background process. It must
22 be run as root. The daemon has two run modes, DHCP server (with
23 optional BOOTP compatibility mode) and BOOTP relay agent mode.
24
25
26 The first line in the SYNOPSIS section illustrates the options avail‐
27 able in the DHCP/BOOTP server mode. The second line in the SYNOPSIS
28 section illustrates the options available when the daemon is run in
29 BOOTP relay agent mode.
30
31
32 The DHCP and BOOTP protocols are used to provide configuration parame‐
33 ters to Internet hosts. Client machines are allocated their IP
34 addresses as well as other host configuration parameters through this
35 mechanism.
36
37
38 The DHCP/BOOTP daemon manages two types of DHCP data tables: the
39 dhcptab configuration table and the DHCP network tables.
40
41
42 See dhcptab(4) regarding the dhcptab configuration table and dhcp_net‐
43 work(4) regarding the DHCP network tables.
44
45
46 The dhcptab contains macro definitions defined using a termcap-like
47 syntax which permits network administrators to define groups of DHCP
48 configuration parameters to be returned to clients. However, a
49 DHCP/BOOTP server always returns hostname, network broadcast address,
50 network subnet mask, and IP maximum transfer unit (MTU) if requested by
51 a client attached to the same network as the server machine. If those
52 options have not been explicitly configured in the dhcptab, in.dhcpd
53 returns reasonable default values.
54
55
56 The dhcptab is read at startup, upon receipt of a SIGHUP signal, or
57 periodically as specified by the -t option. A SIGHUP (sent using the
58 command svcadm refresh network/dhcp-server) causes the DHCP/BOOTP dae‐
59 mon to reread the dhcptab within an interval from 0-60 seconds (depend‐
60 ing on where the DHCP daemon is in its polling cycle). For busy
61 servers, users should run svcadm restart network/dhcp-server to force
62 the dhcptab to be reread.
63
64
65 The DHCP network tables contain mappings of client identifiers to IP
66 addresses. These tables are named after the network they support and
67 the datastore used to maintain them.
68
69
70 The DHCP network tables are consulted during runtime. A client request
71 received from a network for which no DHCP network table exists is
72 ignored.
73
74
75 This command may change in future releases of Solaris software.
76 Scripts, programs, or procedures that use this command might need modi‐
77 fication when upgrading to future Solaris software releases.The command
78 line options provided with the in.dhcpd daemon are used only for the
79 current session, and include only some of the server options you can
80 set. The dhcpsvc.conf(4) contains all the server default settings, and
81 can be modified by using the dhcpmgr utility. See dhcpsvc.conf(4) for
82 more details.
83
85 The following options are supported:
86
87 -b automatic | manual
88
89 This option enables BOOTP compatibility mode, allowing the DHCP
90 server to respond to BOOTP clients. The option argument specifies
91 whether the DHCP server should automatically allocate permanent
92 lease IP addresses to requesting BOOTP clients if the clients are
93 not registered in the DHCP network tables (automatic) or respond
94 only to BOOTP clients who have been manually registered in the DHCP
95 network tables ( manual). This option only affects DHCP server
96 mode.
97
98
99 -d
100
101 Debugging mode. The daemon remains as a foreground process, and
102 displays verbose messages as it processes DHCP and/or BOOTP data‐
103 grams. Messages are displayed on the current TTY. This option can
104 be used in both DHCP/BOOTP server mode and BOOTP relay agent mode.
105
106
107 -h relay_hops
108
109 Specifies the maximum number of relay agent hops that can occur
110 before the daemon drops the DHCP/BOOTP datagram. The default number
111 of relay agent hops is 4. This option affects both DHCP/BOOTP
112 server mode and BOOTP relay agent mode.
113
114
115 -i interface, ...
116
117 Selects the network interfaces that the daemon should monitor for
118 DHCP/BOOTP datagrams. The daemon ignores DHCP/BOOTP datagrams on
119 network interfaces not specified in this list. This option is only
120 useful on machines that have multiple network interfaces. If this
121 option is not specified, then the daemon listens for DHCP/BOOTP
122 datagrams on all network interfaces. The option argument consists
123 of a comma-separated list of interface names. It affects both
124 DHCP/BOOTP server and BOOTP relay agent run modes.
125
126
127 -l syslog_local_facility
128
129 The presence of this option turns on transaction logging for the
130 DHCP server or BOOTP relay agent. The value specifies the syslog
131 local facility (an integer from 0 to 7 inclusive) the DHCP daemon
132 should use for tagging the transactions. Using a facility separate
133 from the LOG_DAEMON facility allows the network administrator to
134 capture these transactions separately from other DHCP daemon events
135 for such purposes as generating transaction reports. See sys‐
136 log(3C), for details about local facilities. Transactions are
137 logged using a record with 9 space-separated fields as follows:
138
139 1. Protocol:
140
141 Relay mode: "BOOTP"
142 Server mode: "BOOTP" or "DHCP" based upon client
143 type.
144
145
146
147 2. Type:
148
149 Relay mode: "RELAY-CLNT", "RELAY-SRVR"
150 Server mode: "ASSIGN", "EXTEND", "RELEASE",
151 "DECLINE", "INFORM", "NAK" "ICMP-ECHO."
152
153
154
155 3. Transaction time: absolute time in seconds (unix time)
156
157 4. Lease time:
158
159 Relay mode: Always 0.
160 Server mode: 0 for ICMP-ECHO events, absolute time in
161 seconds (unix time) otherwise
162
163
164
165 5. Source IP address: Dotted Internet form
166
167 Relay mode: Relay interface IP on RELAY-CLNT, INADDR_ANY on RELAY-SRVR. Server mode: Client IP.
168
169
170 6. Destination IP address: Dotted Internet form
171
172 Relay mode: Client IP on RELAY-CLNT, Server IP on RELAY-SRVR. Server mode: Server IP.
173
174
175 7. Client Identifier: Hex representation (0-9, A-F)
176
177 Relay mode: MAC address Server mode: BOOTP - MAC address; DHCP - client id
178
179
180 8. Vendor Class identifier (white space converted to
181 periods (.)).
182
183 Relay mode: Always "N/A" Server mode: Vendor class ID tokenized by converting white space characters to periods (.)
184
185
186 9. MAC address: Hex representation (0-9, A-F)
187
188 Relay mode: MAC address Server mode: MAC address
189
190 The format of this record is subject to change between releases.
191
192 Transactions are logged to the console if daemon is in debug mode
193 (-d).
194
195 Logging transactions impact daemon performance.
196
197 It is suggested that you periodically rotate the DHCP transaction
198 log file to keep it from growing until it fills the filesystem.
199 This can be done in a fashion similar to that used for the general
200 system message log /var/adm/messages and is best accomplished using
201 the facilities provided by logadm(1M).
202
203
204 -n
205
206 Disable automatic duplicate IP address detection. When this option
207 is specified, the DHCP server does not attempt to verify that an IP
208 address it is about to offer a client is not in use. By default,
209 the DHCP server pings an IP address before offering it to a
210 DHCP/BOOTP client, to verify that the address is not in use by
211 another machine.
212
213
214 -o DHCP_offer_time
215
216 Specifies the number of seconds the DHCP server should cache the
217 offers it has extended to discovering DHCP clients. The default
218 setting is 10 seconds. On slow network media, this value can be
219 increased to compensate for slow network performance. This option
220 affects only DHCP server mode.
221
222
223 -r IP_address | hostname, ...
224
225 This option enables BOOTP relay agent mode. The option argument
226 specifies a comma-separated list of IP addresses or hostnames of
227 DHCP or BOOTP servers to which the relay agent is to forward BOOTP
228 requests. When the daemon is started in this mode, any DHCP tables
229 are ignored, and the daemon simply acts as a BOOTP relay agent.
230
231 A BOOTP relay agent listens to UDP port 68, and forwards BOOTP
232 request packets received on this port to the destinations specified
233 on the command line. It supports the BROADCAST flag described in
234 RFC 1542. A BOOTP relay agent can run on any machine that has
235 knowledge of local routers, and thus does not have to be an Inter‐
236 net gateway machine.
237
238 Note that the proper entries must be made to the netmasks database
239 so that the DHCP server being served by the BOOTP relay agents can
240 identify the subnet mask of the foreign BOOTP/DHCP client's net‐
241 work. See netmasks(4) for the format and use of this database.
242
243
244 -t dhcptab_rescan_interval
245
246 Specifies the interval in minutes that the DHCP server should use
247 to schedule the automatic rereading of the dhcptab information.
248 Typically, you would use this option if the changes to the dhcptab
249 are relatively frequent. Once the contents of the dhcptab have sta‐
250 bilized, you can turn off this option to avoid needless reinitial‐
251 ization of the server.
252
253
254 -v
255
256 Verbose mode. The daemon displays more messages than in the default
257 mode. Note that verbose mode can reduce daemon efficiency due to
258 the time taken to display messages. Messages are displayed to the
259 current TTY if the debugging option is used; otherwise, messages
260 are logged to the syslogd facility. This option can be used in both
261 DHCP/BOOTP server mode and BOOTP relay agent mode.
262
263
265 Example 1 Starting a DHCP Server in BOOTP Compatibility Mode
266
267
268 The following command starts a DHCP server in BOOTP compatibility mode,
269 permitting the server to automatically allocate permanent IP addresses
270 to BOOTP clients which are not registered in the server's table; limits
271 the server's attention to incoming datagrams on network devices le2 and
272 tr0; drops BOOTP packets whose hop count exceeds 2; configures the DHCP
273 server to cache extended DHCP offers for 15 seconds; and schedules
274 dhcptab rescans to occur every 10 minutes:
275
276
277 # in.dhcpd -i le2,tr0 -h 2 -o 15 -t 10 -b automatic
278
279
280
281 Example 2 Starting the Daemon in BOOTP Relay Agent Mode
282
283
284 The following command starts the daemon in BOOTP relay agent mode, reg‐
285 istering the hosts bladerunner and 10.0.0.5 as relay destinations, with
286 debugging and verbose modes enabled, and drops BOOTP packets whose hop
287 count exceeds 5:
288
289
290 # in.dhcpd -d -v -h 5 -r bladerunner,10.0.0.5
291
292
293
295 /etc/inet/dhcpsvc.conf
296
297
298
299
300 /etc/init/hosts
301
302
303
304
305 /usr/lib/inet/dhcp/nsu/rfc2136.so.1
306
307
308
309
311 See attributes(5) for descriptions of the following attributes:
312
313
314
315
316 ┌─────────────────────────────┬─────────────────────────────┐
317 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
318 ├─────────────────────────────┼─────────────────────────────┤
319 │Availability │SUNWdhcsu │
320 ├─────────────────────────────┼─────────────────────────────┤
321 │Interface Stability │Evolving │
322 └─────────────────────────────┴─────────────────────────────┘
323
325 svcs(1), cron(1M), dhcpmgr(1M), dhtadm(1M), inetadm(1M), inetd(1M),
326 logadm(1M), pntadm(1M), svcadm(1M), syslogd(1M), syslog(3C),
327 dhcpsvc.conf(4), dhcp_network(4), dhcptab(4), ethers(4), hosts(4), net‐
328 masks(4), nsswitch.conf(4), attributes(5), dhcp(5), smf(5)
329
330
331
332
333
334 Alexander, S., and R. Droms, DHCP Options and BOOTP Vendor Extensions,
335 RFC 2132, Silicon Graphics, Inc., Bucknell University, March 1997.
336
337
338 Droms, R., Interoperation Between DHCP and BOOTP, RFC 1534, Bucknell
339 University, October 1993.
340
341
342 Droms, R., Dynamic Host Configuration Protocol, RFC 2131, Bucknell Uni‐
343 versity, March 1997.
344
345
346 Wimer, W., Clarifications and Extensions for the Bootstrap Protocol,
347 RFC 1542, Carnegie Mellon University, October 1993.
348
350 The in.dhcpd service is managed by the service management facility,
351 smf(5), under the service identifier:
352
353 svc:/network/dhcp-server
354
355
356
357
358 Administrative actions on this service, such as enabling, disabling, or
359 requesting restart, can be performed using svcadm(1M). Responsibility
360 for initiating and restarting this service is delegated to inetd(1M).
361 Use inetadm(1M) to make configuration changes and to view configuration
362 information for this service. The service's status can be queried using
363 the svcs(1) command.
364
365
366
367SunOS 5.11 10 Aug 2004 in.dhcpd(1M)