man gendhcp (Commandes) - generate a DHCP bootstrap file from flat relational tables

NAME

gendhcp - generate a DHCP bootstrap file from flat relational tables

SYNOPSIS

gendhcp [ -d dbdirectory ] [ -k ] [ -v ]

DESCRIPTION

gendhcp is a back end to the updatehosts command. It should normally only be invoked from the updatehosts command.

gendhcp converts a set of flat (relational) files into a DHCP server bootstrap file. All input files are kept in the dbdirectory which can be specified by the -d command line option. The output file which is named dhcpd.conf is placed in the current directory. When run under updatehosts the current directory is normally /var/named and the input directory is normally /var/named/db. However, these defaults may be different depending upon the updatehosts configuration. See the updatehosts(1) manual page for details.

The -k option generates a bootstrap file so only known hosts (e.g. those with registered MAC layer addresses can bootstrap. This option is off by default which allows any host to boot. The -v option generates additional output on the progress of the bootstrap file generation.

Input File Formats

gendhcp uses readinfo to preprocess the input files. The format of each file consists of a set of records separated into fields. Care should be taken to insure the field names are not altered. Otherwise gendhcp will complain. Each fields attributes should be examined carefully when editing the input files. Each file used by gendhcp is described as follows:

main:
Contains information about each host. The fields from this file used by gendhcp are as follows:
host:
The domain name of the host.
ip:
The IP address of the host. This field may be set to "dynamic" to indicate this host will be given a dynamic IP address when it boots. If the IP address is a normal IP address then the DHCP configuration will use the static IP address indicated.
ether:
The hardware MAC address of the host. This must be present for statically configured hosts or for dynamic hosts when the -k flag is set.

subnet: Contains information about subnets used to generate the DHCP configuration files

subnet:
The subnet prefix in dotted decimal notation
mask:
The mask of the subnet in dotted-decimal
gateway:
The IP address of the default gateway for the subnet dns: The IP address of one or more DNS servers separated with commas.
domain:
The default domain.
time:
The IP address of one or more NTP timeserver separated with commas.
hardware:
The hardware type of the clients (defaults to ether).
dhcprange:
Range of IP addresses used for dynamic allocation of IP addresses.
maxdhcplease:
Maximum time in seconds before a DHCP lease expires.
dynamicbootp:
Allows dynamic BOOTP (defaults to no).

See also