Re: [multipathtcp] MPTCP FAST_CLOSE

Alan Ford <alan.ford@gmail.com> Tue, 14 November 2017 11:12 UTC

Return-Path: <alan.ford@gmail.com>
X-Original-To: multipathtcp@ietfa.amsl.com
Delivered-To: multipathtcp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 331FA124B17 for <multipathtcp@ietfa.amsl.com>; Tue, 14 Nov 2017 03:12:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.194
X-Spam-Level:
X-Spam-Status: No, score=-1.194 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, SUBJ_ALL_CAPS=1.506] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 RQgiOcvSY992 for <multipathtcp@ietfa.amsl.com>; Tue, 14 Nov 2017 03:12:49 -0800 (PST)
Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 BDC25126C3D for <multipathtcp@ietf.org>; Tue, 14 Nov 2017 03:12:48 -0800 (PST)
Received: by mail-wm0-x22b.google.com with SMTP id r68so20568871wmr.1 for <multipathtcp@ietf.org>; Tue, 14 Nov 2017 03:12:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=lL4AOnGNY57sg84AyLPvBFOlr36NtfEJg+OqFCWHlhY=; b=e3+oVqQ6CDtolLdI/vRkp9UrjMW+IwnoTeI/dHWYzbbLViDnurVa5Ojq9v/Xkh0N0O rGLzoA2FzsNLk1tOrlbvDzSrTHNLsvVCO2+4aqY+ZucJ8LLjUBVrhsEt5LdwfvvOcs57 YVcGPmair/xYDCdCzi3+KQzZNlYZTTOhI8UPSw+pdopkiRKSUWaCoVCz1CvFUoj4cctz KB24mmFvE+d7CkRUAwurk4XTUke83ZFKxOufmd0EO2elEIRvOYddnO62dfInPXw/RCQx sZ0eJ1ci2Bp4tTGmow/iiWVZ8I+98ck1B0FbHXPM4RLr9kAii4UX9SWFqXZA2f3NKgWY HvWQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=lL4AOnGNY57sg84AyLPvBFOlr36NtfEJg+OqFCWHlhY=; b=LrqA/NE57IBdtJXa64wy/Me+9ahsST3RCdKG9RACkfn+H6UoX3nD276abldvbggfHz JRKR58mPwacWXvnpxIhhMYA2BS7EYS57Bz0s1+ZLf4gVk4PArin6008wrwVvL5X9OBjG iMdMJY4vM3SEM+2zH3Be93JUL1QUqk1wr8WiRLjDPenqII23HPvhHFel1XXNHn6cdE0+ XFk7aCjV82HGfs/5PwwvjxQNdYO2A1bLbsVAtXELFA2gUVaWBZZGGBwhfAPQc9BptTEJ GRoppsO3B2A/C57JTlhwgb4RyPJxMzcBgb8dDhRRLVsqmJVdlvV57Vv1RwJcenJ/vxdX R95w==
X-Gm-Message-State: AJaThX5q/7GA9ldpfwt68UROOwptaB4AFnLzlS44ixfsyvP3CLIBpvQb J2PGZnAulMcY8JNKVhPvhlgUJqLJ1/0=
X-Google-Smtp-Source: AGs4zMav7+wbNm2XyklW8/BlNoNdyqdt6ln3/1WF3CJds6K/46ETLo0CQhMd2NIEULjIEwgLMKKU9Q==
X-Received: by 10.28.29.130 with SMTP id d124mr3362419wmd.73.1510657967173; Tue, 14 Nov 2017 03:12:47 -0800 (PST)
Received: from alans-mbp.lan ([83.216.156.168]) by smtp.gmail.com with ESMTPSA id b81sm6396349wmh.16.2017.11.14.03.12.46 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Nov 2017 03:12:46 -0800 (PST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Alan Ford <alan.ford@gmail.com>
In-Reply-To: <c320f331-aa18-c4e2-34a9-1ec15cc627b3@uclouvain.be>
Date: Tue, 14 Nov 2017 11:12:45 +0000
Cc: multipathtcp <multipathtcp@ietf.org>, "philip.eardley@bt.com" <philip.eardley@bt.com>, Yoshifumi Nishida <nishida@sfc.wide.ad.jp>, Christoph Paasch <cpaasch@apple.com>, François Finfe <francois.finfe@tessares.net>
Content-Transfer-Encoding: quoted-printable
Message-Id: <C6D373C6-F27C-45F1-ADBB-3BB288E9E0FB@gmail.com>
References: <c320f331-aa18-c4e2-34a9-1ec15cc627b3@uclouvain.be>
To: Olivier.Bonaventure@uclouvain.be
X-Mailer: Apple Mail (2.3124)
Archived-At: <https://mailarchive.ietf.org/arch/msg/multipathtcp/XYHLfrIFBoaiRuiaXZlGjP8uIec>
Subject: Re: [multipathtcp] MPTCP FAST_CLOSE
X-BeenThere: multipathtcp@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Multi-path extensions for TCP <multipathtcp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/multipathtcp>, <mailto:multipathtcp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/multipathtcp/>
List-Post: <mailto:multipathtcp@ietf.org>
List-Help: <mailto:multipathtcp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/multipathtcp>, <mailto:multipathtcp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Nov 2017 11:12:51 -0000

Hi Olivier,

Can you clarify what issue we are trying to solve here? Is this a purely a matter of shutting down a connection rapidly without maintaining state?

The minimum to be compliant as written requires RSTing every subflow bar one, then sending MP_FASTCLOSE on one subflow. The retransmit is only a SHOULD, so you could theoretically RST that subflow after a RTO too. Or is that RTO still too much to keep?

I don’t have an issue with adding this methodology - it does not require any significant changes, just specifies how to behave when receiving RST + MP_FASTCLOSE.

The acknowledged model was designed so that it was less likely that any state would be left at middleboxes and at the client. This does not ensure it was received at the client so in theory the client could sit there not knowing the connection had gone away. However, this is no worse than regular TCP so I don’t immediately see any problems here.

Regards,
Alan

> On 13 Nov 2017, at 14:30, Olivier Bonaventure <Olivier.Bonaventure@uclouvain.be> wrote:
> 
> Hello,
> 
> Sorry for being late with this, but the beginning of the fall semester is always too busy for me.
> 
> During the summer, there was a discussion on the FAST_CLOSE option that was triggered by Francois.
> 
> The current text of RFC6824bis uses the FAST_CLOSE option inside ACK packets, but deployment experience has shown that this results in additional complexity since the ACK must be retransmitted to ensure its reliable delivery.
> 
> Here is a proposed update for section 3.5 that allows a sender to either send FAST_CLOSE inside ACK or RST while a receiver must be ready to process both. Changes are marked with * *
> 
> ------------------
> 3.5.  Fast Close
> 
>   Regular TCP has the means of sending a reset (RST) signal to abruptly
>   close a connection. With MPTCP, a *reguler* RST only has the scope of the
>   subflow and will only close the concerned subflow but not affect the
>   remaining subflows.  MPTCP's connection will stay alive at the data
>   level, in order to permit break-before-make handover between
>   subflows.  It is therefore necessary to provide an MPTCP-level
>   "reset" to allow the abrupt closure of the whole MPTCP connection,
>   and this is the MP_FASTCLOSE option.
> 
>   MP_FASTCLOSE is used to indicate to the peer that the connection will
>   be abruptly closed and no data will be accepted anymore.  The reasons
>   for triggering an MP_FASTCLOSE are implementation specific.  Regular
>   TCP does not allow sending a RST while the connection is in a
>   synchronized state [RFC0793].  Nevertheless, implementations allow
>   the sending of a RST in this state, if, for example, the operating
>   system is running out of resources.  In these cases, MPTCP should
>   send the MP_FASTCLOSE.  This option is illustrated in Figure 14.
> 
>                            1                   2                   3
>        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
>       +---------------+---------------+-------+-----------------------+
>       |     Kind      |    Length     |Subtype|      (reserved)       |
>       +---------------+---------------+-------+-----------------------+
>       |                      Option Receiver's Key                    |
>       |                            (64 bits)                          |
>       |                                                               |
>       +---------------------------------------------------------------+
> 
>                Figure 14: Fast Close (MP_FASTCLOSE) Option
> 
>   If Host A wants to force the closure of an MPTCP connection, *it has two different options* :
> 
>   - *Option A (ACK) : *Host A sends an ACK containing the MP_FASTCLOSE option on one
>      subflow, containing the key of Host B as declared in the initial
>      connection handshake.  On all the other subflows, Host A sends a
>      regular TCP RST to close these subflows, and tears them down.
>      Host A now enters FASTCLOSE_WAIT state.
> 
>   - *Option R (RST) : Host A sends a RST containing the MP_FASTCLOSE option on all
>      subflows, containing the key of Host B as declared in the initial
>      connection handshake.  Host A can tear the subflows and the connection down immediately.*
> 
> 
> 
>   *If a host receives a packet with a valid MP_FASTCLOSE option, it shall process it as follows :*
> 
>   o  Upon receipt of an *ACK* with MP_FASTCLOSE, containing the valid key, Host B answers on the same subflow with a TCP RST and tears down all
>      subflows.  Host B can now close the whole MPTCP connection (it
>      transitions directly to CLOSED state).
> 
>   o  As soon as Host A has received the TCP RST on the remaining
>      subflow, it can close this subflow and tear down the whole
>      connection (transition from FASTCLOSE_WAIT to CLOSED states).  If
>      Host A receives an MP_FASTCLOSE instead of a TCP RST, both hosts
>      attempted fast closure simultaneously.  Host A should reply with a
>      TCP RST and tear down the connection.
> 
>   o  If Host A does not receive a TCP RST in reply to its MP_FASTCLOSE
>      after one retransmission timeout (RTO) (the RTO of the subflow
>      where the MPTCP_RST has been sent), it SHOULD retransmit the
>      MP_FASTCLOSE.  The number of retransmissions SHOULD be limited to
>      avoid this connection from being retained for a long time, but
>      this limit is implementation specific.  A RECOMMENDED number is 3.
>      If no TCP RST is received in response, Host A SHOULD send a TCP
>      RST *with the MP_FASTCLOSE option* itself when it releases state in order to clear any remaining state at middleboxes.
> 
> *o  Upon receipt of a RST with MP_FASTCLOSE, containing the valid key, Host B tears down all subflows. Host B can now close the whole MPTCP connection (it transitions directly to CLOSED state).*
> 
> ----------
> 
> 
> The burden of the MP_FASTCLOSE is on the host that decides to close the connection (typically the server, but not necessarily). The text above allows it to opt for either ACK or RST without adding complexity to the other side.
> 
> 
> Another point that might be discussed in RFC6824bis is how a host should react when there are all the subflows associates to a Multipath TCP connection are in the CLOSED state, but the connection is still alive. At this point, it is impossible to send or receive data over the connection. It should attempt to reestablish one subflow to keep the connection alive.
> 
> 
> Olivier