Different bandwidth for Day & Night in FR

JAHANZAIB SYED aacable at hotmail.com
Wed Feb 7 10:23:15 CET 2018


OS:
Using Ubuntu / Freeradius for user authentication. NAS is mikrotik ver 6.x

Scenario:
I am trying to implement 'different bandwidth for day & night'

from 8am-till-8pm > 1mb
from 8pm-till-8am > 2mb

I dont know much about freeradius inside core, therefore so far I have think of following,

I have created separate table in which i have a dded username / bandwidth for night, start/end time / COA sent flag.

mysql> select * from  users_bwsch;
+----+----------+-----------+----------+----------+------------------+----------------+
| id | username | bwpkg       | start    | end      | start_alert_sent | end_alert_sent |
+----+----------+-----------+----------+----------+------------------+----------------+
|  1 | zaib     | 2048k/2048k | 11:00:00 | 20:00:00 |                0 |              0 |
+----+----------+-----------+----------+----------+------------------+----------------+

I know howto use COA, but confused on howto do multiple IF statement in ACCOUNTING section

1) Using UNLAG query in FR , check the start and end time and match with NOW, if time matches, & start_alert_coa flag is 0 then send COA and update start_alert_sent to 1, when time ends, send COA to change pkg to original one and set FLAG end_alert_sent to 1, and something more ...

OR

2) Using external script to do the checking and send COA using radclient?

I believe there might be more suitable methods to achieve this , that is why I am seeking help from list members.




Regards,
Jz
<http:///>


More information about the Freeradius-Users mailing list