ona icon indicating copy to clipboard operation
ona copied to clipboard

Adding DHCP options doesn't worka (anymore?)

Open schoos76 opened this issue 5 years ago • 7 comments
trafficstars

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.

schoos76 avatar May 17 '20 01:05 schoos76

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

mattpascoe avatar May 18 '20 19:05 mattpascoe

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!

robfantini avatar Jan 10 '21 14:01 robfantini

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

robfantini avatar Jan 10 '21 15:01 robfantini

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.

mattpascoe avatar Jan 10 '21 18:01 mattpascoe

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.

mattpascoe avatar Jan 10 '21 19:01 mattpascoe

Hello Matt, the issue may be with the build program.

I switched back to stable from dev.

I recall seeing on a ona dhcp server config that option was using a global setting and ignoring the over ride 51 i had setup. note on our ona I had to add option 51 to Admin > Manage DHCP Options.

I can play with dev branch on a test system sometime. It could be on a clean install it works fine. there must be a setting we did which prevents that.

On Sun, 10 Jan 2021, Matt Pascoe wrote:

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.

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/opennetadmin/ona/issues/159#issuecomment-757532545

robfantini avatar Jan 11 '21 01:01 robfantini

Hi I see now where the option gets set - at DHCP Pool.

not by adding a DHCP entry.

thanks.

Rob

On Sun, 10 Jan 2021, root wrote:

Hello Matt, the issue may be with the build program.

I switched back to stable from dev.

I recall seeing on a ona dhcp server config that option was using a global setting and ignoring the over ride 51 i had setup. note on our ona I had to add option 51 to Admin > Manage DHCP Options.

I can play with dev branch on a test system sometime. It could be on a clean install it works fine. there must be a setting we did which prevents that.

On Sun, 10 Jan 2021, Matt Pascoe wrote:

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.

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/opennetadmin/ona/issues/159#issuecomment-757532545

robfantini avatar Jan 11 '21 22:01 robfantini

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

mattpascoe avatar May 08 '23 04:05 mattpascoe