DHCP + ldap

Richard Pijnenburg richard at softwaredev.nl
Mon May 10 08:58:03 UTC 2010

Dear list, 

Ive sent the following to the maker of the ldap patch,
david, but perhaps some one here can help me as well. 


The ldap
server part works perfectly after some modifications. 

So I went to the
dhcp server part. 

I've added the rules and came across some small issues.

in the dhcp.conf I had to add the config rule "ldap-dhcp-server-cn"
because you assume that the sever hostname is being used. 

In my own case
this wasn't handy. 

The config rule isn't in the documentation but found
it in the source code. 

second: I don't see anything being logged into the

third: I got 2 compile errors when I enabled the
DEBUG_LDAP rule at the following rules: 

log_info ("Adding contents of
subtree '%s' to config stack from '%s' reference", tempbv[j], search[i]);

log_info ("LDAP: Parsing dhcpService DN '%s' ...", tempbv[cnt]); 

don't have the complete message but it was about it was expecting a char
but got something else. 

And most important is that it doesn't give out
any dhcp ip's. 

After I enabled debug I see this: 

Searching for (

filename "pxelinux.0"; 



from 00:50:56:b8:01:87 via eth1: network no free leases

below you will find the slapd.conf and dhcpd.conf (passwords changed
ofcourse ): 

-- slapd.conf -- 

include /etc/openldap/schema/core.schema

include /etc/openldap/schema/cosine.schema 



include /etc/openldap/schema/dhcp.schema

index dhcpHWAddress eq 

index dhcpClassData eq 

allow bind_v2 


argsfile /var/run/openldap/slapd.args

database bdb 

suffix "dc=ldapserver,dc=local" 



directory /var/lib/ldap 

objectClass eq,pres 

index ou,cn,mail,surname,givenname eq,pres,sub

index uidNumber,gidNumber,loginShell eq,pres 

index uid,memberUid

index nisMapName,nisMapEntry eq,pres,sub 

-- dhcp.conf --

log-facility local7; 

subnet netmask { 


ldap-server "localhost"; 

ldap-port 389; 


ldap-password "myprivatepassword";

ldap-base-dn "dc=ldapserver,dc=local"; 

ldap-dhcp-server-cn "root";

ldap-method dynamic; 

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

in this case the server has as IP address and i try to give
out 192.168.4.x IP via a fixed IP from the mac address. 

according to the
debug message it found the host and got the information and is sending it.

But on the other hand it seems it doesn't parse it correctly or

I hope some one can give me a hint what i'm doing wrong.

With best regards, 

Richard Pijnenburg 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20100510/8cb0fbf1/attachment.html>

More information about the dhcp-users mailing list