1 '\" te
   2 .\"  Copyright (c) 2002,  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 DHCPTAB 4 "Mar 15, 2002"
   7 .SH NAME
   8 dhcptab \- DHCP configuration parameter table
   9 .SH DESCRIPTION
  10 .sp
  11 .LP
  12 The \fBdhcptab\fR configuration table allows network administrators to organize
  13 groups of configuration parameters as macro definitions, which can then be
  14 referenced in the definition of other useful macros. These macros are then used
  15 by the \fBDHCP\fR server to return their values to \fBDHCP\fR and \fBBOOTP\fR
  16 clients.
  17 .sp
  18 .LP
  19 The preferred method of managing the \fBdhcptab\fR is through the  use of the
  20 \fBdhcpmgr\fR(1M) or \fBdhtadm\fR(1M) utility. The description of \fBdhcptab\fR
  21 entries included in this manual page is intended for informational purposes
  22 only, and should not be used to manually edit entries.
  23 .sp
  24 .LP
  25 You can view the contents of the \fBdhcptab\fR using the DHCP manager's tabs
  26 for Macros and Options, or using the \fBdhtadm -P\fR command.
  27 .SS "Syntax of dhcptab Entries"
  28 .sp
  29 .LP
  30 The format of a \fBdhcptab\fR table depends on the data store used to maintain
  31 it. However, any \fBdhcptab\fR must contain the following fields in each
  32 record:
  33 .sp
  34 .ne 2
  35 .na
  36 \fB\fBName\fR\fR
  37 .ad
  38 .RS 9n
  39 This field identifies the macro or symbol record and is used as a search key
  40 into the \fBdhcptab\fR table. The name of a macro or symbol must consist of
  41 \fBASCII\fR characters, with the length limited to 128 characters. Names can
  42 include spaces, except at the end of the name. The name is not case-sensitive.
  43 .RE
  44 
  45 .sp
  46 .ne 2
  47 .na
  48 \fB\fBType\fR\fR
  49 .ad
  50 .RS 9n
  51 This field specifies the type of record and is used as a search key into the
  52 \fBdhcptab\fR. Currently, there are only two legal values for \fBType\fR:
  53 .sp
  54 .ne 2
  55 .na
  56 \fB\fBm\fR\fR
  57 .ad
  58 .RS 5n
  59 This record is a \fBDHCP\fR macro definition.
  60 .RE
  61 
  62 .sp
  63 .ne 2
  64 .na
  65 \fB\fBs\fR\fR
  66 .ad
  67 .RS 5n
  68 This record is a \fBDHCP\fR symbol definition. It is used to define vendor and
  69 site-specific options.
  70 .RE
  71 
  72 .RE
  73 
  74 .sp
  75 .ne 2
  76 .na
  77 \fB\fBValue\fR\fR
  78 .ad
  79 .RS 9n
  80 This field contains the value for the specified type of record. For the \fBm\fR
  81 type, the value will consist of a series of symbol=value pairs, separated by
  82 the colon (\fB:\fR) character. For the \fBs\fR type, the value will consist of
  83 a series of fields, separated by a comma (\fB,\fR), which define a symbol's
  84 characteristics. Once defined, a symbol can be used in macro definitions.
  85 .RE
  86 
  87 .SS "Symbol Characteristics"
  88 .sp
  89 .LP
  90 The Value field of a symbols definition contain the following fields describing
  91 the characteristics of a symbol:
  92 .sp
  93 .ne 2
  94 .na
  95 \fB\fBContext\fR\fR
  96 .ad
  97 .RS 15n
  98 This field defines the context in which the symbol definition is to be used. It
  99 can have one of the following values:
 100 .sp
 101 .ne 2
 102 .na
 103 \fB\fBSite\fR\fR
 104 .ad
 105 .RS 27n
 106 This symbol defines a site-specific option, codes 128-254.
 107 .RE
 108 
 109 .sp
 110 .ne 2
 111 .na
 112 \fB\fBVendor=Client Class ...\fR\fR
 113 .ad
 114 .RS 27n
 115 This symbol defines a vendor-specific option, codes 1-254. The Vendor context
 116 takes \fBASCII\fR string arguments which identify the client class that this
 117 vendor option is associated with. Multiple client class names can be specified,
 118 separated by white space. Only those clients whose client class matches one of
 119 these values will see this option. For Sun machines, the Vendor client class
 120 matches the value returned by the command \fBuname -i\fR on the client, with
 121 periods replacing commas.
 122 .RE
 123 
 124 .RE
 125 
 126 .sp
 127 .ne 2
 128 .na
 129 \fB\fBCode\fR\fR
 130 .ad
 131 .RS 15n
 132 This field specifies the option code number associated with this symbol. Valid
 133 values are 128-254 for site-specific options, and 1-254 for vendor-specific
 134 options.
 135 .RE
 136 
 137 .sp
 138 .ne 2
 139 .na
 140 \fB\fBType\fR\fR
 141 .ad
 142 .RS 15n
 143 This field defines the type of data expected as a value for this symbol, and is
 144 not case-sensitive. Legal values are:
 145 .sp
 146 .ne 2
 147 .na
 148 \fB\fBASCII\fR\fR
 149 .ad
 150 .RS 11n
 151 \fBNVT ASCII\fR text. Value is enclosed in double-quotes (\fB"\fR). Granularity
 152 setting has no effect on symbols of this type, since \fBASCII\fR strings have a
 153 natural granularity of one (1).
 154 .RE
 155 
 156 .sp
 157 .ne 2
 158 .na
 159 \fB\fBBOOLEAN\fR\fR
 160 .ad
 161 .RS 11n
 162 No value is associated with this data type. Presence of symbols of this type
 163 denote boolean \fBTRUE,\fR whereas absence denotes \fBFALSE.\fR Granularity and
 164 Miximum values have no meaning for symbols of this type.
 165 .RE
 166 
 167 .sp
 168 .ne 2
 169 .na
 170 \fB\fBIP\fR\fR
 171 .ad
 172 .RS 11n
 173 Dotted decimal form of an Internet address. Multi-IP address granularity is
 174 supported.
 175 .RE
 176 
 177 .sp
 178 .ne 2
 179 .na
 180 \fB\fBNUMBER\fR\fR
 181 .ad
 182 .RS 11n
 183 An unsigned number with a supported granularity of \fB1\fR, \fB2\fR, \fB4\fR,
 184 and \fB8\fR octets.
 185 .sp
 186 Valid \fBNUMBER\fR types are: \fBUNUMBER8\fR, \fBSNUMBER8\fR, \fBUNUMBER16\fR,
 187 \fBSNUMBER16\fR, \fBUNUMBER32\fR, \fBSNUMBER32\fR, \fBUNUMBER64\fR, and
 188 \fBSNUMBER64\fR. See \fBdhcp_inittab\fR(4) for details.
 189 .RE
 190 
 191 .sp
 192 .ne 2
 193 .na
 194 \fB\fBOCTET\fR\fR
 195 .ad
 196 .RS 11n
 197 Uninterpreted \fBASCII\fR representation of binary data. The client identifier
 198 is one example of an \fBOCTET\fR string. Valid characters are \fB0\fR-\fB9\fR,
 199 \fBa\fR-\fBf\fR, \fBA\fR-\fBF\fR. One \fBASCII\fR character represents one
 200 nibble (4 bits), thus two \fBASCII\fR characters are needed to represent an 8
 201 bit quantity. The granularity setting has no effect on symbols of this type,
 202 since \fBOCTET\fR strings have a natural granularity of one (\fB1\fR).
 203 .sp
 204 For example, to encode a sequence of bytes with decimal values \fB77\fR,
 205 \fB82\fR, \fB5\fR, \fB240\fR, \fB14\fR, the option value would be encoded as
 206 \fB4d5205f00e\fR. A macro which supplies a value for option code \fB78\fR,
 207 \fBSLP_DA\fR, with a \fB0\fR Mandatory byte and Directory Agents at
 208 \fB192.168.1.5\fR and \fB192.168.0.133\fR  would appear in the \fBdhcptab\fR
 209 as:
 210 .sp
 211 .in +2
 212 .nf
 213 slpparams
 214 Macro
 215 :SLP_DA=00c0a80105c0a80085:
 216 .fi
 217 .in -2
 218 
 219 .RE
 220 
 221 .RE
 222 
 223 .sp
 224 .ne 2
 225 .na
 226 \fB\fBGranularity\fR\fR
 227 .ad
 228 .RS 15n
 229 This value specifies how many objects of \fBType\fR define a single
 230 \fBinstance\fR of the symbol value. For example, the static route option is
 231 defined to be a variable list of routes. Each route consists of two \fBIP\fR
 232 addresses, so the \fBType\fR is defined to be \fBIP\fR, and the data's
 233 granularity is defined to be \fB2\fR \fBIP\fR addresses. The granularity field
 234 affects the \fBIP\fR and \fBNUMBER\fR data types.
 235 .RE
 236 
 237 .sp
 238 .ne 2
 239 .na
 240 \fB\fBMaximum\fR\fR
 241 .ad
 242 .RS 15n
 243 This value specifies the maximum items of \fBGranularity\fR which are
 244 permissible in a definition using this symbol. For example, there can only be
 245 one \fBIP\fR address specified for a subnet mask, so the  \fBMaximum\fR number
 246 of items in this case is one (\fB1\fR). A  \fBMaximum\fR value of zero
 247 (\fB0\fR) means that a variable number of items is permitted.
 248 .RE
 249 
 250 .sp
 251 .LP
 252 The following example defines a site-specific option (symbol) called
 253 \fBMystatRt\fR, of code \fB130\fR, type \fBIP,\fR and granularity \fB2\fR, and
 254 a \fBMaximum\fR of \fB0\fR. This definition corresponds to the internal
 255 definition of the static route option (\fBStaticRt\fR).
 256 .sp
 257 .in +2
 258 .nf
 259 MystatRt s Site,130,IP,2,0
 260 .fi
 261 .in -2
 262 
 263 .sp
 264 .LP
 265 The following example demonstrates how a SLP Service Scope symbol
 266 (\fBSLP_SS\fR) with a scope value of \fBhappy\fR and mandatory byte set to
 267 \fB0\fR is encoded. The first octet of the option is the Mandatory octet, which
 268 is set either to \fB0\fR or \fB1\fR. In this example, it is set to \fB0
 269 (00)\fR. The balance of the value is the hexidecimal ASCII code numbers
 270 representing the name \fBhappy\fR, that is, \fB6861707079\fR.
 271 .sp
 272 .in +2
 273 .nf
 274 SLP_SS=006861707079
 275 .fi
 276 .in -2
 277 
 278 .SS "Macro Definitions"
 279 .sp
 280 .LP
 281 The following example illustrates a macro defined using the \fBMystatRt\fR site
 282 option symbol just defined:
 283 .sp
 284 .in +2
 285 .nf
 286 10netnis m :MystatRt=3.0.0.0 10.0.0.30:
 287 .fi
 288 .in -2
 289 
 290 .sp
 291 .LP
 292 Macros can be specified in the \fBMacro\fR field in \fBDHCP\fR network tables
 293 (see \fBdhcp_network\fR(4)), which will bind particular macro definitions to
 294 specific \fBIP addresses.\fR
 295 .sp
 296 .LP
 297 Up to four macro definitions are consulted by the \fBDHCP\fR server to
 298 determine the options that are returned to the requesting client.
 299 .sp
 300 .LP
 301 These macros are processed in the following order:
 302 .sp
 303 .ne 2
 304 .na
 305 \fB\fBClient Class\fR\fR
 306 .ad
 307 .RS 21n
 308 A macro named using the \fBASCII\fR representation of the client class (e.g.
 309 \fBSUNW.Ultra-30\fR) is searched for in the \fBdhcptab\fR. If found, its
 310 symbol/value pairs will be selected for delivery to the client. This mechanism
 311 permits the network administrator to select configuration parameters to be
 312 returned to all clients of the same class.
 313 .RE
 314 
 315 .sp
 316 .ne 2
 317 .na
 318 \fB\fBNetwork\fR\fR
 319 .ad
 320 .RS 21n
 321 A macro named by the dotted Internet form of the network address of the
 322 client's network (for example, \fB10.0.0.0\fR) is searched for in the
 323 \fBdhcptab\fR. If found, its symbol/value pairs will be combined with those of
 324 the \fBClient Class\fR macro. If a symbol exists in both macros, then the
 325 \fBNetwork\fR macro value overrides the value defined in the \fBClient Class\fR
 326 macro. This mechanism permits the network administrator to select configuration
 327 parameters to be returned to all clients on the same network.
 328 .RE
 329 
 330 .sp
 331 .ne 2
 332 .na
 333 \fB\fBIP Address\fR\fR
 334 .ad
 335 .RS 21n
 336 This macro may be named anything, but must be specified in the \fBDHCP\fR
 337 network table for the IP address record assigned to the requesting client. If
 338 this macro is found in the \fBdhcptab\fR, then its symbol/value pairs will be
 339 combined with those of the \fBClient Class\fR macro and the \fBNetwork\fR
 340 macro. This mechanism permits the network administrator to select configuration
 341 parameters to be returned to clients using a particular \fBIP\fR address. It
 342 can also be used to deliver a macro defined to include "server-specific"
 343 information by including this macro definition in all \fBDHCP\fR network table
 344 entries owned by a specific server.
 345 .RE
 346 
 347 .sp
 348 .ne 2
 349 .na
 350 \fB\fBClient Identifier\fR\fR
 351 .ad
 352 .RS 21n
 353 A macro named by the \fBASCII\fR representation of the client's unique
 354 identifier as shown in the \fBDHCP\fR network table (see
 355 \fBdhcp_network\fR(4)). If found, its symbol/value pairs are combined to the
 356 sum of the \fBClient Class\fR, \fBNetwork\fR, and \fBIP Address\fR macros. Any
 357 symbol collisions are replaced with those specified in the client identifier
 358 macro. The client mechanism permits the network administrator to select
 359 configuration parameters to be returned to a particular client, regardless of
 360 what network that client is connected to.
 361 .RE
 362 
 363 .sp
 364 .LP
 365 Refer to \fISystem Administration Guide: IP Services\fR for more information
 366 about macro processing.
 367 .sp
 368 .LP
 369 Refer to the \fBdhcp_inittab\fR(4) man page for more information about symbols
 370 used in Solaris DHCP.
 371 .SH SEE ALSO
 372 .sp
 373 .LP
 374 \fBdhcpmgr\fR(1M), \fBdhtadm\fR(1M), \fBin.dhcpd\fR(1M), \fBdhcp_inittab\fR(4),
 375 \fBdhcp_network\fR(4), \fBdhcp\fR(5)
 376 .sp
 377 .LP
 378 \fISystem Administration Guide: IP Services\fR
 379 .sp
 380 .LP
 381 Alexander, S., and R. Droms, \fIDHCP Options and BOOTP Vendor Extensions\fR,
 382 RFC 2132, Silicon Graphics, Inc., Bucknell University, March 1997.
 383 .sp
 384 .LP
 385 Droms, R., \fIInteroperation Between DHCP and BOOTP\fR, RFC 1534, Bucknell
 386 University, October 1993.
 387 .sp
 388 .LP
 389 Droms, R., \fIDynamic Host Configuration Protocol\fR, RFC 2131, Bucknell
 390 University, March 1997.
 391 .sp
 392 .LP
 393 Wimer, W., \fIClarifications and Extensions for the Bootstrap Protocol\fR, RFC
 394 1542, Carnegie Mellon University, October 1993.