On Feb 19, 2018, at 11:18 AM, Daniel Ryšlink <ryslink@dialtelecom.cz> wrote:
Can anyone please provide a link to a working example of a Freeradius with DHCP virtual server where the users accessing the network are identified not by a MAC address, nor by Calling-Station-ID, but by the attributes encoded into Option 82, specifically in the radius packet:
(0) ADSL-Agent-Circuit-Id = 0x4769302f31393a3130 (0) ADSL-Agent-Remote-Id = 0x010b465454582d535749544348
Yeah... those are horribly formatted. And not automatically decoded by the server.
I use MySQL as a backend for my ippools, but the queries.conf work only operate with "Calling-Station-Id", or "Nas-Port-Id".
That's because it's designed to work with RADIUS packets. You can also see raddb/mods-config/ippool-dhcp/ which contains examples of IP pools for DHCP. The module configuration is in raddb/mods-available/dhcp_sqlippool
Is the solution to define in mods-enabled/dhcp something like:
dhcp { Calling-Station-Id = %{dhcp_options:<Circuit-ID>}%{dhcp_options:<Agent-ID>} }
You can't just create things in the configuration and expect them to do what you want. The configuration items are documented: what they are, and how they work. Read raddb/sites-available/dhcp. It contains a sample virtual server for DHCP. It also references the "dhcp_sqlippool" module described above. You can edit those files to do IP pool assignment for DHCP, using the relay options. Alan DeKok.