SQLCounter configuration

Venkatesh K kaevee at gmail.com
Sun Jan 11 02:59:32 CET 2009


On Sat, Jan 10, 2009 at 10:36 AM, Hanno Schupp <hanno.schupp at gmail.com> wrote:
> Dear All,
>
>
>
> I have a few questions regarding the rlm_sqlcounter module and its
> configuration. I have a freeradius 2.1.0 communicating with a router running
> chillispot 1.1  I set up counters for time, data volume, and with different
> reset periods. All works fine and as expected.
>
>
>
> Here my questions:
>
>
>
> 1)      After the time or data volume for a period (say a month) is reached
> the user is automatically disconnected – as expected. Rather them not
> allowing to log in , I would like freeradius to return some other attributes
> (WISPr-Bandwidth-Max-Up and WISPr-Bandwidth-Max-Down work fine with
> ChilliSpot) to be sent to the router for the user, so that a connection is
> still possible, but at a much lower maximum speed. Can that be done, and if
> so, can someone give me a pointer. I was thinking maybe using unlang, but I
> may be barking up the wrong tree.
>

You might be better off making changes to your provisioning system
assuming you are using a database backend although
you might be able to get away with unlang.

>
>
> 2)      The   reset = monthly   method seem to the first of the current
> month. That is one way of doing it, but I would like the reset to occur at
> the same date in the month every month. So if someone signs up, say on the
> 12th of a month, the reset will occur every month on the 12th. Can that be
> done with freeradius?
>
>

rlm_sqlcounter only support calendar month or day or week.

>
> 3)      Currently I receive something like   Reply-Message = "Your maximum
> never usage time has been reached"   when the counter reaches its limit –
> even when what was counted as not time but data volume. Can Reply-Message
> for sqlcounter be configured as in the expiration module?
>
>

rlm_sqlcounter does not have provision for cusom reply messages. There
was a patch floating around to send custom reply messages from
rlm_sqlcounter. Probably you should look in mailing list archives.

>
> 4)      One surprise I have had: I don't quite understand how the system
> calculates the day for the beginning of the reset = weekly. I appreciate
> that calculating the day of the week is not easy as for example first of the
> current month or beginning of the day, so I was not surprised to not have a
> Monday, but I was surprised to see the SQL query run with 'Fri Jan 09 2009
> 00:00:00 GMT+1300 (New Zealand Daylight Time)' as beginning of the week,
> when running the query on a Saturday. BTW, SQL time is configured correctly,
> and the UNIX_TIMESTAMP is giving a correct timestamp for local time. What am
> I missing?
> (Note: When setting reset = 7d, I get something more explainable like 'Sat
> Jan 10 2009 00:00:00 GMT+1300 (New Zealand Daylight Time)', which is the
> beginning of the today's day. Should reset = weekly and reset =7d yield the
> same result? If not, what is weekly vs 7d, and why does the week not start
> on a Monday?
>
Thanks,

Venkatesh K




More information about the Freeradius-Users mailing list