Re: [P2PSIP] Choice of STUN peer or TURN peer

JiangXingFeng <jiang.x.f@huawei.com> Sun, 03 February 2008 09:14 UTC

Return-Path: <p2psip-bounces@ietf.org>
X-Original-To: ietfarch-p2psip-archive@core3.amsl.com
Delivered-To: ietfarch-p2psip-archive@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 620CF3A6C0D; Sun, 3 Feb 2008 01:14:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.563
X-Spam-Level:
X-Spam-Status: No, score=-2.563 tagged_above=-999 required=5 tests=[AWL=0.036, BAYES_00=-2.599]
Received: from core3.amsl.com ([127.0.0.1]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PWmt3jhmSLDy; Sun, 3 Feb 2008 01:14:47 -0800 (PST)
Received: from core3.amsl.com (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 5D5EA3A6BFA; Sun, 3 Feb 2008 01:14:47 -0800 (PST)
X-Original-To: p2psip@core3.amsl.com
Delivered-To: p2psip@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id B0F723A6BD3 for <p2psip@core3.amsl.com>; Sun, 3 Feb 2008 01:14:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
Received: from core3.amsl.com ([127.0.0.1]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o+kLqhYs+6zA for <p2psip@core3.amsl.com>; Sun, 3 Feb 2008 01:14:45 -0800 (PST)
Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [61.144.161.7]) by core3.amsl.com (Postfix) with ESMTP id 4F1D53A6BFA for <p2psip@ietf.org>; Sun, 3 Feb 2008 01:14:45 -0800 (PST)
Received: from huawei.com (szxga04-in [172.24.2.12]) by szxga04-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0JVN00KCJOF6JN@szxga04-in.huawei.com> for p2psip@ietf.org; Sun, 03 Feb 2008 17:16:18 +0800 (CST)
Received: from huawei.com ([172.24.1.18]) by szxga04-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0JVN005STOF46W@szxga04-in.huawei.com> for p2psip@ietf.org; Sun, 03 Feb 2008 17:16:18 +0800 (CST)
Received: from j36340 ([10.164.9.45]) by szxml03-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTPA id <0JVN00HQZOF4H9@szxml03-in.huawei.com> for p2psip@ietf.org; Sun, 03 Feb 2008 17:16:16 +0800 (CST)
Date: Sun, 03 Feb 2008 17:16:16 +0800
From: JiangXingFeng <jiang.x.f@huawei.com>
In-reply-to: <313101c86626$bf1872a0$c4f0200a@cisco.com>
To: 'Dan Wing' <dwing@cisco.com>, 'Cullen Jennings' <fluffy@cisco.com>
Message-id: <001701c86645$6e19f2b0$2d09a40a@china.huawei.com>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-Mailer: Microsoft Office Outlook 11
Thread-index: Achl//fjytJnxWE9R/WbFwBpAE2n7QABvTPwAA953FA=
Cc: 'P2PSIP Mailing List' <p2psip@ietf.org>
Subject: Re: [P2PSIP] Choice of STUN peer or TURN peer
X-BeenThere: p2psip@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Peer-to-Peer SIP working group discussion list <p2psip.ietf.org>
List-Unsubscribe: <http://www.ietf.org/mailman/listinfo/p2psip>, <mailto:p2psip-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/pipermail/p2psip>
List-Post: <mailto:p2psip@ietf.org>
List-Help: <mailto:p2psip-request@ietf.org?subject=help>
List-Subscribe: <http://www.ietf.org/mailman/listinfo/p2psip>, <mailto:p2psip-request@ietf.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: p2psip-bounces@ietf.org
Errors-To: p2psip-bounces@ietf.org

Great! The overlay could be thought of as a rendezvous point and could be
used to exchange candidates. Further, the TURN client and the TURN server
could use ICE with the help of the rendezvous point to get a direct
connection. (It will exist if the NAT in front of the STUN server has
end-point independent mapping behavior.) And then TURN client could use the
TURN server to communicate with other peers.

--
Jiang XingFeng

> -----Original Message-----
> From: Dan Wing [mailto:dwing@cisco.com]
> Sent: Sunday, February 03, 2008 1:37 PM
> To: 'Cullen Jennings'
> Cc: 'Francois Audet'; 'Bruce Lowekamp'; 'P2PSIP Mailing List';
'JiangXingFeng'
> Subject: RE: [P2PSIP] Choice of STUN peer or TURN peer
> 
> > On Feb 2, 2008, at 12:32 AM, Dan Wing wrote:
> >
> > > Reports indicate that roughly 25% of NATs would block such
> > > incoming packets.
> >
> > Which reports are you thinking of here ?
> 
> Google uses a pre-standard version of ICE for their user-to-user
connections,
> and according to
> http://code.google.com/apis/talk/libjingle/important_concepts.html, 8% of
> those user-to-connections connections require a relay.
> 
> For this to be a problem 8% of the time that two peers cannot establish a
> direct connection, about 28% (28%*28%=7.84%) of NATs have a property
> (port-specific filtering or port assignment) that would also break a TURN
> server trying to run behind that NAT.
> 
> 
> This brings me back to thinking about Bruce's idea that a TURN server be
> triggered via a message sent through the overlay.  In
> <http://www.ietf.org/mail-archive/web/p2psip/current/msg03814.html>, I
said I
> didn't think it would work.  However, on further reflection, there is an
> advantage to communicating to the TURN server using the overlay and also
> sending it TURN messages directly (i.e., not through the overlay).  This
> combination with the TURN client communicating to the TURN server using
the
> overlay and using a normal TURN request means that a TURN server that is
> behind an address-filtering NAT could still be a viable and usable TURN
> server.  This would increase the number of TURN servers available to
p2p-sip.
> 
> 
> This works because the TURN client would have already learned its public
IP
> address via STUN (although its port would be wrong, or its port would be
> filtered), and the TURN client can communicate that IP address and UDP
port
> through the overlay to the TURN server.  When the TURN server receives
that
> communication (containing the TURN client's public IP address and UDP
port)
> through the overlay, the TURN server can send packets towards it; due to
> p2p-unfriendlyness of the NAT in front of the TURN client, though, those
> packets would be dropped by the TURN client's NAT.  However, those
messages
> cause the TURN server's NAT to open a permission towards the TURN client's
IP
> address.  The next retranmission by the TURN client will then make it
through
> the TURN server's NAT, to the TURN server, and the response will make it
back
> to the TURN client.  Here is a diagram, with "-" showing peer-to-peer
> messages, and "=" showing messages sent through the p2p-sip overlay:
> 
>   TURN client   NAT  STUN Server   NAT      TURN server
>        |         |        |         |           |
>   1.   |--STUN request--->|         |           |
>   2.   |--a.b.c.d/12345---|         |           |
>        |         |        |         |           |
>   3.   |--TURN request (1st xmit)-->X(dropped)  |
>   4.   |====my address=a.b.c.d/12345===========>|
>   5.   |         X<---TURN indication-----------|
>   6.   |--TURN request (2nd xmit)-->|---------->|
>   7.   |<--------|<---TURN response-------------|
>        |         |        |         |           |
> 
> * Message 3 is dropped because the TURN Server's NAT filters incoming
packets
> based on their source address -- the TURN server has never sent a packet
to
> a.b.c.d, so the NAT drops the incoming packet.
> 
> * Message 4 is the p2psip overlay message.
> 
> * Message 5 is mostly to mollify the TURN server's NAT.  Once the TURN
> server's NAT sees message 5, it adds a permission for traffic from
a.b.c.d/*.
> (remember: the TURN server's NAT has address filtering behavior, which is
what
> we're trying to get a TURN Server working with by adding this p2psip
overlay
> message (4)). Message 5 is dropped by the TURN client's NAT.
> 
> * Message 6 is a normal retransmission of the TURN client's message.
> 
> 
> With the functionality to trigger to the TURN server through the overlay,
we
> can run a TURN server even behind an address-filtering NAT (but not a
> port-restricting NAT or a symmetric NAT).  Without the functionality to
> trigger the TURN server, we cannot run behind an address-filtering NAT.
> 
> 
> I don't know what (pre-standard) version of ICE that Google implemented,
nor
> do I recall which version of ICE added the ability to communicate directly
> even with address-restricted NATs.  The standard version of ICE does
something
> vaguely like the above:  it sends a message through the overlay (the
> Offer/Answer exchange, using SIP), and that message causes both peers to
try
> to communicate with each other, which allows two peers with
address-filtering
> NATs to communicate directly with each other (without a relay).  The
ability
> to communicate through the p2p-sip overlay to the TURN server provides a
> similar capability so that a TURN server can be behind an
address-filtering
> NAT.
> 
> -d

_______________________________________________
P2PSIP mailing list
P2PSIP@ietf.org
http://www.ietf.org/mailman/listinfo/p2psip