opennetadmin/ona

Adding DHCP options doesn't worka (anymore?)

schoos76 opened this issue · 8 comments

Hi Matt

[DEFAULT] ERROR => dhcp_option_edit add ws_save() SQL Query failed: ERROR => SQL INSERT failed: Field 'sys_default' doesn't have a default value

is in the logs when I try to add a new DHCP option to the available options.
Workaround was "alter table dhcp_options modify sys_default int(1) not null default 0;" in my end, but I assume it's also possible to simply change the insert statemnt to include another column.

Was this on the Master branch or the develop branch? I believe this is fixed in the develop branch.

Hello Matt,
the dev branch does allow dhcp options to be added.

however when we set an option on one subnet , that option ends up at all subnets.

for instance I added option 51 default-lease-time to 10.1.25.0

that setting went to all other subnets.

If more info or debugging help is needed please let me know!

this issue of lease times may be something on our end. I noticed last weeks dhcp ona conf files had the same thing.

it would be good to have lease time set at subnet level. I'll

Hey Rob!

Setting a per subnet lease time should be possible. I'll see if I can go recreate the issue. As I understand it you ar eon the development branch of the ONA repository. What version of the build_isc_dhcp repo/plugin are you using? Its possible that you also need to update the build plugin as well.

Another thought/question.. You do not need to create option 51 as a dhcp option.. that is already defined when you create a DHCP pool on a subnet. If you do not have a pool on the subnet then having that option is meaningless.

Ultimately adding a dhcp option to a subnet should only apply to that subnet only and not all of them.. I did confirm that this works on the demo website with the latest dev versions.

tested as working on current versions. Should be working now.