User Daily Volume - Limit Accordingly ??

Since a user can create multiple sessions per day by log in, and idle / user request log out, we need a variable to hold “TOTAL” volume per day. Start at 00:00:00 and Reset at 23:59:59.
its better to handle any power lost, so maybe this var can be also be written to file while reside in memory. its not the greatest
deal if not possible, better if it is.

VAR DailyDownloadVol = 0;

We can have multiple band limit set: say HiLimit = 5M/5M MedLimit = 1M/1M LowLimit = 256k/256k

We can have a function to look at DailyDownloadVol and compare it to 2 different VAR as

VAR HI = 1G; // DailyDownloadVol is not yet higher than 1G
VAR Med = 2G // DailyDownloadVol is not yet higher than 2G
anything beyond these 2 vars will continue the band limit set on 256k

so:

if
!(DailyDownloadVol >= HI) {set user limit HiLimit } break


else if
!(DailyDownloadVol >= Med) {set user limit 1M/1M} break


else
{set user limit 256k/256k} break



here the idea is a 24 hour base limit on a user whose rate limit changes through time according to his/her download volume per on single day. if this user does nothing but download, he/she will have dynamic limit and as long as he/she stays below 1G download limit is at 5M. if he/she crosses 1G but and stays below 2G he/she will then get 1M speed. but if this user is only a downloader he/she will get 256k when crossing 2G per day…


so now, who can be in the mood to start this speed limit technique and provide some scripts to start with..

the limits and the band can be anything of your choices…

thanks,

Guys I really think this method could really workout well if we can divide the band sharing by using different limitations on users. It could solve all P2P and Internet DM and stuff, while giving a pure smooth internet to all other users who are not heavy duty downloader.

if you guys are not interested, at least can you provide support on some codes to use: for example:

how to get user’s download used summing all active sessions per one day even if the user logs off and in multiple times?
how to save this “download used” as an integer somewhere in memory or in a file?
how to access this memory or file and get the user’s “download used” as integer to be putted in use?

can anyone help out please…

thanks,

I don’t see any way to do this natively in RouterOS without completely out of control scripts.

This wouldn’t be terribly hard to do in RADIUS, though. With interim accounting and CoA it’s definitely possible. It’s still a heck of a lot of work. You might want to look into hiring a contractor or consultant to solve this for you.

Bro “fewi”, you know I use UM, I can’t live without it. :smiley:

That is a good news you’re giving out..

well, my network is set as:

users connect to some local MT router with hotspot.
all local MT routers are connected to on router with UM.

so, users will get access if they have an account on this remote router.
this router has UM, firewalls and PCQ to divide the band between users.

local routers don’t have any simple or tree queue or any band limitations.

BUT I am thinking of changing this method…
a second after midnight, users will login with no limitation on local routers. if they downloaded certain amount within certain time, I want them to get a certain queue tree made for them “LOCAL Router”… if however they continued to download even more, i want to set them on even a different queue tree.
everything will go back to normal at midnight again of next day.

there are 2 things that should be noted:
one: a user should not be kicked out.
two: how to get a summed download value of a user if he/she logs in and out multiple times per day

having this layout in the hand, how to approach this?

and thanks a lot for your reply..

I don’t think this is solvable with UM. It would require a proper RADIUS server with more customization capabilities.

well, this time the news was not so good. :frowning:

I can throw in a box with linux and run free-radius, although i see i will just put myself in a mess.
the cool thing about MicroTik products is the bundle it has, route, bridge, dhcp, hotspot, radius all in just one piece of device.
There is a big difference between owning a TV that work by Tube, and one working by Semiconductor material!!

I say like another member of this forum said… “I have my hair turned gray waiting for a major change of UM”.


I will still try and hope i will get somewhere close to achieving this…

thanks again,