1 '\" te
   2 .\"  Copyright (c) 2001 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 DHCP_NETWORK 4 "Mar 5, 2004"
   7 .SH NAME
   8 dhcp_network \- DHCP network tables
   9 .SH DESCRIPTION
  10 .sp
  11 .LP
  12 The Dynamic Host Configuration Protocol (\fBDHCP\fR) network tables are used to
  13 map the client identifiers of \fBDHCP\fR clients to \fBIP\fR addresses and the
  14 associated configuration parameters of that address. One \fBDHCP\fR network
  15 table exists for each network served by the \fBDHCP\fR server, and each table
  16 is named using the network's \fBIP\fR address. There is no table or file with
  17 the name \fBdhcp_network\fR.
  18 .sp
  19 .LP
  20 The \fBDHCP\fR network tables can exist as \fBASCII\fR text files, binary text
  21 files, or \fBNIS+\fR tables, depending on the data store used. Since the format
  22 of the file could change, the preferred method of managing the \fBDHCP\fR
  23 network tables is through the use of \fBdhcpmgr\fR(1M) or the \fBpntadm\fR(1M)
  24 command.
  25 .sp
  26 .LP
  27 The \fBdhcp_network\fR file is used as a policy mechanism for whether
  28 \fBin.dhcpd\fR(1M) leases addresses on a given network. If the \fBDHCP\fR
  29 server is not serving leases or information to a network, there should be no
  30 \fBdhcp_network\fR file for that network. To set the \fBDHCP\fR server in
  31 \fBinformational\fR mode, where it responds to \fBINFORM\fR messages but does
  32 not lease addresses on that network, create an empty \fBdhcp_network\fR file
  33 for that network. For normal operations, where the \fBDHCP\fR server both
  34 leases addresses and responds to \fBINFORM\fR packets, create a
  35 \fBdhcp_network\fR file using \fBdhcpmgr\fR(1M) or \fBpntadm\fR(1M) and
  36 populate it with leasable addresses.
  37 .sp
  38 .LP
  39 The format of the records in a \fBDHCP\fR network table depends on the data
  40 store used to maintain the table. However, an entry in a \fBDHCP\fR network
  41 table must contain the following fields:
  42 .sp
  43 .ne 2
  44 .na
  45 \fB\fBClient_ID\fR \fR
  46 .ad
  47 .RS 14n
  48 The client identifier field, \fBClient_ID\fR, is an \fBASCII\fR hexadecimal
  49 representation of the unique octet string value of the \fBDHCP\fR Client
  50 Identifier Option (code 61) which identifies a \fBDHCP\fR client. In the
  51 absence of the \fBDHCP\fR Client Identifier Option, the \fBDHCP\fR client is
  52 identified using the form given below for \fBBOOTP\fR clients. The number of
  53 characters in this field must be an even number, with a maximum length of 64
  54 characters. Valid characters are \fB0\fR \fB-\fR \fB9\fR and \fBA\fR-\fBF\fR.
  55 Entries with values of \fB00\fR are freely available for dynamic allocation to
  56 requesting clients. \fBBOOTP\fR clients are identified by the concatenation of
  57 the network's hardware type (as defined by \fBRFC\fR 1340, titled "Assigned
  58 Numbers") and the client's hardware address. For example, the following
  59 \fBBOOTP\fR client has a hardware type of '\fB01\fR' (10mb ethernet) and a
  60 hardware address of \fB8:0:20:11:12:b7\fR, so its client identifier would be:
  61 \fB010800201112B7\fR
  62 .RE
  63 
  64 .sp
  65 .ne 2
  66 .na
  67 \fB\fBFlags\fR \fR
  68 .ad
  69 .RS 14n
  70 The \fBFlags\fR field is a decimal value, the bit fields of which can have a
  71 combination of the following values:
  72 .sp
  73 .ne 2
  74 .na
  75 \fB\fB1 (PERMANENT)\fR \fR
  76 .ad
  77 .RS 18n
  78 Evaluation of the \fBLease\fR field is turned off (lease is permanent). If this
  79 bit is not set, Evaluation of the \fBLease\fR field is enabled and the
  80 \fBLease\fR is \fBDYNAMIC.\fR
  81 .RE
  82 
  83 .sp
  84 .ne 2
  85 .na
  86 \fB\fB2 (MANUAL)\fR \fR
  87 .ad
  88 .RS 18n
  89 This entry has a manual client \fBID\fR binding (cannot be reclaimed by
  90 \fBDHCP\fR server). Client will not be allocated another address.
  91 .RE
  92 
  93 .sp
  94 .ne 2
  95 .na
  96 \fB\fB4 (UNUSABLE)\fR \fR
  97 .ad
  98 .RS 18n
  99 When set, this value means that either through \fBICMP\fR echo or client
 100 \fBDECLINE,\fR this address has been found to be unusable. Can also be used by
 101 the network administrator to \fIprevent\fR a certain client from booting, if
 102 used in conjunction with the \fBMANUAL\fR flag.
 103 .RE
 104 
 105 .sp
 106 .ne 2
 107 .na
 108 \fB\fB8 (BOOTP)\fR \fR
 109 .ad
 110 .RS 18n
 111 This entry is reserved for allocation to \fBBOOTP\fR clients only.
 112 .RE
 113 
 114 .RE
 115 
 116 .sp
 117 .ne 2
 118 .na
 119 \fB\fBClient_IP\fR \fR
 120 .ad
 121 .RS 14n
 122 The \fBClient_IP\fR field holds the \fBIP\fR address for this entry. This value
 123 must be unique in the database.
 124 .RE
 125 
 126 .sp
 127 .ne 2
 128 .na
 129 \fB\fBServer_IP\fR \fR
 130 .ad
 131 .RS 14n
 132 This field holds the \fBIP\fR address of the \fBDHCP\fR server which \fIowns\fR
 133 this client \fBIP\fR address, and thus is responsible for initial allocation to
 134 a requesting client. On a multi-homed DHCP server, this IP address must be the
 135 first address returned by \fBgethostbyname\fR(3NSL).
 136 .RE
 137 
 138 .sp
 139 .ne 2
 140 .na
 141 \fB\fBLease\fR \fR
 142 .ad
 143 .RS 14n
 144 This numeric field holds the entry's absolute lease expiration time, and is in
 145 seconds since \fBJanuary 1, 1970\fR. It can be decimal, or hexadecimal (if
 146 \fB0x\fR prefixes number). The special value \fB-1\fR is used to denote a
 147 permanent lease.
 148 .RE
 149 
 150 .sp
 151 .ne 2
 152 .na
 153 \fB\fBMacro\fR \fR
 154 .ad
 155 .RS 14n
 156 This \fBASCII\fR text field contains the \fBdhcptab\fR macro name used to look
 157 up this entry's configuration parameters in the \fBdhcptab\fR(4) database.
 158 .RE
 159 
 160 .sp
 161 .ne 2
 162 .na
 163 \fB\fBComment\fR \fR
 164 .ad
 165 .RS 14n
 166 This \fBASCII\fR text field contains an optional comment.
 167 .RE
 168 
 169 .SS "TREATISE ON LEASES"
 170 .sp
 171 .LP
 172 This section describes how the \fBDHCP/BOOTP\fR server calculates a client's
 173 configuration lease using information contained in the \fBdhcptab\fR(4) and
 174 \fBDHCP\fR network tables. The server consults the \fBLeaseTim\fR and
 175 \fBLeaseNeg\fR symbols in the \fBdhcptab\fR, and the \fBFlags\fR and
 176 \fBLease\fR fields of the chosen IP address record in the \fBDHCP\fR network
 177 table.
 178 .sp
 179 .LP
 180 The server first examines the \fBFlags\fR field for the identified \fBDHCP\fR
 181 network table record. If the \fBPERMANENT\fR flag is on, then the client's
 182 lease is considered permanent.
 183 .sp
 184 .LP
 185 If the \fBPERMANENT\fR flag is not on, the server checks if the client's lease
 186 as represented by the \fBLease\fR field in the network table record has
 187 expired. If the lease is not expired, the server checks if the client has
 188 requested a new lease. If the \fBLeaseNeg\fR symbol has not been included in
 189 the client's \fBdhcptab\fR parameters, then the client's requested lease
 190 extension is ignored, and the lease is set to be the time remaining as shown by
 191 the \fBLease\fR field. If the \fBLeaseNeg\fR symbol \fIhas\fR been included,
 192 then the server will extend the client's lease to the value it requested if
 193 this requested lease is less than or equal to the current time plus the value
 194 of the client's \fBLeaseTim\fR \fBdhcptab\fR parameter.
 195 .sp
 196 .LP
 197 If the client's requested lease is greater than policy allows (value of
 198 \fBLeaseTim\fR), then the client is given a lease equal to the current time
 199 plus the value of \fBLeaseTim\fR. If \fBLeaseTim\fR is not set, then the
 200 default \fBLeaseTim\fR value is one hour.
 201 .sp
 202 .LP
 203 For more information about the \fBdhcptab\fR symbols, see \fBdhcptab\fR(4).
 204 .SH ATTRIBUTES
 205 .sp
 206 .LP
 207 See \fBattributes\fR(5) for a description of the following attribute:
 208 .sp
 209 
 210 .sp
 211 .TS
 212 box;
 213 c | c
 214 l | l .
 215 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 216 _
 217 Interface Stability     Evolving
 218 .TE
 219 
 220 .SH SEE ALSO
 221 .sp
 222 .LP
 223 \fBdhcpconfig\fR(1M), \fBdhcpmgr\fR(1M), \fBdhtadm\fR(1M), \fBin.dhcpd\fR(1M),
 224 \fBpntadm\fR(1M), \fBdhcptab\fR(4), \fBdhcp\fR(5), \fBdhcp_modules\fR(5),
 225 \fBattributes\fR(5)
 226 .sp
 227 .LP
 228 \fISolaris DHCP Service Developer\&'s Guide\fR
 229 .sp
 230 .LP
 231 \fISystem Administration Guide: IP Services\fR
 232 .sp
 233 .LP
 234 Reynolds, J. and J. Postel, \fIAssigned Numbers\fR, STD 2, RFC 1340,
 235 USC/Information Sciences Institute, July 1992.