Community discussions

MikroTik App
 
raymondr15
Member Candidate
Member Candidate
Topic Author
Posts: 118
Joined: Fri Sep 05, 2014 1:11 am
Location: East London, South Africa
Contact:

Create bandwidth profiles with mangle and queues

Fri Feb 24, 2017 6:58 pm

Hi,

I am looking for a way to use one queue in queue tree for every IP, basically want to add client's IP to address list and queue the same speed per IP's in the address list
eg:
/ip firewall mangle
add action=mark-connection chain=forward comment=2Mbps_Client \
    new-connection-mark=2Mbps_Client passthrough=yes src-address-list=\
    2Mbps_Client
add action=mark-packet chain=forward connection-mark=2Mbps_Client \
    new-packet-mark=2Mbps_Client passthrough=no
add action=mark-connection chain=forward comment=4Mbps_Client \
    new-connection-mark=4Mbps_Client passthrough=yes src-address-list=\
    4Mbps_Client
add action=mark-packet chain=forward connection-mark=4Mbps_Client \
    new-packet-mark=4Mbps_Client passthrough=no
Then I want to add a Queue in Queue tree that will limit automatically per client IP
eg:
/queue tree
add max-limit=20M name="Total Bandwidth Download" parent=LAN priority=1 queue=\
    default
add max-limit=2M name="2Mbps_Client - rx" packet-mark=2Mbps_Client parent=\
    "Total Bandwidth Download" queue=default
add max-limit=4M name="4Mbps_Client - rx" packet-mark=4Mbps_Client parent=\
    "Total Bandwidth Download" queue=default
I was thinking this was possible with PCQ but I do not want to share the Max-Limit bandwidth, I want every user to get the specified amount of bandwidth.
Is this possible?

:)
 
horstkevin
newbie
Posts: 26
Joined: Thu Feb 23, 2017 2:52 am

Re: Create bandwidth profiles with mangle and queues

Mon Feb 27, 2017 1:18 am

I was thinking this was possible with PCQ but I do not want to share the Max-Limit bandwidth, I want every user to get the specified amount of bandwidth.
Is this possible?
Why dont you use simple-queue for each client with max-limit = 2mbit/s.?
 
User avatar
dgnevans
Member
Member
Posts: 469
Joined: Fri Mar 08, 2013 11:24 am
Location: Zimbabwe
Contact:

Re: Create bandwidth profiles with mangle and queues

Mon Feb 27, 2017 8:20 am

YOu can create a PCQ with with the limit of 2 Mbps per second for both upload and download and pcq limit of 4mbps for both upload and download. Then create simple queues for either whole subnets or inidividula clients. Make all these simple queues have a parent. Place the parent at the bottom. And put the max limit of the parent as the total bandwidth you have.
 
raymondr15
Member Candidate
Member Candidate
Topic Author
Posts: 118
Joined: Fri Sep 05, 2014 1:11 am
Location: East London, South Africa
Contact:

Re: Create bandwidth profiles with mangle and queues

Tue Feb 28, 2017 2:42 pm

YOu can create a PCQ with with the limit of 2 Mbps per second for both upload and download and pcq limit of 4mbps for both upload and download. Then create simple queues for either whole subnets or inidividula clients. Make all these simple queues have a parent. Place the parent at the bottom. And put the max limit of the parent as the total bandwidth you have.

Thanks, will try that and maybe do what I'v been trying to do.

Basically what I am trying to do is apply priorities to clients traffic individually, so I can specify a clients data speed package via the markings and address list then apply priorities on top of the the main queue, I do not want to do this per user else my queue tree or simple will have thousands of queues so that is why I want to have a set of queues to each client package that will automatically do the priority per IP address listed in the address-list.

I know how to mark connections/packets but not entirely sure on which way to do it per client with priorities.

I'm wanting to do all the queuing on the core router of the network, I'v got an OSPF backbone network and all internet traffic is routed through the core.
 
User avatar
dgnevans
Member
Member
Posts: 469
Joined: Fri Mar 08, 2013 11:24 am
Location: Zimbabwe
Contact:

Re: Create bandwidth profiles with mangle and queues

Tue Feb 28, 2017 4:40 pm

You can program this using the mangle rules as you suggested or you can go the route of setting up all your clients within one subnet for each speed and have a priority for that rule. It depends how you have configured everyone so far. I prefer the simple queues because there is less resource overheads that you would have with mangle rulels. I design my system so that I can have as few rules as possible.
 
raymondr15
Member Candidate
Member Candidate
Topic Author
Posts: 118
Joined: Fri Sep 05, 2014 1:11 am
Location: East London, South Africa
Contact:

Re: Create bandwidth profiles with mangle and queues

Tue Feb 28, 2017 9:39 pm

You can program this using the mangle rules as you suggested or you can go the route of setting up all your clients within one subnet for each speed and have a priority for that rule. It depends how you have configured everyone so far. I prefer the simple queues because there is less resource overheads that you would have with mangle rulels. I design my system so that I can have as few rules as possible.

Could you point me in the right direction by doing it with mangle and simple queues per IP (with one set of queue's per address list profile)?

Who is online

Users browsing this forum: Google [Bot], Javokhir, pturmel, sindy, sirbryan, tdw and 192 guests