Bering-uClibc 6.x - User Guide - Advanced Topics - Setting Up a DHCP server with a configuration stored in openLDAP

From bering-uClibc
Revision as of 10:09, 22 April 2018 by Kapeka (Talk | contribs)

Jump to: navigation, search
Advanced Topics - Setting Up a DHCP server with a configuration stored in openLDAP
Prev Bering-uClibc 6.x - User Guide Next

Objectives

If you need to maintain a high available DHCP server consider to store its configuration and settings in openLDAP server. You configure at least 2 openLDAP servers with replication (syncrepl) to spread its database over the nodes running on each (or on others) additional DHCP server instances. If you use the „ldap-method dynamic“ in your dhcpd settings, your changes in LDAP for host entries are effective without the need to restart the dhcpd daemon. Only for major changes like adding static routes, you need to restart the dhcpd daemons.

Our scenario

We have a LEAF machine called packethelper-201 which is one of perhaps more DHCP servers. Next, we have an openLDAP server which stores the complete DHCP server configuration and mostly other informations like users with passwords for authentication. The setup of the openLDAP server is not covered by this Wiki. The domain name is „acme.com“ („a company makes everything dot com“).

Packages

As mentioned above, our LEAF DHCP server is called packethelper-201 and it‘s full qualified domain name is packethelper-201.acme.com You have to add the dhcpd.lrp package to your existing packages.

LRP="root license local keyboard openssl shorwall dropbear dhcpd"

To configure the DHCP server to pull it‘s configuraiton from LDAP we need to state the following settings on our LEAF box, you have to edit the /etc/dhcpd.conf:

ldap-server "ldapserver.acme.com";
ldap-port 389;
ldap-username "uid=admindhcpd,ou=system,dc=acme,dc=com";
ldap-password "topsecret";
ldap-base-dn "dc=acme,dc=com";
ldap-method dynamic;
ldap-debug-file "/var/lib/dhcpd-ldap-startup.log";
log-facility local7;

Prev Up Next