83
9.4.1 Option statements
DHCP option statements always start with the
option
keyword, followed by an option name, followed
by option data. The option names and data formats are described below. It is not necessary to
exhaustively specify all DHCP options - only those options which are needed by clients must be
specified. Option data comes in a variety of formats, as follows:
The
ip-address
data type can be entered either as an explicit IP address (e.g., 239.254.197.10) or as a
domain name (e.g. haagen.isc.org). When entering a domain name, be sure that that domain name
resolves to a single IP address.
The
int32
data type specifies a signed 32-bit integer. The
uint32
data type specifies an unsigned 32-bit
integer. The
int16
and
uint16
data types specify signed and unsigned 16-bit integers. The
int8
and
uint8
data types specify signed and unsigned 8-bit integers. Unsigned 8-bit integers are also sometimes
referred to as octets.
The
string
data type specifies an NVT ASCII string, which must be enclosed in double quotes –for
example, to specify a domain-name option, the syntax would be
option domain-name "isc.org";
The
flag
data type specifies a Boolean value. Booleans may take the value 1 (true) or 0 (false).
The
data-string
data type specifies either an NVT ASCII string enclosed in double quotes, or a
series of octets specified in hexadecimal, separated by colons. For example:
option client-identifier "CLIENT-FOO";
option client-identifier 43:4c:49:45:54:2d:46:4f:4f;
The documentation for the various options mentioned below is taken from the latest IETF draft
document on DHCP options. Options which are not listed by name may be defined by the name
option-nnn
, where
nnn
is the decimal number of the option code. These options may be followed either
by a string, enclosed in quotes, or by a series of octets, expressed as two-digit hexadecimal numbers
separated by colons. For example:
option option-133 "my-option-133-text";
option option-129 1:54:c9:2b:47;
Because DHCP does not know the format of these undefined option codes, no checking is done to ensure
the correctness of the entered data.
9.4.2 Supported DHCP client options
The following section shows configuration options which the DHCP client can use to
configure the IP stack.
option subnet-mask
ip-addres
s;
The
subnet-mask
option specifies, or requests the server to supply, the client’s subnet mask.
option dhcp-lease-time
in
t;
This option can be used to request a specific lease duration by the client. The analogous option on
the server is
“max-lease-tim
e”. For example,
“send dhcp-lease-time 20
0” would set a client to request a
lease time of 200 seconds.
option dhcp-client-identifier
data-strin
g;
This option should be used to specify a client identifier in a host declaration, so that a DHCP server can
find the host record by matching against the client identifier. This option is required when attempting to
operate the DHCP client with a Microsoft DHCP server. In this case, the hardware address of the card
upon which DHCP is running must be sent to the server as the client-identifier. Otherwise, it is
recommended that every DHCP client has at least a unique identifier (this can be a MAC address, or a
text string such as a hostname)- otherwise the DHCP server may not function optimally.