如何配置 FreeRadius 系统以启用预付费数据?
通常,FreeRadius 系统包含一个 radacct 表,用于实时跟踪数据。每小时或每天或每次用户注销时,当前使用情况都会添加到 radacct 表中,其中包含所使用的数据量和日期。
这使得提供后付费数据变得容易。事实上,您必须这样做,因为您可以查询的只是客户端历史上使用过的数据。但如果你想做预付费,我已经考虑了很多年,虽然我已经想出了类似于银行的东西,但我仍然不确定如何实现预付费数据。需要注意的是,预付费数据可能在几个月内有效,并且由于 radacct 在当前日期有效,我不知道如何实现这一点。
我正在寻找一种简单的方法,使现有的 Radius 系统能够允许预付费数据,而无需使用任何或太多的存储过程。我正在使用 MySQL 和 PHP。
编辑: 一年零三个月后我重新审视了这篇文章。我们最终使用了 DMA Softlab 的产品 Radius Manager,它内置了此功能。如果我们自己执行此操作,则需要太多的存储过程和太多的开发时间。只是按照 @maraspin 的要求解释我们的架构就是一项使命。
Typically a FreeRadius system contains a radacct table which keeps track of data in real time. Every hour or every day or each time the user logs off the current usage is added to the radacct table with the amount of data used and the date.
This makes it easy to offer post-paid data. In fact, you have to, because all that you can query is the data the client has used historically. But if you want to do pre-paid, I have thought about this for years and although I have come up with something that works similar to a bank, I am still not sure how to achieve pre-paid data. Once caveat is that pre-paid data might be valid for a few months, and since radacct works on the current date, I can't see how to achieve this.
I am looking for an easy way to enable an existing Radius system to allow pre-paid data without using any or too many stored procedures. I'm using MySQL and PHP.
Edit:
I revisited this post after a year and three months. We ended up using a product Radius Manager by DMA Softlab which has this functionality built-in. Doing this on our own would have required too many stored procedures and too much development time. Just explaining our architecture as requested by @maraspin is a mission.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论