Is the turn server relaying DSCP?

178 views
Skip to first unread message

Yu Bao

unread,
Jun 4, 2014, 12:23:39 PM6/4/14
to turn-server-project...@googlegroups.com
Hi,

I'm wondering what is the behavior of the turn server when it comes to relay the DSCP field.

RFC5766 states:

Differentiated Services Code Point (DSCP) field [RFC2474]

      Preferred Behavior: Set the outgoing value to the incoming value,
      unless the server includes a differentiated services classifier
      and marker [RFC2474].

      Alternate Behavior: Set the outgoing value to a fixed value, which
      by default is Best Effort unless configured otherwise.

      In both cases, if the server is immediately adjacent to a
      differentiated services classifier and marker, then DSCP MAY be
      set to any arbitrary value in the direction towards the
      classifier.

And I do see this in the STATUS file:
9) TOS (DiffServ and ECN) field handling (preferred behavior of RFC 5766) implemented,
for Linux. Other platforms support the alternative behavior of RFC 5766. I'm only concerned about Linux - does the turn server only implements the preferred behavior when the TURN client is connected via TURN/UDP AND the relaying protocol is also UDP? What if one leg uses UDP and the other leg is on TCP? Also I don't find any configuration option to tune this, is the behavior hardcoded? Could the user set an arbitrary value for it? Thanks! Yu Bao

Oleg Moskalenko

unread,
Jun 4, 2014, 1:32:03 PM6/4/14
to turn-server-project...@googlegroups.com
On Linux, it uses the preferred behavior, always, unconditionally.

The "other leg" is always UDP in RFC 5766 - it uses only UDP relay. Even when client-to-server connection is TCP, the relay is always UDP. 

On other platforms (like FreeBSD), the TURN Server uses the alternative behavior, the field value is whatever the OS default value for that field is. You set that value in your OS settings (the network stack settings), not in the TURN Server.

Yu Bao

unread,
Jun 4, 2014, 2:57:54 PM6/4/14
to turn-server-project...@googlegroups.com
Thanks for the clarification Oleg.

Eva

unread,
Feb 2, 2015, 1:11:12 PM2/2/15
to turn-server-project...@googlegroups.com
Hello,

You answered before that on linux preferred behaviour for DSCP is always used.

However when I set a DSCP tag (by using googDscp constraint : true when setting up a peer connection), packets from client to TURN server are marked (AF) but
packets after going through the TURN server have their DSCP set back to zero (default).

Is there any additional configuration to implement so the DSCP would not be changed?

Thank you in advance,
Eva

Oleg Moskalenko

unread,
Feb 2, 2015, 1:34:36 PM2/2/15
to Eva, turn-server-project...@googlegroups.com
DSCP and AF are two different fields. Which one are you talking about ?

Oleg

--
You received this message because you are subscribed to the Google Groups "TURN Server (Open-Source project)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turn-server-project-rfc57...@googlegroups.com.
To post to this group, send email to turn-server-project...@googlegroups.com.
Visit this group at http://groups.google.com/group/turn-server-project-rfc5766-turn-server.
For more options, visit https://groups.google.com/d/optout.

Ewa Janczukowicz

unread,
Feb 3, 2015, 3:19:56 AM2/3/15
to Oleg Moskalenko, turn-server-project...@googlegroups.com
Hello,
Sorry for the confusion. I am talking about DSCP field. 

When I set DSCP, the packets from client to server are (from Wireshark):
Differentiated Services Field: 0x88 (DSCP 0x22: Assured Forwarding 41; (...)
1000 10 .. = Differentiated Services Codepoint: Assured Forwarding 41 (0x22)

And packets after going through the server are:
Differentiated Services Field: 0x00 (DSCP 0x00: Default; (...)
0000 00 .. = Differentiated Services Codepoint: Default (0x00)

Thank you in advance,
Ewa

Oleg Moskalenko

unread,
Feb 3, 2015, 3:45:14 AM2/3/15
to Ewa Janczukowicz, turn-server-project...@googlegroups.com
If you are sure that this is not working properly, then file a bug in the project bugs list, we'll fix it.

Oleg

Oleg Moskalenko

unread,
Feb 3, 2015, 4:22:32 AM2/3/15
to Ewa Janczukowicz, turn-server-project...@googlegroups.com
By the way, you are talking about UDP-to-UDP forwarding, right ? We do not support IP headers forwarding for TCP traffic.

Oleg

Ewa Janczukowicz

unread,
Feb 3, 2015, 8:33:19 AM2/3/15
to Oleg Moskalenko, turn-server-project...@googlegroups.com
Yes, udp-to-udp.

Oleg Moskalenko

unread,
Feb 3, 2015, 11:04:42 AM2/3/15
to Ewa Janczukowicz, turn-server-project...@googlegroups.com
give me some time for investigation.

Ewa Janczukowicz

unread,
Feb 3, 2015, 12:25:37 PM2/3/15
to Oleg Moskalenko, turn-server-project...@googlegroups.com
Ok, no problem.
Thank you so much.

Oleg Moskalenko

unread,
Feb 4, 2015, 1:40:33 AM2/4/15
to turn-server-project...@googlegroups.com, mom0...@gmail.com
This functionality is supposed to work in Linux and in FreeBSD. I tested the latest versions, and I found that both TOS and TTL handling is broken. I am working on fixes. The fix will be available in the next builds of coturn and rfc5766-turn-server.

Oleg
Yes, udp-to-udp.

To unsubscribe from this group and stop receiving emails from it, send an email to turn-server-project-rfc5766-turn-server+unsubscribe@googlegroups.com.
To post to this group, send email to turn-server-project-rfc5766-turn-...@googlegroups.com.

Oleg Moskalenko

unread,
Feb 8, 2015, 10:25:20 PM2/8/15
to turn-server-project...@googlegroups.com, mom0...@gmail.com
you can check version 4.4.2.1, it has that bug fixed.

Ewa Janczukowicz

unread,
Feb 9, 2015, 10:01:44 AM2/9/15
to Oleg Moskalenko, turn-server-project...@googlegroups.com
Thank you. I will look into that.

--
You received this message because you are subscribed to a topic in the Google Groups "TURN Server (Open-Source project)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/turn-server-project-rfc5766-turn-server/SAcxtel-IZQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to turn-server-project-rfc57...@googlegroups.com.
To post to this group, send email to turn-server-project...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages