Page 1 of 1

Userman Bandwidth on Shared hotspot users

Posted: Tue Apr 12, 2011 11:13 pm
by winagain
Hi,

I have been using hotspot and userman for a couple of years, I would like to know how I can set shared users to share bandwidth.

When 2 users are logged on the hotspot with the same username, they each get the bandwidth specified in user-manager.

How can this be changes so that if 2 users are logged in the bandwidth will be 50% to A and 50% to B

and if 3 users each on gets 33.333333% of the alloted bandwidth

hope there is a solution for this.

Re: Userman Bandwidth on Shared hotspot users

Posted: Wed Aug 31, 2011 9:52 am
by winagain
Bump

No one got a solution for this?

Re: Userman Bandwidth on Shared hotspot users

Posted: Thu Feb 09, 2012 5:45 pm
by nspotorno
still nothing in 2012 for this issue?

Re: Userman Bandwidth on Shared hotspot users

Posted: Thu Feb 09, 2012 6:37 pm
by winagain
Still have not found a solution.

Would love to know if it's possible

Re: Userman Bandwidth on Shared hotspot users

Posted: Thu Feb 09, 2012 10:04 pm
by javedshotline
Same problem here :D
i think it can be done with script & Queues.

Re: Userman Bandwidth on Shared hotspot users

Posted: Thu Feb 09, 2012 10:12 pm
by winagain
you'd think that a client logged in twice would automatically have speed stipulated in userman halved as two users are using the same subscription.

This should be working out of the box in my opinion, as you have rate limits in there for a reason to manage the available bandwidth, and some clients have multiple devices, and not everyone has routers in place.

Quite frustrating as I have searched for a solution but have found none.

Re: Userman Bandwidth on Shared hotspot users

Posted: Mon Feb 13, 2012 3:12 am
by macsrwe
I don't have the time to set up this configuration to experiment, but since you already have it set up, maybe you can investigate the following.

When you have more than one of the same user logged in, look at the Queues / Simple Queues screen and see if you have only one entry for that user, or if you have more than one. If you have more than one, how do their names differ?

If you have only one entry, enable the columns for RX max limit, TX max limit, RX avg rate and TX avg rate. The max limits should be what you set for the user, not a multiple of that -- otherwise that is the source of your problem, ROuterOS is doing something unusual, and you will have to ask somebody how to control for that.

Then, the avg rates should stay at or below the max limits - if they are, it would suggest that your user is already getting the reduced bandwidth you want him to get.

If you run this test please let us know the results.

Re: Userman Bandwidth on Shared hotspot users

Posted: Mon Feb 13, 2012 7:39 am
by winagain
The difference between the queues is that the IP assigned to the session is different.

Max limit are in use and are working however when the user connects using multiple devices using the same user credentials the speed is not divided between the two concurrent connections.

So every device that connects to the hotspot with the same user credentials in effect gets it's own bandwidth, which shouldn't be the case, as 1 user should only be allowed to the bandwidth they are subscribed to and no more, no matter how many devices are connected.

Re: Userman Bandwidth on Shared hotspot users

Posted: Sat Feb 25, 2012 11:20 am
by hamada1973
any answer for this post ?

Re: Userman Bandwidth on Shared hotspot users

Posted: Sat Feb 25, 2012 1:55 pm
by bambangs2komputer
Hi,

I have been using hotspot and userman for a couple of years, I would like to know how I can set shared users to share bandwidth.

When 2 users are logged on the hotspot with the same username, they each get the bandwidth specified in user-manager.

How can this be changes so that if 2 users are logged in the bandwidth will be 50% to A and 50% to B

and if 3 users each on gets 33.333333% of the alloted bandwidth

hope there is a solution for this.
I disagree if mikrotik give feature like your explain because not effective for technition & I think following course not usefull :-) .
if you want config like that you can config mangle,queuetree,pcq,put user profile more than one & put your customer into usermanager+put name user (same with user profile in the hotspot).
I've done config like that & great work

Re: Userman Bandwidth on Shared hotspot users

Posted: Sat Feb 25, 2012 2:30 pm
by hamada1973
hi bambangs2komputer
Can you please explain more about how to do it in the mangle,queuetree,pcq?
if you have an example for 8 user using 1Mbs... thats mean sharing is 1/8 for each 1Mbps
i need this because i have a small network with 5Mbps sharing is 1/1 and i need to sell them to my customers using sharing 1/8 ratio...
if i leave it as is then 5 customers with 1Mbps profile for each one then the 5 customers using downloade manager can take the 5Mbps for themself and the rest customers dont get good internet.

i hope you get the whole picture

regards

Re: Userman Bandwidth on Shared hotspot users

Posted: Sat Feb 25, 2012 8:43 pm
by macsrwe
bambangs:

What the original poster wants to do makes perfect sense, and it would be nice if User Manager knew how to do it.

For example, consider a trailer park hotspot, set up so that people who arrive for the weekend can buy two days of time at a limited 1mb/s download speed, and are given a name and password to use for the weekend, all in an automated, unassisted PayPal transaction. You don't want to tie the account to one MAC address because you want anyone in the family to be able to use it. You don't want to give EACH computer that is in use simultaneously using that name and password 1mb/s because they didn't pay you for that much bandwidth. And you certainly don't want to require a system where somebody has to create a queue and manually add these people to it, because they're only going to be there for two days and you don't even know each other. Instead, you want to set up a system that works the same as if you had established a 1mb/s channel to their trailer and they shared the bandwidth among themselves using a SOHO router. I could use precisely this mechanism at my own sites. Because I don't know how to set it up (even if it is possible) without manual intervention, right now I just have to limit my accounts to one concurrent user at a time.

Re: Userman Bandwidth on Shared hotspot users

Posted: Thu May 03, 2012 12:58 pm
by winagain
macsrwe this is actually exactly what I meant, it would be cool if user-manager had the queues done automatically.

It would make life so much easier, as I now have to monitor the users that are logging in and using multiple login's and then manually have to create queues to limit them to share the bandwidth which they have paid for.

This is highly inconvenient, as it's should automatically have been where userman creates the shared queue, or at least that is my opinion, otherwise why would you allow shared access, if it's not sharing the bandwidth that has been allocated???

Re: Userman Bandwidth on Shared hotspot users

Posted: Wed May 30, 2012 3:28 am
by tenenbaum
I agree. We just started using the hotspot feature. We have a building where every user needs to get X amount of bandwidth for Y amount of devices. Problem is that while we allow the user to login with Y devices, the bandwidth the user is getting is X+X+X as many as Y is.

So I agree with the original post that one would think the bandwidth is per user and not per device, but that's not the case. PCQ does not really solve this issue (not to mention soooooo much more complicated) because PCQ will still give each IP in the address list associated with the pcq its bandwidth and not shared.

Yes, your an limit it at the tree level but then you need a queue for each user and this won't scale.

Re: Userman Bandwidth on Shared hotspot users

Posted: Thu May 31, 2012 5:05 pm
by pjulian
The only plausible option is to control users by MAC address which isn't really an easy thing to do in the scenarios mentioned.
You could use a front end landing page for management of users by the operator of the hotspot, they could easily add MAC addresses and use MAC auth in the hotspot profile, problem is finding them on the laptops/phone/whatever device, most users wouldn't have a clue and it's time consuming.

The system is designed to manage bandwidth by logged in user, if you are logging in more than once with the same account then of course it's not going to be able to handle it properly, the only way to do that is identify each user by mac or IP, which it simply doesn't do.

If you really want more control then create extra users or limit bandwidth per user down low and allow bursting to get the speeds you need when it's quiet (CIR/MIR), then when it's busy the bandwidth will more likely be spread across users better, only marginally though, there really isn't a simple answer to this question IMHO.

Paul

Re: Userman Bandwidth on Shared hotspot users

Posted: Thu May 31, 2012 7:34 pm
by winagain
hotspot should create a queue tree entry for each user, when another user logs on using the same username, it gets put on the sub branch of that tree entry. That way userx gets the bandwidth they pay for and no more. This should be done dynamically so that the user nor the hotspot owner should require input.

There may be other meathods of doing this.

Re: Userman Bandwidth on Shared hotspot users

Posted: Thu May 31, 2012 7:40 pm
by tenenbaum
winagain, that would be nice but it's not working like that.

Ofer

Re: Userman Bandwidth on Shared hotspot users

Posted: Thu May 31, 2012 9:13 pm
by winagain
Is there is any hope of mikrotik solving this in the future?

Re: Userman Bandwidth on Shared hotspot users

Posted: Fri Jun 01, 2012 1:12 am
by pjulian
I don't think you would see a change to this by Mikrotik, I could be wrong, but I think you will find it's working as designed.
I would imagine that more people would want it working the way it does, I certainly would and we have a lot of hotspots, I can however see why you would want it the other way, I'm just not sure that there is a huge demand for that, perhaps shoot an email off to them and ask specifically rather than just in the forums, they are a great bunch of guys and it may just be a simple thing to implement, you never know.

Regards
Paul

Re: Userman Bandwidth on Shared hotspot users

Posted: Mon Jun 18, 2012 1:20 pm
by angboontiong
There is still no solution on this?

Re: Userman Bandwidth on Shared hotspot users

Posted: Sat Jun 23, 2012 1:36 am
by tevolo
Guys, I've been looking for a solution as well, and I have created one, but I'd like to take it further so it is not so tedious.
I use a Radius Server, but I'm sure it can be done with User Manager and I plan to test soon since I'm looking for a better solution.

Here we go:
1. I have all my user accounts setup in Radius. Each User account uses a radius attribute: Mikrotik-Group = "unit301"
This tells the router to put the user in the Hotspot User Profile: Unit301. Same thing if you created a Hotspot user and put that user in a certain User Profile.
2. Next I create and configure the User Profile: Unit301.
3. I also create an Address Pool: Unit 301.
4. The User Profile is configured to use the Address Pool. I create an Address Pool with the number of Simultaneous Logins I would like a user to have, ie, 192.168.1.10-192.168.10.12 (3 simultaneous uses).
5. Apply the Address Pool in the User Profile for Unit301, and then apply 50 Shared Users for the profile so it never runs into issues - since it is limited by IPs, they'll never get to 50 or even past 3!
6. Create a Simple Queue for the Target Addresses: 192.168.1.10-182.168.10.12. Limit those addresses to a TX/RX limit (I used 8M/2M).
7. Test.

This allows 3 devices to login simultaneously. The queue does it's best to split the bandwidth evenly to each device, and together they receive no more than the 8M/2M I set in the queue. When a 4th device tries to login, it simply says, there are no more IPs available for the user (but you can edit that message if you want).

So this is a working fix, but it is very tedious.

1. I'd like a script to do this if anyone can help.
2. I'd like to convert this to use PCQ and Queue Trees since a lot of simple queues is not good at all, especially when you do this for 100 users or more.

I'm trying to come up with a way to use VLANs, or maybe PPP accounts. Let's try to put something together!!!!!!!!!! Comments Welcome.

Re: Userman Bandwidth on Shared hotspot users

Posted: Sat Jun 23, 2012 12:11 pm
by pjulian
Nice idea, might be a bit hard to tidy it up more though, have a look at the attributes you can pull from radius, you might find something there which is useful as well to help with this, I will have a think about it as well and see if I can think of any shortcuts.

Paul

Re: Userman Bandwidth on Shared hotspot users

Posted: Tue Sep 18, 2012 5:08 am
by tevolo
Anybody have further developments and ideas on this? Anyway to simplify the process?

Re: Userman Bandwidth on Shared hotspot users

Posted: Wed Sep 26, 2012 2:37 pm
by Gareth
I've find a way to do this using Hotspot user profiles, address lists, firewall mangle rules and pcq queues.

Downsides are that you have to create a new hotspot user profile, mangle rules and queues for each account, and you end up with loads of mangle rules, which uses more CPU.

I create the following rules on my Hotspot:

This creates a hotspot user profile called user1 that allows a maximum of 3 logins and adds each user's IP address to the firewall's address list. NB: When you create your user in User Manager, you must make the group = user1.
/ip hotspot user profile
add address-list=user1 address-pool=capped advertise=no idle-timeout=1h \
    keepalive-timeout=5m name=user1 open-status-page=always shared-users=\
    3 status-autorefresh=2m transparent-proxy=yes
This marks the upload and download packets for each user in the user1 address-list, so we can rate-limit them with PCQ queues.
/ip firewall mangle
add action=mark-packet chain=prerouting comment="Mark user1 Packets" \
    disabled=no new-packet-mark=user1-up passthrough=no src-address-list=\
    user1
add action=mark-packet chain=prerouting comment="" disabled=no \
    dst-address-list=user1 new-packet-mark=user1-down passthrough=no
The code for the PCQ Queue types
/queue type
add kind=pcq name=capped_download pcq-classifier=dst-address pcq-limit=50 \
    pcq-rate=1024000 pcq-total-limit=2000
add kind=pcq name=capped_upload pcq-classifier=src-address pcq-limit=50 \
    pcq-rate=192000 pcq-total-limit=300
This code creates the PCQ queues. The first two lines create a DOWNLOAD and UPLOAD group. In my setup, capped users connect to the Internet via a different line from my uncapped users, so in the third and fourth lines I create a capped upload and capped download group with a maximum download and upload rate for all the users therein. The last two lines create an upload and download queue for the user inside the capped upload and download group (see picture)
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
    max-limit=0 name=PCQ_DOWNLOADS parent=global-in priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
    max-limit=0 name=PCQ_UPLOADS parent=global-in priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
    max-limit=384k name=CAPPED_uploads parent=PCQ_UPLOADS priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
    max-limit=3584k name=CAPPED_downloads parent=PCQ_DOWNLOADS priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
    max-limit=1024k name=user1-out packet-mark=user1-down parent=\
    CAPPED_downloads priority=8 queue=capped_download
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
    max-limit=192k name=user1-in packet-mark=user1-up parent=CAPPED_uploads \
    priority=8 queue=capped_upload
Image

More info: QoS and traffic priorities, by Janis Megis, MikroTik

Re: Userman Bandwidth on Shared hotspot users

Posted: Sun Jan 06, 2013 7:20 pm
by tevolo
Having just as many PCQ rules and Mangle rules is probably more CPU dependent than just having Simple Queue handle the bandwidth for the accounts.

We actually have been using this solution for the past year and have had great success! While it is tedious to setup, once it is implemented, it has been pretty easy to manage. The hardest part comes from needing to make changes to the hotspot, which means you have to make changes to every user profile, but scripting makes that a lot easier. We've been happy with the setup now and haven't made changes for the longest time. So far so good!

Next step, find a solution to apply this setup and management from one platform like Radius! :o

Re: Userman Bandwidth on Shared hotspot users

Posted: Fri Aug 07, 2015 2:37 pm
by hari42726
any solution on this?i need it ..

Re: Userman Bandwidth on Shared hotspot users

Posted: Thu Aug 13, 2015 3:00 pm
by hossain2004a
any solution on this?i need it ..
Still the same problem stated in first post?

Re: Userman Bandwidth on Shared hotspot users

Posted: Mon Aug 17, 2015 10:29 am
by hari42726
any solution on this?i need it ..
Still the same problem stated in first post?
Yes Anyone have solution for this . now i using routeros 6.30.2

Re: Userman Bandwidth on Shared hotspot users

Posted: Fri Aug 21, 2015 12:44 pm
by hossain2004a
any solution on this?i need it ..
Still the same problem stated in first post?
Yes Anyone have solution for this . now i using routeros 6.30.2
It's really easy bro.
Just use PCQ in queue and you get what u want. Just go to queue and set PCQ queue for whole network, so if just like user c connected it would have whole bandwidth and if two users, 50 and 50 and so on.... Ask I get your point correctly?

Re: Userman Bandwidth on Shared hotspot users

Posted: Tue Oct 27, 2015 4:16 am
by wacky786
Guys, I've been looking for a solution as well, and I have created one, but I'd like to take it further so it is not so tedious.
I use a Radius Server, but I'm sure it can be done with User Manager and I plan to test soon since I'm looking for a better solution.

Here we go:
1. I have all my user accounts setup in Radius. Each User account uses a radius attribute: Mikrotik-Group = "unit301"
This tells the router to put the user in the Hotspot User Profile: Unit301. Same thing if you created a Hotspot user and put that user in a certain User Profile.
2. Next I create and configure the User Profile: Unit301.
3. I also create an Address Pool: Unit 301.
4. The User Profile is configured to use the Address Pool. I create an Address Pool with the number of Simultaneous Logins I would like a user to have, ie, 192.168.1.10-192.168.10.12 (3 simultaneous uses).
5. Apply the Address Pool in the User Profile for Unit301, and then apply 50 Shared Users for the profile so it never runs into issues - since it is limited by IPs, they'll never get to 50 or even past 3!
6. Create a Simple Queue for the Target Addresses: 192.168.1.10-182.168.10.12. Limit those addresses to a TX/RX limit (I used 8M/2M).
7. Test.

This allows 3 devices to login simultaneously. The queue does it's best to split the bandwidth evenly to each device, and together they receive no more than the 8M/2M I set in the queue. When a 4th device tries to login, it simply says, there are no more IPs available for the user (but you can edit that message if you want).

So this is a working fix, but it is very tedious.

1. I'd like a script to do this if anyone can help.
2. I'd like to convert this to use PCQ and Queue Trees since a lot of simple queues is not good at all, especially when you do this for 100 users or more.

I'm trying to come up with a way to use VLANs, or maybe PPP accounts. Let's try to put something together!!!!!!!!!! Comments Welcome.

Hi
I am running a very similar setup, all is running well just my ip address get full under hotspot, hosts

Re: Userman Bandwidth on Shared hotspot users

Posted: Tue Oct 27, 2015 4:18 am
by wacky786
I have a solution running quite well.

Re: Userman Bandwidth on Shared hotspot users

Posted: Fri Nov 20, 2015 1:08 pm
by andreas140265
I have a solution running quite well.
Why dont you share it?

Re: Userman Bandwidth on Shared hotspot users

Posted: Fri Mar 04, 2016 1:49 pm
by WirelessRudy
So, what is the status of any solutions now?

We started to implement user manager in our network (up to now all was manual queues, dhcp server etc) but we do have in fact some clients that have two antennas fit on their two houses and been given a discount contract under the stipulation they have a shared total bandwidth for the the two.
So the clients has for instance 6Mb but when they use it on both at the same time each only get 3mb.
The problem is that user manager is assigning for each client a public IP with its own queue.

For now we are thinking of a by-pass solution:

- We created a special profile in user manager without any limits. (So traffic would go unlimited)
- In user manager we arrange the client gets a fixed IP for its 2 or more antennas. (We'd made a separate pool for these with a local IP)
- In the source nat we arrange these IP to get one public IP (We only have som 10 or so clients, they can share one public IP. We are a bit short on these....)
- We make a specif queue for each of such clients. It will have the both (or more) IP s from the client so the traffic now gets shared under that one queue.
- Since the 'unlimited' perfil for such user doesn't make a queue anyway, this manual queue we made catches the traffic...

Any ideas on this?
And comments?
Any improvements?

Re: Userman Bandwidth on Shared hotspot users

Posted: Sat Jul 23, 2016 8:59 pm
by rollyboy
I wanted to address this concern to professionals here since more likely Mikrotik always, even from email replies to your concern and asking you to check the forum first (which is helpful in some ways), hence Still proper guidance is still needed and as far I can see this looong way concern for the past years and several updates looks like there is still no solid answer or solution or even a tutorial that we can share (specifically to this matter). which is more likely took the attention of people who loves using Usermanager. and as a person who learns to use Mikrotik using forum I myself is always or otherwise pass by this specific thread to check if there are anyone could share, I know and I do understand also for people that might have the solution and having doubts of sharing please do at least PM specific users here if still interested and offer ($???) your solution i do agree on this one since in case we need a feature like this and you can offer we can talk about it (jeez) anyone?

Re: Userman Bandwidth on Shared hotspot users

Posted: Tue Aug 08, 2017 5:35 pm
by phallaccmt
Will you pay?

Re: Userman Bandwidth on Shared hotspot users

Posted: Thu Sep 21, 2017 12:52 am
by MATU
I got a very easy solution by creating IP pools for each hotspot user profile (Mine were 3) and then creating queues for these 3 profiles with the target being the network address of each of the IP pools , It worked well.
Assuming you solved yours, let me know how you achieved it.

Re: Userman Bandwidth on Shared hotspot users

Posted: Thu Sep 21, 2017 1:25 pm
by phallaccmt
M doing by script.

Re: Userman Bandwidth on Shared hotspot users

Posted: Mon Sep 24, 2018 4:44 am
by phallaccmt

Re: Userman Bandwidth on Shared hotspot users

Posted: Thu Jul 11, 2019 6:39 pm
by projectdimpreza
I got a very easy solution by creating IP pools for each hotspot user profile (Mine were 3) and then creating queues for these 3 profiles with the target being the network address of each of the IP pools , It worked well.
Assuming you solved yours, let me know how you achieved it.
does this require to create multiple dhcp server for each pool?