Community discussions

MikroTik App
 
aminor13
just joined
Topic Author
Posts: 4
Joined: Sun Oct 14, 2012 12:08 pm

How to share internet bandwidth equally between two or more interface (Not per connection)

Wed Feb 15, 2017 2:26 pm

hi
I use mikrotik routerboard in a building for share the internet bandwidth between 10 units. Each unit has its own access point connected to an interface of mikrotik.
Unit No.1 connected to eth1 with address: 192.168.1.1/24
Unit No.2 connected to eth2 with address: 192.168.2.1/24
Unit No.3 connected to eth3 with address: 192.168.3.1/24
and so on.
Now I have a problem with some guys from Unit No.4 who use internet download manager or something like that and occupy whole the bandwidth.
How I can use queue to share and shape all of the internet bandwidth equally between these Units.
sorry for weak English grammar.

thanks in advance
 
User avatar
cdiedrich
Forum Veteran
Forum Veteran
Posts: 997
Joined: Thu Feb 13, 2014 2:03 pm
Location: Basel, Switzerland // Bremen, Germany
Contact:

Re: How to share internet bandwidth equally between two or more interface (Not per connection)

Wed Feb 15, 2017 3:29 pm

Now that looks simple and I'd do it with simple queues.

Either you just limit the bandwidth per unit or even per client in that unit.

Create some Simple queues and pcq-types:
Let's say you want to limit each unit to 50/50 in total and every client should get 5/5:
/queue type
add kind=pcq name=Up-5M pcq-classifier=src-address pcq-rate=5M
add kind=pcq name=Down-5M pcq-classifier=dst-address pcq-rate=5M 
/queue simple
add max-limit=50M/50M name="Unit1" queue=Up-50M/Down-5M target=192.168.1.0/24
add max-limit=50M/50M name="Unit2" queue=Up-50M/Down-5M target=192.168.2.0/24
add max-limit=50M/50M name="Unit3" queue=Up-50M/Down-5M target=192.168.3.0/24
add max-limit=50M/50M name="Unit4" queue=Up-50M/Down-5M target=192.168.4.0/24
This ensures that the whole unit will not get more than 50/50 and a single client not more than 5/5.
-Chris
 
aminor13
just joined
Topic Author
Posts: 4
Joined: Sun Oct 14, 2012 12:08 pm

Re: How to share internet bandwidth equally between two or more interface (Not per connection)

Wed Feb 15, 2017 9:58 pm

Now that looks simple and I'd do it with simple queues.

Either you just limit the bandwidth per unit or even per client in that unit.

Create some Simple queues and pcq-types:
Let's say you want to limit each unit to 50/50 in total and every client should get 5/5:
/queue type
add kind=pcq name=Up-5M pcq-classifier=src-address pcq-rate=5M
add kind=pcq name=Down-5M pcq-classifier=dst-address pcq-rate=5M 
/queue simple
add max-limit=50M/50M name="Unit1" queue=Up-50M/Down-5M target=192.168.1.0/24
add max-limit=50M/50M name="Unit2" queue=Up-50M/Down-5M target=192.168.2.0/24
add max-limit=50M/50M name="Unit3" queue=Up-50M/Down-5M target=192.168.3.0/24
add max-limit=50M/50M name="Unit4" queue=Up-50M/Down-5M target=192.168.4.0/24
This ensures that the whole unit will not get more than 50/50 and a single client not more than 5/5.
-Chris
thank you very much for your quick response cdiedrich. but in this case actually my total bandwidth is low(4mbps), and I don't want to miss any amount of free bandwidth when the others are not using it, I mean I want that whole of the bandwidth should be available to use when nobody else is using it. and finally I should say that in this case it is not matter to limit every client in each unit .
 
aminor13
just joined
Topic Author
Posts: 4
Joined: Sun Oct 14, 2012 12:08 pm

Re: How to share internet bandwidth equally between two or more interface (Not per connection)

Thu Feb 16, 2017 10:16 am

I'm in trubble, any suggestion?
 
User avatar
cdiedrich
Forum Veteran
Forum Veteran
Posts: 997
Joined: Thu Feb 13, 2014 2:03 pm
Location: Basel, Switzerland // Bremen, Germany
Contact:

Re: How to share internet bandwidth equally between two or more interface (Not per connection)

Thu Feb 16, 2017 10:46 am

Well, you say you want all the bandwidth when nobody else is using it - I understand that.
Now someone else uses it and you complain about it?

I haven't tried this but from my (not so proficient) knowledge about queues, you could give it a try with setting the pcqs to 4M/4M and the max-limit as well.
I'd say that now the b/w is equally distributed and equally cut when it peaks.
You should probably set 192.168.0.0/16 as target and have only one aggregate simple queue for all units.

Could anybody confirm this or correct me?
Thanks,
-Chris
 
User avatar
dgnevans
Member
Member
Posts: 469
Joined: Fri Mar 08, 2013 11:24 am
Location: Zimbabwe
Contact:

Re: How to share internet bandwidth equally between two or more interface (Not per connection)

Thu Feb 16, 2017 12:22 pm

/queue type
add kind=pcq name=PCQ-upload-4M pcq-classifier=src-address pcq-rate=4M
add kind=pcq name=PCQ-download-4M pcq-classifier=dst-address pcq-rate=4M 
/queue simple
add max-limit=50M/50M name="Unit1" queue=Up-50M/Down-5M target=192.168.0.0/16
It should work. PCQ will halve the bandwidth if there are 2 people connected quarter if there are 4 etc etc. I have been using this in my setup for a long time. I limit each users to 1.5mbps up down within a vlan and then have a parent queue in the bottom which each queue gets it bandwidth from. This allows me to give an idividual IP full bandwidth by putting it higher up the list or prioritise certain vlans or voice.

Who is online

Users browsing this forum: No registered users and 33 guests