billing using radius

Parham Beheshti p_beheshti at rasana.net
Sun Apr 12 12:15:21 CEST 2009


Hello,
Well, this can be very simple ... or very complicated ...
I'm doing traffic based accounting with freeradius and have been more then happy.
Our scenario is pretty complicated, it involves different pricing KB for day of week/time of day, users are able to purchase additional credit,etc.
to get you started:

1. you can get user's traffic (acctinputoctets+acctoutputoctets) for a given time period and don't let the user login next time he/she wants to access the service. This will take care of not letting users over the quota to login...

2. you can check your online users periodically send COA (Disconnect packet) if user's traffic is above your limit...

3. you may have very long sessions(days, weeks or months) that cross bounderies for example: 10GB/week and have sessions longer then week. to solve this issue you need to have interim-update packets from your NAS, the nas will send you packets regularly... use this against your old data to calculate how much traffic was used. create a daily traffic table and update it with calculated amount. use counters based on the dailytraffic.

depending on number of users you have you may need to partition your daily traffic table.

this solution scales pretty good:
we have about 50,000 broadband users,  5 minute interim-update and we have hourly and daily traffic information tables. we are no where near our limits and freeradius/mysql is scaling very well. (10% load)

You will be better off to do all this calculation in stored procedures instead of queries ...
Let me know if you need more info

Cheers,
Parham

------------------------------------------------------------------------------------------

 
Hi,
I use freeradius server  for accounting of vpn users.I use monthly counter
to limit users but now I want if user's traffic is rather than specific
amount, I will be  able to have billing for them and to disconnect some of
them. Is it possible to have billing with config in freeradius or a new
software is needed?
could radius disconnect users based on amount of traffic not counters?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20090412/1744387d/attachment.html>


More information about the Freeradius-Users mailing list