Community discussions

MikroTik App
 
somefood
just joined
Topic Author
Posts: 21
Joined: Tue May 26, 2015 8:23 am

Qos with variable bandwidth.

Wed Aug 09, 2017 9:41 am

Hello,

I test queue tree about variable bandwidth.

The best condition value is Upload 2Mbps/ Download 10Mbps.

But worst condition value is Upload 32Kbps/ Download 64Kbps.

In my test lab, I set Parent max-limit=5Mbps and child' voip limit=128kbps, max-limit=256kbps child's default limit=128kbps max-lmit=5Mbps

When the uplink bandwidth is 5Mbps, VOIP is working good in congestion condition.

But down the bandwidth (e.g. 3Mbps), VOIP is not working.

I want to guarantee VOIP bandwidth 32~256kbps in variable condition.

What should i do? Please let me know setting value.

Here's my config about queue
/ip firewall mangle
add action=mark-connection chain=forward new-connection-mark=SIP_con \
passthrough=yes src-address=192.168.55.254
add action=mark-connection chain=forward dscp=40 new-connection-mark=SIP_con \
passthrough=yes
add action=mark-packet chain=forward connection-mark=SIP_con new-packet-mark=\
SIP passthrough=no
add action=mark-connection chain=forward new-connection-mark=Default_con \
passthrough=yes
add action=mark-packet chain=forward connection-mark=Default_con \
new-packet-mark=Default passthrough=no

/queue tree
add max-limit=5M name=Ether2 parent=ether2 queue=default
add limit-at=128k max-limit=256k name=VOIP2 packet-mark=SIP parent=Ether2 \
priority=1 queue=default
add limit-at=128k max-limit=5M name=Default2 packet-mark=Default parent=Ether2 \
queue=default
 
astons2
just joined
Posts: 13
Joined: Thu May 28, 2015 3:47 pm

Re: Qos with variable bandwidth.

Thu Aug 24, 2017 4:35 pm

I had a similar question some time ago, no one helped me. After some reading I got conclusion that it's not possible with mikrotik because mikrotik needs to implement absolute packet order by priority, then will work.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Qos with variable bandwidth.

Thu Aug 24, 2017 4:44 pm

It is not a limitation of MikroTik, it is just how networking works.
You need to do your QoS at the bottleneck. When you have a router connected to a modem that provides a variable-rate connection, and your router-modem connection is fixed-rate (like ethernet), the modem has the bottleneck and there is nothing you can do in the router. The modem has to do the QoS. You could maybe help it by doing some DSCP mangling or even have a VLAN tag which indicates priority (and using mangling to set it), but ultimately the modem needs to do the queue prioritization.
Only when you have a fixed-rate connection, you can cheat by using queuing in the router and setting a slightly lower maximal rate than the actual rate. Then you keep the modem queues empty and do the proper QoS in the router.
 
astons2
just joined
Posts: 13
Joined: Thu May 28, 2015 3:47 pm

Re: Qos with variable bandwidth.

Thu Aug 24, 2017 5:00 pm

Thanks for response.

Let me explain my case. I am connection with internet by ADSL, pppoe connection is done by mikrotik. Modem connection is always constant no change there. My internet provider is unable to provide speed which I have paid for. So I paid 50Mbs / 2Mbs but I have 30-43Mbs / 2Mbs, that's why my QOS does not work. That's is how internet here in my country works and I can't do nothing about that. Only if I set max-limit at 30Mbs mikrotik QOS works of course. If we had option for absolute packet order by priority than Qos could work I guess. It could be triggered by some kind check box and if speed goes above limit-at value.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Qos with variable bandwidth.

Thu Aug 24, 2017 5:28 pm

You can only really do QoS at the transmit side anyway. You shape the 2 Mbit upload you have, and the ISP should do the QoS at their end.
Unfortunately most of them are not prepared to configure their equipment properly, and you have a problem.
When my ISP replaced their routers a couple of years ago, the situation improved dramatically. They now do Fair Queue and maybe
even some DSCP handling (I am not sure), and now there is no more issue when using VoIP and downloading at the same time.
 
astons2
just joined
Posts: 13
Joined: Thu May 28, 2015 3:47 pm

Re: Qos with variable bandwidth.

Thu Aug 24, 2017 5:41 pm

Our ISPs are all disaster here no help from their side.
Anyway I have problem with IPTV and when I have massive HTTP download or something else.
So I am searching some kind solution for a very long time for IPTV priority.

Just found this old thread from 2004
viewtopic.php?t=242
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Qos with variable bandwidth.

Thu Aug 24, 2017 5:49 pm

I think there is some misunderstanding in that thread that is maybe also what you do not completely understand.
Queueing has to be done at the side that generates the traffic. So when watching IPTV and downloading, that
is at the ISP. When you get IPTV and internet from the same company, ask them to improve their product by
making sure that IPTV traffic is queued at a higher priority than internet traffic. When these are different companies
it is much more difficult of course.

Shaping you do at the receiving end (or at the transmit on your LAN) is never going to work as well as when the
ISP does it. This is of course even more true for your variable-rate connection, but it applies to fixed rate as well.
 
astons2
just joined
Posts: 13
Joined: Thu May 28, 2015 3:47 pm

Re: Qos with variable bandwidth.

Thu Aug 24, 2017 6:15 pm

Unfortunately ISP and my IPTV are totally different companies, so no help from there.

Well from my point from view I could limit http and P2P download and then IPTV will work fine but again problem is variable internet speed. Example, P2P at 20Mbs and IPTV will have 10Mbs .... Like this I would probably lost 13Mbs in most of the time. I am a bit confused why we cant set variable rate?

I watched MUM presentation 2016 about QoS they also mention there that problem is that we have no absolute packet order by priority. They suggested bandwidth testing from time to time by script and than those UP and Down speed values should be written into query three like limit-max values also by script. This suppose to be only solution so far.

This approach is not good as you need to stop all internet for a 30 seconds until router test speeds, also ISP internet speed can do up and down to often then above solution will not work at all.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10529
Joined: Mon Jun 08, 2015 12:09 pm

Re: Qos with variable bandwidth.

Thu Aug 24, 2017 7:57 pm

Well from my point from view I could limit http and P2P download and then IPTV will work fine but again problem is variable internet speed. Example, P2P at 20Mbs and IPTV will have 10Mbs .... Like this I would probably lost 13Mbs in most of the time. I am a bit confused why we cant set variable rate?
You can, but then you would need some way to control it!
In theory you could write a script that adjusts the parameters of your queue, but how would you know what to set it to?

Also, shaping at your end will not directly influence what the other side SENDS, and that is mostly what is biting you.
I watched MUM presentation 2016 about QoS they also mention there that problem is that we have no absolute packet order by priority.
This is not relevant in your case because that would have to be applied at the ISP, not at your home. And you ISP probably is using equipment
from another manufacturer. It may be able to do what is required, but your ISP is not bothered to open the manual and configure it, because
they get your money anyway.
They suggested bandwidth testing from time to time by script and than those UP and Down speed values should be written into query three like limit-max values also by script. This suppose to be only solution so far.
Well, when I would get tasked with solving this problem, I would not use speed test but I would try to get some monitoring of the IPTV stream
(is there a continuous stream or does it stutter?), or I would setup a ping to the IPTV server and monitor its RTT, and then I would try to
control the queue settings based on that result. Slowly increase when everything is OK, quickly decrease when there are signs of overloading.
Maybe that could work. But it is likely a bit too much to do in a MikroTik script, it would probably require e.g. a Raspberry Pi with some clever
programmed software controlling the MikroTik via API.
 
astons2
just joined
Posts: 13
Joined: Thu May 28, 2015 3:47 pm

Re: Qos with variable bandwidth.

Thu Aug 24, 2017 9:14 pm

Well, when I would get tasked with solving this problem, I would not use speed test but I would try to get some monitoring of the IPTV stream
(is there a continuous stream or does it stutter?), or I would setup a ping to the IPTV server and monitor its RTT, and then I would try to
control the queue settings based on that result. Slowly increase when everything is OK, quickly decrease when there are signs of overloading.
Maybe that could work. But it is likely a bit too much to do in a MikroTik script, it would probably require e.g. a Raspberry Pi with some clever
programmed software controlling the MikroTik via API.
This is good idea, thanks. I do have windows based PC which is working 24/7 so he can control MikroTik. Some time ago I made small PC application in C++ with MikroTik API by which I can see MikroTik cpu, memory usage, traffic and etc ... so I can make what you are suggesting.

When I have problems with IPTV, picture stutter's, as soon as I limit other download picture become normal again.

Would by much better if guys from MikroTik make some kind solution for QoS with variable bandwidth maybe they could add your solution, its sounds easy and it should not take to much cpu power for that. Pinging gateway for example and base on result make changes in queue tree settings ....

Who is online

Users browsing this forum: CyberaxIzh and 18 guests