Technical article 110032

Documentation for dhcpd configuration under SCO OpenServer 5.0.5.

OpenServer 5.0.5

Written · Last revised

Problem

As described in ta110030, the manual page for configuring dhcp is not available in SCO OpenServer Enterprise System Release 5.0.5.

Solution

This problem has been resolved in SCO OpenServer Release 5.0.6.

For earlier releases, the following pages, from UnixWare 7, may be used to configure dhcpd and dhcpd.conf:

                            dhcpd(1Mtcp)
_________________________________________________________________
dhcpd -- Dynamic Host Configuration Protocol server
Synopsis

in.dhcpd [ -t timeout ] [ -D debug_level ] [ -b bootpd_port ]

Description

dhcpd implements a Dynamic Host Configuration Protocol (DHCP) server as defined in RFC 1534, RFC 1542, RFC 2131, and RFC 2132.

If there is no IP address specified for a DHCP client in the DHCP configuration file, dhcpd requests an address from the Address Allocation Server (assd) which allocates an address from a pool of addresses consistent with the client's subnet. The Address Allocation Server provides the same service to other daemons which need to assign temporary addresses.

dhcpd can be configured to run from inetd by including the following
line in the file /etc/inetd.conf:
bootps dgram/i udp wait root /etc/dhcpd  dhcpd
This mode of operation is referred to as ``inetd mode'' and causes
dhcpd to be started only when a DHCP request arrives. If it does not
receive another packet within fifteen minutes of the last one it
received, it will exit to conserve system resources. The -t option
controls this timeout (see ``Options'').
When running dhcpd and bootpd on the same host, dhcpd forwards BOOTP
packets to the port specified with the -b option. bootpd must be run
in "slave mode" (with the -S option). In this mode, bootpd listens on
an alternate port. The port ``bootps-alt'' is defined to be 950 in
/etc/services, but it can be anything less than 1024.

To run dhcpd and bootpd on the same host from inetd, use the following two lines in the file /etc/inetd.conf: bootps dgram/i udp wait root /etc/dhcpd -b bootps-alt bootps-alt dgram udp wait root /etc/bootpd bootpd -S

dhcpd can also uses BOOTP gateways (see bootpgw(1Mtcp)) to forward DHCP packets to DHCP clients on another subnet.

It is also possible to run dhcpd in ``standalone mode'' (without
inetd) by simply invoking it from a shell like any other regular
command. dhcpd automatically detects whether it was invoked from inetd
or from a shell and automatically selects the appropriate mode.
To run dhcpd and bootpd on the same host in ``standalone mode'', use
the following two commands:
/etc/dhcpd -b port
/etc/bootpd -S -P port

where port is the alternate port where bootpd is listening for BOOTP packets forwarded by dhcpd.

Options
-b bootpd_port
     Alternate port assigned to bootpd to listen for packets if both
     bootpd and dhcpd are running on the same host. bootpd   must be
     running in slave mode   (-S).
-D debug_level
     Sets the debug_level variable that controls the amount of
     debugging messages generated. For example, -D 1 will set the
     debugging level to 1. Recognized values are 0, 1, 2, and 3 or
     greater. Zero generates no messages and 1 to 3 generate
     increasing amounts of messages. Specifying an integer greater
     than 3 has the same result as specifying 3. If dhcpd is running
     in standalone mode and you specify 3 or greater, messages will
     be directed to standard error (not to syslog) and dhcpd does
     not go into the background.
-t timeout
     Specifies the timeout value (in minutes) that a dhcpd process
     will wait for a packet before exiting. If no packets are
     received for timeout minutes, then the program will exit. A
     timeout value of zero means ``run forever''. In standalone
     mode, this option is forced to zero.

dhcpd loads its database of known subnets, clients, classes and DHCP options from the default configuration file, /etc/inet/dhcpd.conf. The DHCP Configuration Manager does not support an alternate configuration database nor does it support an alternate location for this file.

Operation

When dhcpd starts, it reads a configuration database (/etc/dhcpd.conf) that contains known subnets, clients, classes and DHCP options, along with DHCP server parameters. It also records the modification time of the configuration database. dhcpd then listens for any packets sent to the bootps port.

When dhcpd receives a packet, it checks the modification time of the configuration file and reloads the database if necessary. It then constructs the set of parameters corresponding to the client from the DHCP configuration file and responds to the client.

During initialization, dhcpd determines the UDP port numbers to be used by calling getservbyname (see getservent(3N)) which normally reads /etc/services. Two service names (and port numbers) are used: bootps DHCP/BOOTP server listening port bootpc DHCP/BOOTP client destination port

If the port numbers cannot be determined using getservbyname, then the values default to bootps=67 and bootpc=68.

References
aasd(1Mtcp), bootpd(1Mtcp), dhcpd.conf(4tcp), inetd(1Mtcp)
Standards compliance
RFC 1534, RFC 1542, RFC 2131, RFC 2132
  _________________________________________________________________

UnixWare 7.0.1 Release -- September 11, 1998 1998 The Santa Cruz Operation, Inc. All rights reserved.

*********************************************************************
                          dhcpd.conf(4tcp)
_________________________________________________________________
dhcpd.conf -- DHCP configuration file format
Synopsis
# Option definitions -- must be defined before being used
[option [option_code] {
comment value
name string
type integer|binary|string [array]
max_val value
min_val value
}
...]
# Client definitions
[client opaque [client_identifier_object] {
comment value
ip_address value
# Option value assignments
[option value
...]
}
...]
[client [hardware_type] [hardware_address] {
comment value
ip_address value
# Option value assignments
[option value
...]
}
...]
# User class definitions
[user_class [user_class_string] {
comment value
# Option value assignments
[option value
...]
}
...]
# Vendor class definitions
[vendor_class [vendor_class_string] {
comment value
# Vendor-specific option definition
[option [option_code] {
comment value
name string
type integer|binary|string [array]
max_val value
min_val value
}
...]
# Option value assignments
[option value
...]
}
...]
# Subnet definitions
[subnet [subnet_IP_address] {
comment value
mask value
pool name
lease_dflt seconds
lease_max seconds
t1 value
t2 value
# Option value assignments
[option value
...]
}
...]
# Global option definitions
[global {
# Option value assignments
option value
...
}]
# Server options
[server {
aas_server IP_address
aas_password password
address_probe [true|false]
option_overload [true|false]
lease_res seconds
lease_pad value
}]
Description

The default configuration file for the DHCP server is /etc/inet/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 a number of ASCII characters which can include tabs or spaces.

Definition types

The various definition types shown in the ``Synopsis'' section have different sets of allowable parameters as described below. option [option_code] This entry allows you to define new global option types. Outside the scope of vendor class definitions, an option type with a given code may only be defined once in the file and it may not redefine an existing option. You can also define vendor-specific options within vendor class definitions. Such definitions may redefine existing options. (See the description of vendor_class.) Allowed keywords are:

     comment
            Defines a comment.
     name
            Identifies the option but it is not used by the DHCP
            server.
     type
            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.
client opaque [client_identifier_object]
client [hardware_type] [hardware_address]
     A client entry defines an individual client as described in RFC
     2131.
     If the opaque keyword is defined, 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.
     Allowed keywords are:
     comment
            Defines a comment.
     ip_address
            Defines 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.
     Option values   for a client can be assigned within the scope of
     the client definition.
user_class [user_class_string]
     This entry defines options for a particular user class.
     Allowed keywords are:

comment Defines a comment. Option values for a user class can be assigned within the scope of the user class definition. vendor_class [vendor_class_string] This entry defines options for a particular vendor class. The vendor-class string is specific to a given hardware vendor. Allowed keywords are:

comment Defines a comment. Vendor-specific options can be defined for each vendor class. These options can be defined for option codes 1-254 and take precedence over the standard options within the scope of the vendor class definition. Option values for a vendor class can be assigned within the scope of the vendor class definition. subnet [subnet_IP_address] This entry defines options for a particular subnet. Allowed keywords are:

comment Defines a comment. mask Defines the subnet netmask. pool Restricts the operation of the server to a specified pool of addresses. lease_dflt Defines the default lease period in days for the subnet. A value of infinite means that there is no limit. lease_max Defines the maximum lease period in days for the subnet. A value of infinite means that there is no limit. t1 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. t2 Defines the rebind time in units of 0.1%. Option values for a subnet can be assigned within the scope of the subnet definition. global This entry defines options for any address. Only one of these entries is allowed in the dhcpd.conf file. Global option values are assigned here. server This entry defines options that affect the operation of the DHCP server. Only one server entry is allowed in the dhcpd.conf file. Allowed keywords are:

aas_server Defines the IP address of the Address Allocation Server (AAS). aas_password Defines a password for the AAS server. A password must be defined if the AAS server is on a remote machine. option_overload Defines whether option overloading is allowed. If its value is non-zero, it is allowed. By default it is not allowed. lease_res Defines the initial lease reservation time in seconds. The default value is 180 seconds. lease_pad 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. address_probe Defines whether an address that is about to be allocated should be tested using ping. By default, this is enabled.

Options

Standard options supported by the DHCP server are defined in RFC 2132. Keywords for these options are defined in the file /etc/inet/dhcp.opts. User-defined options are also supported. These must be defined using the option entry type before they are referenced.

Files

/etc/dhcp.opts option identifier definitions /etc/dhcpd.conf default configuration file for the DHCP server

References
aasd.conf(4tcp), aasd(1Mtcp), dhcpd(1Mtcp)
RFC 2131, RFC 2132
  _________________________________________________________________

UnixWare 7.0.1 Release -- September 11, 1998 1998 The Santa Cruz Operation, Inc. All rights reserved.

From the Xinuos technical article database, record 110032. Reproduced with permission. The original is at www.sco.com/ta/110032, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.