dhcpd-options(5) File Formats Manual dhcpd-options(5)
NAME
dhcp-options - Dynamic Host Configuration Protocol options
DESCRIPTION
The Dynamic Host Configuration protocol allows the client to receive options from the DHCP server describing the network configuration and
various services that are available on the network. When configuring dhcpd(8) or dhclient(8) , options must often be declared. The syn-
tax for declaring options, and the names and formats of the options that can be declared, are documented here.
REFERENCE
: 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 defined below:
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 text data type specifies an NVT ASCII string, which must be enclosed in double quotes - for example, to specify a root-path option, the
syntax would be
option root-path "10.0.1.4:/var/tmp/rootfs";
The domain-name data type specifies a domain name, which must not enclosed in double quotes. This data type is not used for any existing
DHCP options. The domain name is stored just as if it were a text option.
The flag data type specifies a boolean value. Booleans can be either true or false (or on or off, if that makes more sense to you).
The string data type specifies either an NVT ASCII string enclosed in double quotes, or a series of octets specified in hexadecimal, sepa-
rated by colons. For example:
option dhcp-client-identifier "CLIENT-FOO";
or
option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f;
SETTING OPTION VALUES USING EXPRESSIONS
Sometimes it's helpful to be able to set the value of a DHCP option based on some value that the client has sent. To do this, you can use
expression evaluation. The dhcp-eval(5) manual page describes how to write expressions. To assign the result of an evaluation to an
option, define the option as follows:
option my-option = expression ;
For example:
option hostname = binary-to-ascii (16, 8, "-",
substring (hardware, 1, 6));
STANDARD DHCP OPTIONS
The documentation for the various options mentioned below is taken from the latest IETF draft document on DHCP options. Options not listed
below may not yet be implemented, but it is possible to use such options by defining them in the configuration file. Please see the DEFIN-
ING NEW OPTIONS heading later in this document for more information.
Some of the options documented here are automatically generated by the DHCP server or by clients, and cannot be configured by the user.
The value of such an option can be used in the configuration file of the receiving DHCP protocol agent (server or client), for example in
conditional expressions. However, the value of the option cannot be used in the configuration file of the sending agent, because the value
is determined only after the configuration file has been processed. In the following documentation, such options will be shown as "not user
configurable"
The standard options are:
option all-subnets-local flag;
This option specifies whether or not the client may assume that all subnets of the IP network to which the client is connected use the
same MTU as the subnet of that network to which the client is directly connected. A value of true indicates that all subnets share the
same MTU. A value of false means that the client should assume that some subnets of the directly connected network may have smaller
MTUs.
option arp-cache-timeout uint32;
This option specifies the timeout in seconds for ARP cache entries.
option bootfile-name text;
This option is used to identify a bootstrap file. If supported by the client, it should have the same effect as the filename declara-
tion. BOOTP clients are unlikely to support this option. Some DHCP clients will support it, and others actually require it.
option boot-size uint16;
This option specifies the length in 512-octet blocks of the default boot image for the client.
option broadcast-address ip-address;
This option specifies the broadcast address in use on the client's subnet. Legal values for broadcast addresses are specified in section
3.2.1.3 of STD 3 (RFC1122).
option cookie-servers ip-address [, ip-address... ];
The cookie server option specifies a list of RFC 865 cookie servers available to the client. Servers should be listed in order of pref-
erence.
option default-ip-ttl uint8;
This option specifies the default time-to-live that the client should use on outgoing datagrams.
option default-tcp-ttl uint8;
This option specifies the default TTL that the client should use when sending TCP segments. The minimum value is 1.
option dhcp-client-identifier string;
This option can be used to specify a DHCP client identifier in a host declaration, so that dhcpd can find the host record by matching
against the client identifier.
Please be aware that some DHCP clients, when configured with client identifiers that are ASCII text, will prepend a zero to the ASCII
text. So you may need to write:
option dhcp-client-identifier "