dhcpd.conf(SFF)


dhcpd.conf -- DHCP configuration file format

Syntax

# Client entries

client opaque [client_identifier_object] {
comment value
ip_address value
[option
...]
}

client [hardware_type] [hardware_address] {
comment value
ip_address value
[option
...]
}

# User class entries

user_class [user_class_string] {
comment value
[option
...]
}

# Vendor class entries

vendor_class [vendor_class_string] {
comment value
[option
...]
}

# Subnet entries

subnet [subnet_IP_address] {
comment value
mask value
pool name
lease_dflt seconds
lease_max seconds
t1 value
t2 value
[option
...]
}

# Global entries

global {
option
...
}

# Option entries

option [option_code] {
comment value
name string
type integer|binary|string [array]
max_val value
min_val value
}

# Server entries

server {
aas_server IP_address
aas_password password
address_probe [0|1]
option_overload [0|1]
lease_res seconds
lease_pad value
}

Description

The default configuration file for the DHCP server is /etc/dhcpd.conf. It uses a text-based, line-oriented format, and contains one or more entries that contain settings for various parameters.

Each line of the DHCP configuration file must be no more than 1023 characters in length, including the newline character. There is no facility for line continuation.

Spaces or tabs are required between lexical elements, and may be used at the beginning and end of lines arbitrarily. Blank lines may appear anywhere.

Comments are denoted by a ``#'' preceded by a space or tab or the beginning of a line. Everything from the ``#'' to the end of the line is ignored.

Data types

All IP addresses can be specified as in ``dotted decimal'' notation or as a host name (which must be resolvable).

Integer values must be base decimal. Depending on the parameter, the value may be signed or unsigned, and may have range restrictions based on the size of the integer or other constraints.

String values must be specified as anumber of ASCII characters which can include tabs or spaces.

Entry types

The various entry types have different sets of allowable parameters as described below.

client opaque [client_identifier_object]

client [hardware_type] [hardware_address]
These entries define an individual client as described in RFC 1541.

If the opaque keyword is defined (for example, for a client with a PPP interface), the client identifier object is treated as an opaque object and is stored as a character string.

If opaque is not defined, a hardware type and a hardware address are expected. The hardware type is validated against the server's list of valid hardware types. If it does not match an existing hardware type, it will be added to the list if its value is numeric. If it does match an existing type, the length of the hardware address will be checked against the expected length for that hardware type.

The comment keyword may be specified to define a comment.

The ip_address keyword may be specified to define an IP address for a particular client. The address must not be included in any address pool. The address will be allocated with an infinite lease.

Options can also be defined.


user_class [user_class_string]
This entry defines options for a particular user class (code 77).

The format of the user class string is defined in the IETF draft draft-ietf-dhc-userclass-01.txt.

The comment keyword may be specified to define a comment.

Options can also be defined.


vendor_class [vendor_class_string]
This entry defines options for a particular vendor class (code 60). The vendor class string may be either a character or binary string as defined in RFC 1541.

The comment keyword may be specified to define a comment.

Vendor class options can also be defined.


subnet [subnet_IP_address]
This entry defines options for a particular subnet.

The comment keyword may be specified to define a comment.

The mask keyword allows the subnet netmask to be defined.

The pool keyword allows options to restricted to a specified pool of addresses.

The lease_dflt keyword allows the default lease to be defined for the subnet.

The lease_max keyword allows the maximum lease to be defined for the subnet.

The t1 keyword defines the lease renewal time in units of 0.1%. For example, a value of 500 indicates that the lease should be renewed after 50% of its lease had expired.

The t2 keyword defines the rebind time in units of 0.1%.

Options can also be defined here.


global
This entry defines options for any address. Only one of these entries is allowed in the dhcpd.conf file.

Only options can also be defined here.


option [option_code]
This entry allows you to define a new option type. A new option type may only be defined once in the file. The DHCP server will return a new option type as a vendor-specific option. The option code must be between the minimum and maximum values defined in RFC 2132.

The comment keyword may be specified to define a comment.

The name keyword can be used to identify the option but it is ignored by the DHCP server.

The type keyword specifies whether the option's value is integer, binary or string. The array modifier indicates that the option's value is an array.

For integer types, the min_val and max_val keywords can be used to specify the minimum and maximum values of the option's value.

For string and binary types, the max_length and max_length keywords can be used to specify the minimum and maximum length of the option's value. For array types, these keywords specify the minimum and maximum size of the array.


server
This entry defines options for the DHCP server. Only one of these entries is allowed in the dhcpd.conf file.

The aas_server keyword defines the address of an external Address Allocation Server (AAS).

The aas_password keyword defines a password for the AAS server. A password must be defined if the AAS server is on a remote machine.

The option_overload keyword defines whether option overloading is allowed. If its value is non-zero, it is allowed. By default it is not allowed.

The lease_res keyword defines the initial lease reservation time in seconds. The default value is 180 seconds.

The lease_pad keyword defines the lease padding. This is the amount of extra time the server allocates above the client lease time. It is defined in units of 0.1% of the client lease time. The default value of 10 adds 1% to the client lease time for the server lease time.

The address_probe keyword defines whether an address that is about to be allocated should be tested using ping. By default, this is enabled.

Files


/etc/dhcp.opts
option identifier definitions

See Also

aasd.conf(SFF), aasd(ADMN), dhcpd(ADMN)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005