First of all, I would like to mention that I have already read the Mikrotik Wiki, multiple configuration examples and read a lot of forum topics about QoS with configurations similar to what I want to achieve.
My setup looks like this:
- Mikrotik wAP (model RBwAPG-5HacT2HnD) with RouterOS 6.45.9 is connected via its single LAN port to a Linux desktop. Mikrotik works in "ap bridge" mode. It is also set to the 2.4GHz B so that I can limit the physically available bandwidth to ~6Mbit/s. All interfaces are bridged.
- A Linux Laptop is connected to the 2.4GHz channel of Mikrotik
I wrote the simplest server-client C program to send ping-like message from client to server and back per TCP connection. What I want to do now is to guarantee at least 2Mbit/s to the connection between my ping-like program, while iperf3 generates as much traffic as it can to saturate the link (read: prioritise my C programms traffic over iperf3).
Desktop acts as client and sends a single „double“ over WiFi to laptop, which then increments the „double“ and sends it back.
I want to achieve the desired „prioritisation“ of my ping-like traffic with help of Queue Trees. In order to do that, I configured the tree in following way:
Code: Select all
/queue tree
add max-limit=10M name=Wlan1Parent parent=global priority=1 queue=default
add limit-at=2M max-limit=10M name=wlan1_low_prio packet-mark=iperf parent=Wlan1Parent queue=default
add limit-at=2M max-limit=10M name=Wlan1_high_prio packet-mark=high_prio parent=Wlan1Parent priority=1 queue=default
In order to make the Queue Tree work, I need to mark the packets to allow their classification in the queue:
Code: Select all
/ip firewall mangle
add action=set-priority chain=postrouting comment="Translate DSCP to WMM priorities" new-priority=from-dscp-high-3-bits passthrough=yes
add action=mark-packet chain=prerouting comment="mark the bulk-traffic to port 5101" dst-port=5101 fragment=no new-packet-mark=iperf packet-mark="" passthrough=yes priority=0 protocol=tcp src-address=192.168.88.21
add action=mark-packet chain=prerouting comment="mark high prio data destined to port 5150" dst-port=5150 new-packet-mark=high_prio passthrough=no protocol=tcp src-address=192.168.88.21
add action=mark-packet chain=prerouting new-packet-mark=high_prio passthrough=yes protocol=tcp src-address=192.168.88.254 src-port=5150
add action=mark-packet chain=prerouting new-packet-mark=iperf passthrough=yes protocol=tcp src-address=192.168.88.254 src-port=!5150
But here is the problem (finally):
When I run iperf3 and then start my ping-like client, it does not become the guaranteed 2Mbit/s and gets delayed a lot (RTT is ~500ms). (He does not even get the actually required 150kbit/s)
If I run only ping-like client without iperf traffic I get RTT ~3-6ms.
RTT measurement is implemented on the client side.
Does anyone see an error in my configurateion? What is lacking in my config?
P.S. I am very new to networking, so the obvious stuff for you might not be so obvious for me:)