Community discussions

MikroTik App
 
kraal
Member Candidate
Member Candidate
Topic Author
Posts: 142
Joined: Tue Jan 19, 2021 10:24 pm

Questions about queues / traffic limitation and prioritization

Wed Sep 01, 2021 12:52 am

Hello,

I have a Mikrotik AC2 WiFi access point with multiple wireless interfaces as follows:
  • wlan1 on 2.4Ghz (ssid WIFI2, vlan 100) with two linked virtual wlan interfaces wlan1_1 (ssid WIFI2_1, vlan 110) and wlan1_2 (ssid WIFI2_2, vlan 120)
  • wlan2 on 5Ghz (ssid WIFI5, vlan 200)

I want to add queues to achieve something like the following:
  • limit download / upload rates (from/to internet) of wlan1 to 50M download / 1M upload (maximum, shared by all devices)
  • limit download / upload rates (from/to internet) of wlan1_1 to 50M download / 1M upload (maximum, shared by all devices)
  • limit download / upload rates (from/to internet) of wlan1_2 to 5M download / 512K upload (maximum, shared by all devices)
  • limit download / upload rates (from/to internet) of wlan2 to 100M download / 5M upload (maximum, shared by all devices)
  • set a global download / upload rates limitation (from/to internet) for all wlan interfaces to 150M download / 5M upload with wlan2 priority > wlan1 > wlan1_1 > wlan1_2
  • have no download/upload limits (from/to local network) for wlan2
  • prioritize wired traffic over wireless traffic

Here are my questions:
  • My understanding is that I have to use queue tree along with mangle rules to achieve this. Am I correct?
  • I guess that in order to not have limits for traffic to the local network I have to make sure that only packets to the internet are marked. Am I correct?
  • I don't really understand how "parent" queues work and when to use them. Could you please tell me where I can find some explanation and examples ?
  • I don't know how "global" queues (to set global shared limits among all wireless interfaces, with prioritization) can be configured. Again where can I find information about it?

Thank you a lot for your help!

Michel
 
mikeeg02
Member Candidate
Member Candidate
Posts: 162
Joined: Fri Mar 30, 2018 2:28 am
Location: Pennsylvania

Re: Questions about queues / traffic limitation and prioritization

Wed Sep 01, 2021 4:19 pm

It would be very helpful for you to provide an export of your config and post it, our answers would be much more helpful. That being said, you should be able to use simple queues to prioritize traffic the way you want (If I am understanding your request the way you intend it)

I have made some assumptions, one is that your wired interfaces are bridged together and their bridge interface is called "bridge". Another is that the wireless interfaces are routed, and not bridged.

Where things become tricky is to properly prioritize the traffic the way I think you want it done, you will need to commit to a value for limit-at. Limit-at is what you are guaranteeing during congestion, and a big part of how prioritization works during congestion. So if you want your wired interfaces to be able to use all of it all of the time, and the wireless to suffer, you would add the wired interfaces as listed below with the limit-at and max-limit matching the parent, otherwise you will need to come up with a value you deem reasonable to allow some wireless traffic to pass. Whats important to remember, is that the sum of your child queues limit-at values, must not exceed the parent queues max-limit for proper prioritization.
/interface bridge settings
set use-ip-firewall=yes

/queue simple
add name=all_bandwidth target=0.0.0.0/0 dst=ether1 max-limit=10M/200M
add name=wired_queue target=bridge dst=ether1 limit-at 10M/200M max-limit=10M/200M parent=all_bandwidth priority=3/3
add name=wlan2_queue target=wlan2 dst=ether1 max-limit=5M/100M parent=all_bandwidth priority=4/4 
add name=wlan1_queue target=wlan1 dst=ether1 max-limit=1M/50M parent=all_bandwidth priority=5/5 
add name=wlan1_1_queue target=wlan1_1 dst=ether1 max-limit=1M/50M parent=all_bandwidth priority=6/6
add name=wlan1_2_queue target=wlan1_2 dst=ether1 max-limit=512K/5M parent=all_bandwidth priority=7/7

Something more ideal would be more like this potentially

/interface bridge settings
set use-ip-firewall=yes

/queue simple
add name=all_bandwidth target=0.0.0.0/0 dst=ether1 max-limit=10M/200M
add name=wired_queue target=bridge dst=ether1 limit-at=8M/180M max-limit=10M/200M parent=all_bandwidth priority=3/3
add name=wlan2_queue target=wlan2 dst=ether1 limit-at=1M/10M max-limit=1M/50M parent=all_bandwidth priority=4/4 
add name=wlan1_queue target=wlan1 dst=ether1 limit-at=1M/10M max-limit=1M/50M parent=all_bandwidth priority=5/5 
add name=wlan1_1_queue target=wlan1_1 dst=ether1 max-limit=1M/50M parent=all_bandwidth priority=6/6
add name=wlan1_2_queue target=wlan1_2 dst=ether1 max-limit=512K/5M parent=all_bandwidth priority=7/7
This may be a good start for you to tweak settings to make things worth the way you want them to. But again this is a very basic outline with the limited information you have given us to start with. The current export would be helpful.

I did not use the highest (1) and lowest (8) queue priority values, and you can easily change them.

Who is online

Users browsing this forum: RHWwijk and 76 guests