1 '\" te 2 .\" Copyright (c) 2004 by Sun Microsystems, Inc. All Rights Reserved. 3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. 4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. 5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] 6 .TH IN.DHCPD 1M "Aug 10, 2004" 7 .SH NAME 8 in.dhcpd \- Dynamic Host Configuration Protocol server 9 .SH SYNOPSIS 10 .LP 11 .nf 12 \fB/usr/lib/inet/in.dhcpd\fR [\fB-denv\fR] [\fB-h\fR \fIrelay_hops\fR] [\fB-i\fR \fIinterface,\fR ...] 13 [\fB-l\fR \fIsyslog_local_facility\fR] [\fB-b\fR automatic | manual] 14 [\fB-o\fR \fIDHCP_offer_time\fR] [\fB-t\fR \fIdhcptab_rescan_interval\fR] 15 .fi 16 17 .LP 18 .nf 19 \fB/usr/lib/inet/in.dhcpd\fR [\fB-dv\fR] [\fB-h\fR \fIrelay_hops\fR] [\fB-i\fR \fIinterface,\fR]... 20 [\fB-l\fR \fIsyslog_local_facility\fR] \fB-r\fR \fIIP_address\fR | \fIhostname,\fR ... 21 .fi 22 23 .SH DESCRIPTION 24 .sp 25 .LP 26 \fBin.dhcpd\fR is a daemon that responds to Dynamic Host Configuration Protocol 27 (\fBDHCP\fR) requests and optionally to \fBBOOTP\fR protocol requests. The 28 daemon forks a copy of itself that runs as a background process. It must be run 29 as root. The daemon has two run modes, \fBDHCP\fR server (with optional 30 \fBBOOTP\fR compatibility mode) and \fBBOOTP\fR relay agent mode. 31 .sp 32 .LP 33 The first line in the \fBSYNOPSIS\fR section illustrates the options available 34 in the DHCP/BOOTP server mode. The second line in the SYNOPSIS section 35 illustrates the options available when the daemon is run in \fBBOOTP\fR relay 36 agent mode. 37 .sp 38 .LP 39 The \fBDHCP\fR and \fBBOOTP\fR protocols are used to provide configuration 40 parameters to Internet hosts. Client machines are allocated their \fBIP\fR 41 addresses as well as other host configuration parameters through this 42 mechanism. 43 .sp 44 .LP 45 The \fBDHCP\fR/\fBBOOTP\fR daemon manages two types of \fBDHCP\fR data tables: 46 the \fBdhcptab\fR configuration table and the DHCP network tables. 47 .sp 48 .LP 49 See \fBdhcptab\fR(4) regarding the dhcptab configuration table and 50 \fBdhcp_network\fR(4) regarding the \fBDHCP\fR network tables. 51 .sp 52 .LP 53 The \fBdhcptab\fR contains macro definitions defined using a \fBtermcap\fR-like 54 syntax which permits network administrators to define groups of \fBDHCP\fR 55 configuration parameters to be returned to clients. However, a \fBDHCP/BOOTP\fR 56 server always returns hostname, network broadcast address, network subnet mask, 57 and \fBIP\fR maximum transfer unit (\fBMTU\fR) if requested by a client 58 attached to the same network as the server machine. If those options have not 59 been explicitly configured in the \fBdhcptab\fR, \fBin.dhcpd\fR returns 60 reasonable default values. 61 .sp 62 .LP 63 The \fBdhcptab\fR is read at startup, upon receipt of a \fBSIGHUP\fR signal, or 64 periodically as specified by the \fB-t\fR option. A \fBSIGHUP\fR (sent using 65 the command \fBsvcadm refresh network/dhcp-server\fR) causes the DHCP/BOOTP 66 daemon to reread the \fBdhcptab\fR within an interval from \fB0\fR-\fB60\fR 67 seconds (depending on where the DHCP daemon is in its polling cycle). For busy 68 servers, users should run \fBsvcadm restart network/dhcp-server\fR to force the 69 \fBdhcptab\fR to be reread. 70 .sp 71 .LP 72 The DHCP network tables contain mappings of client identifiers to \fBIP\fR 73 addresses. These tables are named after the network they support and the 74 datastore used to maintain them. 75 .sp 76 .LP 77 The DHCP network tables are consulted during runtime. A client request received 78 from a network for which no DHCP network table exists is ignored. 79 .sp 80 .LP 81 This command may change in future releases of Solaris software. Scripts, 82 programs, or procedures that use this command might need modification when 83 upgrading to future Solaris software releases.The command line options provided 84 with the \fBin.dhcpd\fR daemon are used only for the current session, and 85 include only some of the server options you can set. The \fBdhcpsvc.conf\fR(4) 86 contains all the server default settings, and can be modified by using the 87 \fBdhcpmgr\fR utility. See \fBdhcpsvc.conf\fR(4) for more details. 88 .SH OPTIONS 89 .sp 90 .LP 91 The following options are supported: 92 .sp 93 .ne 2 94 .na 95 \fB\fB-b\fR \fB automatic | manual\fR\fR 96 .ad 97 .sp .6 98 .RS 4n 99 This option enables \fBBOOTP\fR compatibility mode, allowing the \fBDHCP\fR 100 server to respond to \fBBOOTP\fR clients. The option argument specifies whether 101 the \fBDHCP\fR server should automatically allocate permanent lease \fBIP\fR 102 addresses to requesting \fBBOOTP\fR clients if the clients are not registered 103 in the DHCP network tables (\fBautomatic\fR) or respond only to \fBBOOTP\fR 104 clients who have been manually registered in the DHCP network tables (\fB 105 manual\fR). This option only affects \fBDHCP\fR server mode. 106 .RE 107 108 .sp 109 .ne 2 110 .na 111 \fB\fB-d\fR\fR 112 .ad 113 .sp .6 114 .RS 4n 115 Debugging mode. The daemon remains as a foreground process, and displays 116 verbose messages as it processes \fBDHCP\fR and/or \fBBOOTP\fR datagrams. 117 Messages are displayed on the current TTY. This option can be used in both 118 DHCP/BOOTP server mode and \fBBOOTP\fR relay agent mode. 119 .RE 120 121 .sp 122 .ne 2 123 .na 124 \fB\fB-h\fR\fI relay_hops\fR\fR 125 .ad 126 .sp .6 127 .RS 4n 128 Specifies the maximum number of relay agent hops that can occur before the 129 daemon drops the DHCP/BOOTP datagram. The default number of relay agent hops is 130 4. This option affects both DHCP/BOOTP server mode and \fBBOOTP\fR relay agent 131 mode. 132 .RE 133 134 .sp 135 .ne 2 136 .na 137 \fB\fB-i\fR\fI interface, .\|.\|.\fR\fR 138 .ad 139 .sp .6 140 .RS 4n 141 Selects the network interfaces that the daemon should monitor for DHCP/BOOTP 142 datagrams. The daemon ignores DHCP/BOOTP datagrams on network interfaces not 143 specified in this list. This option is only useful on machines that have 144 multiple network interfaces. If this option is not specified, then the daemon 145 listens for DHCP/BOOTP datagrams on all network interfaces. The option argument 146 consists of a comma-separated list of interface names. It affects both 147 DHCP/BOOTP server and \fBBOOTP\fR relay agent run modes. 148 .RE 149 150 .sp 151 .ne 2 152 .na 153 \fB\fB-l\fR \fIsyslog_local_facility\fR\fR 154 .ad 155 .sp .6 156 .RS 4n 157 The presence of this option turns on transaction logging for the \fBDHCP\fR 158 server or \fBBOOTP\fR relay agent. The value specifies the \fBsyslog\fR local 159 facility (an integer from \fB0\fR to \fB7\fR inclusive) the DHCP daemon should 160 use for tagging the transactions. Using a facility separate from the 161 \fBLOG_DAEMON\fR facility allows the network administrator to capture these 162 transactions separately from other DHCP daemon events for such purposes as 163 generating transaction reports. See \fBsyslog\fR(3C), for details about local 164 facilities. Transactions are logged using a record with 9 space-separated 165 fields as follows: 166 .RS +4 167 .TP 168 1. 169 Protocol: 170 .sp 171 .in +2 172 .nf 173 Relay mode: "BOOTP" 174 Server mode: "BOOTP" or "DHCP" based upon client 175 type. 176 .fi 177 .in -2 178 .sp 179 180 .RE 181 .RS +4 182 .TP 183 2. 184 Type: 185 .sp 186 .in +2 187 .nf 188 Relay mode: "RELAY-CLNT", "RELAY-SRVR" 189 Server mode: "ASSIGN", "EXTEND", "RELEASE", 190 "DECLINE", "INFORM", "NAK" "ICMP-ECHO." 191 .fi 192 .in -2 193 .sp 194 195 .RE 196 .RS +4 197 .TP 198 3. 199 Transaction time: absolute time in seconds (unix time) 200 .RE 201 .RS +4 202 .TP 203 4. 204 Lease time: 205 .sp 206 .in +2 207 .nf 208 Relay mode: Always 0. 209 Server mode: 0 for ICMP-ECHO events, absolute time in 210 seconds (unix time) otherwise 211 .fi 212 .in -2 213 .sp 214 215 .RE 216 .RS +4 217 .TP 218 5. 219 Source IP address: Dotted Internet form 220 .LP 221 .nf 222 Relay mode: Relay interface IP on RELAY-CLNT, INADDR_ANY on RELAY-SRVR. Server mode: Client IP. 223 .fi 224 225 .RE 226 .RS +4 227 .TP 228 6. 229 Destination IP address: Dotted Internet form 230 .LP 231 .nf 232 Relay mode: Client IP on RELAY-CLNT, Server IP on RELAY-SRVR. Server mode: Server IP. 233 .fi 234 235 .RE 236 .RS +4 237 .TP 238 7. 239 Client Identifier: Hex representation (0-9, A-F) 240 .LP 241 .nf 242 Relay mode: MAC address Server mode: BOOTP - MAC address; DHCP - client id 243 .fi 244 245 .RE 246 .RS +4 247 .TP 248 8. 249 Vendor Class identifier (white space converted to 250 periods (.)). 251 .LP 252 .nf 253 Relay mode: Always "N/A" Server mode: Vendor class ID tokenized by converting white space characters to periods (.) 254 .fi 255 256 .RE 257 .RS +4 258 .TP 259 9. 260 MAC address: Hex representation (0-9, A-F) 261 .LP 262 .nf 263 Relay mode: MAC address Server mode: MAC address 264 .fi 265 266 .RE 267 The format of this record is subject to change between releases. 268 .sp 269 Transactions are logged to the console if daemon is in debug mode (\fB-d\fR). 270 .sp 271 Logging transactions impact daemon performance. 272 .sp 273 It is suggested that you periodically rotate the DHCP transaction log file to 274 keep it from growing until it fills the filesystem. This can be done in a 275 fashion similar to that used for the general system message log 276 \fB/var/adm/messages\fR and is best accomplished using the facilities provided 277 by \fBlogadm\fR(1M). 278 .RE 279 280 .sp 281 .ne 2 282 .na 283 \fB\fB-n\fR\fR 284 .ad 285 .sp .6 286 .RS 4n 287 Disable automatic duplicate \fBIP\fR address detection. When this option is 288 specified, the \fBDHCP\fR server does not attempt to verify that an \fBIP 289 address it is about to\fR offer a client is not in use. By default, the 290 \fBDHCP\fR server pings an \fBIP\fR address before offering it to a DHCP/BOOTP 291 client, to verify that the address is not in use by another machine. 292 .RE 293 294 .sp 295 .ne 2 296 .na 297 \fB\fB-o\fR\fI DHCP_offer_time\fR\fR 298 .ad 299 .sp .6 300 .RS 4n 301 Specifies the number of seconds the \fBDHCP\fR server should cache the offers 302 it has extended to discovering \fBDHCP\fR clients. The default setting is 303 \fB10\fR seconds. On slow network media, this value can be increased to 304 compensate for slow network performance. This option affects only \fBDHCP\fR 305 server mode. 306 .RE 307 308 .sp 309 .ne 2 310 .na 311 \fB\fB-r\fR\fI IP_address | hostname, .\|.\|.\fR\fR 312 .ad 313 .sp .6 314 .RS 4n 315 This option enables \fBBOOTP\fR relay agent mode. The option argument specifies 316 a comma-separated list of \fBIP\fR addresses or hostnames of \fBDHCP\fR or 317 \fBBOOTP\fR servers to which the relay agent is to forward \fBBOOTP\fR 318 requests. When the daemon is started in this mode, any \fBDHCP\fR tables are 319 ignored, and the daemon simply acts as a \fBBOOTP\fR relay agent. 320 .sp 321 A \fBBOOTP\fR relay agent listens to \fBUDP\fR port 68, and forwards 322 \fBBOOTP\fR request packets received on this port to the destinations specified 323 on the command line. It supports the \fBBROADCAST\fR flag described in 324 \fBRFC\fR 1542. A \fBBOOTP\fR relay agent can run on any machine that has 325 knowledge of local routers, and thus does not have to be an Internet gateway 326 machine. 327 .sp 328 Note that the proper entries must be made to the \fBnetmasks\fR database so 329 that the \fBDHCP\fR server being served by the \fBBOOTP\fR relay agents can 330 identify the subnet mask of the foreign BOOTP/DHCP client's network. See 331 \fBnetmasks\fR(4) for the format and use of this database. 332 .RE 333 334 .sp 335 .ne 2 336 .na 337 \fB\fB-t\fR\fI dhcptab_rescan_interval\fR\fR 338 .ad 339 .sp .6 340 .RS 4n 341 Specifies the interval in minutes that the \fBDHCP\fR server should use to 342 schedule the automatic rereading of the \fBdhcptab\fR information. Typically, 343 you would use this option if the changes to the \fBdhcptab\fR are relatively 344 frequent. Once the contents of the \fBdhcptab\fR have stabilized, you can turn 345 off this option to avoid needless reinitialization of the server. 346 .RE 347 348 .sp 349 .ne 2 350 .na 351 \fB\fB-v\fR\fR 352 .ad 353 .sp .6 354 .RS 4n 355 Verbose mode. The daemon displays more messages than in the default mode. Note 356 that verbose mode can reduce daemon efficiency due to the time taken to display 357 messages. Messages are displayed to the current \fBTTY\fR if the debugging 358 option is used; otherwise, messages are logged to the \fBsyslogd\fR facility. 359 This option can be used in both DHCP/BOOTP server mode and \fBBOOTP\fR relay 360 agent mode. 361 .RE 362 363 .SH EXAMPLES 364 .LP 365 \fBExample 1 \fRStarting a \fBDHCP\fR Server in \fBBOOTP\fR Compatibility Mode 366 .sp 367 .LP 368 The following command starts a \fBDHCP\fR server in \fBBOOTP\fR compatibility 369 mode, permitting the server to automatically allocate permanent \fBIP\fR 370 addresses to \fBBOOTP\fR clients which are not registered in the server's 371 table; limits the server's attention to incoming datagrams on network devices 372 \fBle2\fR and \fBtr0\fR; drops \fBBOOTP\fR packets whose hop count exceeds 2; 373 configures the \fBDHCP\fR server to cache extended \fBDHCP\fR offers for 15 374 seconds; and schedules \fBdhcptab\fR rescans to occur every 10 minutes: 375 376 .sp 377 .in +2 378 .nf 379 \fB# in.dhcpd \fR\fB-i\fR\fB le2,tr0 \fR\fB-h\fR\fB 2 \fR\fB-o\fR\fB 15 \fR\fB-t\fR\fB 10 \fR\fB-b\fR\fB automatic\fR 380 .fi 381 .in -2 382 .sp 383 384 .LP 385 \fBExample 2 \fRStarting the Daemon in \fBBOOTP\fR Relay Agent Mode 386 .sp 387 .LP 388 The following command starts the daemon in \fBBOOTP\fR relay agent mode, 389 registering the hosts \fBbladerunner\fR and \fB10.0.0.5\fR as relay 390 destinations, with debugging and verbose modes enabled, and drops \fBBOOTP\fR 391 packets whose hop count exceeds 5: 392 393 .sp 394 .in +2 395 .nf 396 \fB# in.dhcpd \fR\fB-d\fR\fB \fR\fB-v\fR\fB \fR\fB-h\fR\fB 5 \fR\fB-r\fR\fB bladerunner,10.0.0.5\fR 397 .fi 398 .in -2 399 .sp 400 401 .SH FILES 402 .sp 403 .ne 2 404 .na 405 \fB\fB/etc/inet/dhcpsvc.conf\fR\fR 406 .ad 407 .sp .6 408 .RS 4n 409 410 .RE 411 412 .sp 413 .ne 2 414 .na 415 \fB\fB/etc/init/hosts\fR\fR 416 .ad 417 .sp .6 418 .RS 4n 419 420 .RE 421 422 .sp 423 .ne 2 424 .na 425 \fB\fB/usr/lib/inet/dhcp/nsu/rfc2136.so.1\fR\fR 426 .ad 427 .sp .6 428 .RS 4n 429 430 .RE 431 432 .SH ATTRIBUTES 433 .sp 434 .LP 435 See \fBattributes\fR(5) for descriptions of the following attributes: 436 .sp 437 438 .sp 439 .TS 440 box; 441 c | c 442 l | l . 443 ATTRIBUTE TYPE ATTRIBUTE VALUE 444 _ 445 Interface Stability Evolving 446 .TE 447 448 .SH SEE ALSO 449 .sp 450 .LP 451 \fBsvcs\fR(1), \fBcron\fR(1M), \fBdhcpmgr\fR(1M), \fBdhtadm\fR(1M), 452 \fBinetadm\fR(1M), \fBinetd\fR(1M), \fBlogadm\fR(1M), \fBpntadm\fR(1M), 453 \fBsvcadm\fR(1M), \fBsyslogd\fR(1M), \fBsyslog\fR(3C), \fBdhcpsvc.conf\fR(4), 454 \fBdhcp_network\fR(4), \fBdhcptab\fR(4), \fBethers\fR(4), \fBhosts\fR(4), 455 \fBnetmasks\fR(4), \fBnsswitch.conf\fR(4), \fBattributes\fR(5), \fBdhcp\fR(5), 456 \fBsmf\fR(5) 457 .sp 458 .LP 459 \fI\fR 460 .sp 461 .LP 462 Alexander, S., and R. Droms, \fIDHCP Options and BOOTP Vendor Extensions\fR, 463 RFC 2132, Silicon Graphics, Inc., Bucknell University, March 1997. 464 .sp 465 .LP 466 Droms, R., \fIInteroperation Between DHCP and BOOTP\fR, RFC 1534, Bucknell 467 University, October 1993. 468 .sp 469 .LP 470 Droms, R., \fIDynamic Host Configuration Protocol\fR, RFC 2131, Bucknell 471 University, March 1997. 472 .sp 473 .LP 474 Wimer, W., \fIClarifications and Extensions for the Bootstrap Protocol\fR, RFC 475 1542, Carnegie Mellon University, October 1993. 476 .SH NOTES 477 .sp 478 .LP 479 The \fBin.dhcpd\fR service is managed by the service management facility, 480 \fBsmf\fR(5), under the service identifier: 481 .sp 482 .in +2 483 .nf 484 svc:/network/dhcp-server 485 .fi 486 .in -2 487 .sp 488 489 .sp 490 .LP 491 Administrative actions on this service, such as enabling, disabling, or 492 requesting restart, can be performed using \fBsvcadm\fR(1M). Responsibility for 493 initiating and restarting this service is delegated to \fBinetd\fR(1M). Use 494 \fBinetadm\fR(1M) to make configuration changes and to view configuration 495 information for this service. The service's status can be queried using the 496 \fBsvcs\fR(1) command.