2009-4Q: CORE: Custom DHCP Config files

The updates to SIMPLer and the WIB to support custom DHCP config files are now complete and deployed.

There is a new field in the Modify Gateway Details page (network -> Gateway Details -> <wib number>) called "Custom DHCP Config":

If this is left blank, then the DHCP server on the WIB will work as it currently does (i.e. it will generate the config itself based on the interfaces configured on the WIB and the customer MAC addresses downloaded from SIMPLer). However, if you put text in this field, then this text is used as the dhcp daemon config file instead - i.e. the WIB will not auto-generate one, and will instead use whatever is downloaded from SIMPLer. The little red down arrow to the right of the box will cause the currently config to be downloaded to the browser, so you can verify that it looks OK before pushing the config files to the WIB.A

SIMPLer will still generate the "host" directives - these are the commands which associate the MAC address to the IP address. For example:

host TEST31_test {

hardware ethernet 22:33:44:55:66:66;

fixed-address 172.16.9.202;

}

In order to indicate where in the config file these hosts directives should go, you can use the %HOSTS% token in the Custom DHCP config field. SIMPLer will expand out the %HOSTS% token with the auto-generated host directives before sending the file to the WIB (if the %HOSTS% token is omitted, the host directives will be added to the end of the file).

So, for example if the Custom DHCP config field had

authoritative;

always-broadcast on;

%HOSTS%

shared-network wib {

subnet 10.11.1.0 netmask 255.255.255.0 {

then the resulting dhcpd.conf file would look like this

authoritative;

always-broadcast on;

host TEST31_test

hardware ethernet 22:33:44:55:66:66;

fixed-address 172.16.9.202;

}

[...more host directives...]

shared-network wib {

subnet 10.11.1.0 netmask 255.255.255.0 {

SIMPLer will always supply the "hardware ethernet" and "fixed-address" parameters in the host directive for each IP address. If the operator wants to include more customer, or IP, specific DHCP options, then these can be added to the customer details network page:

and/or to the IP table page:

The options specified in the customer details page will be included in all of the host directives for that customers IP addresses, while those in the IP table will just be included in the host directive for that specific IP. This allows per-customer and/or per-IP options to be set. Options from the customer details are included first, then those from the IP table, and finally the "hardware ethernet" and "fixed-address" parameters.

Looking at the sample DHCP config file we got from Andrew a while back, the "filename" option is the one that will most likely be needed in either the customer details, or IP table DHCP Options fields.

So, in summary:

  1. Put the dhcpd.conf file contents, apart from the host directives, in the gateway "Custom DHCP Config" field

  2. Use the %HOSTS% directive to indicate where the hosts directives are to be included in the file

  3. Put any additional per-customer / per-IP DHCP options in either the customer details or IP table (anything apart from "hardware ethernet" and "fixed-address" which SIMPLer will automatically supply)

  4. Go back to the gateway details page and click the little red down arrow to get a copy of the generated dhcpd.conf file.

  5. If all looks OK, go to the tools menu and update the WIB files.

Azotel | River House | Blackpool Park | Cork | Ireland

US +1-312-239-0680 | IE +353-21-234-8100 | UK +44-207-193-4170 | SA +27-11-083-6900