Normal practice - Radius End of month cap allocation

Leno

Expert Member
Joined
May 15, 2005
Messages
2,396
Reaction score
767
Location
UK & PE
Hi Guys

I would like to find out what the general practice is in regard to counting data on a adsl or any other radius connection which is connected over the month end change over

Is that session (whenever it ends) counted as the month when it starts, or when it ends?

Since session disconnects are not legal its not possible to disconnect at 23:59:59 on the last day of the month

Since Radius accounting only gives one figure for the whole session, the data has to be put in one or the other month and not split?

eg - I connect on the 28th and download 2.4 gigs, still under my 3 gb. Therefore i am still connected on the 1st under the same session...

If we count it as when the session ends, thats 2.4 gb that was not downloaded on the new month

If we only count sessions that start in the new month, whatever i download till i get disconnected is not counted on the new month....

The only solution to stop this from going too far over the edge is to limit each session to the total account allowance before i send a disconnect message
 
Since Radius accounting only gives one figure for the whole session
These days Radius Interim Accounting is used to sub allocate usage from a single session across monthly boundaries.
 
Well, my MySQL query for the total month usage only uses the session start date and not the end date and time. That will cause it to span over multiple months.

I am not sure if you are familiar with PHP, but if you look at this function I wrote you might get an idea of how its calculated.

You should also always end a packet of disconnect to each session at least every 24 hours.

http://pastie.org/733230

I hope that helps.
 
Well, my MySQL query for the total month usage only uses the session start date and not the end date and time. That will cause it to span over multiple months.

I am not sure if you are familiar with PHP, but if you look at this function I wrote you might get an idea of how its calculated.

You should also always end a packet of disconnect to each session at least every 24 hours.

http://pastie.org/733230

I hope that helps.

Thx for the code, was half way through mine when I hit this question :)

One question, I thought 24 hour resets were illegal now...
 
Ahh ok u talking about tricking the accounting to think its a new session?
 
I am using this on Mikrotik + wireless but I am sure the same can apply for ADSL
 
Top
Sign up to the MyBroadband newsletter
X