Community discussions

MikroTik App
 
novelty22
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Fri Feb 12, 2010 1:57 pm

Making sure a given amount of bandwidth is available for a given device

Wed Apr 18, 2018 8:22 pm

Hi,

I have a customer with a 120M/120M connection. This is for a church that usually has 100-250 users on wifi at any given time.

I need to make sure that at least 15M/15M is available at all times for a given streaming device, but I also want to make sure any wifi users have full access to the other 105M. What is the best way to go about this?

Is there a way to use PCQ to accomplish this? Dedicate 105/105 to PCQ which would leave the remaining 15M available to the other device (e.g. if i moved the streaming device to a different subnet)?
I see an example on how to see a max limit for each PCQ user, but I can't seem to find any that set a max limit for all PCQ users. (https://wiki.mikrotik.com/wiki/Manual:Q ... Q_Examples)

Is there a better way to go about this?

Any suggestion would be appreciated.
 
2frogs
Forum Veteran
Forum Veteran
Posts: 713
Joined: Fri Dec 03, 2010 1:38 am

Re: Making sure a given amount of bandwidth is available for a given device

Thu Apr 19, 2018 6:34 am

Using this as a guide is a starting place. You will set up a Queue Tree with a Parent Queue (this is for your over bandwidth) and then Children Queues (one each for the different user types)

We are going to start on step 2.
/queue type
add kind=pcq name=Download pcq-classifier=dst-address pcq-rate=120M
add kind=pcq name=Upload pcq-classifier=dst-address pcq-rate=120M
Next, we need to add the mangle rules. Order matters. First Packet Mark the dedicated user. Then add a catch all for everyone else. Change "192.168.88.5" to your dedicated devices IP or use address list instead. I use chain=forward to exclude inter LAN traffic and the Routers traffic.
/ip firewall mangle
add action=mark-packet chain=forward dst-address=192.168.88.5 in-interface-list=WAN new-packet-mark=Dedicated_Download passthrough=no
add action=mark-packet chain=forward in-interface-list=LAN new-packet-mark=Dedicated_Upload passthrough=no src-address=192.168.88.5
add action=mark-packet chain=forward dst-address=192.168.88.0/24 in-interface-list=WAN new-packet-mark=General_Downlaod passthrough=no
add action=mark-packet chain=forward in-interface-list=LAN new-packet-mark=General_Upload passthrough=no src-address=192.168.88.0/24
Now setup the Queue Trees. You will have both a Download and Upload for each Parent and Child Queue. Also set a higher priority for you Dedicated Queue.
/queue tree
add name=Download parent=global queue=Download
add name=Upload parent=global queue=Upload
add limit-at=15M max-limit=120M name=Dedicated_Download packet-mark=Dedicated_Download parent=Download priority=1 queue=Download
add limit-at=128k max-limit=120M name=General_Down packet-mark=General_Downlaod parent=Download queue=Download
add limit-at=15M max-limit=120M name=Dedicated_Upload packet-mark=Dedicated_Upload parent=Upload priority=1 queue=pcq-upload-default
add limit-at=128k max-limit=120M name=General packet-mark=General_Upload parent=Upload queue=Upload
Now your dedicated device should receive no less than 15M/15M and be able to use the whole 120M/120M when available. And the General Users will share the 120M/120M or what is left of it equally.
 
JB172
Member
Member
Posts: 304
Joined: Fri Jul 24, 2015 3:12 pm
Location: AWMN

Re: Making sure a given amount of bandwidth is available for a given device

Fri Apr 20, 2018 8:33 pm

We are going to start on step 2.
/queue type
add kind=pcq name=Upload pcq-classifier=dst-address pcq-rate=120M
I think that the pcq-classifier for Upload should be src-address
/queue type
add kind=pcq name=Upload pcq-classifier=src-address pcq-rate=120M
 
2frogs
Forum Veteran
Forum Veteran
Posts: 713
Joined: Fri Dec 03, 2010 1:38 am

Re: Making sure a given amount of bandwidth is available for a given device

Fri Apr 20, 2018 9:35 pm

I think that the pcq-classifier for Upload should be src-address
/queue type
add kind=pcq name=Upload pcq-classifier=src-address pcq-rate=120M
Actually I meant to have the mangle like:

/ip firewall mangle
add action=mark-packet chain=forward dst-address=192.168.88.5 in-interface-list=WAN new-packet-mark=Dedicated_Download passthrough=no
add action=mark-packet chain=forward out-interface-list=WAN new-packet-mark=Dedicated_Upload passthrough=no src-address=192.168.88.5
add action=mark-packet chain=forward dst-address=192.168.88.0/24 in-interface-list=WAN new-packet-mark=General_Downlaod passthrough=no
add action=mark-packet chain=forward out-interface-list=WAN new-packet-mark=General_Upload passthrough=no src-address=192.168.88.0/24

And the classifiers would be correct.

Who is online

Users browsing this forum: VoltageWar and 44 guests