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

"Dan Wing" <dwing@cisco.com> Fri, 25 January 2008 03:53 UTC

Return-path: <p2psip-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1JIFd5-00060w-11; Thu, 24 Jan 2008 22:53:23 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JIFd3-0005wM-9z for p2psip@ietf.org; Thu, 24 Jan 2008 22:53:21 -0500
Received: from sj-iport-6.cisco.com ([171.71.176.117]) by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1JIFd2-0006eE-Da for p2psip@ietf.org; Thu, 24 Jan 2008 22:53:21 -0500
Received: from sj-dkim-2.cisco.com ([171.71.179.186]) by sj-iport-6.cisco.com with ESMTP; 24 Jan 2008 19:53:19 -0800
Received: from sj-core-5.cisco.com (sj-core-5.cisco.com [171.71.177.238]) by sj-dkim-2.cisco.com (8.12.11/8.12.11) with ESMTP id m0P3rJ3t005486; Thu, 24 Jan 2008 19:53:19 -0800
Received: from dwingwxp01 ([10.32.240.195]) by sj-core-5.cisco.com (8.12.10/8.12.6) with ESMTP id m0P3rHAl023127; Fri, 25 Jan 2008 03:53:17 GMT
From: Dan Wing <dwing@cisco.com>
To: 'JiangXingFeng' <jiang.x.f@huawei.com>, 'Bruce Lowekamp' <lowekamp@sipeerior.com>
References: <000b01c85eb3$70cc6720$c3f0200a@cisco.com> <002b01c85ef7$29410840$2d09a40a@china.huawei.com>
Subject: RE: [P2PSIP] Choice of STUN peer or TURN peer
Date: Thu, 24 Jan 2008 19:53:16 -0800
Message-ID: <0dc701c85f05$d23f7b30$44a36b80@cisco.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
Thread-Index: AchdzJ90kFg6Xq4fTZOyCgPVF+N/zwAif+RQABT2TDAAEsYpMAAECZOQ
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
In-Reply-To: <002b01c85ef7$29410840$2d09a40a@china.huawei.com>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; l=2557; t=1201233199; x=1202097199; c=relaxed/simple; s=sjdkim2002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=dwing@cisco.com; z=From:=20=22Dan=20Wing=22=20<dwing@cisco.com> |Subject:=20RE=3A=20[P2PSIP]=20Choice=20of=20STUN=20peer=20 or=20TURN=20peer |Sender:=20; bh=dpRYfiBzda/fecnnzOJLXUJumTT0B7FHY/Dgke5z5+k=; b=MNGpgS4rcS3Imr2/4VOp1ga7fX5QKPBWqj/cg8IzK3fU0oqUXkoW8vlRj+ g4fBtcaN4vZr/VDPCyYbJevzKB2GKzGMsyIctGs9HkKk2CkqhqA4iPFYgRdx N7Iq5rivh/;
Authentication-Results: sj-dkim-2; header.From=dwing@cisco.com; dkim=pass ( sig from cisco.com/sjdkim2002 verified; );
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 41c17b4b16d1eedaa8395c26e9a251c4
Cc: 'P2PSIP Mailing List' <p2psip@ietf.org>
X-BeenThere: p2psip@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Peer-to-Peer SIP working group discussion list <p2psip.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/p2psip>, <mailto:p2psip-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/p2psip>
List-Post: <mailto:p2psip@ietf.org>
List-Help: <mailto:p2psip-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/p2psip>, <mailto:p2psip-request@ietf.org?subject=subscribe>
Errors-To: p2psip-bounces@ietf.org

 

> -----Original Message-----
> From: JiangXingFeng [mailto:jiang.x.f@huawei.com] 
> Sent: Thursday, January 24, 2008 6:08 PM
> To: 'Dan Wing'; 'Bruce Lowekamp'
> Cc: 'P2PSIP Mailing List'
> Subject: RE: [P2PSIP] Choice of STUN peer or TURN peer
> 
> > 
> > The TURN server is responsible for obtaining a publicly-routable
> > address, and giving that address to the TURN client.  The TURN
> > specification, as currently written, expects the TURN server
> > itself to be on a publicly-routable network ("on the Internet").
> > 
> > If, however, the TURN server is behind a NAT, and we want the
> > TURN server to still be responsible for obtaining a
> > publicly-routable IP address, you could do that.  Here is a
> > new technique that could be used:  the TURN server could use
> > STUN (or NAT-PMP or UPnP, if there is only one NAT between
> > the TURN server and the Internet), and obtain a publicly-
> > routable mapping:
> > 
> > 
> >   TURN client         STUN server          NAT  TURN server
> >        |                   |                |      |
> >  1.    |------give me a TURN address------->|----->|
> >  2.    |                   |<--STUN Request--------|
> >  3.    |                   |-STUN Response->|----->|
> >  4.    |<-----here is your TURN address------------|
> > 
> > 
> > Messages 2-3 are normal STUN request/response messages, and
> > tell the TURN server a publicly-routable IP address and UDP
> > port.  The IP address and UDP port returned in in the STUN
> > Response (message 3) is the TURN server's publicly-routable
> > transport address, and is given to the TURN client in message
> > 4.
> > 
> > For the above message flow to work, the NAT has to be
> > p2p-friendly, of course -- that is a requirement for a
> > successful TURN server behind a NAT.
> 
> 
> If the NAT is nested, the location of the STUN server may 
> fail the above the
> method. For example, if the STUN server is also behind the 
> NAT and reflects
> the inner NAT mapping, not outer most NAT mapping, to the 
> TURN server, the
> relayed address will not be used for the TURN client to 
> contact with TURN
> server. In order to avoid this kind of failure, stun server's location
> should be learned by its clients.

Yep.  That is part of the qualification a p2p-sip TURN server 
would have to do before it declares itself a TURN server.

-d

> In china, due to the lack 
> of the IPv4
> address, nested NAT is not a rare situation. 
> Comments?
> 
> Regards!
> JiangXingFeng
> 


_______________________________________________
P2PSIP mailing list
P2PSIP@ietf.org
https://www1.ietf.org/mailman/listinfo/p2psip