Re: [tram] Happy Turnballs

"Tirumaleswar Reddy (tireddy)" <tireddy@cisco.com> Mon, 17 April 2017 10:25 UTC

Return-Path: <tireddy@cisco.com>
X-Original-To: tram@ietfa.amsl.com
Delivered-To: tram@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EB2ED12EB58 for <tram@ietfa.amsl.com>; Mon, 17 Apr 2017 03:25:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.522
X-Spam-Level:
X-Spam-Status: No, score=-14.522 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0XXxXSDXCX44 for <tram@ietfa.amsl.com>; Mon, 17 Apr 2017 03:25:29 -0700 (PDT)
Received: from alln-iport-5.cisco.com (alln-iport-5.cisco.com [173.37.142.92]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0917012EB4E for <tram@ietf.org>; Mon, 17 Apr 2017 03:25:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4998; q=dns/txt; s=iport; t=1492424729; x=1493634329; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=EtmXemXit4K8H9gwsUx7cScJ3SflynbRDXJp/Uh2MoA=; b=b8dtckIMm7nyHPB7JspoyVFwhKxE/aFNfZ/HE5P746q5I0oZdSOEqzOa G4kmdR5cx163rYgOJn9oKsbTLJLoj8xLppFiDZMtA+1SU9VPJ5CVsBKf7 32Uul/pJKogYpI4lwhAYbrDCgwrzBuOgDFXAcE7My/TXPIw3EzYTsCyJb Q=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0DZAQCll/RY/40NJK1cGQEBAQEBAQEBAQEBBwEBAQEBg1NhgQsHg1+KFZFclV+CDyELhXgCGoNlPxgBAgEBAQEBAQFrKIUVAQEBAQIBAQEhETcDFwQCAQgRBAEBAwIjAwICAiULFAEICAIEARIIigcIDqocgiaLBwEBAQEBAQEBAQEBAQEBAQEBAQEBARgFgQuFR4FdgxiEQYMcgl8Fj3eGO4ZpAYcDf4pZggiPR5QJAR84gQVjFUSEYYIEdYgRgQ0BAQE
X-IronPort-AV: E=Sophos;i="5.37,214,1488844800"; d="scan'208";a="411631609"
Received: from alln-core-8.cisco.com ([173.36.13.141]) by alln-iport-5.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 17 Apr 2017 10:25:28 +0000
Received: from XCH-RCD-020.cisco.com (xch-rcd-020.cisco.com [173.37.102.30]) by alln-core-8.cisco.com (8.14.5/8.14.5) with ESMTP id v3HAPSUm026823 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 17 Apr 2017 10:25:28 GMT
Received: from xch-rcd-017.cisco.com (173.37.102.27) by XCH-RCD-020.cisco.com (173.37.102.30) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 17 Apr 2017 05:25:27 -0500
Received: from xch-rcd-017.cisco.com ([173.37.102.27]) by XCH-RCD-017.cisco.com ([173.37.102.27]) with mapi id 15.00.1210.000; Mon, 17 Apr 2017 05:25:27 -0500
From: "Tirumaleswar Reddy (tireddy)" <tireddy@cisco.com>
To: Jonathan Lennox <jonathan@vidyo.com>, "tram@ietf.org" <tram@ietf.org>
Thread-Topic: Happy Turnballs
Thread-Index: AQHSqEGEXZGdNc4iZES8BGujtDsYBqHI8r2w
Date: Mon, 17 Apr 2017 10:25:27 +0000
Message-ID: <7d80f647761b46d48f05c36df7ad170f@XCH-RCD-017.cisco.com>
References: <28057480-A193-4B8F-9953-78A21949483C@vidyo.com>
In-Reply-To: <28057480-A193-4B8F-9953-78A21949483C@vidyo.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.232.21.175]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/tram/JQlAGhtG-LqVw4w_da53MlemdtU>
Subject: Re: [tram] Happy Turnballs
X-BeenThere: tram@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "Discussing the creation of a Turn Revised And Modernized \(TRAM\) WG, which goal is to consolidate the various initiatives to update TURN and STUN." <tram.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tram>, <mailto:tram-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tram/>
List-Post: <mailto:tram@ietf.org>
List-Help: <mailto:tram-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tram>, <mailto:tram-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 17 Apr 2017 10:25:35 -0000

> -----Original Message-----
> From: tram [mailto:tram-bounces@ietf.org] On Behalf Of Jonathan Lennox
> Sent: Wednesday, March 29, 2017 9:34 AM
> To: tram@ietf.org
> Subject: [tram] Happy Turnballs
> 
> So I was asked to write up my comments on Happy Eyeballs for TURN.  Here’re
> my thoughts.
> 
> As always with Happy Eyeballs, when connecting to a TURN server specified by
> a DNS name, do a DNS query for both IPv6 and IPv4, and then (with
> appropriate timing based on expected success), attempt to connect to both
> the returned IPv6 and IPv4 addresses, in parallel.

As per https://tools.ietf.org/html/rfc6555, by default IPv6 should have slight preference (or head-start) over IPv4 unless the client address preference policy is modified giving preference to IPv4 over IPv6.

> 
> The complexities occur when both IPv4 and IPv6 connections succeed; the
> dispreferred connection (which should usually be the IPv4 connection, but this
> is client policy) must be closed in a way that doesn’t leave lingering state on
> the server.

Agreed.

> 
> The process to follow depends on the transport protocol being used for TURN.
> 
> 1. For TCP or TLS, do standard Happy Eyeballs: initiate a TCP connect to both
> addresses, and use the first connection to succeed.  If both succeed, close the
> dispreferred connection normally (with TCP FIN, i.e. socket close) before
> sending any data on the connection.
> 
> 2. For DTLS, send (separate) clientHello messages to both addresses.
> Terminating the dispreferred DTLS association depends on the response.  If the
> server is using stateless cookies (as it normally should for a TURN server on the
> open Internet), it will send back a HelloVerifyRequest.  The preferred
> association can continue normally, and the dispreferred association can be
> silently discarded.
> 
> If the server is not using stateless cookies, it will instead send back a
> ServerHello message (and associated messages in that flight).  In this case, the
> client should gracefully tear down the dispreffered association to avoid
> lingering server state: it should send a user_canceled alert, followed by a
> close_notify alert.

user_cancelled alert is typically triggered when initiated by a user, close_notify alert is sufficient to inform the recipient that the sender will not send 
any more messages on this connection.

> 
> [This section should be verified by a DTLS expert.]
> 
> 3. For UDP, send TURN Allocate requests to both addresses, without
> authentication information.  If the TURN server is requiring authentication (as
> it normally will), it will send back 401 Unauthenticated responses.  This does
> not create server state, so the dispreferred allocation attempt can be silently
> discarded.

TURN server would have to remember the Nonce value !

> 
> If the TURN server is not requiring authentication (as, for example, a server
> which controls access via network topology, as described in Section 9 of draft-
> ietf-tram-turn-server-discovery), it is possible for both Allocate requests to
> succeed.  (Note that since the scenario this is describing is using plaintext UDP,
> this is a case that draft-ietf-tram-turn-server-discovery requires only be
> enabled by explicit administrator configuration.)  In this case, the dispreffered
> allocation should be explicitly torn down, by sending a Refresh with a LIFETIME
> value of 0.

Looks good.

-Tiru

> 
> 
> Comments welcome.
> 
> _______________________________________________
> tram mailing list
> tram@ietf.org
> https://www.ietf.org/mailman/listinfo/tram