Migrating DHCP configuration from v3 to v4

Alan DeKok aland at deployingradius.com
Thu Jun 29 16:29:04 UTC 2023


On Jun 29, 2023, at 12:17 PM, Ľudovít Mikula <ludovit.mikula at 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.

> In v3 there was a dedicated dhcp and dhcp-ippool mods-config/sql setup, where the sql_user_name was set to:
>    sql_user_name = "%{control:DHCP-SQL-Option-Identifier}"
> and in my processing sections I have set the "control:DHCP-SQL-Option-Identifier" based on some custom logic.

  That attribute no longer exists.

> In v4 there is no such configuration, but the comments in ippool queries seem to suggest it can now all be done in one config.
> 
> However when using ippool module in DHCP request processing, the %{User-Name} attribute (configured in sql_user_name) is not known and I have not found an alternative to DHCP-SQL-Option-Identifier attribute.

  You don't need to set that.  See mods-config/sql/ippool/mysql/queries.conf.  The sql_user_name configuration isn't used anywhere.

> What is the recommended way of migrating such configuration from v3 into v4?

  Don't port the configuration from v3 to v4.  Read the v4 configuration, and do things the "new way".

  Alan DeKok.



More information about the Freeradius-Users mailing list