Can't get dhcp server working



Hi guys

this is sort of a follow up on Cannot get DHCP to work. I got dhcp server working last time but without ucs@school and I want to use ucs@school, so I’m not sure why dhcp is screwed up when this package is installed and no matter what I do to get dhcp working univention-dchp keeps being down and can’t get the damn service up

I’m on version 4.3-3 errata390

single server environment

looking to setup ucs@school

dc server name is optiplex
server’s ip is
the network to be served with dchp service is with ranges from .24 to 254
domain is inscope.local
school name is icope

I got 2 dhcp services, one setup under the domain object and another one setup under school object. under each there’s a server called optiplex and subnet which / 24 with ranges from .25 to .254, no pools were setup.

here are the logs


root@optiplex:~# sudo tail -n 100 /var/log/daemon.log
Dec 23 00:12:28 optiplex dhcpd[26844]: Cannot find host LDAP entry optiplex (&(objectClass=dhcpServer)(cn=optiplex))
Dec 23 00:12:28 optiplex dhcpd[26844]: Configuration file errors encountered -- exiting

univention-ldapsearch -b cn=dhcp,$(ucr get ldap/base) ‘(!(objectClass=univentionDhcpHost))’

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

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

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

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

#, dhcp, dhcp, inscope.local
dn: cn=,cn=dhcp,cn=dhcp,dc=inscope,dc=local
objectClass: top
objectClass: univentionDhcpSubnet
objectClass: univentionObject
univentionObjectType: dhcp/subnet
dhcpNetMask: 24

# search result
search: 3
result: 0 Success

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

I’ve understand that with ucs@school I’m supposed to set my dhcp entries under the respective dchp container for the school, that’s why i setup anther dhcp service there with it’s respective server and network
and I’ve been playing around with dhcpd/ldap/base in ucr and I set it last as :
which I figured must be wrong…but that’s just me trying out. (I’m sorry I’m stil a newbie at ldap)

Any help would be greatly appreciated otherwise I might have to for another AD/domain controller option but I really like yours.

Thank you in advance.


I solved my own problem, finally, those 20 min spend understanding a bit better ldap were definitely worth it :slight_smile:

so… it appears that after you install ucs@school, you get another dhcp service, and with it, you get another dhcpd/ldap/base value, that’s what was screweing me over. what I did, as per last note on my previous posting from Moritz was to try a few different DN values for that variable for the container where the expected dhcp service was with the server and the the subnet i set up as needed, so here are the screenshots



ldap directory


dhcp from the domain container


and the subnet i setup (with no pool)


after that and then and setting the dns and the routing polices. (which I’m using the default ones)

my univention-dhcp service came to live and then I saw my dhcp client coming up with the expected dhcp configuration from the univention server. Problem solved

I’ve never been as happy seeing a dhcp client getting their dhcp configuration. :slight_smile:

thank you guys for the support, it took a while to digest and understand but I think I got the gist of it now… now on to the next task

Cheers, merry christmas and happy new year