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
ldap-debug-file. 

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]); 

I
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"; 

fixed-address 192.168.4.20; 

' 

DHCPDISCOVER
from 00:50:56:b8:01:87 via eth1: network 192.168.3.0/24: 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/inetorgperson.schema 

include
/etc/openldap/schema/nis.schema 

include /etc/openldap/schema/dhcp.schema


index dhcpHWAddress eq 

index dhcpClassData eq 

allow bind_v2 

pidfile
/var/run/openldap/slapd.pid 

argsfile /var/run/openldap/slapd.args


database bdb 

suffix "dc=ldapserver,dc=local" 

rootdn
"cn=root,dc=ldapserver,dc=local" 

rootpw
{SSHA}ECKv2sa9F2kP46OwVJAD9oZGUezOL++z 

directory /var/lib/ldap 

index
objectClass eq,pres 

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


index uidNumber,gidNumber,loginShell eq,pres 

index uid,memberUid
eq,pres,sub 

index nisMapName,nisMapEntry eq,pres,sub 

-- dhcp.conf --


log-facility local7; 

subnet 192.168.3.0 netmask 255.255.255.0 { 

}


ldap-server "localhost"; 

ldap-port 389; 

ldap-username
"cn=root,dc=ldapserver,dc=local"; 

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 192.168.3.1 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
something. 

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