How can i provide internet service based on usage volume? Like i want to provide certain users 5GB usage a month, how can i ensure that.
I understand there is something in the wiki that shows how to do it using just the Mikrotik router itself. Basically it makes use of traffic accounting and a script that monitors usage. The usage is “stored” in the comments field for each user I believe so that it does not get reset if the router is rebooted.
We developed our own PHP/Mysql solution that downloads the usage info from key routers every five minutes and updates the speed a customer has access to based on this (ie before they hit the monthly GB limit they get one speed and afterwards they get another).
regards
Peter
Use Radius with these attributes for 1 session
http://wiki.mikrotik.com/wiki/RADIUS_Client#MikroTik_Specific_RADIUS_Attribute_Numeric_Values
MIKROTIK_RECV_LIMIT
MIKROTIK_RECV_LIMIT_GIGAWORDS
MIKROTIK_XMIT_LIMIT
MIKROTIK_XMIT_LIMIT_GIGAWORDS
MIKROTIK_TOTAL_LIMIT
MIKROTIK_TOTAL_LIMIT_GIGAWORDS
You should be able to use this as well to store how much data they have transferred and act accordingly with a database.
http://wiki.mikrotik.com/wiki/RADIUS_Client#Stop_and_Interim-Update_Accounting-Request
Presumably that does require the user to have “logged in” somehow?
Yes it requires someone to sign in someway to take advantage and to give them volume based services, hotspot, PPPoE, L2TP, etc. Otherwise no router will know to track a person.
Depends on how you do things.
We do not use logins but give our customers a fixed IP address and track usage based on that.
Thanks. So, it can not be done with MT alone, needs an extra radius server to keep track.
I do that with mikrotik hotspot a radius server, mysql databse and a custom php driven website for customers to buy topups create accounts etc. The whole process is done by the user and they can see their gigs left and buy topups or subscribe to a monthly ammount from a user friendly control panel with paypal. Its quite alot of work to setup and code but it’s possible.
Is there someone implemented volume based service with PPPoE server maybe with FreeRadius? If so can you exclude some packets between specific servers from this volume counting?