Re: [multipathtcp] MPTCP FAST_CLOSE

Alan Ford <alan.ford@gmail.com> Tue, 12 December 2017 09:54 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 4348212940B for <multipathtcp@ietfa.amsl.com>; Tue, 12 Dec 2017 01:54:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.192
X-Spam-Level:
X-Spam-Status: No, score=-1.192 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, SUBJ_ALL_CAPS=1.506, URIBL_BLOCKED=0.001] 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 WNzNVI9xS2BK for <multipathtcp@ietfa.amsl.com>; Tue, 12 Dec 2017 01:54:52 -0800 (PST)
Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 373201293F3 for <multipathtcp@ietf.org>; Tue, 12 Dec 2017 01:54:52 -0800 (PST)
Received: by mail-wm0-x22f.google.com with SMTP id b199so15787044wme.1 for <multipathtcp@ietf.org>; Tue, 12 Dec 2017 01:54:52 -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:message-id:references :to; bh=8fNpNjS47yJts7ars9XTm9QNj5qK6ZUGSvuA/IAbiz8=; b=iuWsyx0I/rbYHPPp2o/kQbKco+m4PFVNxCkyTboR81fqO/OVZ+C03g/VNJi2bVdxg1 jaBWereZJde124YJNd5kixleYpm0Y7JkpYjnYlP4GKjCs+qnhw6f+J0dTFBJxRfcwKNi VtN9h2sxcvBSwxhVvP3dxYRbvatPgV8zZEOIsRo2FiV1E+qlT/Su00VpnZcEQel91nKz GLCZINPXrUblXarsS8POmM2m6YIAkWfcVNA0Ema9iW+1wy2CfqLzodMLXdAHNO77mXLj Cg979FpZKc0LEh0W4gP1vViYRhqK6jjg1p3TIvcrk8IzHGVezuZm4gu4LL/gtY85RmdS ziKQ==
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 :message-id:references:to; bh=8fNpNjS47yJts7ars9XTm9QNj5qK6ZUGSvuA/IAbiz8=; b=dSgXy3SM+zXOTb34Izozid67eLBnVOVtBrPrJo8poGb09GzERRRZoOGt8R5bVqL7Ka CR0fvMNlPOG7DldBq8VyX0SanxKe9Ar/WPnuFIo6OhccUhtnvW3QlAcRTguOmLFi0vtM p0ANxyDuWtO70k8si0vrSN1s8+uKCV+JetsKhBjhFnvFwfhs9t4+SdrT5VOEPLydqYlf A8tlvIXUkiLWud196I6spb7fzXf0iBfcLjIV4mG+yNKSqHj4l33h/EzoH306hG0dVRCS shUFI8EH/9fSq7y3BdlvmJo2Jq8LunM3593ld6CbLnDVNs75Z8huAT62+16WcR+BS6eo hx/A==
X-Gm-Message-State: AKGB3mK+E6Q+cQEomebGy7YT5635WABlhjpnbM2znpCcfy8Vsb9mNubo EOsWMJS5CfmtXUB4ce1xeH0=
X-Google-Smtp-Source: ACJfBouOJx0ibrva/lsFPW0FBzmm6a7equg152G0ZV8bCDfLGqK8tU+pUMhUFmxiWOprVP7SWbt4dA==
X-Received: by 10.80.193.9 with SMTP id l9mr2072616edf.176.1513072490651; Tue, 12 Dec 2017 01:54:50 -0800 (PST)
Received: from alans-mbp.lan ([31.185.193.242]) by smtp.gmail.com with ESMTPSA id q3sm8261261edd.61.2017.12.12.01.54.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Dec 2017 01:54:50 -0800 (PST)
Content-Type: multipart/alternative; boundary="Apple-Mail=_4AA2CE81-C73B-46AA-90D3-47E005F12054"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Alan Ford <alan.ford@gmail.com>
In-Reply-To: <20171127053345.GT39967@Chimay.local>
Date: Tue, 12 Dec 2017 09:54:49 +0000
Cc: Olivier Bonaventure <Olivier.Bonaventure@uclouvain.be>, multipathtcp <multipathtcp@ietf.org>, "philip.eardley@bt.com" <philip.eardley@bt.com>, Yoshifumi Nishida <nishida@sfc.wide.ad.jp>, François Finfe <francois.finfe@tessares.net>
Message-Id: <D6145580-E74D-4829-960B-F37D1FC99BA4@gmail.com>
References: <c320f331-aa18-c4e2-34a9-1ec15cc627b3@uclouvain.be> <C6D373C6-F27C-45F1-ADBB-3BB288E9E0FB@gmail.com> <20171127053345.GT39967@Chimay.local>
To: Christoph Paasch <cpaasch@apple.com>
X-Mailer: Apple Mail (2.3124)
Archived-At: <https://mailarchive.ietf.org/arch/msg/multipathtcp/jHxQaVvLDdnmKGFaIoHo6DPEAYo>
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, 12 Dec 2017 09:54:55 -0000

Hi all,

Does anyone else have any opinions on this proposal?

As said, I don’t personally have an issue with adding this methodology - it’s just text, specifying how to behave when receiving RST + MP_FASTCLOSE - a previously undefined behaviour. There is no significant cost here, but equally I’m not keen on adding more text for the sake of it. I don’t personally have the implementation experience to feel confident on the benefit here - what do other implementors think?

Cheers,
Alan

> On 27 Nov 2017, at 05:33, Christoph Paasch <cpaasch@apple.com> wrote:
> 
> Hello Alan,
> 
> On 14/11/17 - 11:12:45, Alan Ford wrote:
>> 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 main motivation is that when a host decides to force-close
> an MPTCP-connection, in many cases it is due to resource-shortage (running
> out of memory). In that case, we really want to be able to get rid of the
> state as quickly as possible. Sending ACK+MP_FASTCLOSE, immediately followed
> by a RST would do the job as well, but I think the RST+MP_FASTCLOSE option
> is cleaner.
> 
> 
> Cheers,
> Christoph
> 
>> 
>> 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
>>