with some modifications to the port itself and utilizing a patch from Brian Masney (http://www.newwave.net/~masneyb/) it is possible to use an LDAP backend to store the configuration for dhcpd, the different network and host entries. dynamic leases are also written to the LDAP backend. this is very useful in a dhcp failover environment, as it is no longer necessary to sync the dhcpd.conf file manually to the backup system if one has changed something on the dhcp master. two lookup methods are implemented. - static lookup: on dhcpd startup one LDAP lookup for all entries is done. no further lookups will be made. dhcpd must be restarted for every configuration change. - dynamic lookup: for every client request an LDAP lookup will be made. every configuration change kicks in when the next client request is recieved and the lookup is made. PR: ports/71030 Submitted by: Joerg Pulz <Joerg.Pulz@frm2.tum.de> Approved by: Cyrille Lefevre
45 lines
2.1 KiB
Text
45 lines
2.1 KiB
Text
**** To setup dhcpd, you may have to copy %%PREFIX%%/etc/dhcpd.conf.sample
|
|
to %%PREFIX%%/etc/dhcpd.conf for editing.
|
|
|
|
**** This port installs dhcp daemon, but don't invokes dhcpd by default. If
|
|
you want to invoke dhcpd at startup, put these lines into /etc/rc.conf.
|
|
|
|
dhcpd_enable="YES" # dhcpd enabled?
|
|
dhcpd_flags="-q" # command option(s)
|
|
dhcpd_conf="%%PREFIX%%/etc/dhcpd.conf" # configuration file
|
|
dhcpd_ifaces="" # ethernet interface(s)
|
|
dhcpd_withumask="022" # file creation mask
|
|
|
|
**** If compiled with paranoia support (the default), the following lines
|
|
are also supported:
|
|
|
|
dhcpd_chuser_enable="YES" # runs w/o privileges?
|
|
dhcpd_withuser="dhcpd" # user name to run as
|
|
dhcpd_withgroup="dhcpd" # group name to run as
|
|
dhcpd_chroot_enable="YES" # runs chrooted?
|
|
dhcpd_rootdir="/var/db/dhcpd" # directory to run in
|
|
dhcpd_flags="-early_chroot" # needs full root
|
|
|
|
WARNING: -early_chroot requires a jail(8) like environment to works.
|
|
|
|
**** If compiled with jail support (the default), the following lines are
|
|
also supported (-early_chroot and dhcpd_chroot_enable=YES are implied):
|
|
|
|
dhcpd_jail_enable="YES" # runs imprisoned?
|
|
dhcpd_hostname="<hostname>" # jail hostname
|
|
dhcpd_ipaddress="<ip address>" # jail ip address
|
|
|
|
WARNING: dhcpd_rootdir needs to point to a full jail(8) environment.
|
|
|
|
**** WARNING: never edit the chrooted or jailed dhcpd.conf file but
|
|
%%PREFIX%%/etc/dhcpd.conf instead which is always copied where
|
|
needed upon startup.
|
|
|
|
**** WARNING: %%PREFIX%%/etc/rc.isc-dhcpd.conf is obsolete. rc.conf like
|
|
variables are still read there but should be moved /etc/rc.conf or
|
|
/etc/rc.conf.d/dhcpd instead. Also, the dhcpd_options variable must
|
|
be renamed dhcpd_flags if any.
|
|
%%LDAP%%
|
|
%%LDAP%%**** You have requested support for the LDAP configuration backend.
|
|
%%LDAP%% The OpenLDAP schema file is installed as %%SCHEMA_DIR%%/dhcp.schema.
|
|
%%LDAP%% See %%DOCSDIR%%/README.ldap for further LDAP configuration details.
|