I’m quite new to MikroTik and still struggling a bit.
We have a 128/64 Kib satellite link for our internet connectivity, which works fine until somebody starts a large download.
At that point DNS lookups get very slow and usually stop working.
I’ve followed the instructions in the MikroTik reference manual’s application examples to set up equal bandwidth sharing and this has improved the situation for mutliple users downloading at once. I’ve pasted in the queue tree config below.
However I can’t work out how to give DNS requests and responses priority over other traffic on the link.
For completeness, you should also mangle the TCP variant of DNS. Just add another mangle rule to write a connection-mark, and put it BEFORE the rule placing the final packet marks:
So just add the following:
/ ip firewall mangle
add chain=prerouting protocol=tcp dst-port=53 action=mark-connection
new-connection-mark=dns-con passthrough=yes comment=“dns-con” disabled=no
in between the two mangle rules dapsyra wrote for you.
You have to swap rules 3 and 4 in your mangle rules - the one putting packet-marks on all packets from a connection has to be last!
This will only prioritize the DNS requests (i.e. outgoing DNS queries), as you are mangling/packet-markting according to DESTINATION port 53.
So the counter behaviour you see is correct.
But you can of course also prioritze the incoming DNS answers. You would have to mark those packets accordingly, i.e. mark UDP/TCP with a SOURCE port of 53.
But beware that this will only work on your internal network - you don’t have any influence on how the DNS answers will come in over your internet uplink. This is something that would have to be done by your ISP/uplink-provider…