Time-of-day RADIUS accounting
Fajar A. Nugraha
list at fajar.net
Thu Sep 13 23:49:30 CEST 2012
On Fri, Sep 14, 2012 at 4:19 AM, DataWizApp <datawizapp at gmail.com> wrote:
> Thank you both. I have another question below.
> Suppose that we have many NAS devices supporting INTERIM UPDATE and
> one main RADIUS server. Rather than changing all the NAS servers
> update their usage regularly using some cron jobs or scripts, it may
> be useful that the RADIUS server puts an intended INTERIM UPDATE
> interval to each Access-Accept message.
Yes, you can do that. Acct-Interim-Interval reply attribute.
> I may be wrong or it may not
> be supported from the current standard, but want to hear your
It works just fine.
> The RFC 2866 describes that "If the server wishes to receive interim
> accounting messages for the given user it mush include the
> Acct-Interim-Interval RADIUS attribute in the message, which indicates
> the interval in seconds between interim messages. It is also possible
> to statically configure an interim value on the NAS itself. Note that
> a locally configured value on the NAS MUST override the value found in
> an Access-Accept."
> For example, assume that we have 5 NAS devices, one RADIUS server and
> five user sessions connect to five NAS devices respectively, and we
> would like to charge users based on the usage in each hour.
> User 1 initiates the connection at 01:01
> User 2 initiates the connection at 01:11
> User 3 initiates the connection at 01:21
> User 4 initiates the connection at 01:31
> User 5 initiates the connection at 01:41
> For this case, what I think is that the RADIUS server can sends an
> INTERIM-UPDATE with different interval to each session -- e.g., 59,
> 49, 39, 29 and 19 mins. I wonder whether we can do like this way.
> Certainly if the flow ends before that it will send a STOP message.
Why would you want all interim update packets to come at the same time?
Usually what you do is:
- Set the limit (if you know any) using Session-Timeout,
ChilliSpot-Max-Total-Octets, or whatever attribute that tells the NAS
"hey, this is the max time/volume that this user can use"
- Set Acct-Interim-Interval to something acceptable (1 hour is a good
start), so that if you have some kind of usage display for the
customer, it will be updated.
More information about the Freeradius-Devel