LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   how to setup dhcp-reservations in a ldap enviroment and... ? (https://www.linuxquestions.org/questions/linux-server-73/how-to-setup-dhcp-reservations-in-a-ldap-enviroment-and-662440/)

odcheck 08-13-2008 06:34 AM

how to setup dhcp-reservations in a ldap enviroment and... ?
 
Hello @ All,
and thanks for your attention.

I want to know how I can use dhcp-reservation in LDAP and
dynamic DNS Updates?

Here're my spec's:
OS:
debian etch 4.0r3c
Kernel
2.6.18-6-486 i686
OpenLdap:
slapd 2.3.30-5+etch1
Samba:
samba 3.0.24-6etch10
samba-common 3.0.24-6etch10
DHCP
dhcp3-common 3.0.4-14linbox1
dhcp3-server 3.0.4-14linbox1
dhcp3-server-ldap 3.0.4-14linbox1
Bind9
bind9 9.3.4-2linbox1
------------------------------------------------------
So if I missed something for a better troubleshooting let me know.

This system/server whatever is configured as Samba PDC with LDAP Backend and it works kind of tremendous good. The Clients get an IP and as well there optional stuff like DNS IP, Gateway etc., Windows Clients are able to join the samba domain and stuff like that, acl and so on.

1st Question:
But I don't know where I can tell this LDAP Dhcp to use for example at client PC01 with mac-address 00:0E..... to get always IP xx.xx.xx.xx ?

Once upon a time, before the ldap thing... I didn't have such questions
cause I had a "normal" /etc/dhcp3-server/dhcp.conf and a normal named.conf.local ... And dynamic DNS Update with static and non static clients via DHCP using rcnd.key wasn't such a pain.

2nd Question:
How can I use dynamic DNS Update function within LDAP? Like once upon a time??

It would be wonderful if anyone out there could give me a suggestion, a hint a good page or something on that.

with kindly regards
odcheck

odcheck 08-13-2008 09:55 AM

nearly answered alone question1
Quote:

1st Question:
But I don't know where I can tell this LDAP Dhcp to use for example at client PC01 with mac-address 00:0E..... to get always IP xx.xx.xx.xx ?
Quote:


Implementing dhcp3-server-ldap

These steps supposse that:

* dhcp3-server is configured and running in the server
* There is a ldap server available
* The ldap suffix is "dc=instituto,dc=extremadura,dc=es" (replace it with your suffix, as "dc=skole,dc=skolelinux,dc=no")
* ldap server is running at the ip 172.16.3.166 (replace it with your ip or hostname)
* dhcpd server is running at aula1-pro (replace it with your hostname)

At the dhcp server:

1. Install the package dhcp3-server-ldap from Debian lenny or sid.
2. To get the ldif with the dhcp information:
Code:

dhcpd-conf-to-ldap.pl  --basedn "dc=instituto,dc=extremadura,dc=es" \
 --dhcpdn "cn=DHCP Config, dc=instituto,dc=extremadura,dc=es" \
 --conf "/etc/dhcp3/dhcpd.conf" >dhcpd.ldif

3. Change dhcpd configuration, so the /etc/dhcp3/dhcpd.conf file should be like this:
Code:

ldap-server "172.16.3.166";
ldap-port 389;
ldap-base-dn  "dc=instituto,dc=extremadura,dc=es";
ldap-debug-file "/var/log/dhcp-ldap-startup.log";
ldap-dhcp-server-cn "aula1-pro";
ldap-method dynamic;
ddns-update-style none;

At the ldap server:

1. Bring from the dhcp server the dhcpd.ldif file from the step 1 above and the file /usr/share/doc/dhcp3-server-ldap/dhcp.schema.gz
2. Gunzip dhcp.schema.gz and copy it to /etc/ldap/schema/
3. Edit /etc/ldap/ldap.conf and add these lines:
Code:

include        /etc/ldap/schema/dhcp.schema
index          dhcpHWAddress  eq
index          dhcpClassData  eq

4. Import dhcpd.ldif into ldap tree using your favourite application (gq, phpldapadmin, ldapadd, etc.)
5. Reindex and restart ldap server:
Code:

slapindex & /etc/init.d/slapd restart
Now restart dhcpd server and take a look at "/var/log/dhcp-ldap-startup.log". If everything goes fine, the old dhcpd.config file should be there, but extracted from ldap, and dhcp should be working.
Source: http://wiki.debian.org/DebianEdu/LdapifyServices

Then I've got a DHCP conf with IP reservation, just wondering if I really need to do this everytime I need a new client dhcp-ip reservation.... but this would be a first workaround . So anyone else any suggestions?

And Dynamic DNS Updates is still an open point on my agenda.

odcheck 08-15-2008 12:43 AM

Currently I've decieded to get a good book and while doing the self study, I'll use DHCP and BIND the old-school way without LDAP integration.


In fact there is not a single replay, I guess there will also none in the future.

This case is closed.


All times are GMT -5. The time now is 02:31 PM.