1 '\" te
   2 .\"  Copyright (c) 1992-1996 Competitive Automation, Inc. Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
   3 .\"  Copyright (c) 2016-2017, Chris Fraire <cfraire@me.com>.
   4 .\" 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. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
   5 .\" See the License for the specific language governing permissions and limitations under the License. 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
   6 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7 .TH DHCPAGENT 1M "Feb 13, 2020"
   8 .SH NAME
   9 dhcpagent \- Dynamic Host Configuration Protocol (DHCP) client daemon
  10 .SH SYNOPSIS
  11 .nf
  12 \fBdhcpagent\fR [\fB-a\fR] [ \fB-d\fR \fIn\fR] [\fB-f\fR] [\fB-v\fR]
  13 .fi
  14 
  15 .SH DESCRIPTION
  16 \fBdhcpagent\fR implements the client half of the Dynamic Host Configuration
  17 Protocol \fB(DHCP)\fR for machines running illumos software.
  18 .sp
  19 .LP
  20 The \fBdhcpagent\fR daemon obtains configuration parameters for the client
  21 (local) machine's network interfaces from a \fBDHCP\fR server. These parameters
  22 may include a lease on an \fBIP\fR address, which gives the client machine use
  23 of the address for the period of the lease, which may be infinite. If the
  24 client wishes to use the \fBIP\fR address for a period longer than the lease,
  25 it must negotiate an extension using \fBDHCP\fR. For this reason,
  26 \fBdhcpagent\fR must run as a daemon, terminating only when the client machine
  27 powers down.
  28 .sp
  29 .LP
  30 For IPv4, the \fBdhcpagent\fR daemon is controlled through \fBipadm\fR(1M),
  31 \fBnwamcfg\fR(1M), or \fBifconfig\fR(1M) in much the same way that the
  32 \fBinit\fR(1M) daemon is controlled by \fBtelinit\fR(1M). \fBdhcpagent\fR can
  33 be invoked as a user process, albeit one requiring root privileges, but this is
  34 not necessary, as \fBipadm\fR(1M), \fBnwamcfg\fR(1M), or \fBifconfig\fR(1M)
  35 will start \fBdhcpagent\fR automatically.
  36 .sp
  37 .LP
  38 For IPv6, the \fBdhcpagent\fR daemon is invoked automatically by
  39 \fBin.ndpd\fR(1M). It can also be controlled through \fBifconfig\fR(1M), if
  40 necessary.
  41 .sp
  42 .LP
  43 When invoked, \fBdhcpagent\fR enters a passive state while it awaits
  44 instructions from \fBipadm\fR(1M), \fBnwamcfg\fR(1M), \fBifconfig\fR(1M), or
  45 \fBin.ndpd\fR(1M). When \fBdhcpagent\fR receives a command to configure an
  46 interface, \fBdhcpagent\fR brings up the interface (if necessary) and starts
  47 DHCP. Once DHCP is complete, \fBdhcpagent\fR can be queried for the values of
  48 the various network parameters. In addition, if DHCP was used to obtain a lease
  49 on an address for an interface, \fBdhcpagent\fR configures the address for use.
  50 When a lease is obtained, it is automatically renewed as necessary. If the
  51 lease cannot be renewed, \fBdhcpagent\fR will unconfigure the address, but the
  52 interface will be left up, and \fBdhcpagent\fR will attempt to acquire a new
  53 address lease.
  54 .sp
  55 .LP
  56 \fBdhcpagent\fR monitors system suspend/resume events and will validate any
  57 non-permanent leases with the DHCP server upon resume. Similarly,
  58 \fBdhcpagent\fR monitors link up/down events and will validate any
  59 non-permanent leases with the DHCP server when the downed link is brought back
  60 up. The lease validation mechanism will restart DHCP if the server indicates
  61 that the existing lease is no longer valid. If the server cannot be contacted,
  62 then the existing lease will continue. This behavior can be modified with the
  63 \fBVERIFIED_LEASE_ONLY\fR parameter in the \fB/etc/default/dhcpagent\fR file.
  64 See the description of this parameter below.
  65 .sp
  66 .LP
  67 For IPv4, if the configured interface is found to be unplumbed, or to have a
  68 different IP address, subnet mask, or broadcast address from those obtained
  69 from DHCP, the interface is abandoned from DHCP control.
  70 .sp
  71 .LP
  72 For IPv6, \fBdhcpagent\fR automatically plumbs and unplumbs logical interfaces
  73 as necessary for the IPv6 addresses supplied by the server. The IPv6 prefix
  74 length (netmask) is not set by the DHCPv6 protocol, but is instead set by
  75 \fBin.ndpd\fR(1M) using prefix information obtained by Router Advertisements.
  76 If any of the logical interfaces created by \fBdhcpagent\fR is unplumbed, or
  77 configured with a different IP address, it will be abandoned from DHCP control.
  78 If the link-local interface is unplumbed, then all addresses configured by DHCP
  79 on that physical interface will be removed.
  80 .sp
  81 .LP
  82 In addition to \fBDHCP\fR, \fBdhcpagent\fR also supports \fBBOOTP\fR (IPv4
  83 only). See \fIRFC 951, Bootstrap Protocol\fR. Configuration parameters obtained
  84 from a \fBBOOTP\fR server are treated identically to those received from a
  85 \fBDHCP\fR server, except that the \fBIP\fR address received from a \fBBOOTP\fR
  86 server always has an infinite lease.
  87 .sp
  88 .LP
  89 \fBDHCP\fR also acts as a mechanism to configure other information needed by
  90 the client, for example, the domain name and addresses of routers. Aside from
  91 the IP address, and for IPv4 alone, the netmask, broadcast address, and default
  92 router, the agent does not directly configure the workstation, but instead acts
  93 as a database which may be interrogated by other programs, and in particular by
  94 \fBdhcpinfo\fR(1).
  95 .sp
  96 .LP
  97 On clients with a single interface, this is quite straightforward. Clients with
  98 multiple interfaces may present difficulties, as it is possible that some
  99 information arriving on different interfaces may need to be merged, or may be
 100 inconsistent. Furthermore, the configuration of the interfaces is asynchronous,
 101 so requests may arrive while some or all of the interfaces are still
 102 unconfigured. To handle these cases, one interface may be designated as
 103 primary, which makes it the authoritative source for the values of \fBDHCP\fR
 104 parameters in the case where no specific interface is requested. See
 105 \fBdhcpinfo\fR(1) and \fBifconfig\fR(1M) for details.
 106 .sp
 107 .LP
 108 For IPv4, the \fBdhcpagent\fR daemon can be configured to request a particular
 109 Fully Qualified Domain Name (FQDN) or host name. See the \fBREQUEST_FQDN\fR or
 110 \fBREQUEST_HOSTNAME\fR description in the \fBFILES\fR section. When first
 111 configuring a client to request an FQDN or host name, you must perform the
 112 following steps as root to ensure that the full DHCP negotiation takes place:
 113 .sp
 114 .in +2
 115 .nf
 116 # pkill dhcpagent
 117 # rm /etc/dhcp/\fIinterface\fR.dhc
 118 # reboot
 119 .fi
 120 .in -2
 121 .sp
 122 
 123 .sp
 124 .LP
 125 All DHCP packets sent by \fBdhcpagent\fR include a vendor class identifier (RFC
 126 2132, option code 60; RFC 3315, option code 16). This identifier is the same as
 127 the platform name returned by the \fBuname\fR \fB-i\fR command, except:
 128 .RS +4
 129 .TP
 130 .ie t \(bu
 131 .el o
 132 Any commas in the platform name are changed to periods.
 133 .RE
 134 .RS +4
 135 .TP
 136 .ie t \(bu
 137 .el o
 138 If the name does not start with a stock symbol and a comma, it is automatically
 139 prefixed with \fBSUNW\fR.
 140 .RE
 141 .SS "Messages"
 142 The \fBdhcpagent\fR daemon writes information and error messages in five
 143 categories:
 144 .sp
 145 .ne 2
 146 .na
 147 \fBcritical\fR
 148 .ad
 149 .sp .6
 150 .RS 4n
 151 Critical messages indicate severe conditions that prevent proper operation.
 152 .RE
 153 
 154 .sp
 155 .ne 2
 156 .na
 157 \fBerrors\fR
 158 .ad
 159 .sp .6
 160 .RS 4n
 161 Error messages are important, sometimes unrecoverable events due to resource
 162 exhaustion and other unexpected failure of system calls; ignoring errors may
 163 lead to degraded functionality.
 164 .RE
 165 
 166 .sp
 167 .ne 2
 168 .na
 169 \fBwarnings\fR
 170 .ad
 171 .sp .6
 172 .RS 4n
 173 Warnings indicate less severe problems, and in most cases, describe unusual or
 174 incorrect datagrams received from servers, or requests for service that cannot
 175 be provided.
 176 .RE
 177 
 178 .sp
 179 .ne 2
 180 .na
 181 \fBinformational\fR
 182 .ad
 183 .sp .6
 184 .RS 4n
 185 Informational messages provide key pieces of information that can be useful to
 186 debugging a \fBDHCP\fR configuration at a site. Informational messages are
 187 generally controlled by the \fB-v\fR option. However, certain critical pieces
 188 of information, such as the IP address obtained, are always provided.
 189 .RE
 190 
 191 .sp
 192 .ne 2
 193 .na
 194 \fBdebug\fR
 195 .ad
 196 .sp .6
 197 .RS 4n
 198 Debugging messages, which may be generated at two different levels of
 199 verbosity, are chiefly of benefit to persons having access to source code, but
 200 may be useful as well in debugging difficult DHCP configuration problems.
 201 Debugging messages are only generated when using the \fB-d\fR option.
 202 .RE
 203 
 204 .sp
 205 .LP
 206 When \fBdhcpagent\fR is run without the \fB-f\fR option, all messages are sent
 207 to the system logger \fBsyslog\fR(3C) at the appropriate matching priority and
 208 with a facility identifier \fBLOG_DAEMON\fR. When \fBdhcpagent\fR is run with
 209 the \fB-f\fR option, all messages are directed to standard error.
 210 .SS "DHCP Events and User-Defined Actions"
 211 If an executable (binary or script) is placed at \fB/etc/dhcp/eventhook\fR, the
 212 \fBdhcpagent\fR daemon will automatically run that program when any of the
 213 following events occur:
 214 .sp
 215 .ne 2
 216 .na
 217 \fB\fBBOUND\fR and \fBBOUND6\fR\fR
 218 .ad
 219 .sp .6
 220 .RS 4n
 221 These events occur during interface configuration. The event program is invoked
 222 when \fBdhcpagent\fR receives the DHCPv4 ACK or DHCPv6 Reply message from the
 223 DHCP server for the lease request of an address, indicating successful initial
 224 configuration of the interface. (See also the \fBINFORM\fR and \fBINFORM6\fR
 225 events, which occur when configuration parameters are obtained without address
 226 leases.)
 227 .RE
 228 
 229 .sp
 230 .ne 2
 231 .na
 232 \fB\fBEXTEND\fR and \fBEXTEND6\fR\fR
 233 .ad
 234 .sp .6
 235 .RS 4n
 236 These events occur during lease extension. The event program is invoked just
 237 after \fBdhcpagent\fR receives the DHCPv4 ACK or DHCPv6 Reply from the DHCP
 238 server for the DHCPv4 REQUEST (renew) message or the DHCPv6 Renew or Rebind
 239 message.
 240 .sp
 241 Note that with DHCPv6, the server might choose to remove some addresses, add
 242 new address leases, and ignore (allow to expire) still other addresses in a
 243 given Reply message. The \fBEXTEND6\fR event occurs when a Reply is received
 244 that leaves one or more address leases still valid, even if the Reply message
 245 does not extend the lease for any address. The event program is invoked just
 246 before any addresses are removed, but just after any new addresses are added.
 247 Those to be removed will be marked with the \fBIFF_DEPRECATED\fR flag.
 248 .RE
 249 
 250 .sp
 251 .ne 2
 252 .na
 253 \fB\fBEXPIRE\fR and \fBEXPIRE6\fR\fR
 254 .ad
 255 .sp .6
 256 .RS 4n
 257 These events occur during lease expiration. For DHCPv4, the event program is
 258 invoked just before the leased address is removed from an interface. For
 259 DHCPv6, the event program is invoked just before the last remaining leased
 260 addresses are removed from the interface.
 261 .RE
 262 
 263 .sp
 264 .ne 2
 265 .na
 266 \fB\fBDROP\fR and \fBDROP6\fR\fR
 267 .ad
 268 .sp .6
 269 .RS 4n
 270 These events occur during the period when an interface is dropped. The event
 271 program is invoked just before the interface is removed from DHCP control. If
 272 the interface has been abandoned due the user unplumbing the interface, then
 273 this event will occur after the user's action has taken place. The interface
 274 might not be present.
 275 .RE
 276 
 277 .sp
 278 .ne 2
 279 .na
 280 \fB\fBINFORM\fR and \fBINFORM6\fR\fR
 281 .ad
 282 .sp .6
 283 .RS 4n
 284 These events occur when an interface acquires new or updated configuration
 285 information from a DHCP server by means of the DHCPv4 \fBINFORM\fR or the
 286 DHCPv6 Information-Request message. These messages are sent using an
 287 \fBifconfig\fR(1M) \fBdhcp inform\fR command or when the DHCPv6 Router
 288 Advertisement \fBO\fR (letter 0) bit is set and the \fBM\fR bit is not set.
 289 Thus, these events occur when the DHCP client does not obtain an IP address
 290 lease from the server, and instead obtains only configuration parameters.
 291 .RE
 292 
 293 .sp
 294 .ne 2
 295 .na
 296 \fB\fBLOSS6\fR\fR
 297 .ad
 298 .sp .6
 299 .RS 4n
 300 This event occurs during lease expiration when one or more valid leases still
 301 remain. The event program is invoked just before expired addresses are removed.
 302 Those being removed will be marked with the \fBIFF_DEPRECATED\fR flag.
 303 .sp
 304 Note that this event is not associated with the receipt of the Reply message,
 305 which occurs only when one or more valid leases remain, and occurs only with
 306 DHCPv6. If all leases have expired, then the EXPIRE6 event occurs instead.
 307 .RE
 308 
 309 .sp
 310 .ne 2
 311 .na
 312 \fB\fBRELEASE\fR and \fBRELEASE6\fR\fR
 313 .ad
 314 .sp .6
 315 .RS 4n
 316 This event occurs during the period when a leased address is released. The
 317 event program is invoked just before \fBdhcpagent\fR relinquishes the address
 318 on an interface and sends the DHCPv4 \fBRELEASE\fR or DHCPv6 Release packet to
 319 the DHCP server.
 320 .RE
 321 
 322 .sp
 323 .LP
 324 The system does not provide a default event program. The file
 325 \fB/etc/dhcp/eventhook\fR is expected to be owned by root and have a mode of
 326 755.
 327 .sp
 328 .LP
 329 The event program will be passed two arguments, the interface name and the
 330 event name, respectively. For DHCPv6, the interface name is the name of the
 331 physical interface.
 332 .sp
 333 .LP
 334 The event program can use the \fBdhcpinfo\fR(1) utility to fetch additional
 335 information about the interface. While the event program is invoked on every
 336 event defined above, it can ignore those events in which it is not interested.
 337 The event program runs with the same privileges and environment as
 338 \fBdhcpagent\fR itself, except that \fBstdin\fR, \fBstdout\fR, and \fBstderr\fR
 339 are redirected to \fB/dev/null\fR. Note that this means that the event program
 340 runs with root privileges.
 341 .sp
 342 .LP
 343 If an invocation of the event program does not exit after 55 seconds, it is
 344 sent a \fBSIGTERM\fR signal. If does not exit within the next three seconds, it
 345 is terminated by a \fBSIGKILL\fR signal.
 346 .sp
 347 .LP
 348 See EXAMPLES for an example event program.
 349 .SH OPTIONS
 350 The following options are supported:
 351 .sp
 352 .ne 2
 353 .na
 354 \fB\fB-a\fR\fR
 355 .ad
 356 .sp .6
 357 .RS 4n
 358 Adopt a configured IPv4 interface. This option is for use with diskless
 359 \fBDHCP\fR clients. In the case of diskless \fBDHCP\fR, \fBDHCP\fR has already
 360 been performed on the network interface providing the operating system image
 361 prior to running \fBdhcpagent\fR. This option instructs the agent to take over
 362 control of the interface. It is intended primarily for use in boot scripts.
 363 .sp
 364 The effect of this option depends on whether the interface is being adopted.
 365 .sp
 366 If the interface is being adopted, the following conditions apply:
 367 .sp
 368 \fBdhcpagent\fR uses the client id specified in
 369 \fB/chosen\fR:\fI<client_id>\fR, as published by the PROM or as specified on a
 370 \fBboot\fR(1M) command line. If this value is not present, the client id is
 371 undefined. The DHCP server then determines what to use as a client id. It is an
 372 error condition if the interface is an Infiniband interface and the PROM value
 373 is not present.
 374 .sp
 375 If the interface is not being adopted:
 376 .sp
 377 \fBdhcpagent\fR uses the value stored in \fB/etc/default/dhcpagent\fR. If this
 378 value is not present, the client id is undefined. If the interface is
 379 Infiniband and there is no value in \fB/etc/default/dhcpagent\fR, a client id
 380 is generated as described by the draft document on DHCP over Infiniband,
 381 available at:
 382 .sp
 383 .in +2
 384 .nf
 385 http://www.ietf.org
 386 .fi
 387 .in -2
 388 
 389 .RE
 390 
 391 .sp
 392 .ne 2
 393 .na
 394 \fB\fB-d\fR \fIn\fR\fR
 395 .ad
 396 .sp .6
 397 .RS 4n
 398 Set debug level to \fIn\fR. Two levels of debugging are currently available, 1
 399 and 2; the latter is more verbose.
 400 .RE
 401 
 402 .sp
 403 .ne 2
 404 .na
 405 \fB\fB-f\fR\fR
 406 .ad
 407 .sp .6
 408 .RS 4n
 409 Run in the foreground instead of as a daemon process. When this option is used,
 410 messages are sent to standard error instead of to \fBsyslog\fR(3C).
 411 .RE
 412 
 413 .sp
 414 .ne 2
 415 .na
 416 \fB\fB-v\fR\fR
 417 .ad
 418 .sp .6
 419 .RS 4n
 420 Provide verbose output useful for debugging site configuration problems.
 421 .RE
 422 
 423 .SH EXAMPLES
 424 \fBExample 1 \fRExample Event Program
 425 .sp
 426 .LP
 427 The following script is stored in the file \fB/etc/dhcp/eventhook\fR, owned by
 428 root with a mode of 755. It is invoked upon the occurrence of the events listed
 429 in the file.
 430 
 431 .sp
 432 .in +2
 433 .nf
 434 #!/bin/sh
 435 
 436 (
 437 echo "Interface name: " $1
 438 echo "Event: " $2
 439 
 440 case $2 in
 441 "BOUND")
 442      echo "Address acquired from server "\e
 443          `/sbin/dhcpinfo -i $1 ServerID`
 444      ;;
 445 "BOUND6")
 446      echo "Addresses acquired from server " \e
 447          `/sbin/dhcpinfo -v6 -i $1 ServerID`
 448      ;;
 449 "EXTEND")
 450     echo "Lease extended for " \e
 451          `/sbin/dhcpinfo -i $1 LeaseTim`" seconds"
 452      ;;
 453 "EXTEND6")
 454     echo "New lease information obtained on $i"
 455      ;;
 456 "EXPIRE" | "DROP" | "RELEASE")
 457      ;;
 458 
 459 esac
 460 ) >/var/run/dhcp_eventhook_output 2>&1
 461 .fi
 462 .in -2
 463 .sp
 464 
 465 .sp
 466 .LP
 467 Note the redirection of stdout and stderr to a file.
 468 
 469 .SH FILES
 470 .ne 2
 471 .na
 472 \fB\fB/etc/dhcp/\fIif\fR.dhc\fR\fR
 473 .ad
 474 .br
 475 .na
 476 \fB\fB/etc/dhcp/\fIif\fR.dh6\fR\fR
 477 .ad
 478 .sp .6
 479 .RS 4n
 480 Contains the configuration for interface. The mere existence of this file does
 481 not imply that the configuration is correct, since the lease might have
 482 expired. On start-up, \fBdhcpagent\fR confirms the validity of the address
 483 using REQUEST (for DHCPv4) or Confirm (DHCPv6).
 484 .RE
 485 
 486 .sp
 487 .ne 2
 488 .na
 489 \fB\fB/etc/dhcp/duid\fR\fR
 490 .ad
 491 .br
 492 .na
 493 \fB\fB/etc/dhcp/iaid\fR\fR
 494 .ad
 495 .sp .6
 496 .RS 4n
 497 Contains persistent storage for system-generated DUID (DHCP Unique Identifier)
 498 and interface-specific IAID (Identity Association Identifier) values which are
 499 used if no \fBCLIENT_ID\fR is defined (see below). The format of these files is
 500 undocumented, and applications should not read from or write to them.  Instead,
 501 \fBdhcpinfo\fR(1) can be used to query the \fBdhcpagent\fR for \fIClientID\fR.
 502 For DHCPv6 interfaces, the result will contain the DUID. For DHCPv4 interfaces
 503 with \fBV4_DEFAULT_IAID_DUID\fR enabled (see below), the result will contain
 504 the IAID and DUID.
 505 .RE
 506 
 507 .sp
 508 .ne 2
 509 .na
 510 \fB\fB/etc/default/dhcpagent\fR\fR
 511 .ad
 512 .sp .6
 513 .RS 4n
 514 Contains default values for tunable parameters. All values may be qualified
 515 with the interface they apply to by prepending the interface name and a period
 516 (".") to the interface parameter name. The parameters include: the interface
 517 parameter name.
 518 .sp
 519 To configure IPv6 parameters, place the string \fB\&.v6\fR between the
 520 interface name (if any) and the parameter name. For example, to set the global
 521 IPv6 parameter request list, use \fB\&.v6.PARAM_REQUEST_LIST\fR. To set the
 522 \fBCLIENT_ID\fR (\fBDUID\fR) on \fBhme0\fR, use \fBhme0.v6.CLIENT_ID\fR.
 523 .sp
 524 The parameters include:
 525 .sp
 526 .ne 2
 527 .na
 528 \fB\fBVERIFIED_LEASE_ONLY\fR\fR
 529 .ad
 530 .sp .6
 531 .RS 4n
 532 Indicates that a \fBRELEASE\fR rather than a \fBDROP\fR should be performed on
 533 managed interfaces when the agent terminates. Release causes the client to
 534 discard the lease, and the server to make the address available again. Drop
 535 causes the client to record the lease in \fB/etc/dhcp/\fIinterface\fR.dhc\fR or
 536 \fB/etc/dhcp/\fIinterface\fR.dh6\fR for later use. In addition, when the link
 537 status changes to \fBup\fR or when the system is resumed after a suspend, the
 538 client will verify the lease with the server. If the server is unreachable for
 539 verification, then the old lease will be discarded (even if it has time
 540 remaining) and a new one obtained.
 541 .sp
 542 Enabling this option is often desirable on mobile systems, such as laptops, to
 543 allow the system to recover quickly from moves.
 544 .sp
 545 Default value of this option is \fIno\fR.
 546 .RE
 547 
 548 .sp
 549 .ne 2
 550 .na
 551 \fB\fBOFFER_WAIT\fR\fR
 552 .ad
 553 .sp .6
 554 .RS 4n
 555 Indicates how long to wait in seconds between checking for valid
 556 \fBOFFER\fRs after sending a \fBDISCOVER\fR. For DHCPv6, sets the time to
 557 wait between checking for valid Advertisements after sending a Solicit.
 558 .sp
 559 Default value of this option is \fI3\fR.
 560 .RE
 561 
 562 .sp
 563 .ne 2
 564 .na
 565 \fB\fBCLIENT_ID\fR\fR
 566 .ad
 567 .sp .6
 568 .RS 4n
 569 Indicates the value that should be used to uniquely identify the client to the
 570 server. This value can take one of three basic forms:
 571 .sp
 572 .in +2
 573 .nf
 574 \fIdecimal\fR,\fIdata\fR...
 575 0xHHHHH...
 576 "\fIstring\fR...."
 577 .fi
 578 .in -2
 579 .sp
 580 
 581 The first form is an RFC 3315 DUID. This is legal for both IPv4 DHCP and
 582 DHCPv6. For IPv4, an RFC 4361 Client ID is constructed from this value. In this
 583 first form, the format of \fIdata\fR... depends on the decimal value. The
 584 following formats are defined for this first form:
 585 .sp
 586 .ne 2
 587 .na
 588 \fB1,\fIhwtype\fR,\fItime\fR,\fIlla\fR\fR
 589 .ad
 590 .sp .6
 591 .RS 4n
 592 Type 1, DUID-LLT. The \fIhwtype\fR value is an integer in the range 0-65535,
 593 and indicates the type of hardware. The \fItime\fR value is the number of
 594 seconds since midnight, January 1st, 2000 UTC, and can be omitted to use the
 595 current system time. The \fIlla\fR value is either a colon-separated MAC
 596 address or the name of a physical interface. If the name of an interface is
 597 used, the \fIhwtype\fR value can be omitted. For example: \fB1,,,hme0\fR
 598 .RE
 599 
 600 .sp
 601 .ne 2
 602 .na
 603 \fB2,\fIenterprise\fR,\fIhex\fR...\fR
 604 .ad
 605 .sp .6
 606 .RS 4n
 607 Type 2, DUID-EN. The \fIenterprise\fR value is an integer in the range
 608 0-4294967295 and represents the SMI Enterprise number for an organization. The
 609 \fIhex\fR string is an even-length sequence of hexadecimal digits.
 610 .RE
 611 
 612 .sp
 613 .ne 2
 614 .na
 615 \fB3,\fIhwtype\fR,\fIlla\fR\fR
 616 .ad
 617 .sp .6
 618 .RS 4n
 619 Type 3, DUID-LL. This is the same as DUID-LLT (type 1), except that a time
 620 stamp is not used.
 621 .RE
 622 
 623 .sp
 624 .ne 2
 625 .na
 626 \fB*,\fIhex\fR\fR
 627 .ad
 628 .sp .6
 629 .RS 4n
 630 Any other type value (0 or 4-65535) can be used with an even-length hexadecimal
 631 string.
 632 .RE
 633 
 634 The second and third forms of \fBCLIENT_ID\fR are legal for IPv4 only. These
 635 both represent raw Client ID (without RFC 4361), in hex, or NVT ASCII string
 636 format. Thus, "\fBSun\fR" and \fB0x53756E\fR are equivalent.
 637 .RE
 638 
 639 .sp
 640 .ne 2
 641 .na
 642 \fB\fBV4_DEFAULT_IAID_DUID\fR\fR
 643 .ad
 644 .sp .6
 645 .RS 4n
 646 Indicates whether to use, when CLIENT_ID is not defined, a system-managed,
 647 RFC 3315-style (i.e., DHCPv6-style) binding identifier as documented in
 648 RFC 4361, "Node-specific Client Identifiers for DHCPv4," for IPv4
 649 interfaces which for purposes of backward compatibility do not normally get
 650 default binding identifiers.
 651 .sp
 652 An IPv4 interface that is not in an IP network multipathing (IPMP) group,
 653 that is not IP over InfiniBand (IPoIB), and that is not a logical interface
 654 does not normally get a default binding identifier.
 655 .sp
 656 Default value of this option is \fIno\fR.
 657 .RE
 658 
 659 .sp
 660 .ne 2
 661 .na
 662 \fB\fBPARAM_REQUEST_LIST\fR\fR
 663 .ad
 664 .sp .6
 665 .RS 4n
 666 Specifies a list of comma-separated integer values of options for which the
 667 client would like values, or symbolic \fBSite\fR or \fBOption\fR option names.
 668 Symbolic option names for IPv4 are resolved through \fB/etc/dhcp/inittab\fR.
 669 Option names for IPv6 are resolved by means of \fB/etc/dhcp/inittab6\fR.
 670 .RE
 671 
 672 .sp
 673 .ne 2
 674 .na
 675 \fB\fBPARAM_IGNORE_LIST\fR\fR
 676 .ad
 677 .sp .6
 678 .RS 4n
 679 Specifies a list of options (constructed in the same manner as
 680 \fBPARAM_REQUEST_LIST\fR) that the DHCP client will ignore. Ignored options are
 681 treated as though the server did not return the options specified. Ignored
 682 options are not visible using \fBdhcpinfo\fR(1) or acted on by the client. This
 683 parameter can be used, for example, to disable an unwanted client name or
 684 default router.
 685 .RE
 686 
 687 .sp
 688 .ne 2
 689 .na
 690 \fB\fBREQUEST_FQDN\fR\fR
 691 .ad
 692 .sp .6
 693 .RS 4n
 694 Indicates the client requests the DHCP server to map the client's leased
 695 IPv4 address to the Fully Qualified Domain Name (FQDN) associated with the
 696 network interface that performs DHCP on the client and to collaborate with
 697 a compatible DNS server to manage A and PTR resource records for the FQDN
 698 for the life of the lease.
 699 .sp .6
 700 The \fIhostname\fR in the FQDN is determined from the following possible
 701 configurations:
 702 .sp
 703 .ne 2
 704 .na
 705 1.  \fBipadm\fR(1M): include the \fB-1,--primary\fR flag when creating an
 706 address that uses DHCP so that \fBnodename\fR(4) is used as the
 707 \fIhostname\fR.
 708 .ad
 709 .sp
 710 .ne 2
 711 .na
 712 2.  \fBipadm\fR(1M): include the \fB-h,--reqhost\fR \fIhostname\fR switch
 713 when executing the \fBcreate-addr -T dhcp\fR subcommand, or use the
 714 \fBset-addrprop -p reqhost=\fR\fIhostname\fR subcommand for any existing
 715 DHCP address.
 716 .ad
 717 .sp
 718 .ne 2
 719 .na
 720 3.  \fBnwamcfg\fR(1M): set a property,
 721 \fBip-primary=\fR\fIon\fR, for an ncu ip that uses DHCP so that
 722 \fBnodename\fR(4) is used as the \fIhostname\fR.
 723 .ad
 724 .sp
 725 .ne 2
 726 .na
 727 4.  \fBnwamcfg\fR(1M): set a property,
 728 \fBip-reqhost=\fR\fIhostname\fR, for an ncu ip that uses DHCP.
 729 .ad
 730 .sp
 731 The \fIhostname\fR value is either a Partially Qualified Domain Name (PQDN)
 732 or an FQDN (i.e., a "rooted" domain name ending with a '.' or one inferred
 733 to be an FQDN if it contains at least three DNS labels such as
 734 srv.example.com).  If a PQDN is specified, then an FQDN is constructed if
 735 \fBDNS_DOMAINNAME\fR is defined or if \fBADOPT_DOMAINNAME\fR is set to
 736 \fIyes\fR and an eligible domain name (as described below) is available.
 737 .sp
 738 If an FQDN is sent, \fBREQUEST_HOSTNAME\fR processing will not be done,
 739 per RFC 4702 (3.1):  "clients that send the Client FQDN option in their
 740 messages MUST NOT also send the Host Name."
 741 .sp
 742 Default value of this option is \fIyes\fR.
 743 .RE
 744 
 745 .sp
 746 .ne 2
 747 .na
 748 \fB\fBDNS_DOMAINNAME\fR\fR
 749 .ad
 750 .sp .6
 751 .RS 4n
 752 Indicates the value that should be appended to a PQDN specified by the
 753 \fB-h,--reqhost\fR option of \fBipadm\fR(1M), by the ncu \fBip-reqhost\fR
 754 property of \fBnwamcfg\fR(1M), or by \fBnodename\fR(4) to construct an FQDN
 755 for \fBREQUEST_FQDN\fR processing.
 756 If the \fIhostname\fR value is already an FQDN, then the value of this
 757 option is not used.
 758 .RE
 759 
 760 .sp
 761 .ne 2
 762 .na
 763 \fB\fBADOPT_DOMAINNAME\fR\fR
 764 .ad
 765 .sp .6
 766 .RS 4n
 767 Indicates that a domain name returned by the DHCP server or the \fBdomain\fR
 768 from \fBresolv.conf\fR(4) should be adopted if needed to construct an FQDN
 769 from a PQDN specified by the \fB-h,--reqhost\fR option of \fBipadm\fR(1M),
 770 by the ncu \fBip-reqhost\fR property of \fBnwamcfg\fR(1M), or by
 771 \fBnodename\fR(4).
 772 If the \fIhostname\fR value is already an FQDN, then the value of this
 773 option is not applicable.
 774 The eligible DHCP option for domain name is DHCPv4 \fBDNSdmain\fR.
 775 .sp
 776 Default value of this option is \fIno\fR.
 777 .RE
 778 
 779 .sp
 780 .ne 2
 781 .na
 782 \fB\fBREQUEST_HOSTNAME\fR\fR
 783 .ad
 784 .sp .6
 785 .RS 4n
 786 Indicates the client requests the DHCP server to map the client's leased IPv4
 787 address to the host name associated with the network interface that performs
 788 DHCP on the client. The host name must be specified as documented for a
 789 PQDN in \fBREQUEST_FQDN\fR above or specified in the
 790 \fB/etc/hostname.\fIinterface\fR\fR file for the relevant interface on a line
 791 of the form
 792 .sp
 793 .in +2
 794 .nf
 795 inet \fIhostname\fR
 796 .fi
 797 .in -2
 798 .sp
 799 
 800 where \fIhostname\fR is the host name requested.
 801 .sp
 802 This option works with DHCPv4 only.
 803 .sp
 804 Default value of this option is \fIyes\fR.
 805 .RE
 806 
 807 .RE
 808 
 809 .sp
 810 .ne 2
 811 .na
 812 \fB\fB/etc/dhcp/eventhook\fR\fR
 813 .ad
 814 .sp .6
 815 .RS 4n
 816 Location of a DHCP event program.
 817 .RE
 818 
 819 .SH ATTRIBUTES
 820 See \fBattributes\fR(5) for descriptions of the following attributes:
 821 .sp
 822 
 823 .sp
 824 .TS
 825 box;
 826 c | c
 827 l | l .
 828 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 829 _
 830 Interface Stability     Committed
 831 .TE
 832 
 833 .SH SEE ALSO
 834 \fBdhcpinfo\fR(1), \fBifconfig\fR(1M), \fBinit\fR(1M), \fBin.mpathd\fR(1M),
 835 \fBin.ndpd\fR(1M), \fBipadm\fR(1M), \fBnwamcfg\fR(1M), \fBsyslog\fR(3C),
 836 \fBnodename\fR(4), \fBresolv.conf\fR(4), \fBattributes\fR(5), \fBdhcp\fR(5)
 837 .sp
 838 .LP
 839 \fI\fR
 840 .sp
 841 .LP
 842 Croft, B. and Gilmore, J. \fIRFC 951, Bootstrap Protocol (BOOTP)\fR, Network
 843 Working Group, September 1985.
 844 .sp
 845 .LP
 846 Droms, R. \fIRFC 2131, Dynamic Host Configuration Protocol\fR, Network Working
 847 Group, March 1997.
 848 .sp
 849 .LP
 850 Lemon, T. and B. Sommerfeld. \fIRFC 4361, Node-specific Client Identifiers for
 851 Dynamic Host Configuration Protocol Version Four (DHCPv4)\fR. Nominum and Sun
 852 Microsystems. February 2006.
 853 .sp
 854 .LP
 855 Droms, R. \fIRFC 3315, Dynamic Host Configuration Protocol for IPv6
 856 (DHCPv6)\fR. Cisco Systems. July 2003.
 857 .SH NOTES
 858 The \fBdhcpagent\fR daemon can be used on IPv4 logical interfaces, just as with
 859 physical interfaces. When used on a logical interface, the daemon automatically
 860 constructs a Client ID value based on the DUID and IAID values, according to
 861 RFC 4361. The  \fB/etc/default/dhcpagent\fR \fBCLIENT_ID\fR value, if any,
 862 overrides this automatic identifier.
 863 .sp
 864 .LP
 865 As with physical IPv4 interfaces, the \fB/etc/hostname.hme0:1\fR and
 866 \fB/etc/dhcp.hme0:1\fR files must also be created in order for \fBhme0:1\fR to
 867 be automatically plumbed and configured at boot. In addition, unlike physical
 868 IPv4 interfaces, \fBdhcpagent\fR does not add or remove default routes
 869 associated with logical interfaces.
 870 .sp
 871 .LP
 872 DHCP can be performed on IPMP IP interfaces to acquire and maintain IPMP data
 873 addresses. Because an IPMP IP interface has no hardware address, the daemon
 874 automatically constructs a Client ID using the same approach described above
 875 for IPv4 logical interfaces. In addition, the lack of a hardware address means
 876 the daemon must set the "broadcast" flag in all \fBDISCOVER\fR and
 877 \fBREQUEST\fR messages on IPMP IP interfaces. Some DHCP servers may refuse such
 878 requests.
 879 .sp
 880 .LP
 881 DHCP can be performed on IP interfaces that are part of an IPMP group (to
 882 acquire and maintain test addresses). The daemon will automatically set the
 883 \fBNOFAILOVER\fR and \fBDEPRECATED\fR flags on each test address. Additionally,
 884 the daemon will not add or remove default routes in this case. Note that the
 885 actual DHCP packet exchange may be performed over any active IP interface in
 886 the IPMP group. It is strongly recommended that test addresses have infinite
 887 leases. Otherwise, an extended network outage detectable only by probes may
 888 cause test address leases to expire, causing \fBin.mpathd\fR(1M) to revert to
 889 link-based failure detection and trigger an erroneous repair.
 890 .sp
 891 .LP
 892 With DHCPv6, the link-local interface must be configured using
 893 \fB/etc/hostname6.hme0\fR in order for DHCPv6 to run on \fBhme0\fR at boot
 894 time. The logical interfaces for each address are plumbed by \fBdhcpagent\fR
 895 automatically.