On Nov 11, 2024, at 7:47 AM, Dima Ermakov <demonihin@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.