Re: [quicwg/base-drafts] Server's preferred address (#1251)

Martin Thomson <notifications@github.com> Wed, 28 March 2018 02:47 UTC

Return-Path: <bounces+848413-a050-quic-issues=ietf.org@sgmail.github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id ADD95120724 for <quic-issues@ietfa.amsl.com>; Tue, 27 Mar 2018 19:47:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.01
X-Spam-Level:
X-Spam-Status: No, score=-2.01 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.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 ElbwsIoMkTyX for <quic-issues@ietfa.amsl.com>; Tue, 27 Mar 2018 19:47:43 -0700 (PDT)
Received: from o8.sgmail.github.com (o8.sgmail.github.com [167.89.101.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 12CC0126BF3 for <quic-issues@ietf.org>; Tue, 27 Mar 2018 19:47:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com; h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=2Zt4+bDf9vwb5ahI2ryUcCDRdhc=; b=HRNcFhjyVPrxgKby nBbr6cBG4yv2XfNN4IgF5Ifygw24t5UNT0tP8pJdcDB4nUvYerzHw2HdoLyWKFwy 1ZhTD16D7f92ml3V9qTPgLOVTuRIkfKv89MtrxefO6VblqERAjonbmW9yOm/MVF5 93ef07i9FMux65mTe90gHc075mU=
Received: by filter0471p1iad2.sendgrid.net with SMTP id filter0471p1iad2-803-5ABB024D-28 2018-03-28 02:47:42.055778046 +0000 UTC
Received: from smtp.github.com (out-3.smtp.github.com [192.30.252.194]) by ismtpd0002p1iad1.sendgrid.net (SG) with ESMTP id oTXSu8nhQH-cUkpVUFkVhA for <quic-issues@ietf.org>; Wed, 28 Mar 2018 02:47:41.866 +0000 (UTC)
Date: Wed, 28 Mar 2018 02:47:42 +0000
From: Martin Thomson <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4abb0a6c8d3facc65ceedf0ab57da8e51cb2f03b2cf92cf0000000116d2c44d92a169ce126c34a9@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/1251/review/107519251@github.com>
In-Reply-To: <quicwg/base-drafts/pull/1251@github.com>
References: <quicwg/base-drafts/pull/1251@github.com>
Subject: Re: [quicwg/base-drafts] Server's preferred address (#1251)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5abb024db8bf8_12e32addcdfdced02637e7"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: martinthomson
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
X-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak3F9Z1ci1E92KkE+fgkv+E0gSLkNKlLhMz1yG PEbMSrwYvKcoZ0oROz6VNmJ9QaxBEKjYd7IuogtEOJZZLT6EYoVGAMRkepHiJhzh20nq0VLwa8V49g 0N99zMg6ihznxR46jaHLRkm3XGRfe4YdY+j9pjXF+KH2L3DQKd7ZdBR/CGDP1TPIJ3FcH5GDZ35D4b M=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/78DVN19DB6ElV7CrAJqdzZriyFE>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.22
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 28 Mar 2018 02:47:46 -0000

martinthomson requested changes on this pull request.

This needs working group review and feedback.  Especially the part where support of this feature is mandatory.  We need consensus that forcing clients to do this is a good thing.

(For the record, I don't think that the changes needed are big, but I'll request changes until it's clear that there is consensus to adopt the change.)

> @@ -1105,6 +1107,14 @@ language from Section 3 of {{!I-D.ietf-tls-tls13}}.
       };
       TransportParameter parameters<22..2^16-1>;
    } TransportParameters;
+
+   struct {
+     enum { IPv4(4), IPv6(6), (15)} ip_version;

Please be consistent about snake_case and camelCase.

> @@ -1105,6 +1107,14 @@ language from Section 3 of {{!I-D.ietf-tls-tls13}}.
       };
       TransportParameter parameters<22..2^16-1>;
    } TransportParameters;
+
+   struct {
+     enum { IPv4(4), IPv6(6), (15)} ip_version;
+     opaque ip_address<4..2^8-1>;
+     uint16 port;
+     opaque connectionId<4..18>;

To be clear, this only works if the server chooses to use a connection ID.

> @@ -1485,6 +1505,11 @@ path validation with other frames.  For instance, an endpoint may pad a packet
 carrying a PATH_CHALLENGE for PMTU discovery, or an endpoint may bundle a
 PATH_RESPONSE with its own PATH_CHALLENGE.
 
+Differences in routing on the Internet might cause the same destination address
+and connection ID to reach a different server instance which does not posses the
+necessary connection state. Receiving a Stateless Reset in response to a probing
+packet SHOULD NOT terminate the connection, but MUST cause the endpoint to
+consider path validation to have failed.

Can we make this change in a separate PR?

> +A server initiates connection migration by including the preferred_address
+transport parameter in the TLS handshake.
+
+Once the handshake is finished, the client MUST initiate path validation (see
+{{migrate-validate}}) of the server's preferred IP address using the connection
+ID provided in the preferred_address transport parameter.
+
+If path validation succeeds, the client SHOULD immediately begin sending all
+non-probe packets to the new server address using the new connection ID and
+discontinue use of the old server address.  If path validation fails, the client
+MUST continue sending all future packets to the server's original IP address.
+
+### Responding to Connection Migration
+
+A server might receive a packet addressed to its preferred IP address at any
+time during the connection after the handshake is completed.  If this packet

drop "during the connection", it's redundant with "after the handshake"

> +time during the connection after the handshake is completed.  If this packet
+contains a PATH_CHALLENGE frame, the server sends a PATH_RESPONSE frame as per
+{{migrate-validate}}, but the server MUST continue sending all other packets
+from its original IP address.
+
+Once the server has received a non-probing packet on its preferred address which
+is the largest packet number seen so far, the server begins sending to the
+client exclusively from its preferred IP address.
+
+
+## Interaction of Client and Server Migration
+
+A client might need to perform a connection migration before the server's
+connection migration has completed.  In this case, the client SHOULD perform
+path validation to both the original and preferred server address from the
+client's new address concurrently.

I think that this is problematic.  Managing two migrations concurrently is just hard.  Though your stated design works (effectively trialing all three new paths), it's unnecessarily complicated.

I would revise the client migration and forbid it (or state that it isn't going to work) until the server has finished its migration.  That is, the client has to wait until after the server's migration occurs.  The odds that a client is forced to migrate in this period is low enough that starting over might be better than taking on the combinatorial mess.  That way leads to ICE.

> +QUIC allows servers to accept connections on one IP address and attempt to
+transfer these connections to a more preferred address shortly after the
+handshake.  This section describes the protocol for migrating a connection to a
+new server address.
+
+Migrating a connection to a new server address mid-connection is left for future
+work. If a client receives packets from a new server address not indicated by
+the preferred_address transport parameter, the client SHOULD discard these
+packets.
+
+### Initiating Connection Migration
+
+A server initiates connection migration by including the preferred_address
+transport parameter in the TLS handshake.
+
+Once the handshake is finished, the client MUST initiate path validation (see

A potential problem here is that the client concludes that the handshake is finished before the server does.  That leads to retransmissions of the client Finished getting confused.  I can't see any concrete issues (other than the ones we already have), but you should convince yourself that it's OK.

> +A client might need to perform a connection migration before the server's
+connection migration has completed.  In this case, the client SHOULD perform
+path validation to both the original and preferred server address from the
+client's new address concurrently.
+
+If path validation of the server's preferred address succeeds, the client MUST
+abandon validation of the original address and migrate to using the server's
+preferred address.  If path validation of the server's preferred address fails,
+but validation of the server's original address succeeds, the client MAY migrate
+to using the original address from the client's new address.
+
+If the connection to the server's preferred address is not from the same client
+address, the server MUST protect against potential attacks as described in
+{{address-spoofing}} and {{on-path-spoofing}}.  In addition to intentional
+simultaneous migration, this might also occur because the client's access
+network used a different NAT binding for the server's preferred address.

This could be clearer: the server probes toward the client when?  After receiving a probe (no?), or after receiving non-probing packets (yes?).

> @@ -1558,7 +1583,7 @@ failure. Primarily, this happens if a connection migration to a new path is
 initiated while a path validation on the old path is in progress.
 
 
-## Connection Migration {#migration}
+## Client Connection Migration {#migration-client}

I don't think that we should make this "client" connection migration.  This is the generic description, and the addition you made below is just a special case for the server that can be initiated during the handshake.

> @@ -1791,6 +1811,64 @@ number. "packet_number_secret" is derived from the TLS key exchange,
 as described in Section 5.6 of {{QUIC-TLS}}.
 
 
+## Server Connection Migration {#migration-server}

I like (and prefer) the suggested name change.

When you say that not changing network attachment is a necessary assumption, why is that important?  The new address will be validated and congestion control rebooted in the same way that any other migration would be.  So even if this points to a completely different server instance (with keys being shipped across as needed), it still works.

> +QUIC allows servers to accept connections on one IP address and attempt to
+transfer these connections to a more preferred address shortly after the
+handshake.  This section describes the protocol for migrating a connection to a
+new server address.
+
+Migrating a connection to a new server address mid-connection is left for future
+work. If a client receives packets from a new server address not indicated by
+the preferred_address transport parameter, the client SHOULD discard these
+packets.
+
+### Initiating Connection Migration
+
+A server initiates connection migration by including the preferred_address
+transport parameter in the TLS handshake.
+
+Once the handshake is finished, the client MUST initiate path validation (see

This feature is only effective if it can be relied upon.  That said, it's a big deal, so we should talk about it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1251#pullrequestreview-107519251