This is the module that will enable the ability to extract and build ISC DHCP server configurations from the database. It will output the configuration text that would normally be located in something like /etc/dhcpd.conf or similar.
For now this module is in pre-release. It still needs quite a bit of real world testing. If you are interested in testing and are willing to provide feedback, please email support@opennetadmin.com to request a download.
Run make install_module to install the server side code that enables the ONA system to extract DHCP configuration. This would be ran on the same system you installed the core ONA application to.
Run make install_server to install just the build script that would be run via cron or on demand to retrieve the configuration and refresh the DHCP server daemon. If your DHCP server is on the same box as the ONA system then run both install methods on the same box.
Run make install_docs to install basic documentation into the ONA docs directory
Run make all to install everything above.
First off, you must have at least one subnet defined in the database as well as a host definition for the server you will be running the DHCP server on. This host definition should have the same name and IP address as what your server is actually configured to use.
The host within ONA should be defined as a DHCP server for whatever subnets you expect it to be responsible for. You must also have a default gateway defined for the subnet and any DHCP pools that may exist.
You should now see the configuration being built real time in the web interface each time you select the server host and view its DHCP server display page.
This now also exposes the dcm.pl module called build_dhcpd. It is used by the build_dhcpd script to extract the configuration. It is also used by the web interface to generate configuration data.
Add the following line to your system dhcpd.conf file. Probably in /etc/dhcpd3/dhcpd.conf depending on your system. You may need to configure directives like “authoritative”, ddns-update-style, or logging statements etc in the main config file as these are out of scope for the ONA system to manage at this point. The placement of this line could vary depending on how your distribution organizes dhcpd. /etc/dhcpd3/dhcpd.conf should be used for ubuntu/debian based systems.
include "/opt/ona/etc/dhcpd/dhcpd.conf.ona";
Now that it is installed you should be able to execute /opt/ona/bin/build_dhcpd as root. This will build a configuration file from the data in ONA and place it into the file /opt/ona/etc/dhcpd.conf.ona. Assuming you have proper information in your system level dhcpd.conf file and that includes this new file built by ONA then your server will now test that configuration and restart.
Once you have a successful rebuild of your configuration, you can then put the /opt/ona/bin/build_dhcpd build script into a cron that runs at whatever interval you see as appropriate for your environment. I would suggest at least 2 times a day all the way down to once every hour. Remember, you can always run it on demand if needed. You will need to run it as root since it needs to restart the DHCP daemon.