0

When build DHCP from sources and trying to run the DHCP server, failing with ERROR. Any ideas what could the issue, something related how build from sources or something else is missing? No issues if install the DHCP Server from package(sudo apt-get install isc-dhcp-server).

ERROR:

Jun 09 20:02:16  dhcpd[1531]: Unknown command -user
Jun 09 20:02:16  dhcpd[1531]: Usage: dhcpd [-p <UDP port #>] [-f] [-d] [-q] [-t|-T]
                                                [-4|-6] [-cf config-file] [-lf lease-file]
                                                [-tf trace-output-file]
                                                [-play trace-input-file]
                                                [-pf pid-file] [--no-pid] [-s server]
                                                [if0 [...ifN]]
                                          dhcpd {--version|--help|-h}
Jun 09 20:02:16  dhcpd[1531]:
Jun 09 20:02:16  dhcpd[1531]: If you think you have received this message due to a bug rather
Jun 09 20:02:16  dhcpd[1531]: than a configuration issue please read the section on submitting
Jun 09 20:02:16  dhcpd[1531]: bugs on either our web page at www.isc.org or in the README file
Jun 09 20:02:16  dhcpd[1531]: before submitting a bug.  These pages explain the proper
Jun 09 20:02:16  dhcpd[1531]: process and the information we find helpful for debugging.
Jun 09 20:02:16  dhcpd[1531]:
Jun 09 20:02:16  dhcpd[1531]: exiting.

Details:

Ubuntu: 16.04.6 LTS (Xenial Xerus)

Script to build DHCP from sources:

#!/usr/bin/env bash

Define variable

DHCP_VER="v4_4_2"

Install libary for build DHCP server

sudo apt update && sudo apt -y full-upgrade sudo apt -y install libtool build-essential autoconf automake g++

Preparation

if ! [ -d ~/build ]; then mkdir ~/build fi

cd ~/build

git clone https://gitlab.isc.org/isc-projects/dhcp.git -b ${DHCP_VER}

cd ~/build/dhcp

autoreconf -i

CFLAGS="-D_PATH_DHCLIENT_SCRIPT='&quot;/sbin/dhclient-script&quot;'
-D_PATH_DHCPD_CONF='&quot;/etc/dhcp/dhcpd.conf&quot;'
-D_PATH_DHCLIENT_CONF='&quot;/etc/dhcp/dhclient.conf&quot;'"

./configure --prefix=/usr
--sysconfdir=/etc/dhcp
--localstatedir=/var
--with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases
--with-srv6-lease-file=/var/lib/dhcpd/dhcpd6.leases
--with-cli-lease-file=/var/lib/dhclient/dhclient.leases
--with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases

Make and install DHCP

make >make.out 2>&1 make install

exit 0

1 Answers1

0

Missing configuration property. Please add --enable-paranoia to the configure flags.

./configure --enable-paranoia
            --prefix=/usr                                           \
            --sysconfdir=/etc/dhcp                                  \
            --localstatedir=/var                                    \
            --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases        \
            --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases      \
            --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \
            --with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases