tinaore Maral MAM - MikroTik Wik
Manual: WMM
Contents
1 How WMM warks
2 How to set priority
3 Example
4 Priority from DCP
5 Combining priority setting and handling solutions
How WMM works
WMM works by dividing traffic into 4 access categories: background, best effort, video, voice. QoS policy (different handing of
access categories) Is applied on transmitted packets, therefore it's transmitting device Is treating different packets differently -
that is ~ e.g. AP does not have control over how clients are transmitting packets, and clients do not have control over how AP
transmits packets.
Mikrotik AP and client classifies packets based on priority assigned to them, according to table (as per WMM spec): 1,2 ~
background 0,3 - best effort 4,5 - video 6,7 - voice
To be able to use multiple WMM access categories, not just best effort where all packets with default prionty 0 go, priority must
be set for those packets. By default all packets (incoming and locally generated) inside router have priority 0.
access category for packet does not necessarily mean that it will be sent over the air before all other packets with
“worse” access category. WMM works by executing DCF method far medium access with different settings for each access
category (EDCF), which basically means that "better" access category has higher probability of getting access to medium - WMM
enabled station can be considered to be 4 stations, one per access category, and the ones with “better” access category use
settings that make them more likely to get chance to trensmit (by using shorter backaff timeouts) when all are contending for
medium, Detalls can be studied in 802.11¢ and WMM specification
How to set priority
Priority of packets can be set using "set priority” action of ip firewall mangle rules and/or bridge firewall fier rules. Priority can
be set to specific value or to "ingress priority”. Ingress priority is priority value that was detected on incoming packet, if
avallable. Currently there are 2 sources of ingress priority = priority in VLAN header and priority from WMM packets received over
wireless interface, For all other packets ingress priority is 0.
[Mate Starting from vé.x pity can best from OSC® by seing from-dscp-high-3-bits
Note that ingress priority value is not automatically copied to priority value, correct rule needs to be set up to do this!
So there are basically 2 ways to control/set priority (remember, that both require setting up correct rule(s)!): = assign priority
with rules with particular matchers (protocol, addresses, etc), - set it from ingress priority,
This essentialy means that if tis not possible or wanted to classify packets by rules, configuration of network must be such that
router can extract ingress priority from incoming frames. Remember there are currently 2 sources for this - VLAN tag in packets
and received WMM packets.
Do not mix priority of queues with priority assigned to packets. Priarities of queues work separately and specify "importance" of
queue and has meaning only within particular queue setup. Think of packet priority as of some kind of mark, that gets attached
to packet by rules, Also take into account that this mark currently is only used for outgoing packets when going over WMM
pik mikrotk comiwikiMarual WHIM 48tinaore Maral MAM - MikroTik Wik
enabled link, and in case VLAN tagged packet is sent out (no matter if that packet is tagged locally or bridged).
Example
For example, in setup
PPPOE server -> WMM AP -> client,
IF AP Is just forwarding PPPOE traffic (therefore inspecting encapsulated IP packets to match e.g. by protocol is not possible, as
packets can be encrypted and compressed), priority must come to AP from PPPoE server in VLAN tag, s0 you have to use VLAN
(between PPPOE server and AP) for this, just to communicate priority information.
Note that you do not have to forward VLAN encapsulated traffic to client - VLAN can be terminated at AP, VLAN tag is needed
only when entering AP.
In case AP is PPPOE server itself, there is no need to use VLAN - priority can be set by rules before itis encapsulated in PPPoE.
Priority from DSCP
Another way of setting priority is by using DSCP field in 1P header, this can only be done by firewall mange rule "set priority
action. Note that DSCP in 1° header can have values 0+63, but priory only 0-7. Effective priority after set from DSCP value wall
be 3 high bits of DSCP value.
Remember that DSCP can only be accessed on IP packets!
Note, tht to use this feature, DSCP value in IP header should be set somewhere,
It is best to set DSCP value in IP header of packets on some border router (e.9. main router used for connection to internet),
based on traffic type. £.g. set DSCP value for packets coming from internet belonging to sip connections to 7, and 0 for the rest.
This way packets must be marked only at one place. Then all APs in network set packet priority from DSCP value with just one
rule,
In setup:
< - border router - - WMM AP - client
border router sets DSCP value for sip trafic, and WMM AP sets priority from DSCP value. Note that in this setup DSCP is set only
for trafic _to_client. Sometimes it can be useful to set also DSCP on traffic coming _from_client (e.g. if2 clients connected to
different APs are talking between themselves) «this can be done on APS.
Combining priority setting and handling solutions
Complex networks and different situations can be handled by combining different approaches of carrying priority information to
ensure QoS and optimize use of resources, based an "building blocks” described above, Several suggestions:
~ the less number of fiter rules in whole network, the better (faster) - try to classify packets only when necessary, prefer to do
that on fast routers as most probably connection tracking will be required.
~ use DSCP to carry priority information in IP packets forwarded in your network, this way you can use it when needed.
~ use VLANs where necessary, as they also carry priority information, make sure ethernet bridges and switches in the way, if
any, are net clearing priority information in VLAN tag. In MT bridges you have to setup bridge firewall rule to set priority from
ingress priarity for this!
~ remember that QoS does not improve throughput of links, it just treats different packets differently, and also that WMM traffic
over wireless link will discriminate regular traffic in the air,
Categories: Manual | Wireless | Interface | Case Studies )
ip:ik mikrotk comiwikiMarual WHIM 28sinaore Maral MAM - MikroTik Wik
el
pik mikrobik combwikiMarual WHIM a3