Community discussions

MikroTik App
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3119
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

WMM, Priotity, DSCP procedure?

Thu Jan 13, 2011 4:06 am

The Wiki manual is not clear to me so I need some help/advices.

Situation:
client with CPE has wireless connection to AP.
AP has wireless backhaul to next wireless node.
This last wireless node connectect by cable to main gateway (border router)

Client uses VOIP device with separate IP or Skype phone with separate IP.
(Use separate IP make identification of voice communication very simple. Just the IP address of the device.)

In CPE I make mangle:
/ip firewall mangle
add action=mark-connection chain=prerouting comment="VOIP conn marker" disabled=no \
new-connection-mark=VOIP passthrough=yes src-address=172.25.53.244
add action=change-dscp chain=prerouting comment="VOIP conn get TOS 7 " connection-mark=VOIP disabled=no new-dscp=7
add action=set-priority chain=prerouting comment="TOS 7 mark get priority 7" disabled=no dscp=7 new-priority=7 passthrough=no
add action=mark-packet chain=forward comment="TOS 7 Traffic get conn mark \"U-High\"" disabled=no dscp=7 new-packet-mark=U_HIGH passthrough=no
add action=mark-packet chain=forward comment="" connection-mark=U_high disabled=no new-packet-mark=U_HIGH passthrough=no

On the wireless interface WMM is enabled.

Is this now the right procedure?
1. mangle traffic from srce address and give conn. mark "U_high"
2. conn. with "U_high" mark gives all packages dscp number 7 (is highest)
3. packages with dscp=7 all get priority 7 (is highest)
4. conn. with U_high" mark gives all packages a package mark "U_HIGH" for local Queue (Where it gets highest priority.

Please some advices since I want to implement it on my network but am not sure if this is the way to go.
 
User avatar
nest
Forum Veteran
Forum Veteran
Posts: 822
Joined: Tue Feb 27, 2007 1:52 am
Location: UK
Contact:

Re: WMM, Priotity, DSCP procedure?

Tue Jan 18, 2011 4:04 am

Try "new-priority=from-dscp" to mark the packet's QoS value to be then used by the WMM protocol and not marking it with a fixed priority of 7. We have links that share VOIP and data. VOIP has no problems but we also make sure that data does not flood the link by using other mangle rules and queues. The best way to guarantee good QoS is not to saturate the link in the first place. But wireless is not a good medium in the first place due it's very nature so test in the lab first, where there is limited interference to prove you have it working well.
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3119
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: WMM, Priotity, DSCP procedure?

Wed Jan 19, 2011 4:38 am

Try "new-priority=from-dscp" to mark the packet's QoS value to be then used by the WMM protocol and not marking it with a fixed priority of 7.
Can you explain this a bit better?
With "new-prioity=from-dscp" I suppose you mean to setup a mangle filter with classifier 'DSCP' (so this must have been set somewhere already) and then give it a new priority. But not "7"? Why not?
 
Trisc
Member Candidate
Member Candidate
Posts: 242
Joined: Sat May 29, 2004 11:24 pm
Location: Glos, UK

Re: WMM, Priotity, DSCP procedure?

Wed Jan 19, 2011 6:39 pm

There was a good paper on this at last year's MUM: http://mum.mikrotik.com/presentations/PL10/grittini.pdf

Also search for WMM in the Wiki manual
 
User avatar
nest
Forum Veteran
Forum Veteran
Posts: 822
Joined: Tue Feb 27, 2007 1:52 am
Location: UK
Contact:

Re: WMM, Priotity, DSCP procedure?

Wed Jan 19, 2011 9:57 pm

With "new-prioity=from-dscp" I suppose you mean to setup a mangle filter with classifier 'DSCP'
Yes, It is a specific firewall rule setting that takes the DSCP field and sets the WMM QoS field accordingly. See http://wiki.mikrotik.com/wiki/Manual:WM ... _from_DSCP

Also, the MUM Presentation, that Trisc refers to, is worth watching.
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3119
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: WMM, Priotity, DSCP procedure?

Tue Feb 15, 2011 2:04 am

The relation between dscp and tos is still not clear to me. In fact the referred presentation makes me even more confused while the MT-wiki is not much of a help neither...
Author of the referred to presentation gives in mangle traffic to a Voip Server" a new-dscp value=6
(why "6"?, tabel in same presentation tells me dscp value "6" stands for TOS priority "0" or WMM "best effort" only..)

Then, two pages further, author translate DSCP value into WMM priority with "new-priority=7" (which makes sense) but the classifier the filter looks for is "dscp=46"!!
Why is he now using "46"? I line with what he did 2 pages earlier he would filter on dscp value "6"

Also, dscp value "46" standss for WMM "video" or TOS priority "5"......
I would think any voip traffic would be given dscp value 55 - 63 (so "55", "56", "57" etc until "63"??) which would then translate into TOS mark "7" and if priority would be derived by router from-dscp the result would be a packet priority "7", which is what we are looking for?

Someone really needs to give me a better explanation on the ´why's´ and ´how`s´ so if I fully understand how things are done it might be an idea I write a wiki article called "traffic priority for dummies in Mikrotik land" :)
 
User avatar
nest
Forum Veteran
Forum Veteran
Posts: 822
Joined: Tue Feb 27, 2007 1:52 am
Location: UK
Contact:

Re: WMM, Priotity, DSCP procedure?

Wed Feb 16, 2011 1:09 am

What is clearly not helping you is that there is no "standard" for what dscp value to give to any particular traffic type. Therefore as there is no international standard value for different traffic types, reading different descriptions from different sources and different websites can be confusing. Mikrotik cannot define a standard way of doing this, or chose for you the right values to use. As that is down to you to decide! :-(

This lack of a standard also causes problems if you think you can use the dscp field with traffic passing between your network and a third party. As their "standard" could be different to your "standard", you cannot guarantee that what DSCP value they classify high priority traffic with for example, is the same as the value you wish to use.

Some equipment generates traffic from it, with well known or documented dscp values or they can be set to one, inside their configuration software. E.g. some VOIP phones use a dscp value of 46. But the value to test for and to use in your rules should be based on monitoring your own traffic and making your own decisions.

If you are not familiar with the mathematics of binary logic, some of the values chosen may seem odd, but if you read http://en.wikipedia.org/wiki/Differentiated_services http://en.wikipedia.org/wiki/Type_of_Service and http://www.cisco.com/en/US/tech/tk543/t ... 49f2.shtml it may help you a little to understand how the two sets of 3 bits that make up a 6 bit DSCP value can be related to a particular priority.
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3119
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: WMM, Priotity, DSCP procedure?

Wed Feb 16, 2011 1:39 am

Ok, no standards... hmm.

But, MT ROS uses a field called "dscp (TOS)" so how do I interpret this? It is clear if I fill any two digit number we are talking about dhcp value.
But what if I fill in a value 1, 2, 3, 4, 5, 6,or 7? These values exist on both TOS and DSCP. (Take in respect my last question in this post.) But they don't mean the same!

So let say I give certain packet in router A a dscp (TOS) value "5" (Is this "TOS" or is this "DSCP"?) and the packet then travels to router B
Now in router B we filter for a dscp (TOS) value "0". (Now, does it filter for "TOS" or for "DSCP"?)

Since DSCP value "5" according some information equals TOS priority "0" will it ´catch´ this package? After all, I filled in a value "5" in a previous router for setting "dscp (TOS)" value and now this router B doesn't know if this value is a TOS value or a DSCP value? So he might ´catch´ this package? Or does router just look for the number? If number is the same then it catches it?

Other example:
Router A set "dscp (TOS)" value for certain package to "7".
Now next router B filters for DSCP (TOS) value "7" and under mangle ´action´ we set "New Priority = from dscp".
Does router now consider value "7" to be a TOS value "0" and set priority to "0" (=default) or does router B consider value "7" to be a TOS value "7" which would translate into package priority "7" which is highest?

So although TOS and DSCP values in themselves don't say what kind of traffic we speak about (after all, it is just a label we put there) MT ROS has a table build in that translate certain dscp values into packet priority. And the packet priority DOES have an influence on priority of traffic in WMM! (And now in NV2 protocol.)

Other question I am still looking for answering:
A DSCP value is given each time (in tables) as a range. Like "55" to "63". This range would then correspond with a TOS value "7".
But can I use any value in-between these figures as well? So not "55" but "57" for instance?
From some articles I got the impression I could only use either "55" or "63"?
 
User avatar
nest
Forum Veteran
Forum Veteran
Posts: 822
Joined: Tue Feb 27, 2007 1:52 am
Location: UK
Contact:

Re: WMM, Priotity, DSCP procedure?

Fri Feb 18, 2011 12:10 am

As the website links I have given you explain, the DSCP number is not "a number". It is a 6 bit field made from two sets of 3 bits. There are also 2 extra low unassigned bits which are for future use, as yet unclassified, thus taking it up to a full 8 bit byte. Those two sets of 3 bits in turn define two properties of the packet's required QoS.

Choosing DSCP values is not as straight forward as just having incrementing DSCP numbers to denote each priority, such as 0,1,2,3,4,5,6,7. You have to understand how binary arithmetic works to understand how you can combine those two 3 bit fields (and the 2 unused low order bits which are always 00).

The wireless link, when using 802.11agn, can support eight WMM values between 0 and 7 as part of the RF protocol, thus offering some limited QoS capability (i.e. not brilliant, but better than nothing at all). So, MT provides a very easy way of taking the DSCP value of the incoming traffic, masking the high order 3 bits required to represent QoS and then assigning an appropriate WMM value for the wireless protocol based upon those masked 3 bits. The DSCP field used to be called TOS.

See the following for more info: http://www.cisco.com/en/US/tech/tk543/t ... ingclasses

Who is online

Users browsing this forum: D3nkis, DanSch1982 and 87 guests