Cannot get DHCP to work

Can you post the output of the following commands?

univention-ldapsearch -b cn=dhcp,$(ucr get ldap/base) -LLL
cat /etc/resolv.conf
cat /etc/dhcp/dhcpd.conf

The first command didn’t work for me. I tried it as you formatted:

Administrator@DC01:~$ univention-ldapsearch -b cn=dhcp,$(ucr get ldap/base) -LLL-bash: ucr: command not found
/etc/machine.secret: Permission denied

And with sudo:

Administrator@DC01:~$ sudo univention-ldapsearch -b cn=dhcp,$(ucr get ldap/base) -LLL
-bash: ucr: command not found
[sudo] password for Administrator: 
Invalid DN syntax (34)
Additional information: invalid DN

The resolv.conf outputs the correct info:

domain	mydomain.com
nameserver  <myIP>
options timeout:2

Contents of dhcpd.conf:

include "/etc/dhcp/univention.conf";
include "/etc/dhcp/local.conf";

option ldap-servers code 128 = array of ip-address;
option ldap-base code 129 = string;



ldap-server "DC01.mydomain.com";
ldap-dhcp-server-cn "DC01";
ldap-username "cn=DC01,cn=dc,cn=computers,dc=mydomain,dc=com";
ldap-password-file "/etc/machine.secret";
ldap-port 7389;
ldap-base-dn "cn=dhcp,dc=mydomain,dc=com";
ldap-method dynamic;
ldap-debug-file "/var/log/dhcp-ldap-startup.log";

# dynamic DNS: with external name server only!

Please try as user root (sudo bash).

Hi Gohmann

I found this thread which shows pretty much my current problem exactly, (it’s a shame that the original author didn’t follow up on it but I intend to do so)

Problem: dhcp client on test network (10.0.0.0/24) is not getting any dhcp config

background

  • setup: I configured dhcp service, server, subnet and pool but after pushing an ipconfig renew on client no dhcp config is received, the apipa config comes up instead. network consist of one switch that connects: one client, one wireless router with dhcp disabled on lan (10.0.0.1 with a wan connection) and univention server setup as dc, dhcp, dns and radius server. (10.0.0.2)

  • univention servier running: UCS: 4.3-1 errata145
    Installed: cups=2.2.1 dhcp-server=12.0 kde=5.8 letsencrypt=1.2.2-3 nagios=4.3 radius=5.0 samba4=4.7 squid=3.5 ucsschool=4.3 v4

  • Administrator@optiplexmint:~$ sudo tail /var/log/daemon.log

[sudo] password for Administrator: 
Jul  8 14:41:51 optiplexmint dhcpd[18755]: exiting.
Jul  8 14:41:58 optiplexmint dhcpd[18763]: Configuration file errors encountered -- exiting
Jul  8 14:41:58 optiplexmint dhcpd[18763]: 
Jul  8 14:41:58 optiplexmint dhcpd[18763]: If you think you have received this message due to a bug rather
Jul  8 14:41:58 optiplexmint dhcpd[18763]: than a configuration issue please read the section on submitting
Jul  8 14:41:58 optiplexmint dhcpd[18763]: bugs on either our web page at www.isc.org or in the README file 
  • Administrator@optiplexmint:~$ sudo systemctl status univention-dhcp.service
● univention-dhcp.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/univention-dhcp; generated; vendor preset: enabled)
   Active: active (exited) since Sun 2018-07-08 14:08:38 EDT; 35min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 12261 ExecStop=/etc/init.d/univention-dhcp stop (code=exited, status=0/SUCCESS)
  Process: 12272 ExecStart=/etc/init.d/univention-dhcp start (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   Memory: 0B
      CPU: 0
   CGroup: /system.slice/univention-dhcp.service
  • Administrator@optiplexmint:~$ sudo univention-check-join-status
    Joined successfully

  • Administrator@optiplexmint:~$ sudo cat /etc/dhcp/dhcpd.conf

[sudo] password for Administrator: 
# Warning: This file is auto-generated and might be overwritten by
#          univention-config-registry.
#          Please edit the following file(s) instead:
# Warnung: Diese Datei wurde automatisch generiert und kann durch
#          univention-config-registry ueberschrieben werden.
#          Bitte bearbeiten Sie an Stelle dessen die folgende(n) Datei(en):
# 
# 	/etc/univention/templates/files/etc/dhcp/dhcpd.conf
# 
include "/etc/dhcp/univention.conf";
include "/etc/dhcp/local.conf";
option ldap-servers code 128 = array of ip-address;
option ldap-base code 129 = string;
option wpad code 252 = text;
authoritative;
ldap-server "optiplexmint.fcortes.local";
ldap-dhcp-server-cn "optiplexmint";
ldap-username "cn=optiplexmint,cn=dc,cn=computers,dc=fcortes,dc=local";
ldap-password-file "/etc/machine.secret";
ldap-port 7389;
ldap-base-dn "cn=dhcp,ou=fcortesschool,dc=fcortes,dc=local";
ldap-method dynamic;
# ldap-debug-file "/var/log/dhcp-ldap-startup.log";
# dynamic DNS: with external name server only!
  • Administrator@optiplexmint:~$ cat /etc/resolv.conf
# Warning: This file is auto-generated and might be overwritten by
#          univention-config-registry.
#          Please edit the following file(s) instead:
# Warnung: Diese Datei wurde automatisch generiert und kann durch
#          univention-config-registry ueberschrieben werden.
#          Bitte bearbeiten Sie an Stelle dessen die folgende(n) Datei(en):
# 
# 	/etc/univention/templates/files/etc/resolv.conf
# 
domain	fcortes.local
nameserver  10.0.0.2
options timeout:2
  • root@optiplexmint:/home/Administrator# univention-ldapsearch -b cn=dhcp,$(ucr get ldap/base) -LLL
dn: cn=dhcp,dc=fcortes,dc=local
objectClass: organizationalRole
objectClass: univentionObject
univentionObjectType: container/cn
description: Containing all DHCP Objects as per default Settings
cn: dhcp
dn: cn=localdhcp,cn=dhcp,dc=fcortes,dc=local
univentionObjectType: dhcp/service
cn: localdhcp
objectClass: top
objectClass: univentionDhcpService
objectClass: univentionObject
objectClass: univentionPolicyReference
univentionPolicyReference: cn=DHCPallowPolicy,cn=scope,cn=dhcp,cn=policies,dc=
 fcortes,dc=local
univentionPolicyReference: cn=default-settings,cn=dns,cn=dhcp,cn=policies,dc=f
 cortes,dc=local
univentionPolicyReference: cn=default-settings,cn=routing,cn=dhcp,cn=policies,
 dc=fcortes,dc=local
univentionPolicyReference: cn=default_10.0.0.0-24,cn=leasetime,cn=dhcp,cn=poli
 cies,dc=fcortes,dc=local
dn: cn=10.0.0.0,cn=localdhcp,cn=dhcp,dc=fcortes,dc=local
cn: 10.0.0.0
univentionObjectType: dhcp/subnet
dhcpRange: 10.0.0.10 10.0.0.254
dhcpNetMask: 24
univentionDhcpBroadcastAddress: 10.0.0.255
univentionPolicyReference: cn=default-settings,cn=dns,cn=dhcp,cn=policies,dc=f
 cortes,dc=local
univentionPolicyReference: cn=default-settings,cn=routing,cn=dhcp,cn=policies,
 dc=fcortes,dc=local
univentionPolicyReference: cn=default_10.0.0.0-24,cn=leasetime,cn=dhcp,cn=poli
 cies,dc=fcortes,dc=local
objectClass: top
objectClass: univentionDhcpSubnet
objectClass: univentionObject
objectClass: univentionPolicyReference
dn: cn=optiplexmint,cn=localdhcp,cn=dhcp,dc=fcortes,dc=local
objectClass: top
objectClass: univentionObject
objectClass: dhcpServer
dhcpServiceDN: cn=localdhcp,cn=dhcp,dc=fcortes,dc=local
univentionObjectType: dhcp/server
cn: optiplexmint
dn: cn=localpool,cn=10.0.0.0,cn=localdhcp,cn=dhcp,dc=fcortes,dc=local
univentionObjectType: dhcp/pool
cn: localpool
dhcpRange: 10.0.0.10 10.0.0.254
univentionPolicyReference: cn=default-settings,cn=dns,cn=dhcp,cn=policies,dc=f
 cortes,dc=local
univentionPolicyReference: cn=default-settings,cn=routing,cn=dhcp,cn=policies,
 dc=fcortes,dc=local
univentionPolicyReference: cn=default_10.0.0.0-24,cn=leasetime,cn=dhcp,cn=poli
 cies,dc=fcortes,dc=local
objectClass: top
objectClass: univentionDhcpPool
objectClass: univentionObject
objectClass: univentionPolicyReference
dhcpPermitList: allow known clients
dhcpPermitList: allow all clients
dhcpPermitList: allow unknown clients
dhcpPermitList: allow dynamic bootp clients

Any ideas what could be the problem or the misconfig?

Well, you skipped the most interesting part of the log.

If this is really the same issue (well, symptons are identical: dhcpd does not start; but there could be completely different reasons for not starting) post some more lines of the log (from start to fail of dhcp).

Let us know what happens.

/KNEBB

Hi knebb

thank you for getting back, my apologies if I miss something important

Here are a few more details, hopefully everthing that you need.

  1. I was under the impression that dhcp was up an running because the status said “active” but it turns out that :Active (exited)" which is what I got might mean something different from “up and running” as per: https://unix.stackexchange.com/questions/241970/what-does-status-active-exited-mean-for-a-custom-service

  2. I took a peek at the systems services in the gui console and it shows stopped and I can’t get it up and running: https://prnt.sc/k4gcki

  3. as suggested by GrandJean, I went into the config file uncommented, restarted the service and here’s what the log file that refer in the line shows:

Administrator@optiplexmint:~$ sudo nano /etc/dhcp/dhcpd.conf
Administrator@optiplexmint:~$ sudo systemctl restart univention-dhcp.service
Administrator@optiplexmint:~$ sudo cat /var/log/dhcp-ldap-startup.log
#DHCP Service
 option domain-name "fcortes.local";
option domain-name-servers 10.0.0.2;
option wpad "http://optiplexmint.fcortes.local/proxy.pac";
Administrator@optiplexmint:~$ sudo systemctl status univention-dhcp.service
● univention-dhcp.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/univention-dhcp; generated; vendor preset: enable
   Active: active (exited) since Mon 2018-07-09 15:59:44 EDT; 1min 30s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6087 ExecStop=/etc/init.d/univention-dhcp stop (code=exited, status=0
  Process: 6097 ExecStart=/etc/init.d/univention-dhcp start (code=exited, status
      CPU: 150ms
Jul 09 15:59:44 optiplexmint dhcpd[6105]: Internet Systems Consortium DHCP Serve
Jul 09 15:59:44 optiplexmint dhcpd[6105]: Copyright 2004-2016 Internet Systems C
Jul 09 15:59:44 optiplexmint dhcpd[6105]: All rights reserved.
Jul 09 15:59:44 optiplexmint dhcpd[6105]: For info, please visit https://www.isc
Jul 09 15:59:44 optiplexmint dhcpd[6105]: Config file: /etc/dhcp/dhcpd.conf
Jul 09 15:59:44 optiplexmint dhcpd[6105]: Database file: /var/lib/dhcp/dhcpd.lea
Jul 09 15:59:44 optiplexmint dhcpd[6105]: PID file: /var/run/dhcpd.pid
Jul 09 15:59:44 optiplexmint univention-dhcp[6097]: Starting DHCP server: dhcpdo
Jul 09 15:59:44 optiplexmint univention-dhcp[6097]: .
Jul 09 15:59:44 optiplexmint systemd[1]: Started LSB: DHCP server.
lines 1-18/18 (END)
  1. contents of /etc/dhcp/dhcpd.conf:
Administrator@optiplexmint:~$ cat /etc/dhcp/dhcpd.conf
# Warning: This file is auto-generated and might be overwritten by
#          univention-config-registry.
#          Please edit the following file(s) instead:
# Warnung: Diese Datei wurde automatisch generiert und kann durch
#          univention-config-registry ueberschrieben werden.
#          Bitte bearbeiten Sie an Stelle dessen die folgende(n) Datei(en):
# 
# 	/etc/univention/templates/files/etc/dhcp/dhcpd.conf
# 
include "/etc/dhcp/univention.conf";
include "/etc/dhcp/local.conf";
option ldap-servers code 128 = array of ip-address;
option ldap-base code 129 = string;
option wpad code 252 = text;
authoritative;
ldap-server "optiplexmint.fcortes.local";
ldap-dhcp-server-cn "optiplexmint";
ldap-username "cn=optiplexmint,cn=dc,cn=computers,dc=fcortes,dc=local";
ldap-password-file "/etc/machine.secret";
ldap-port 7389;
ldap-base-dn "cn=dhcp,ou=fcortesschool,dc=fcortes,dc=local";
ldap-method dynamic;
ldap-debug-file "/var/log/dhcp-ldap-startup.log";
# dynamic DNS: with external name server only!
Administrator@optiplexmint:~$
  1. contents of last 100 lines on /var/log/daemon.log seem to have a few repetitive messages for dhcp involving 3 interfaces on my test system of which 1 I have no clue where it comes from (docker0 (172.17.42.1)) one I opted not to use but it’s installed on my test server (enp4s8) and the nic that I’m using which is enp2s0 (10.0.0.2). I’m not sure how to write "subnet declaration
    in my dhcpd.conf file for the network segment. but I do have a subnet and a pool as per you guys’ manual. https://prnt.sc/k4gorj
Administrator@optiplexmint:~$ sudo tail -n 100 /var/log/daemon.log
Jul  9 16:16:31 optiplexmint dhcpd[8631]: before submitting a bug.  These pages explain the proper
Jul  9 16:16:31 optiplexmint dhcpd[8631]: process and the information we find helpful for debugging..
Jul  9 16:16:31 optiplexmint dhcpd[8631]: 
Jul  9 16:16:31 optiplexmint dhcpd[8631]: exiting.
Jul  9 16:16:36 optiplexmint dhcpd[8638]: Wrote 0 leases to leases file.
Jul  9 16:16:36 optiplexmint dhcpd[8638]: 
Jul  9 16:16:36 optiplexmint dhcpd[8638]: No subnet declaration for docker0 (172.17.42.1).
Jul  9 16:16:36 optiplexmint dhcpd[8638]: ** Ignoring requests on docker0.  If this is not what
Jul  9 16:16:36 optiplexmint dhcpd[8638]:    you want, please write a subnet declaration
Jul  9 16:16:36 optiplexmint dhcpd[8638]:    in your dhcpd.conf file for the network segment
Jul  9 16:16:36 optiplexmint dhcpd[8638]:    to which interface docker0 is attached. **
Jul  9 16:16:36 optiplexmint dhcpd[8638]: 
Jul  9 16:16:36 optiplexmint dhcpd[8638]: 
Jul  9 16:16:36 optiplexmint dhcpd[8638]: No subnet declaration for enp2s0 (10.0.0.2).
Jul  9 16:16:36 optiplexmint dhcpd[8638]: ** Ignoring requests on enp2s0.  If this is not what
Jul  9 16:16:36 optiplexmint dhcpd[8638]:    you want, please write a subnet declaration
Jul  9 16:16:36 optiplexmint dhcpd[8638]:    in your dhcpd.conf file for the network segment
Jul  9 16:16:36 optiplexmint dhcpd[8638]:    to which interface enp2s0 is attached. **
Jul  9 16:16:36 optiplexmint dhcpd[8638]: 
Jul  9 16:16:36 optiplexmint dhcpd[8638]: 
Jul  9 16:16:36 optiplexmint dhcpd[8638]: No subnet declaration for enp4s8 (no IPv4 addresses).
Jul  9 16:16:36 optiplexmint dhcpd[8638]: ** Ignoring requests on enp4s8.  If this is not what
Jul  9 16:16:36 optiplexmint dhcpd[8638]:    you want, please write a subnet declaration
Jul  9 16:16:36 optiplexmint dhcpd[8638]:    in your dhcpd.conf file for the network segment
Jul  9 16:16:36 optiplexmint dhcpd[8638]:    to which interface enp4s8 is attached. **
Jul  9 16:16:36 optiplexmint dhcpd[8638]: 
Jul  9 16:16:36 optiplexmint dhcpd[8638]: 
Jul  9 16:16:36 optiplexmint dhcpd[8638]: Not configured to listen on any interfaces!
Jul  9 16:16:36 optiplexmint dhcpd[8638]: 
Jul  9 16:16:36 optiplexmint dhcpd[8638]: If you think you have received this message due to a bug rather
Jul  9 16:16:36 optiplexmint dhcpd[8638]: than a configuration issue please read the section on submitting
Jul  9 16:16:36 optiplexmint dhcpd[8638]: bugs on either our web page at www.isc.org or in the README file
Jul  9 16:16:36 optiplexmint dhcpd[8638]: before submitting a bug.  These pages explain the proper
Jul  9 16:16:36 optiplexmint dhcpd[8638]: process and the information we find helpful for debugging..
Jul  9 16:16:36 optiplexmint dhcpd[8638]: 
Jul  9 16:16:36 optiplexmint dhcpd[8638]: exiting.
Jul  9 16:16:42 optiplexmint dhcpd[8644]: Wrote 0 leases to leases file.
Jul  9 16:16:42 optiplexmint dhcpd[8644]: 
Jul  9 16:16:42 optiplexmint dhcpd[8644]: No subnet declaration for docker0 (172.17.42.1).
Jul  9 16:16:42 optiplexmint dhcpd[8644]: ** Ignoring requests on docker0.  If this is not what
Jul  9 16:16:42 optiplexmint dhcpd[8644]:    you want, please write a subnet declaration
Jul  9 16:16:42 optiplexmint dhcpd[8644]:    in your dhcpd.conf file for the network segment
Jul  9 16:16:42 optiplexmint dhcpd[8644]:    to which interface docker0 is attached. **
Jul  9 16:16:42 optiplexmint dhcpd[8644]: 
Jul  9 16:16:42 optiplexmint dhcpd[8644]: 
Jul  9 16:16:42 optiplexmint dhcpd[8644]: No subnet declaration for enp2s0 (10.0.0.2).
Jul  9 16:16:42 optiplexmint dhcpd[8644]: ** Ignoring requests on enp2s0.  If this is not what
Jul  9 16:16:42 optiplexmint dhcpd[8644]:    you want, please write a subnet declaration
Jul  9 16:16:42 optiplexmint dhcpd[8644]:    in your dhcpd.conf file for the network segment
Jul  9 16:16:42 optiplexmint dhcpd[8644]:    to which interface enp2s0 is attached. **
Jul  9 16:16:42 optiplexmint dhcpd[8644]: 
Jul  9 16:16:42 optiplexmint dhcpd[8644]: 
Jul  9 16:16:42 optiplexmint dhcpd[8644]: No subnet declaration for enp4s8 (no IPv4 addresses).
Jul  9 16:16:42 optiplexmint dhcpd[8644]: ** Ignoring requests on enp4s8.  If this is not what
Jul  9 16:16:42 optiplexmint dhcpd[8644]:    you want, please write a subnet declaration
Jul  9 16:16:42 optiplexmint dhcpd[8644]:    in your dhcpd.conf file for the network segment
Jul  9 16:16:42 optiplexmint dhcpd[8644]:    to which interface enp4s8 is attached. **
Jul  9 16:16:42 optiplexmint dhcpd[8644]: 
Jul  9 16:16:42 optiplexmint dhcpd[8644]: 
Jul  9 16:16:42 optiplexmint dhcpd[8644]: Not configured to listen on any interfaces!
Jul  9 16:16:42 optiplexmint dhcpd[8644]: 
Jul  9 16:16:42 optiplexmint dhcpd[8644]: If you think you have received this message due to a bug rather
Jul  9 16:16:42 optiplexmint dhcpd[8644]: than a configuration issue please read the section on submitting
Jul  9 16:16:42 optiplexmint dhcpd[8644]: bugs on either our web page at www.isc.org or in the README file
Jul  9 16:16:42 optiplexmint dhcpd[8644]: before submitting a bug.  These pages explain the proper
Jul  9 16:16:42 optiplexmint dhcpd[8644]: process and the information we find helpful for debugging..
Jul  9 16:16:42 optiplexmint dhcpd[8644]: 
Jul  9 16:16:42 optiplexmint dhcpd[8644]: exiting.
Jul  9 16:16:47 optiplexmint dhcpd[8663]: Wrote 0 leases to leases file.
Jul  9 16:16:47 optiplexmint dhcpd[8663]: 
Jul  9 16:16:47 optiplexmint dhcpd[8663]: No subnet declaration for docker0 (172.17.42.1).
Jul  9 16:16:47 optiplexmint dhcpd[8663]: ** Ignoring requests on docker0.  If this is not what
Jul  9 16:16:47 optiplexmint dhcpd[8663]:    you want, please write a subnet declaration
Jul  9 16:16:47 optiplexmint dhcpd[8663]:    in your dhcpd.conf file for the network segment
Jul  9 16:16:47 optiplexmint dhcpd[8663]:    to which interface docker0 is attached. **
Jul  9 16:16:47 optiplexmint dhcpd[8663]: 
Jul  9 16:16:47 optiplexmint dhcpd[8663]: 
Jul  9 16:16:47 optiplexmint dhcpd[8663]: No subnet declaration for enp2s0 (10.0.0.2).
Jul  9 16:16:47 optiplexmint dhcpd[8663]: ** Ignoring requests on enp2s0.  If this is not what
Jul  9 16:16:47 optiplexmint dhcpd[8663]:    you want, please write a subnet declaration
Jul  9 16:16:47 optiplexmint dhcpd[8663]:    in your dhcpd.conf file for the network segment
Jul  9 16:16:47 optiplexmint dhcpd[8663]:    to which interface enp2s0 is attached. **
Jul  9 16:16:47 optiplexmint dhcpd[8663]: 
Jul  9 16:16:47 optiplexmint dhcpd[8663]: 
Jul  9 16:16:47 optiplexmint dhcpd[8663]: No subnet declaration for enp4s8 (no IPv4 addresses).
Jul  9 16:16:47 optiplexmint dhcpd[8663]: ** Ignoring requests on enp4s8.  If this is not what
Jul  9 16:16:47 optiplexmint dhcpd[8663]:    you want, please write a subnet declaration
Jul  9 16:16:47 optiplexmint dhcpd[8663]:    in your dhcpd.conf file for the network segment
Jul  9 16:16:47 optiplexmint dhcpd[8663]:    to which interface enp4s8 is attached. **
Jul  9 16:16:47 optiplexmint dhcpd[8663]: 
Jul  9 16:16:47 optiplexmint dhcpd[8663]: 
Jul  9 16:16:47 optiplexmint dhcpd[8663]: Not configured to listen on any interfaces!
Jul  9 16:16:47 optiplexmint dhcpd[8663]: 
Jul  9 16:16:47 optiplexmint dhcpd[8663]: If you think you have received this message due to a bug rather
Jul  9 16:16:47 optiplexmint dhcpd[8663]: than a configuration issue please read the section on submitting
Jul  9 16:16:47 optiplexmint dhcpd[8663]: bugs on either our web page at www.isc.org or in the README file
Jul  9 16:16:47 optiplexmint dhcpd[8663]: before submitting a bug.  These pages explain the proper
Jul  9 16:16:47 optiplexmint dhcpd[8663]: process and the information we find helpful for debugging..
Jul  9 16:16:47 optiplexmint dhcpd[8663]: 
Jul  9 16:16:47 optiplexmint dhcpd[8663]: exiting.

If anything else is needed please let me know

and thank you in advance.

That’s the point.

The daemon is running fine but is not properly configured.

On the Web-GUI (UMC) make sure:

  • Open the DHCP module (blue)
  • On the left patz select the service (should be one)
  • Check then on the right if you have configured a subnet where the dhcp server resides
  • Check if you have added a DHCP-server named as your server

Should look like this:
1

Once properly configured it should run smoothly.

/KNEBB

Hi knebb

Again, thank you for the reply and your patience.

I made a couple of changes

  1. I removed the dhcp service that was created when I installed UCS@School as you said it should be one service there.

  2. within the only dhcp service left called “localdhcp”, I change my subnet range to include the server’s ip 10.0.0.2 (so I set it to be from 10.0.0.1 to 10.0.0.254 and bc: 10.0.0.255 (subnet is 10.0.0.0 / 24) I had it before from 10.0.0.10 just as my pool.

  3. I restarted the service but there’s still something off as I still get the service status as “active (exited)”, the log now shows a different issue, though:

Administrator@optiplexmint:~$ sudo tail -n 100 /var/log/daemon.log
Jul 10 17:49:17 optiplexmint dhcpd[19669]: Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=optiplexmint))
Jul 10 17:49:17 optiplexmint dhcpd[19669]: Configuration file errors encountered -- exiting
Jul 10 17:49:17 optiplexmint dhcpd[19669]: 
Jul 10 17:49:17 optiplexmint dhcpd[19669]: If you think you have received this message due to a bug rather
Jul 10 17:49:17 optiplexmint dhcpd[19669]: than a configuration issue please read the section on submitting
Jul 10 17:49:17 optiplexmint dhcpd[19669]: bugs on either our web page at www.isc.org or in the README file
Jul 10 17:49:17 optiplexmint dhcpd[19669]: before submitting a bug.  These pages explain the proper
Jul 10 17:49:17 optiplexmint dhcpd[19669]: process and the information we find helpful for debugging..
Jul 10 17:49:17 optiplexmint dhcpd[19669]: 
Jul 10 17:49:17 optiplexmint dhcpd[19669]: exiting.
Jul 10 17:49:22 optiplexmint dhcpd[19675]: Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=optiplexmint))
Jul 10 17:49:22 optiplexmint dhcpd[19675]: Configuration file errors encountered -- exiting
Jul 10 17:49:22 optiplexmint dhcpd[19675]: 
Jul 10 17:49:22 optiplexmint dhcpd[19675]: If you think you have received this message due to a bug rather
Jul 10 17:49:22 optiplexmint dhcpd[19675]: than a configuration issue please read the section on submitting
Jul 10 17:49:22 optiplexmint dhcpd[19675]: bugs on either our web page at www.isc.org or in the README file
Jul 10 17:49:22 optiplexmint dhcpd[19675]: before submitting a bug.  These pages explain the proper
Jul 10 17:49:22 optiplexmint dhcpd[19675]: process and the information we find helpful for debugging..
Jul 10 17:49:22 optiplexmint dhcpd[19675]: 
Jul 10 17:49:22 optiplexmint dhcpd[19675]: exiting.
Jul 10 17:49:27 optiplexmint dhcpd[19681]: Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=optiplexmint))
Jul 10 17:49:27 optiplexmint dhcpd[19681]: Configuration file errors encountered -- exiting
Jul 10 17:49:27 optiplexmint dhcpd[19681]: 
Jul 10 17:49:27 optiplexmint dhcpd[19681]: If you think you have received this message due to a bug rather
Jul 10 17:49:27 optiplexmint dhcpd[19681]: than a configuration issue please read the section on submitting
Jul 10 17:49:27 optiplexmint dhcpd[19681]: bugs on either our web page at www.isc.org or in the README file
Jul 10 17:49:27 optiplexmint dhcpd[19681]: before submitting a bug.  These pages explain the proper
Jul 10 17:49:27 optiplexmint dhcpd[19681]: process and the information we find helpful for debugging..
Jul 10 17:49:27 optiplexmint dhcpd[19681]: 
Jul 10 17:49:27 optiplexmint dhcpd[19681]: exiting.
Jul 10 17:49:32 optiplexmint dhcpd[19687]: Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=optiplexmint))
Jul 10 17:49:32 optiplexmint dhcpd[19687]: Configuration file errors encountered -- exiting
Jul 10 17:49:32 optiplexmint dhcpd[19687]: 
Jul 10 17:49:32 optiplexmint dhcpd[19687]: If you think you have received this message due to a bug rather
Jul 10 17:49:32 optiplexmint dhcpd[19687]: than a configuration issue please read the section on submitting
Jul 10 17:49:32 optiplexmint dhcpd[19687]: bugs on either our web page at www.isc.org or in the README file
Jul 10 17:49:32 optiplexmint dhcpd[19687]: before submitting a bug.  These pages explain the proper
Jul 10 17:49:32 optiplexmint dhcpd[19687]: process and the information we find helpful for debugging..
Jul 10 17:49:32 optiplexmint dhcpd[19687]: 
Jul 10 17:49:32 optiplexmint dhcpd[19687]: exiting.
Jul 10 17:49:37 optiplexmint dhcpd[19694]: Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=optiplexmint))
Jul 10 17:49:37 optiplexmint dhcpd[19694]: Configuration file errors encountered -- exiting
Jul 10 17:49:37 optiplexmint dhcpd[19694]: 
Jul 10 17:49:37 optiplexmint dhcpd[19694]: If you think you have received this message due to a bug rather
Jul 10 17:49:37 optiplexmint dhcpd[19694]: than a configuration issue please read the section on submitting
Jul 10 17:49:37 optiplexmint dhcpd[19694]: bugs on either our web page at www.isc.org or in the README file
Jul 10 17:49:37 optiplexmint dhcpd[19694]: before submitting a bug.  These pages explain the proper
Jul 10 17:49:37 optiplexmint dhcpd[19694]: process and the information we find helpful for debugging..
Jul 10 17:49:37 optiplexmint dhcpd[19694]: 
Jul 10 17:49:37 optiplexmint dhcpd[19694]: exiting.
Jul 10 17:49:42 optiplexmint dhcpd[19700]: Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=optiplexmint))
Jul 10 17:49:42 optiplexmint dhcpd[19700]: Configuration file errors encountered -- exiting
Jul 10 17:49:42 optiplexmint dhcpd[19700]: 
Jul 10 17:49:42 optiplexmint dhcpd[19700]: If you think you have received this message due to a bug rather
Jul 10 17:49:42 optiplexmint dhcpd[19700]: than a configuration issue please read the section on submitting
Jul 10 17:49:42 optiplexmint dhcpd[19700]: bugs on either our web page at www.isc.org or in the README file
Jul 10 17:49:42 optiplexmint dhcpd[19700]: before submitting a bug.  These pages explain the proper
Jul 10 17:49:42 optiplexmint dhcpd[19700]: process and the information we find helpful for debugging..
Jul 10 17:49:42 optiplexmint dhcpd[19700]: 
Jul 10 17:49:42 optiplexmint dhcpd[19700]: exiting.
Jul 10 17:49:48 optiplexmint dhcpd[19706]: Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=optiplexmint))
Jul 10 17:49:48 optiplexmint dhcpd[19706]: Configuration file errors encountered -- exiting
Jul 10 17:49:48 optiplexmint dhcpd[19706]: 
Jul 10 17:49:48 optiplexmint dhcpd[19706]: If you think you have received this message due to a bug rather
Jul 10 17:49:48 optiplexmint dhcpd[19706]: than a configuration issue please read the section on submitting
Jul 10 17:49:48 optiplexmint dhcpd[19706]: bugs on either our web page at www.isc.org or in the README file
Jul 10 17:49:48 optiplexmint dhcpd[19706]: before submitting a bug.  These pages explain the proper
Jul 10 17:49:48 optiplexmint dhcpd[19706]: process and the information we find helpful for debugging..
Jul 10 17:49:48 optiplexmint dhcpd[19706]: 
Jul 10 17:49:48 optiplexmint dhcpd[19706]: exiting.
Jul 10 17:49:53 optiplexmint dhcpd[19723]: Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=optiplexmint))
Jul 10 17:49:53 optiplexmint dhcpd[19723]: Configuration file errors encountered -- exiting
Jul 10 17:49:53 optiplexmint dhcpd[19723]: 
Jul 10 17:49:53 optiplexmint dhcpd[19723]: If you think you have received this message due to a bug rather
Jul 10 17:49:53 optiplexmint dhcpd[19723]: than a configuration issue please read the section on submitting
Jul 10 17:49:53 optiplexmint dhcpd[19723]: bugs on either our web page at www.isc.org or in the README file
Jul 10 17:49:53 optiplexmint dhcpd[19723]: before submitting a bug.  These pages explain the proper
Jul 10 17:49:53 optiplexmint dhcpd[19723]: process and the information we find helpful for debugging..
Jul 10 17:49:53 optiplexmint dhcpd[19723]: 
Jul 10 17:49:53 optiplexmint dhcpd[19723]: exiting.
Jul 10 17:49:58 optiplexmint dhcpd[19729]: Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=optiplexmint))
Jul 10 17:49:58 optiplexmint dhcpd[19729]: Configuration file errors encountered -- exiting
Jul 10 17:49:58 optiplexmint dhcpd[19729]: 
Jul 10 17:49:58 optiplexmint dhcpd[19729]: If you think you have received this message due to a bug rather
Jul 10 17:49:58 optiplexmint dhcpd[19729]: than a configuration issue please read the section on submitting
Jul 10 17:49:58 optiplexmint dhcpd[19729]: bugs on either our web page at www.isc.org or in the README file
Jul 10 17:49:58 optiplexmint dhcpd[19729]: before submitting a bug.  These pages explain the proper
Jul 10 17:49:58 optiplexmint dhcpd[19729]: process and the information we find helpful for debugging..
Jul 10 17:49:58 optiplexmint dhcpd[19729]: 
Jul 10 17:49:58 optiplexmint dhcpd[19729]: exiting.
Jul 10 17:50:03 optiplexmint dhcpd[19757]: Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=optiplexmint))
Jul 10 17:50:03 optiplexmint dhcpd[19757]: Configuration file errors encountered -- exiting
Jul 10 17:50:03 optiplexmint dhcpd[19757]: 
Jul 10 17:50:03 optiplexmint dhcpd[19757]: If you think you have received this message due to a bug rather
Jul 10 17:50:03 optiplexmint dhcpd[19757]: than a configuration issue please read the section on submitting
Jul 10 17:50:03 optiplexmint dhcpd[19757]: bugs on either our web page at www.isc.org or in the README file
Jul 10 17:50:03 optiplexmint dhcpd[19757]: before submitting a bug.  These pages explain the proper
Jul 10 17:50:03 optiplexmint dhcpd[19757]: process and the information we find helpful for debugging..
Jul 10 17:50:03 optiplexmint dhcpd[19757]: 
Jul 10 17:50:03 optiplexmint dhcpd[19757]: exiting.
Administrator@optiplexmint:~$ 

Hope I’m getting close

images:

service > subnet and server:

subnet:

subnet > pool:

waiting anxiously for your feedback

my dhcp.conf

# Warning: This file is auto-generated and might be overwritten by
#          univention-config-registry.
#          Please edit the following file(s) instead:
# Warnung: Diese Datei wurde automatisch generiert und kann durch
#          univention-config-registry ueberschrieben werden.
#          Bitte bearbeiten Sie an Stelle dessen die folgende(n) Datei(en):'
#
#       /etc/univention/templates/files/etc/dhcp/dhcpd.conf
#
include "/etc/dhcp/univention.conf";
include "/etc/dhcp/local.conf";
option ldap-servers code 128 = array of ip-address;
option ldap-base code 129 = string;
option wpad code 252 = text;
authoritative;
ldap-server "optiplexmint.fcortes.local";
ldap-dhcp-server-cn "optiplexmint";
ldap-username "cn=optiplexmint,cn=dc,cn=computers,dc=fcortes,dc=local";
ldap-password-file "/etc/machine.secret";
ldap-port 7389;
ldap-base-dn "cn=dhcp,ou=fcortesschool,dc=fcortes,dc=local";
ldap-method dynamic;
ldap-debug-file "/var/log/dhcp-ldap-startup.log";

# dynamic DNS: with external name server only!

thank you. :slight_smile:

@fcortes Just a hint: instead of trying prefixing stuff with ’ you should enclose things you copy & paste with lines which only contain three backslashes:

```
Content goes here
```

That way no Markdown formatting will be applied to the content between those lines. Makes such things much easier to read (and it’s faster to type). This applies e.g. to log messages or configuration files — basically to everything you want to appear verbatim.

Read more about Markdown formatting here. What I’m talking about is named “Code blocks” in that post.

That’s fine. Even though I would have remove the manually created one. But it should be fine, though.

No way. You do not want to offer the IP address of your dhcp-Server. Just change the range here to a range which you do want to assign to clients. Use 10.0.0.10 as first address and make sure no statically/ manually assigned IP is in this range.

Is does not find it’s own entry currently. This is the only item which is not actually related to “do it right and it will work” :wink:

Here I would suggest trying to remove the server from the service and re-add it again. IF it works, all is good.

If not, check if the server has the “DHCP”-Service flag set:
dhcp

/KNEBB

Hi Knebb, Moritz

here’s a video that I think will show my config better, got rid of the service I created and started working with the one that was there from the beginning.

unfortunately even after configuring as shown in the video and as indicated and restarting the service, I’m still not getting dhcp on my client

nodhcp

any suggestions? should I start fresh and reinstall?

thank you.

You did not configure as suggested. I did not mention to use a pool!
Skip them: "Wenn in einem Subnetz DHCP-Pools angelegt werden, sollten keine IP-Adressbereiche im Subnetz-Eintrag definiert werden. Diese sind ausschließlich in den Pool-Einträgen anzulegen. "

As my last update your dhcp-server did not start at all. So there is no sense in trying to get an IP for your client.

What does the logfile tell us now? Not need for screenshots, logfile will usually tell what we need.

Does the service start now? Or still some issues?
Jul 10 17:49:17 optiplexmint dhcpd[19669]: Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=optiplexmint))
Is this gone or still there?

Hi knebb

I’m very sorry about that oversight regarding the pool

I’ve gone ahead and removed the pool:

after removing the pool I attempted to restart dhcp but it’s not restarting yet (still active (exited)) and the log still shows:

Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=optiplexmint))

cannotfindldap%20entry

Again, I thank you for your patience.

Hey,

please post the output of the following two commands (please copy & paste the text; screenshots are really hard to work with):

univention-ldapsearch -b cn=dhcp,$(ucr get ldap/base) '(!(objectClass=univentionDhcpHost))'
dpkg -l | grep dhcp

Run the first command on your DC Master. Run the second command on the server that’s supposed to act as your DHCP server (if you only have one server, then that’s your DC Master as well, obviously).

Kind regards,
mosu

Hi Moritz

as requested here it is:

Administrator@optiplexmint:~$ sudo univention-ldapsearch -b cn=dhcp,$(ucr get ldap/base) '(!(objectClass=univentionDhcpHost))'
-bash: ucr: command not found
[sudo] password for Administrator: 
Sorry, try again.
[sudo] password for Administrator: 
# extended LDIF
#
# LDAPv3
# base <cn=dhcp,> with scope subtree
# filter: (!(objectClass=univentionDhcpHost))
# requesting: ALL
#

# search result
search: 3
result: 34 Invalid DN syntax
text: invalid DN

# numResponses: 1
Administrator@optiplexmint:~$ 

Please become root first before executing the two commands. And those are two commands, not just one.

Meaning:

  1. Run sudo -i
  2. Run univention-ldapsearch …
  3. Run dpkg -l…

Sorry, here it is again

root@optiplexmint:~# univention-ldapsearch -b cn=dhcp,$(ucr get ldap/base) '(!(objectClass=univentionDhcpHost))'
# extended LDIF
#
# LDAPv3
# base <cn=dhcp,dc=fcortes,dc=local> with scope subtree
# filter: (!(objectClass=univentionDhcpHost))
# requesting: ALL
#

# dhcp, fcortes.local
dn: cn=dhcp,dc=fcortes,dc=local
objectClass: organizationalRole
objectClass: univentionObject
univentionObjectType: container/cn
description: Containing all DHCP Objects as per default Settings
cn: dhcp

# fcortes.local, dhcp, fcortes.local
dn: cn=fcortes.local,cn=dhcp,dc=fcortes,dc=local
objectClass: top
objectClass: univentionObject
objectClass: univentionDhcpService
univentionObjectType: dhcp/service
cn: fcortes.local

# 10.0.0.0, fcortes.local, dhcp, fcortes.local
dn: cn=10.0.0.0,cn=fcortes.local,cn=dhcp,dc=fcortes,dc=local
cn: 10.0.0.0
objectClass: top
objectClass: univentionDhcpSubnet
objectClass: univentionObject
univentionObjectType: dhcp/subnet
dhcpRange: 10.0.0.10 10.0.0.254
dhcpNetMask: 24
univentionDhcpBroadcastAddress: 10.0.0.255

# optiplexmint, fcortes.local, dhcp, fcortes.local
dn: cn=optiplexmint,cn=fcortes.local,cn=dhcp,dc=fcortes,dc=local
objectClass: top
objectClass: univentionObject
objectClass: dhcpServer
dhcpServiceDN: cn=fcortes.local,cn=dhcp,dc=fcortes,dc=local
univentionObjectType: dhcp/server
cn: optiplexmint

# search result
search: 3
result: 0 Success

# numResponses: 5
# numEntries: 4
root@optiplexmint:~# dpkg -l | grep dhcp
ii  isc-dhcp-client                                     4.3.5-3+deb9u1A~4.3.0.201803131309               amd64        DHCP client for automatically obtaining an IP address
ii  isc-dhcp-common                                     4.3.5-3+deb9u1A~4.3.0.201803131309               amd64        common manpages relevant to all of the isc-dhcp packages
ii  isc-dhcp-server                                     4.3.5-3+deb9u1A~4.3.0.201803131309               amd64        ISC DHCP server for automatic IP address assignment
ii  isc-dhcp-server-ldap                                4.3.5-3+deb9u1A~4.3.0.201803131309               amd64        DHCP server that uses LDAP as its backend
ii  univention-dhcp                                     12.0.0-5A~4.3.0.201805241419                     all          UCS - DHCP server
root@optiplexmint:~# 

Hey,

from your earlier post regarding the server configuration:

Compare that with where you’ve created your DHCP objects:

Note the ou=fcortesschool vs cn=fcortes.local.

In an UCS@school context you don’t use the top-level DHCP section. Instead, use the DHCP section in the school-specific LDAP sub-tree. In the UMC, use the “LDAP directory” module found in the “Domain” section. There you have access to the whole LDAP tree. You can create all types of LDAP entries there as well, including all the DHCP-specific ones.

Kind regards,
mosu

Hi Moritz

thank you for the answer but it doesn’t help me much.

I installed ucs@school because I really want to try this this software at a school where we don’t have a DC, plus I also want to be able to manage users centrally (teachers and students computer accounts as well as wifi using freeradius, which is something I understand I might be able to do using the ucs@school package as well as the freeradius package.

I want also to get this only dc to be the dns and dhcp server (currently those functions are provided by a pfsense box).

when I install ucs@school I wasn’t thinking it would screw things up as dhcp was not workng before I installed it, I haven’t done much there but I see that it set up a dhcp service which I deleted while trying to resolve the dhcp issue with your guys assistance. I was then left with the dhcp service I configured and the one that I guess was setup from the beginning.

I tried to check out the ldap directory and the ldap tree within the domain section in umc, and yes, I can create all kind of entries but I wouldn’t know what entries I need to create and the ones that were setup there don’t seem to be working to get the dhcp service up

I’m going to reinstall and start from the scratch. I won’t install ucs@school as that didn’t seem to work out while trying to figure the software out for now but I will setup the server again as a DC, dhcp, dns and radius server, hopefully I will have better look next time around and get it working right off the bat.

thank you again for your patience. I know a few things and I can follow some instructions but clearly I’m still a newbie.

alright, I reinstalled with dhcp and radius to start with and dhcp is running now and a client on the network got dhcp config, finally.

it’s a shame I couldn’t figure out what was wrong with my previous config or how to remove ucs@school if that was part of the wrong config, but well. at least that one is now working… next step is getting wpa2 entreprise to work with radius. wish me luck.

thanks again for your help. :slight_smile:

Mastodon