Cannot get DHCP to work


#1

I have carefully followed the documentation, but I cannot get my clients to pick up an IP using a DHCP request. I created a DHCP service with a unique name, then a DHCP subnet. I then went to the LDAP Directory and created a pool. When I disable the old DHCP server on my network, then try to release and renew on a test client, it won’t grab an IP. If I re-enable the old server, my client gets a lease without any problem. I’m not sure what I’m doing wrong.


#2

Hi!

Could you please give us some general information about your UCS system? Just run univention-app info and copy&paste the result.

Do you see any DHCP related messages in /var/log/daemon.log?
We are looking for general errors of the service (check also systemctl status univention-dhcp.service) and/or messages from the client(s) (DHCPDISCOVER, DHCPREQUEST) and the server (DHCPOFFER, DHCPACK, DHCPNACK).

Best regards,
Michael Grandjean


#3

Thanks for the prompt response. I really appreciate it. Here’s the univention-app info output:

UCS: 4.2-3 errata246
App Center compatibility: 4
Installed: dhcp-server=11.0.0 nagios=3.5 pkgdb=10 samba4=4.6
Upgradable:

My log is full of a generic DHCP error repeating over and over:

Dec  3 07:11:14 DC01 dhcpd: Configuration file errors encountered -- exiting
Dec  3 07:11:14 DC01 dhcpd:
Dec  3 07:11:14 DC01 dhcpd: If you think you have received this message due to a bug rather
Dec  3 07:11:14 DC01 dhcpd: than a configuration issue please read the section on submitting
Dec  3 07:11:14 DC01 dhcpd: bugs on either our web page at www.isc.org or in the README file
Dec  3 07:11:14 DC01 dhcpd: before submitting a bug.  These pages explain the proper
Dec  3 07:11:14 DC01 dhcpd: process and the information we find helpful for debugging..
Dec  3 07:11:14 DC01 dhcpd:
Dec  3 07:11:14 DC01 dhcpd: exiting.

The output of systemctl status univention-dhcp.service is similar with a little more info:

● univention-dhcp.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/univention-dhcp)
   Active: active (exited) since Fri 2017-12-08 18:34:57 EST; 22h ago
  Process: 25155 ExecStop=/etc/init.d/univention-dhcp stop (code=exited, status=0/SUCCESS)
  Process: 25166 ExecStart=/etc/init.d/univention-dhcp start (code=exited, status=0/SUCCESS)

Dec 08 18:34:56 DC01 univention-dhcp[25166]: Configuration file errors encountered -- exiting
Dec 08 18:34:56 DC01 univention-dhcp[25166]: If you think you have received this message due to a bug rather
Dec 08 18:34:56 DC01 univention-dhcp[25166]: than a configuration issue please read the section on submitting
Dec 08 18:34:56 DC01 univention-dhcp[25166]: bugs on either our web page at www.isc.org or in the README file
Dec 08 18:34:56 DC01 univention-dhcp[25166]: before submitting a bug.  These pages explain the proper
Dec 08 18:34:56 DC01 univention-dhcp[25166]: process and the information we find helpful for debugging..
Dec 08 18:34:56 DC01 univention-dhcp[25166]: exiting.
Dec 08 18:34:57 DC01 systemd[1]: Started LSB: DHCP server.
Dec 08 18:34:57 DC01 univention-dhcp[25166]: Starting DHCP server: dhcpdok: run: univention-dhcp: (pid 25243) 1s, normally down
Dec 08 18:34:57 DC01 univention-dhcp[25166]: .

Looks like I’ve configured something wrong. What’s the best way to share my configuration for your review? Screenshots, config files, something else?


#4

Hi!

At first we should check if the joinscripts were executed successfully. Please run:

univention-check-join-status

The config file should be a good start. The config file is located at /etc/dhcp/dhcpd.conf and basically contains only the instruction to connect to the LDAP directory service and read the configuration from there. However, there is one line commented:

[...]
# ldap-debug-file "/var/log/dhcp-ldap-startup.log";
[...]

Please remove the ´#´-sign, save the file and restart the daemon:

systemctl restart univention-dhcp.service

Then have a look at /var/log/dhcp-ldap-startup.log.

Best regards,
Michael


#5

This is the first server in a new domain. I’m building a test domain as a proof-of-concept before rolling this to production since I’m new to Univention. The results of univention-check-join-status are:

Joined successfully

After following the instructions and restarting the DHCP service, the dhcp-ldap-startup.log file is empty.

image

When I look at the browser console, the univention-dhcp service is running, so it’s not failing to start.

I’m still seeing the dhcpd configuration file errors in daemon.log, though.


#7

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

#8

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!

#9

Please try as user root (sudo bash).


#10

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?


#11

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


#12

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.


#13

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


#14

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:


#15

@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.


#16

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


#17

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.


#18

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?


#19

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.


#20

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


#21

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:~$