Skip to content
Permalink
Browse files
Merged patches from Fran Taylor.
Fran <tuneology@gmail.com> wrote:
Attached is a patch that I have written for dhcpd so that DHCPv6
client information can be stored in LDAP.

It is admittedly fairly crude, but I have been running it for over a
year now and it seems to work fine.  I have tested it with linux,
Solaris, Windows, and OSX clients.
  • Loading branch information
jpopelka authored and dcantrell committed May 27, 2010
1 parent ae22573 commit 4f54c42
Show file tree
Hide file tree
Showing 3 changed files with 359 additions and 34 deletions.
@@ -189,3 +189,37 @@ into problems reading the configuration, try running dhcpd with the -d flag.
If you still have problems, edit the site.conf file in the DHCP source and
add the line: COPTS= -DDEBUG_LDAP and recompile DHCP. (make sure you run make
clean and rerun configure before you rebuild).

DHCPv6 requires a separate instance of the dhcpd server from the DHCPv4 server.

It is convenient to use distinct LDAP login DNs for the two servers,
and setup LDAP access restrictions in the LDAP server, so that each
DHCP server only has access to its own data.

You will need to use a separate configuration file /etc/dhcp/dhcpd6.conf.
For example:

ldap-server "localhost";
ldap-port 389;
ldap-username "cn=DHCPv6 User, dc=ntelos, dc=net";
ldap-password "blahblah";
ldap-base-dn "dc=ntelos, dc=net";
ldap-method dynamic;
ldap-debug-file "/var/log/dhcp-ldap-startup.log";

And use these command line arguments to dhcpd:

dhcpd eth... -6 -cf /etc/dhcp/dhcpd6.conf -pf /var/run/dhcpd6.pid -lf /var/lib/dhcpd6/dhcpd.leases

For DHCPv6, the client configuration is the same, but substitute the
Client ID for the Ethernet hardware address. Here is an example of a
host definition for a DHCPv6 client:

dn: cn=examplehost,cn=XXXX:XXXX:XXXX:XXXX::/64,cn=Network-eth1,cn=DHCPv6,dc=example,dc=com
objectClass: top
objectClass: dhcpHost
cn: examplehost
dhcpClientId: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
dhcpStatements: fixed-address6 XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX
option host-name "examplehost.ipv6.example.com"
option domain-name "ipv6.example.com"

0 comments on commit 4f54c42

Please sign in to comment.