'\" te .\" Copyright (c) 2004 by Sun Microsystems, Inc. All Rights Reserved. .\" 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. 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 fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH IN.DHCPD 1M "Aug 10, 2004" .SH NAME in.dhcpd \- Dynamic Host Configuration Protocol server .SH SYNOPSIS .LP .nf \fB/usr/lib/inet/in.dhcpd\fR [\fB-denv\fR] [\fB-h\fR \fIrelay_hops\fR] [\fB-i\fR \fIinterface,\fR ...] [\fB-l\fR \fIsyslog_local_facility\fR] [\fB-b\fR automatic | manual] [\fB-o\fR \fIDHCP_offer_time\fR] [\fB-t\fR \fIdhcptab_rescan_interval\fR] .fi .LP .nf \fB/usr/lib/inet/in.dhcpd\fR [\fB-dv\fR] [\fB-h\fR \fIrelay_hops\fR] [\fB-i\fR \fIinterface,\fR]... [\fB-l\fR \fIsyslog_local_facility\fR] \fB-r\fR \fIIP_address\fR | \fIhostname,\fR ... .fi .SH DESCRIPTION .sp .LP \fBin.dhcpd\fR is a daemon that responds to Dynamic Host Configuration Protocol (\fBDHCP\fR) requests and optionally to \fBBOOTP\fR protocol requests. The daemon forks a copy of itself that runs as a background process. It must be run as root. The daemon has two run modes, \fBDHCP\fR server (with optional \fBBOOTP\fR compatibility mode) and \fBBOOTP\fR relay agent mode. .sp .LP The first line in the \fBSYNOPSIS\fR section illustrates the options available in the DHCP/BOOTP server mode. The second line in the SYNOPSIS section illustrates the options available when the daemon is run in \fBBOOTP\fR relay agent mode. .sp .LP The \fBDHCP\fR and \fBBOOTP\fR protocols are used to provide configuration parameters to Internet hosts. Client machines are allocated their \fBIP\fR addresses as well as other host configuration parameters through this mechanism. .sp .LP The \fBDHCP\fR/\fBBOOTP\fR daemon manages two types of \fBDHCP\fR data tables: the \fBdhcptab\fR configuration table and the DHCP network tables. .sp .LP See \fBdhcptab\fR(4) regarding the dhcptab configuration table and \fBdhcp_network\fR(4) regarding the \fBDHCP\fR network tables. .sp .LP The \fBdhcptab\fR contains macro definitions defined using a \fBtermcap\fR-like syntax which permits network administrators to define groups of \fBDHCP\fR configuration parameters to be returned to clients. However, a \fBDHCP/BOOTP\fR server always returns hostname, network broadcast address, network subnet mask, and \fBIP\fR maximum transfer unit (\fBMTU\fR) if requested by a client attached to the same network as the server machine. If those options have not been explicitly configured in the \fBdhcptab\fR, \fBin.dhcpd\fR returns reasonable default values. .sp .LP The \fBdhcptab\fR is read at startup, upon receipt of a \fBSIGHUP\fR signal, or periodically as specified by the \fB-t\fR option. A \fBSIGHUP\fR (sent using the command \fBsvcadm refresh network/dhcp-server\fR) causes the DHCP/BOOTP daemon to reread the \fBdhcptab\fR within an interval from \fB0\fR-\fB60\fR seconds (depending on where the DHCP daemon is in its polling cycle). For busy servers, users should run \fBsvcadm restart network/dhcp-server\fR to force the \fBdhcptab\fR to be reread. .sp .LP The DHCP network tables contain mappings of client identifiers to \fBIP\fR addresses. These tables are named after the network they support and the datastore used to maintain them. .sp .LP The DHCP network tables are consulted during runtime. A client request received from a network for which no DHCP network table exists is ignored. .sp .LP This command may change in future releases of Solaris software. Scripts, programs, or procedures that use this command might need modification when upgrading to future Solaris software releases.The command line options provided with the \fBin.dhcpd\fR daemon are used only for the current session, and include only some of the server options you can set. The \fBdhcpsvc.conf\fR(4) contains all the server default settings, and can be modified by using the \fBdhcpmgr\fR utility. See \fBdhcpsvc.conf\fR(4) for more details. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .na \fB\fB-b\fR \fB automatic | manual\fR\fR .ad .sp .6 .RS 4n This option enables \fBBOOTP\fR compatibility mode, allowing the \fBDHCP\fR server to respond to \fBBOOTP\fR clients. The option argument specifies whether the \fBDHCP\fR server should automatically allocate permanent lease \fBIP\fR addresses to requesting \fBBOOTP\fR clients if the clients are not registered in the DHCP network tables (\fBautomatic\fR) or respond only to \fBBOOTP\fR clients who have been manually registered in the DHCP network tables (\fB manual\fR). This option only affects \fBDHCP\fR server mode. .RE .sp .ne 2 .na \fB\fB-d\fR\fR .ad .sp .6 .RS 4n Debugging mode. The daemon remains as a foreground process, and displays verbose messages as it processes \fBDHCP\fR and/or \fBBOOTP\fR datagrams. Messages are displayed on the current TTY. This option can be used in both DHCP/BOOTP server mode and \fBBOOTP\fR relay agent mode. .RE .sp .ne 2 .na \fB\fB-h\fR\fI relay_hops\fR\fR .ad .sp .6 .RS 4n Specifies the maximum number of relay agent hops that can occur before the daemon drops the DHCP/BOOTP datagram. The default number of relay agent hops is 4. This option affects both DHCP/BOOTP server mode and \fBBOOTP\fR relay agent mode. .RE .sp .ne 2 .na \fB\fB-i\fR\fI interface, .\|.\|.\fR\fR .ad .sp .6 .RS 4n Selects the network interfaces that the daemon should monitor for DHCP/BOOTP datagrams. The daemon ignores DHCP/BOOTP datagrams on network interfaces not specified in this list. This option is only useful on machines that have multiple network interfaces. If this option is not specified, then the daemon listens for DHCP/BOOTP datagrams on all network interfaces. The option argument consists of a comma-separated list of interface names. It affects both DHCP/BOOTP server and \fBBOOTP\fR relay agent run modes. .RE .sp .ne 2 .na \fB\fB-l\fR \fIsyslog_local_facility\fR\fR .ad .sp .6 .RS 4n The presence of this option turns on transaction logging for the \fBDHCP\fR server or \fBBOOTP\fR relay agent. The value specifies the \fBsyslog\fR local facility (an integer from \fB0\fR to \fB7\fR inclusive) the DHCP daemon should use for tagging the transactions. Using a facility separate from the \fBLOG_DAEMON\fR facility allows the network administrator to capture these transactions separately from other DHCP daemon events for such purposes as generating transaction reports. See \fBsyslog\fR(3C), for details about local facilities. Transactions are logged using a record with 9 space-separated fields as follows: .RS +4 .TP 1. Protocol: .sp .in +2 .nf Relay mode: "BOOTP" Server mode: "BOOTP" or "DHCP" based upon client type. .fi .in -2 .sp .RE .RS +4 .TP 2. Type: .sp .in +2 .nf Relay mode: "RELAY-CLNT", "RELAY-SRVR" Server mode: "ASSIGN", "EXTEND", "RELEASE", "DECLINE", "INFORM", "NAK" "ICMP-ECHO." .fi .in -2 .sp .RE .RS +4 .TP 3. Transaction time: absolute time in seconds (unix time) .RE .RS +4 .TP 4. Lease time: .sp .in +2 .nf Relay mode: Always 0. Server mode: 0 for ICMP-ECHO events, absolute time in seconds (unix time) otherwise .fi .in -2 .sp .RE .RS +4 .TP 5. Source IP address: Dotted Internet form .LP .nf Relay mode: Relay interface IP on RELAY-CLNT, INADDR_ANY on RELAY-SRVR. Server mode: Client IP. .fi .RE .RS +4 .TP 6. Destination IP address: Dotted Internet form .LP .nf Relay mode: Client IP on RELAY-CLNT, Server IP on RELAY-SRVR. Server mode: Server IP. .fi .RE .RS +4 .TP 7. Client Identifier: Hex representation (0-9, A-F) .LP .nf Relay mode: MAC address Server mode: BOOTP - MAC address; DHCP - client id .fi .RE .RS +4 .TP 8. Vendor Class identifier (white space converted to periods (.)). .LP .nf Relay mode: Always "N/A" Server mode: Vendor class ID tokenized by converting white space characters to periods (.) .fi .RE .RS +4 .TP 9. MAC address: Hex representation (0-9, A-F) .LP .nf Relay mode: MAC address Server mode: MAC address .fi .RE The format of this record is subject to change between releases. .sp Transactions are logged to the console if daemon is in debug mode (\fB-d\fR). .sp Logging transactions impact daemon performance. .sp It is suggested that you periodically rotate the DHCP transaction log file to keep it from growing until it fills the filesystem. This can be done in a fashion similar to that used for the general system message log \fB/var/adm/messages\fR and is best accomplished using the facilities provided by \fBlogadm\fR(1M). .RE .sp .ne 2 .na \fB\fB-n\fR\fR .ad .sp .6 .RS 4n Disable automatic duplicate \fBIP\fR address detection. When this option is specified, the \fBDHCP\fR server does not attempt to verify that an \fBIP address it is about to\fR offer a client is not in use. By default, the \fBDHCP\fR server pings an \fBIP\fR address before offering it to a DHCP/BOOTP client, to verify that the address is not in use by another machine. .RE .sp .ne 2 .na \fB\fB-o\fR\fI DHCP_offer_time\fR\fR .ad .sp .6 .RS 4n Specifies the number of seconds the \fBDHCP\fR server should cache the offers it has extended to discovering \fBDHCP\fR clients. The default setting is \fB10\fR seconds. On slow network media, this value can be increased to compensate for slow network performance. This option affects only \fBDHCP\fR server mode. .RE .sp .ne 2 .na \fB\fB-r\fR\fI IP_address | hostname, .\|.\|.\fR\fR .ad .sp .6 .RS 4n This option enables \fBBOOTP\fR relay agent mode. The option argument specifies a comma-separated list of \fBIP\fR addresses or hostnames of \fBDHCP\fR or \fBBOOTP\fR servers to which the relay agent is to forward \fBBOOTP\fR requests. When the daemon is started in this mode, any \fBDHCP\fR tables are ignored, and the daemon simply acts as a \fBBOOTP\fR relay agent. .sp A \fBBOOTP\fR relay agent listens to \fBUDP\fR port 68, and forwards \fBBOOTP\fR request packets received on this port to the destinations specified on the command line. It supports the \fBBROADCAST\fR flag described in \fBRFC\fR 1542. A \fBBOOTP\fR relay agent can run on any machine that has knowledge of local routers, and thus does not have to be an Internet gateway machine. .sp Note that the proper entries must be made to the \fBnetmasks\fR database so that the \fBDHCP\fR server being served by the \fBBOOTP\fR relay agents can identify the subnet mask of the foreign BOOTP/DHCP client's network. See \fBnetmasks\fR(4) for the format and use of this database. .RE .sp .ne 2 .na \fB\fB-t\fR\fI dhcptab_rescan_interval\fR\fR .ad .sp .6 .RS 4n Specifies the interval in minutes that the \fBDHCP\fR server should use to schedule the automatic rereading of the \fBdhcptab\fR information. Typically, you would use this option if the changes to the \fBdhcptab\fR are relatively frequent. Once the contents of the \fBdhcptab\fR have stabilized, you can turn off this option to avoid needless reinitialization of the server. .RE .sp .ne 2 .na \fB\fB-v\fR\fR .ad .sp .6 .RS 4n Verbose mode. The daemon displays more messages than in the default mode. Note that verbose mode can reduce daemon efficiency due to the time taken to display messages. Messages are displayed to the current \fBTTY\fR if the debugging option is used; otherwise, messages are logged to the \fBsyslogd\fR facility. This option can be used in both DHCP/BOOTP server mode and \fBBOOTP\fR relay agent mode. .RE .SH EXAMPLES .LP \fBExample 1 \fRStarting a \fBDHCP\fR Server in \fBBOOTP\fR Compatibility Mode .sp .LP The following command starts a \fBDHCP\fR server in \fBBOOTP\fR compatibility mode, permitting the server to automatically allocate permanent \fBIP\fR addresses to \fBBOOTP\fR clients which are not registered in the server's table; limits the server's attention to incoming datagrams on network devices \fBle2\fR and \fBtr0\fR; drops \fBBOOTP\fR packets whose hop count exceeds 2; configures the \fBDHCP\fR server to cache extended \fBDHCP\fR offers for 15 seconds; and schedules \fBdhcptab\fR rescans to occur every 10 minutes: .sp .in +2 .nf \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 .fi .in -2 .sp .LP \fBExample 2 \fRStarting the Daemon in \fBBOOTP\fR Relay Agent Mode .sp .LP The following command starts the daemon in \fBBOOTP\fR relay agent mode, registering the hosts \fBbladerunner\fR and \fB10.0.0.5\fR as relay destinations, with debugging and verbose modes enabled, and drops \fBBOOTP\fR packets whose hop count exceeds 5: .sp .in +2 .nf \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 .fi .in -2 .sp .SH FILES .sp .ne 2 .na \fB\fB/etc/inet/dhcpsvc.conf\fR\fR .ad .sp .6 .RS 4n .RE .sp .ne 2 .na \fB\fB/etc/init/hosts\fR\fR .ad .sp .6 .RS 4n .RE .sp .ne 2 .na \fB\fB/usr/lib/inet/dhcp/nsu/rfc2136.so.1\fR\fR .ad .sp .6 .RS 4n .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Evolving .TE .SH SEE ALSO .sp .LP \fBsvcs\fR(1), \fBcron\fR(1M), \fBdhcpmgr\fR(1M), \fBdhtadm\fR(1M), \fBinetadm\fR(1M), \fBinetd\fR(1M), \fBlogadm\fR(1M), \fBpntadm\fR(1M), \fBsvcadm\fR(1M), \fBsyslogd\fR(1M), \fBsyslog\fR(3C), \fBdhcpsvc.conf\fR(4), \fBdhcp_network\fR(4), \fBdhcptab\fR(4), \fBethers\fR(4), \fBhosts\fR(4), \fBnetmasks\fR(4), \fBnsswitch.conf\fR(4), \fBattributes\fR(5), \fBdhcp\fR(5), \fBsmf\fR(5) .sp .LP \fI\fR .sp .LP Alexander, S., and R. Droms, \fIDHCP Options and BOOTP Vendor Extensions\fR, RFC 2132, Silicon Graphics, Inc., Bucknell University, March 1997. .sp .LP Droms, R., \fIInteroperation Between DHCP and BOOTP\fR, RFC 1534, Bucknell University, October 1993. .sp .LP Droms, R., \fIDynamic Host Configuration Protocol\fR, RFC 2131, Bucknell University, March 1997. .sp .LP Wimer, W., \fIClarifications and Extensions for the Bootstrap Protocol\fR, RFC 1542, Carnegie Mellon University, October 1993. .SH NOTES .sp .LP The \fBin.dhcpd\fR service is managed by the service management facility, \fBsmf\fR(5), under the service identifier: .sp .in +2 .nf svc:/network/dhcp-server .fi .in -2 .sp .sp .LP Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using \fBsvcadm\fR(1M). Responsibility for initiating and restarting this service is delegated to \fBinetd\fR(1M). Use \fBinetadm\fR(1M) to make configuration changes and to view configuration information for this service. The service's status can be queried using the \fBsvcs\fR(1) command.