limit bandwidth and traffic

Hi

Have configured MikroTik 2.9 with freeradius and mysql. I want to limit bandwidth (upload/download) of users and want to limit their traffic (1gb/2gb/10gb etc). Also want to specify validity of the account. Once the validity is over or the quota is exceeded (whichever is earlier) I want users to be disconnected automatically. Can this be done in radius server?

I’m newbie in Mikrotik. Where can I find solution to this.

thanx

Mikrotik-Recv-Limit
Mikrotik-Recv-Limit-Gigawords
Mikrotik-Xmit-Limit
Mikrotik-Xmit-Limit-Gigawords

are used to limit total amount of uploaded downloaded data.

Rate-Limit is used to limit bandwidth, rate-limit syntax -
rx-rate[/tx-rate] [rx-burst-rate[/tx-burst-rate] [rx-burst-threshold[/tx-burst-threshold] [rx-burst-time[/tx-burst-time] [priority] [rx-rate-min[/tx-rate-min]]]]

More information about supported RADIUS attributes,
http://www.mikrotik.com/testdocs/ros/2.9/guide/aaa_radius_content.php#13.4.5

Thanks for your prompt reply.

Where can I put this attributes ? I’m using freeradius with mysql. Do I need to put this attributes in radius database ? If so, which table ?

hi

have put those attributes in radius database and mikrotik acts based on these parameters. but when the quota is exceeded the user automatically logs off and he can log in again and use internet b’coz his recv-limit and xmit-limit starts from 0. I want to record the total bandwidth used by user and if it reaches the limit given to him, the user should not be able to log in again until his account is renewed.

I hope there must be solution for this.

Also how can I specify the validity for the account/package.

thanks

Im interested in doing something similar, what solution did you find to this problem?

Hi

visit this links :

http://wiki.freeradius.org/Rlm_sqlcounter → for time limit

http://forum.mikrotik.com/t/use-of-rlm-sqlcounter-rlm-counter-for-time-data/13577/1 → for data limit