IPv6 accounting RADIUS SQL schema?

Alan DeKok aland at deployingradius.com
Fri Aug 17 03:55:05 CEST 2018


> On Aug 16, 2018, at 4:10 PM, Michael Ducharme <mducharme at gmail.com> wrote:
> 
> Hi Alan,
> 
> Thanks for the info. However, how does that solution handle dual stack? If client gets both IPv4 and IPv6, a user would want to record both, not just one or the other. Although I am not a FreeRADIUS expert by any means, I looked at the unlang manpage, it looks like that query will store the IPv6 address in the field only if the client is not getting an IPv4 address. If the client is getting both, if I understand the unlang manpage correctly, it will store only the IPv4 and the IPv6 address will go unrecorded.

  Yes.  That's why I suggested updating the query.

  If you want to add a "framedipv6address" field to SQL, it's simple.  It's just a text file... add another line, and then update the SQL queries.

> Also, if I understand the RFC correctly (and it's possible that I do not), this attribute handles only cases where a single host requests an address via DHCPv6, rather than a router requesting a prefix, or a NAS assigning a framed prefix for SLAAC assignment. If I understand things correctly, these cases would be reported only through Framed-IPv6-Prefix and/or Delegated-IPv6-Prefix accounting. I don't believe those prefixes would be reported in Framed-IPv6-Address?

  They're different attributes, so no.

> Based on that I had planned to add three new fields into our radacct table in MySQL - one for framed IPv6 address, one for Framed-IPv6-Prefix, and one for Delegated-IPv6-Prefix. Adding three new fields however seems not only a bit messy, it may not be in line with what the developers had in mind, which is why I asked the question.

  If they're different... they should be recorded.

  Alan DeKok.




More information about the Freeradius-Users mailing list