Radacct update at 3 hours

Hitesh Vinzoda hiteshvinzoda at yahoo.com
Sun Dec 4 08:18:00 CET 2011


Hi Fajar,

Thanks for your prompt response. This is really very helpful. I will try this at the first available opportunity.

Thanks
 
Hitesh Vinzoda
Network Administrator
+91-9924117399
www.vinzoda.in

"There are 10 types of people in this world.
One who can understand binary and other's can't."





________________________________
 From: Fajar A. Nugraha <list at fajar.net>
To: Hitesh Vinzoda <hiteshvinzoda at yahoo.com>; FreeRadius users mailing list <freeradius-users at lists.freeradius.org> 
Sent: Saturday, 3 December 2011 6:38 PM
Subject: Re: Radacct update at 3 hours
 
On Sat, Dec 3, 2011 at 6:23 PM, Hitesh Vinzoda <hiteshvinzoda at yahoo.com> wrote:
> Hi all,
>
> I get this working now. Thanks a lot to you guys. Now i want to test one
> more feature, i.e. Is there a way where we can set the accounting updates to
> be triggered at a specific time of a day e.g. everynight at 23:59. My gut
> feeling is this has to be configured on the NAS.

Short version: You can't. Don't bother. Really.

Long version:
There's two attributes that radius can send that MAY be able to do
what you want, in a rundabout fashion.

First one is Session-Timout, which basically tells the NAS the maximum
time the session can last before the NAS have to cut it off
forcefully. In some types of connection (e.g. 3G, or ADSL with the
modem dialing) the client will then try to reconnect immediately, so
this might effectively have the same effect with what you want. You
can use unlang with sql expansion (mysql has some nice function for
date/time calculation) or exec to calculate the value of
Session-Timeout which would make the NAS drops the connection at
23:59.

The second one is Acct-Interim-Interval. Similar to above, you can
calculate Acct-Interim-Interval in a way that you'd get an
Acct-Interim packet at 23:59. For example:
- the client is connected on 06:00
- you want interim updates to be sent (roughly) every 3 hours
- If you set Acct-Interim-Interval to be 2 hours, 59 minutes and 10
seconds (i.e. 10750 seconds) the NAS should (hopefuly) send an
Acct-Interim packet somewhere around 23:59.
- you can use unlang with sql or exec (same as above) to perform the
necessary Acct-Interim-Interval calculation, but it will be
complicated.

I suugest you don't bother with either. Really. Just set
Acct-Interim-Interval into something managable (e.g. 1 hour), and for
billing purposes just use whatever information available at that time
(e.g. use last Acct-Interim sent before 23:59).

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20111204/99e5062b/attachment.html>


More information about the Freeradius-Users mailing list