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

Alan DeKok aland at deployingradius.com
Mon Nov 11 13:57:58 UTC 2024


On Nov 11, 2024, at 7:47 AM, Dima Ermakov <demonihin at gmail.com> wrote:
> 
> I tried the "files" approach for now with the ' key = "%{Network-Subnet}" '
> please take a look below:

  Yes, that's good.  The attributes all got renamed in v4.
> 
> From the attempts above I think that the "option 2" will work well for me.
> Still, it is a bit inconvenient to configure the DHCP relay agent
> "receiving" interface in the FreeRADIUS configuration (192.168.10.1/32
> in this case).
> It would be nice to be able to match by network prefix, so that "any"
> DHCP relay agent IP from the prefix 192.168.10.0/24 would match some
> section.

  As the documentation suggests, you can control the prefix matching.  Add a DEFAULT at the top of the file:

DEFAULT
	Next-Shortest-Prefix = yes

192.168.10.0/24
   Router-Address := 192.168.10.1,
   Subnet-Mask := 255.255.255.0,
   Broadcast-Address := 192.168.10.255,
   Domain-Name-Server := 192.168.20.2

  And it will automatically find the right prefix.  This isn't ideal, but it should work.

  Alan DeKok.



More information about the Freeradius-Users mailing list