opennetadmin / ona

OpenNetAdmin IP Address Management (IPAM) system
opennetadmin.com
GNU General Public License v2.0
141 stars 35 forks source link

Adding DHCP options doesn't worka (anymore?) #159

Closed schoos76 closed 1 year ago

schoos76 commented 4 years ago

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.

mattpascoe commented 4 years ago

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

robfantini commented 3 years ago

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 commented 3 years ago

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

mattpascoe commented 3 years ago

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 commented 3 years ago

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.

robfantini commented 3 years ago

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 commented 3 years ago

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

mattpascoe commented 1 year ago

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