Re: [Idr] TCP & BGP: Some don't send terminate BGP when holdtimer expired, because TCP recv window is 0

Gyan Mishra <hayabusagsm@gmail.com> Sat, 19 December 2020 21:36 UTC

Return-Path: <hayabusagsm@gmail.com>
X-Original-To: idr@ietfa.amsl.com
Delivered-To: idr@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 450D93A0BF5 for <idr@ietfa.amsl.com>; Sat, 19 Dec 2020 13:36:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.087
X-Spam-Level:
X-Spam-Status: No, score=-2.087 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_REMOTE_IMAGE=0.01, URIBL_BLOCKED=0.001] autolearn=unavailable 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 4ii0Ia-ZFJoG for <idr@ietfa.amsl.com>; Sat, 19 Dec 2020 13:36:20 -0800 (PST)
Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) (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 0D8D13A0BF2 for <idr@ietf.org>; Sat, 19 Dec 2020 13:36:20 -0800 (PST)
Received: by mail-pl1-x62f.google.com with SMTP id s2so3337567plr.9 for <idr@ietf.org>; Sat, 19 Dec 2020 13:36:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OjgY50XPkGliW+ocHCXb19RbtOSWVzxdzUvzkuka7wE=; b=GfOddAjXdkcnvHTYPFLqw8c0o85CPhTbqwzHnZ4cribvMBM9+aMmwMFefbtaPYJ8Ht hB/yRVJLwCMXSqgNVPHaVWIZiusPtHBXO44niGhHIudKhxC59p5ohcX0S+QBfZvanLwC rU3TUgwTOgr8LdaRHhuw7EXuJvDskqeWq/3J7duss40ohiDLaGnUBD2FlfnNMsRBsWPx dEeBEpO3N+i6hAV9QgFRv2dolJ0RBAe1kzf3J6Y3g2nyHRFqdRZcCaYtrzQkki6fU8vL M8enqX5hHxVxJAff0XKlxpUO4uv2m+uSTiiOkX3st1Y1kvRl3RxS4RNNy8JWvMOBPMTh FuQA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OjgY50XPkGliW+ocHCXb19RbtOSWVzxdzUvzkuka7wE=; b=IMPPVknFaPk6JKGVGP98Wf7CUeNJdpMum+t2r0nr/d13ZXw4wG+zK30DRd30LPw5Lm o7ItOBBns9XCp8Fk3VsvynQy9hRS2MEQy/4Ck8/zISJDrDKfSPLGqapZpPpxc+3KXhNS gpfxK/Hn7i6slvY/yTZXX3TZDTcI7jzxZnvI0GJ/xJJwRwGk9E/nWWQv4zXDL0N5VyFH lw9y1PzOxSPCYHoE3uE/DNSEf1GA1KuQVyJJa1w8Lwc4I1aQadFcmdbMsnbRVRtXaefp d3ZEpyZdYLd4CxEbLqYvToo4cXR6XeLwgfLOseaV6eJGHUZkB0577gsmN27TFQFks/4A Dt1w==
X-Gm-Message-State: AOAM531p7JdfHeZFAwYhR8a052MC+8oDqUVsLRc/hbE33VYtAXK7AkoX MEfn77laAJQfG00OChLjcTQfYR9qpkKZXeik1rQ=
X-Google-Smtp-Source: ABdhPJzI4yQQv6vCv7dvOKJ+q6lJ6vE0mNA2PvOI1jX/3ddecgbLW+NY+GrgRF14Bf8jMqXjv1Hmk9SCZZFvet/yK7o=
X-Received: by 2002:a17:90a:7085:: with SMTP id g5mr10500250pjk.132.1608413778288; Sat, 19 Dec 2020 13:36:18 -0800 (PST)
MIME-Version: 1.0
References: <CANJ8pZ-WMDotkQvhN-NuP7ivZkPRR-9S2KJSar=6463U0VKkow@mail.gmail.com> <EFC56A31-1276-4DAB-9526-9C2F24814D2C@pfrc.org> <CANJ8pZ_LnDna_jtipcLJq9rrS3MM32rLdxRW8ntC2aEi9VvzMg@mail.gmail.com> <722A787A-5B83-4802-A9F4-AB2957BB3305@juniper.net> <CA+eZshBse4g6jUBMxs4bJiE+uvWScwv7ggLNOMJbUiL1YsaisQ@mail.gmail.com>
In-Reply-To: <CA+eZshBse4g6jUBMxs4bJiE+uvWScwv7ggLNOMJbUiL1YsaisQ@mail.gmail.com>
From: Gyan Mishra <hayabusagsm@gmail.com>
Date: Sat, 19 Dec 2020 16:36:07 -0500
Message-ID: <CABNhwV1ikHAknsfNDw6GJ8BngHDNjNdCxmgipJvJ7G3rxmnZVA@mail.gmail.com>
To: William McCall <william.mccall@gmail.com>
Cc: Enke Chen <enchen@paloaltonetworks.com>, John Scudder <jgs=40juniper.net@dmarc.ietf.org>, "idr@ietf. org" <idr@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000e825fe05b6d803fc"
Archived-At: <https://mailarchive.ietf.org/arch/msg/idr/1FfmSMipC3MRixWeAD8yDPL4l8U>
Subject: Re: [Idr] TCP & BGP: Some don't send terminate BGP when holdtimer expired, because TCP recv window is 0
X-BeenThere: idr@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Inter-Domain Routing <idr.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/idr>, <mailto:idr-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/idr/>
List-Post: <mailto:idr@ietf.org>
List-Help: <mailto:idr-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/idr>, <mailto:idr-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 19 Dec 2020 21:36:22 -0000

Here is the RFC 5482 TCP User timeout options from TCPM WG.

https://tools.ietf.org/html/rfc5482

TCPM has a bis draft update to 793 that has more info then the original.

https://datatracker.ietf.org/wg/tcpm/documents/

https://tools.ietf.org/html/draft-ietf-tcpm-rfc793bis-19#page-42


>From quick read there are caveats with devices supporting or not supporting
the option.

Also I guess setting the value is tricky as well not too low or too high
that either could make matters worse with instability.

Going down this path of does seem a lot more complicated and risker then
using BFD.


Kind Regards

Gyan


On Sat, Dec 19, 2020 at 5:38 AM William McCall <william.mccall@gmail.com>
wrote:

> On Fri, Dec 18, 2020 at 10:33 PM John Scudder
> <jgs=40juniper.net@dmarc.ietf.org> wrote:
> >
> > On Dec 18, 2020, at 1:09 PM, Enke Chen <enchen@paloaltonetworks.com>
> wrote:
> > >
> > > No, I am not assuming that packets are getting somewhere. The
> TCP_USER_TIMEOUT would work as long as there is "pending data" (either
> unacked, or locally queued). The data can be from the local BGP Keepalives
> or the TCP_KEEPALIVE.
> >
> > Apart from the other objections to relying on TCP_USER_TIMEOUT, which I
> think are sufficient, it’s not clear to me that implementations will
> provide the desired semantics. RFC 793 seems like it specifies the right
> semantics (“get this data to the peer within N seconds or close”):
> >
> >         The timeout, if present, permits the caller to set up a timeout
> >         for all data submitted to TCP.  If data is not successfully
> >         delivered to the destination within the timeout period, the TCP
> >         will abort the connection.  The present global default is five
> >         minutes.
> >
> > However the Linux man page documents different semantics:
> >
> >        TCP_USER_TIMEOUT (since Linux 2.6.37)
> >               This option takes an unsigned int as an argument.  When the
> >               value is greater than 0, it specifies the maximum amount of
> >               time in milliseconds that transmitted data may remain
> >               unacknowledged before TCP will forcibly close the
> >               corresponding connection and return ETIMEDOUT to the
> >               application.  If the option value is specified as 0, TCP
> will
> >               use the system default.
> >
> > The important difference being that whereas 793 implies data written to
> the socket, the Linux man page says “transmitted” data, which seems like it
> must mean data TCP has written to the network. These are two very different
> things! If Linux (or another stack) implements what the man page seems to
> say, it’s not useful for our purposes.
> >
> > —John
> > _______________________________________________
> > Idr mailing list
> > Idr@ietf.org
> > https://www.ietf.org/mailman/listinfo/idr
>
> I was curious too. I read the manpage, relevant linux kernel code, the
> RFC, and hacked up a test case (unicast me if you want the code).
> Also, Cloudflare published a relevant blog entry[0]. For this specific
> scenario, see under the sub-heading "Zero window ESTAB is...
> forever?".
>
> TCP_USER_TIMEOUT doesn't appear to kick in until there is unACKed
> data, meaning that it has already been transmitted from TCP's
> perspective. Stuff hanging around in the buffers due to persist state
> doesn't seem to count, per the test results and the docs. Confirms
> your thoughts from the reading I think.
>
> [0] https://blog.cloudflare.com/when-tcp-sockets-refuse-to-die/
>
> --
> William McCall
>
> _______________________________________________
> Idr mailing list
> Idr@ietf.org
> https://www.ietf.org/mailman/listinfo/idr
>
-- 

<http://www.verizon.com/>

*Gyan Mishra*

*Network Solutions A**rchitect *



*M 301 502-134713101 Columbia Pike *Silver Spring, MD