man Pages(4): File Formats
검색에만이 책은
PDF로 이 문서 다운로드

NAME

dhcptab - DHCP configuration parameter table

DESCRIPTION

The dhcptab macro table allows network administrators to organize groups of configuration parameters as macro definitions, which can then be further used in the definition of other useful macros. These macros can be configured such that the DHCP server will return their values to DHCP and BOOTP clients.
The preferred method of managing the dhcptab macro table is through the use of the dhtadm(1M) utility. The syntax described in the balance of this manual page is intended for informational purposes.

Syntax of the dhcptab Table

The syntax of the dhcptab table is as follows:
Comments begin with the cross-hatch (# )character in the first position on the line and end with a carriage return. Lines can be continued by escaping the carriage return character with a backslash (\) character.
dhcptab records contain three (3) fields:
NameTypeValue
The fields are defined as follows:
Name
This field identifies the record and is used as the search key into the dhcptab table. A Name must consist of ASCII characters. If the record is of type Macro, then the length is limited to 64 characters. If the record is of type Symbol, then the length is limited to 8 characters.
Type
This field specifies the type of record. Currently, there are only two legal values for Type:
m (Macro)
This record is a DHCP macro definition.
s (Symbol)
This record is a DHCP symbol definition. It is used to define
vendor and site-specific options.
Value
This field contains the value for the specified type of record. For the macro type, the value will consist of a series of symbol=value pairs, separated by the colon (: )character. For the symbol type, the value will consist of a series of fields, separated by a comma (, ),which define a symbol's characteristics. Once defined, a symbol can be used in macro definitions.

Symbol Characteristics

The fields describing the characteristics of a symbol are as follows:
ContextCodeTypeGranularityMaximum
These fields are defined as follows:
Context
This field defines the context in which the symbol definition is to be used. It can have three values:
Extend
This symbol defines a standard option, codes from 77-127.
The use of this symbol type is for adding new standard
options added since the release of the dhcp server.
Site
This symbol defines a site-specific option, codes 128-254.
Vendor=Client Class ...
This symbol defines a vendor-specific option, codes 1-254.
The Vendor context takes ASCII string arguments which identify the client class that this vendor option is associated with. Multiple client class names can be specified, separated by
white space. Only those clients whose client class matches
one of these values will see this option.
Code
This field specifies the option code number associated with this symbol. Valid values are 128-254 for site-specific options, and 1-254 for vendorspecific options.
Type
This field defines the type of data expected as a value for this symbol. Legal values are:
ASCII
NVT ASCII text. Value is enclosed in double-quotes (").
BOOLEAN
No value is associated with this data type. Presence of
symbols of this type denote boolean TRUE ,whereas
absence denotes FALSE.
IP
Dotted decimal form of an Internet address.
NUMBER
An unsigned number with a supported granularity of 1 ,2 ,
4 ,and 8 octets.
OCTET
Uninterpreted ASCII representation of binary data. The
client identifier is one example of an octet string.
Granularity This value specifies how many objects of Type define a single instance of
the symbol value. For example, the static route option is defined to be a variable list of routes. Each route consists of two IP addresses, so the Type is defined to be IP ,and the data's granularity is defined to be 2 IP addresses.
Maximum
This value specifies the maximum items of Granularity which are permissible in a definition using this symbol. For example, there can only be one IP address specified for a subnet mask, so the Maximum number of items in this case is one (1 ). A Maximum value of zero (0 )means that a variable number of items is permitted.
The following example defines a site-specific option called MystatRt, of code 130 ,type IP , and granularity 2 ,and a Maximum of 0 . This definition corresponds to the internal definition of the static route option (StaticRt).
MystatRt s Site,130,IP,2,0

Macro Definitions

The following example illustrates a macro defined using the MystatRt site option symbol just defined:
10netnis m :MystatRt=3.0.0.0 10.0.0.30:
Macro records can be specified in the Macro field in dhcp network databases (see dhcp_network(4)), which will bind particular macro definitions to specific IP addresses.
If present, four macro definitions are consulted by the DHCP server to determine the options that are returned to the requesting client:
Client ClassNetworkIP AddressClient Identifier
These macros are processed as follows:
Client Class
A macro called by the ASCII representation of the client class is searched for in the dhcptab. If found, then its symbol/value pairs will be selected for delivery to the client. This mechanism permits the network administrator to select configuration parameters to be returned to all clients of the same class.
Network
A macro named by the dotted Internet form of the network address of the client's network (for example, 10.0.0.0 )is searched for in the dhcptab. If found, then its symbol/value pairs will be combined with those of the Client Class macro. If a symbol exists in both macros, then the Network macro value overrides the value defined in the Client Class macro. This mechanism permits the network administrator to select configuration parameters to be returned to all clients on the same network.
IP Address
This macro is specified in the dhcp network database for the record assigned to the requesting client. If this macro is found in the dhcptab, then its symbol/value pairs will be combined with those of the Client Class macro and the Network macro. This mechanism permits the network administrator to select configuration parameters to be returned to clients using a particular IP address. It can also be used to deliver a macro defined to include "server-specific" information by including this macro definition in all dhcp network database entries owned by a specific server.
Client Identifier
A macro called by the ASCII representation of the client's client identifier is searched for in the dhcptab. If found, its symbol/value pairs are combined to the sum of the Client Class, Network, and IP Address macros. Any symbol collisions are replaced with those specified in the client identifier macro. This mechanism permits the network administrator to select configuration parameters to be returned to a particular client, regardless of what network that client is connected to.

Internal Symbol Names

The following table maps the available internal symbol names to RFC-2132 options:
  Symbol      Code                        Description

Subnet
1
Subnet Mask, dotted Internet address (IP).
UTCoffst          2   Coordinated Universal time offset (seconds).
Router            3   List of Routers, IP.
Timeserv          4   List of RFC-868 servers, IP.
IEN116ns          5   List of IEN 116 name servers, IP.
DNSserv           6   List of DNS name servers, IP.
Logserv           7   List of MIT-LCS UDP log servers, IP.
Cookie            8   List of RFC-865 cookie servers, IP.
Lprserv           9   List of RFC-1179 line printer servers, IP.
Impress          10   List of Imagen Impress servers, IP.
Resource         11   List of RFC-887 resource location servers, IP.
Hostname         12   Client's hostname, value from hosts database.
Bootsize         13   Number of 512 octet blocks in boot image, NUMBER.
Dumpfile          14   Path where core image should be dumped, ASCII.
DNSdmain         15   DNS domain name, ASCII.
Swapserv         16   Client's swap server, IP.
Rootpath         17   Client's Root path, ASCII.
ExtendP          18   Extensions path, ASCII.
IpFwdF           19   IP Forwarding Enable/Disable, NUMBER.
NLrouteF         20   Non-local Source Routing, NUMBER.
PFilter          21   Policy Filter, IP, IP.
MaxIpSiz         22   Maximum datagram Reassembly Size, NUMBER.
IpTTL            23   Default IP Time to Live, (1=<x<=255), NUMBER.
PathTO           24   RFC-1191 Path MTU Aging Timeout, NUMBER.
PathTbl          25   RFC-1191 Path MTU Plateau Table, NUMBER.
MTU              26   Interface MTU, x>=68, NUMBER.
SameMtuF         27   All Subnets are Local, NUMBER.
Broadcst         28   Broadcast Address, IP.
MaskDscF         29   Perform Mask Discovery, NUMBER.
MaskSupF         30   Mask Supplier, NUMBER.
RDiscvyF         31   Perform Router Discovery, NUMBER.
RSolictS         32   Router Solicitation Address, IP.
StaticRt         33   Static Route, Double IP (network router).
TrailerF         34   Trailer Encapsulation, NUMBER.
ArpTimeO         35   ARP Cache Time out, NUMBER.
EthEncap         36   Ethernet Encapsulation, NUMBER.
TcpTTL           37   TCP Default Time to Live, NUMBER.
TcpKaInt         38   TCP Keepalive Interval, NUMBER.
TcpKaGbF         39   TCP Keepalive Garbage, NUMBER.
NISdmain         40   NIS Domain name, ASCII.
NISservs         41   List of NIS servers, IP.
NTPservs         42   List of NTP servers, IP.
NetBNms          44   List of NetBIOS Name servers, IP.

NetBDsts         45   List of NetBIOS Distribution servers, IP.
NetBNdT          46   NetBIOS Node type (1=B-node, 2=P, 4=M, 8=H)
NetBScop         47   NetBIOS scope, ASCII.
XFontSrv         48   List of X Window Font servers, IP.
XDispMgr         49   List of X Window Display managers, IP.
LeaseTim         51   Lease Time Policy, (-1 = PERM), NUMBER.
Message          56   Message to be displayed on client, ASCII.
T1Time           58   Renewal (T1) time, NUMBER.
T2Time           59   Rebinding (T2) time, NUMBER.
NW_dmain         62   NetWare/IP Domain Name, ASCII.
NWIPOpts         63   NetWare/IP Options, OCTET (unknown type).
NIS+dom          64   NIS+ Domain name, ASCII.
NIS+serv         65   NIS+ servers, IP.
TFTPsrvN         66   TFTP server hostname, ASCII.
OptBootF         67   Optional Bootfile path, ASCII.
MblIPAgt         68   Mobile IP Home Agent, IP.
SMTPserv         69   Simple Mail Transport Protocol Server, IP.
POP3serv         70   Post Office Protocol (POP3) Server, IP.
NNTPserv         71   Network News Transport Proto. (NNTP) Server, IP.
WWWservs         72   Default WorldWideWeb Server, IP.
Fingersv         73   Default Finger Server, IP.
IRCservs         74   Internet Relay Chat Server, IP.
STservs          75   StreetTalk Server, IP.
STDAservs        76   StreetTalk Directory Assist. Server, IP.
BootFile       N/A    File to Boot, ASCII.
BootSrvA       N/A    Boot Server, IP.
BootSrvN       N/A    Boot Server Hostname, ASCII.
LeaseNeg       N/A    Lease is Negotiable Flag, (Present=TRUE )
Include        N/A    Include listed macro values in this macro.

EXAMPLES

Below is an example dhcptab file, illustrating the concepts described above:
#
# PCNFS vendor options. First define them, then use them in
# our Client Class macro definition to establish proper context.
#

# SolarNet framework servers. Note that this symbol is valid for two
# client classes, "SUNW.PCNFS.5.1" and "SUNW.PCNFSPRO.1.1".
SNadmfw s Vendor=SUNW.PCNFS.5.1.1 SUNW.PCNFSPRO.1.1,1,ASCII,1,0

# PCNFS servers. Note that two client classes are specified for
# this symbol.
Pcnfsd s Vendor=SUNW.PCNFS.5.1.1 SUNW.PCNFSPRO.1.1,2,IP,1,0

# NFS Read and Write sizes. Unsigned shorts.
SNnfsRd s Vendor=SUNW.PCNFS.5.1.1 SUNW.PCNFSPRO.1.1,4,NUMBER,2,1
SNnfsWr s Vendor=SUNW.PCNFS.5.1.1 SUNW.PCNFSPRO.1.1,5,NUMBER,2,1

# NFS Timout in 1/10's of a second. An unsigned short.
SNnfsTim s Vendor=SUNW.PCNFS.5.1.1 SUNW.PCNFSPRO.1.1,6,NUMBER,2,1

# NFS Retries, an unsigned short.
SNnfsTry s Vendor=SUNW.PCNFS.5.1.1 SUNW.PCNFSPRO.1.1,7,NUMBER,2,1

# PC-Admin login script file.
SNClogin s Vendor=SUNW.PCNFS.5.1.1 SUNW.PCNFSPRO.1.1,8,ASCII,1,0

# PC-Admin logout script file.
SNClgout s Vendor=SUNW.PCNFS.5.1.1 SUNW.PCNFSPRO.1.1,9,ASCII,1,0

# PC-Admin script server.
SNCserv s Vendor=SUNW.PCNFS.5.1.1 SUNW.PCNFSPRO.1.1,10,IP,1,0

# Path to PC-Admin scripts on server.
SNCpath s Vendor=SUNW.PCNFS.5.1.1 SUNW.PCNFSPRO.1.1,11,ASCII,1,0

# PC-Admin Boot script file.
SNCboot s Vendor=SUNW.PCNFS.5.1.1 SUNW.PCNFSPRO.1.1,12,ASCII,1,0

# Timezone (TZ)
SN_TZ s Vendor=SUNW.PCNFS.5.1.1 SUNW.PCNFSPRO.1.1,13,ASCII,1,0

# Site specific option.
SiteTest s Site,128,IP,1,1

# PCNFS client class. This option will automatically be returned
# to clients specifying "SUNW.PCNFS.5.1.1" as their Client Class.
# Predefined, Site, or vendor symbols can be used in this definition.
# However, note that vendor symbols used here whose Client Class does not
# match will be omitted in the response to the client.
SUNW.PCNFS.5.1.1 m \
           :SNadmfw="doppelbock pilsner": \
           :Pcnfsd=10.0.5.26 10.0.5.5 10.0.4.1: \
           :SNnfsRd=1024:SNnfsWr=8192: \
           :SNnfsTim=56:SNnfsTry=6: \
           :Impress=10.0.0.254:

# Set the locale. EST's offset is 18000 seconds. Note also the use
# of the SN_TZ (which will overwrite UTCoffst for SUNW.PCNFS.5.1.1 and
# SUNW.PCNFSPRO.1.1 clients).

Locale m \
           :UTCoffst=18000:SN_TZ="EST5EDT":

# Netbios node type is broadcast (1).
NetBIOS m \
           :NetBNms=10.0.5.1 10.0.4.1:NetBNdT=0x1: \
           :NetBDsts=10.0.5.5 10.0.5.6 10.0.4.2: \
           :NetBScop="NB.This.Is.A.Nis.DOMAIN":

# This macro includes the definitions for Locale and NetBIOS.
# Lease is renegotiable, and the maximum lease a client can request
# is 2 hours (7200 seconds)
#
# Note that this macro definition includes the SUNW.PCNFS.5.1.1 and
# SUNW.PCNFSPRO.1.1 Vendor symbol for SolarNet login script file name.
# Only those clients whose Client Class is SUNW.PCNFS.5.1.1 will see
# this value.
5netnis m \
           :Subnet=255.255.255.0:Router=10.0.5.26 10.0.5.27: \
           :Include=Locale:SNCpath="/opt/SUNWpcnet/1.5/site/pcnfs": \
           :SNCboot="boot.snc":SNCserv=10.0.5.26:Timeserv=10.0.5.5: \
           :NISdmain="This.Is.A.Nis.DOMAIN":NISservs=10.0.5.210: \
           :Message="NIS client, Welcome to the 5 net.": \
           :SiteTest=1.0.0.0:LeaseTim=7200:LeaseNeg:Include=NetBIOS: \
           :SNClogin="login.snc":

# This macro defines a short lease - only 5 minutes! Note the use
# of the pcnfsd vendor option here. Note also that the server will
# return the client's hostname by consulting the hosts database for
# the value.
15netnis m \
           :Subnet=255.255.255.0:Router=10.0.15.226: \
           :Include=Locale:SNCpath="/opt/solarnet":SNCboot="site.snc": \
           :SNCserv=10.0.15.226:Timeserv=10.0.5.5: \
           :NISdmain="Another.Nis.Domain.COM":NISservs=10.0.15.6: \
           :Message="NIS client, Welcome to the 15 net.": \
           :LeaseTim=300:LeaseNeg:Pcnfsd=10.0.15.226:Hostname:

5netdns m \
           :Subnet=255.255.255.0:Router=10.0.5.26 10.0.5.26: \
           :SNCserv=10.0.5.26:SNCpath="/opt/SUNWpcnet/site/pcnfs": \
           :SNCboot="boot.snc":Include=Locale:Timeserv=10.0.5.5: \
           :DNSdmain="East.Sun.COM":DNSserv=10.0.15.6 15.0.1.15: \
           :Message="DNS client, Welcome to the 5 net.":LeaseNeg:

# This macro is named by a client's client identifier. Its options
# will be combined with those of the Client Class macro
# and per network macro, if defined. Regardless of where this client
# boots, these options will follow it!
010800C0EE0E4C m \
           :Impress=10.0.20.55:

FILES

/var/dhcp/dhcptab
file or NIS+ table.

SEE ALSO

dhcpconfig(1M), dhtadm(1M), in.dhcpd(1M), dhcp_network(4)
Alexander, S., and R. Droms, DHCP Options and BOOTP Vendor Extensions, RFC 2132, Silicon Graphics, Inc., Bucknell University, March 1997.
Droms, R., Interoperation Between DHCP and BOOTP, RFC 1534, Bucknell University, October 1993.
Droms, R., Dynamic Host Configuration Protocol, RFC 2131, Bucknell University, March 1997.
Wimer, W., Clarifications and Extensions for the Bootstrap Protocol, RFC 1542, Carnegie Mellon University, October 1993.