Subject: [BEHAVE] TURN-TCP: the main issue and a path forward?

From: Jonathan Rosenberg <[email-masked]>
Date: Thu, 30 Oct 2008 23:32:30 -0400

With TURN hopefully (!!) wrapped up, it is time to return our attention 
to turn-tcp.

The main issue in TURN-TCP was around handling of the case where there 
are multiple connections to different peers, and a single connection 
from  the client to the TURN server. This introduced all kinds of 
interesting queueing and flow control issues. The TURN server needs to 
worry about one slow connection to a remote peer causing starvation on 
connections to other peers.

I think the easiest thing is just to avoid this in the first place. I 
don't remember if we discussed this, but the following solution avoids 
this problem:

   1. when a client gets a tcp allocation from a turn server, and a peer 
opens a connection towards that allocation, the turn server sends the 
client an indication, telling it that a connection attempt was 
requested. TURN server doesn't accept the connection yet.

   2. the indication contains a cookie

   3. the client opens a new tcp connection to the server, and sends a 
ConnectionAccept request, containing this cookie. Now, if the TURN 
server recognizes the cookie it accepts the connection. If no matching 
ConnectionAccept request arrives soon, the TURN server rejects the 
incoming connection.

In this way, there is always a single client->turn connection for each 
turn->peer connection. Similarly, if the client wants to initiate a tcp 
connection from its allocated port to a peer:

   1. client sends a CreateConnection request to the TURN server

   2. TURN server responds with a cookie.

   3. Client initiates a new TCP connection to the server, sends a 
CreateConnection this time with the cookie. If the server recognizes it, 
it establishes a connection from the allocated port to the peer

Thoughts?

-Jonathan R.
-- 
Jonathan D. Rosenberg, Ph.D.                   111 Wood Avenue South
Cisco Fellow                                   Iselin, NJ 08830
Cisco, Voice Technology Group
[email-masked]
http://www.jdrosen.net                         PHONE: (408) 902-3084
http://www.cisco.com
_______________________________________________
Behave mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/behave

---

From: "Rémi Denis-Courmont" <[email-masked]>
Date: Fri, 31 Oct 2008 09:26:16 +0200

> it establishes a connection from the allocated port to the peer

Yes, that works. But the STUN/data muxing probably needs to be re-thought too.

-- 
Rémi Denis-Courmont
Maemo Software, Nokia Devices R&D
_______________________________________________
Behave mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/behave