Thank you for the insights! On 6/29/23 18:29, Alan DeKok wrote:
On Jun 29, 2023, at 12:17 PM, Ľudovít Mikula <ludovit.mikula@mikori.sk> wrote:
I am migrating my dhcp setup from freeradius v3 into v4 and have some questions.
Be aware that v4 might work, or might not.
Yes I'm aware and of course we'll test a specific commit and stick to it if it works :) I'm trying to wrap my head around the new way and after studying mods-config/sql/ippool/mysql/queries.conf a bit more, would it be something along: 1. create a copy of mods-available/sqlippool (fe. called dhcp_sqlippool) and set: - allocated_address_attr = dhcpv4.Your-IP-Address - owner = "%{Vendor-Specific.ADSL-Forum.Agent-Remote-ID}" - gateway = "%{dhcpv4.Gateway-IP-Address}" 2. in sites-available/dhcp determine pool name and run dhcp_sqlippool to allocate an IP address: &control.IP-Pool.Name := "determine pool name with some custom logic" if (!&control.IP-Pool.Name || &control.IP-Pool.Name == '') { do_not_respond return } dhcp_sqlippool 3. In sites-available/dhcp Request processing section set: if (ok) { &reply.Your-IP-Address := &Your-IP-Address } Ludo Mikula