FreeRADIUS 4: DHCP v4: ERROR: Expansion "network" needs to be resolved before it is used

Alan DeKok aland at deployingradius.com
Fri Nov 8 12:48:28 UTC 2024


On Nov 8, 2024, at 12:34 PM, Dima Ermakov <demonihin at gmail.com> wrote:
> Here is what I want to do eventually:
> 1. Define per IP Prefix DHCP configuration, preferably, via text
> "files". The configuration should contain: DNS settings, Lease time,
> Default gateway (maybe more later);

  That's a little vague.

  The documentation / configuration for the "files" module explains how it works.  You will need to read that, and then figure out how your requirements can be implemented in the "files" module.

  Note that this does *not* mean configuring a fixed key "network" for every entry.

> 2. For some network prefixes I want to define DHCP pools with SQL
> integration to track active leases (this will be my next step, when I
> manage to do the first step).

  That's fine.

> To do so, I read the wiki page (although for FreeRADIUS 3.2) about
> DHCP and read the configuration from v3.2 (which was probably my
> mistake).
> 
> The examples from v3.2 (mods-available/dhcp_files) gave me the idea to
> use static key="network" (see below):

  You can't apply the v3 documentation to v4. It's a major version upgrade.


> I see your recommendation to use DEFAULT. To implement (1), should I
> create several DEFAULT sections + Fall-Through := yes + Network-Subnet
> comparison operations like below?

  Maybe?

  What do you want to do?  You still haven't really explained.

  Why not just write the rules directly in "unlang"?  If every entry matches, you might as well just write if / then / else statements.

  Alan DeKok.



More information about the Freeradius-Users mailing list