Community discussions

MikroTik App
 
User avatar
Kentzo
Long time Member
Long time Member
Topic Author
Posts: 528
Joined: Mon Jan 27, 2014 3:35 pm
Location: California

How to set CoS priority from WMM and vice versa?

Thu Jan 20, 2022 8:35 pm

My wlan interface a tagged port on a bridge. There is also a VLAN configured on the interface.

world <-- tagged --> bridge <-- tagged --> wlan ((( untagged ))) WMM-aware clients

The packets from clients that enter wlan have their 802.11 User Priority priority set. I would like to to convert that priority to CoS as the wlan interface inserts the VLAN header.
Conversely, the packets from bridge that enter wlan have their 802.1p priority set. I would like to convert that priority to 802.11 UP as the wlan interface strips the VLAN header.

viewtopic.php?t=182412#p906895 pointed out that I may need to use a rule, but it eludes me what rule exactly should I add.

WMM Example implies between the lines that no extra action may be needed and conversion happens automatically. But this is not worded explicitly.

So, can ingress priority conversion (transition?) work in this case on RouterOS?
 
User avatar
Kentzo
Long time Member
Long time Member
Topic Author
Posts: 528
Joined: Mon Jan 27, 2014 3:35 pm
Location: California

Re: How to set CoS priority from WMM and vice versa?

Fri Jan 21, 2022 7:07 am

Using the fact Apple devices appropriately set priority for Apple Facetime calls, I set up the following test:
  • A Facetime call is made from an iPad (connected to Wi-Fi) to an iPhone (connected to Cellular, Wi-Fi off). This was done to avoid client-to-client transmission.
  • Wireshark was set up to monitor and capture traffic on wlan of a laptop (connected to the same Wi-Fi). This was done to verify that iPad sends QoS in 802.11 frames
  • Passthrough rules were added to Router / AP bridge filter and IP/IPv6 firewall. This was done to track whether 802.11 QoS frames are recognized.
/interface bridge filter
add action=passthrough chain=input ingress-priority=!0
add action=passthrough chain=forward ingress-priority=!0
add action=passthrough chain=output ingress-priority=!0
add action=passthrough chain=input mac-protocol=vlan vlan-priority=!0
add action=passthrough chain=forward mac-protocol=vlan vlan-priority=!0
add action=passthrough chain=output mac-protocol=vlan vlan-priority=!0


/ip firewall mangle
add action=passthrough chain=forward ingress-priority=!0
add action=passthrough chain=input ingress-priority=!0
add action=passthrough chain=output ingress-priority=!0
add action=passthrough chain=postrouting ingress-priority=!0
add action=passthrough chain=prerouting ingress-priority=!0

add action=passthrough chain=forward priority=!0
add action=passthrough chain=input priority=!0
add action=passthrough chain=output priority=!0
add action=passthrough chain=postrouting priority=!0
add action=passthrough chain=prerouting priority=!0

/ip firewall raw
add action=passthrough chain=prerouting ingress-priority=!0
add action=passthrough chain=output ingress-priority=!0

add action=passthrough chain=prerouting priority=!0
add action=passthrough chain=output priority=!0

/ipv6 firewall mangle
add action=passthrough chain=forward ingress-priority=!0
add action=passthrough chain=input ingress-priority=!0
add action=passthrough chain=output ingress-priority=!0
add action=passthrough chain=postrouting ingress-priority=!0
add action=passthrough chain=prerouting ingress-priority=!0
add action=passthrough chain=forward priority=!0
add action=passthrough chain=input priority=!0
add action=passthrough chain=output priority=!0
add action=passthrough chain=postrouting priority=!0
add action=passthrough chain=prerouting priority=!0

/ipv6 firewall raw
add action=passthrough chain=output ingress-priority=!0
add action=passthrough chain=prerouting ingress-priority=!0
add action=passthrough chain=output priority=!0
add action=passthrough chain=prerouting priority=!0
The goal of the test was to see if it is possible to add a rule to see whether a 802.11 QoS are seen anywhere in RouterOS.

But so far the answer is NO. Wireshark clearly showed that the iPad sent 802.11 QoS Data frames, with the QoS Priority field set to 5 (Video). However, all the rules I added showed 0 bytes/packets.

Did I miss something?
 
User avatar
Kentzo
Long time Member
Long time Member
Topic Author
Posts: 528
Joined: Mon Jan 27, 2014 3:35 pm
Location: California

Re: How to set CoS priority from WMM and vice versa?

Wed Mar 02, 2022 11:25 pm

Apparently this is fixed in the recent releases, I'm yet to verify that.

Who is online

Users browsing this forum: Bing [Bot], gianricci, Renfrew, Semrush [Bot], uamma and 85 guests