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

Robert Raszuk <robert@raszuk.net> Thu, 17 December 2020 10:21 UTC

Return-Path: <robert@raszuk.net>
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 9EB993A15E6 for <idr@ietfa.amsl.com>; Thu, 17 Dec 2020 02:21:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.088
X-Spam-Level:
X-Spam-Status: No, score=-2.088 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, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=raszuk.net
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 Hq69u9D0n7hl for <idr@ietfa.amsl.com>; Thu, 17 Dec 2020 02:21:13 -0800 (PST)
Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) (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 C59B03A15DC for <idr@ietf.org>; Thu, 17 Dec 2020 02:21:12 -0800 (PST)
Received: by mail-lf1-x131.google.com with SMTP id x20so36450954lfe.12 for <idr@ietf.org>; Thu, 17 Dec 2020 02:21:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raszuk.net; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hypea0K3/RmNzPOTPQ4vjNjbDaGy4a8TOAiST1W8FHI=; b=OkXZti977ThUr/JigXIiismrfWRVsbnK4q3U9vkB4+WCYsPGlSgFKnYySTaqtWYb7Z A+tV5yWg8XLlt8ZQXBB9XA3XukAEpugWpT+WIA2rZKKWllSbpIbdff6bqIOGVqdZfOLU s5NIchAVShRdDFC8H+Ziw1m8emBJqCxIUFUldo8ReG/MJQuIzdVEJHNLu/nNLvgQWLQi KjkjjyaL220IDD1CHMzn1s5aBydTytTjBHK+QPxQ/KzOZMyWfEnh6y3Q6om5sLFkLLz9 lOXmuJE5TO3TTYrxsliVeYVZ+eYaye/S+oviIbeJJK4ZL7DFb46ZLWkyKhR622MwCpyH a7NA==
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=hypea0K3/RmNzPOTPQ4vjNjbDaGy4a8TOAiST1W8FHI=; b=ezHS/KynZiv3iypEUIlVx2kgQjbZmQ5bbGjef6d69qBr/egDo4mQ6iCf7I5yPVmSXn FFkG0zowqE6+GmfJnvATAJqi82hHrQmorD5dUS4CYrxwR91CdL9PgHvavueEyiUNfjAH w6y3cyjmlSJilE5ckURvAOOODJfgfzAlnUp45xZD0Ag8dlE2N3azOfd7krFwY9ap3aFl wc6Y+PPBQl1cdRHpxXLeYlBTOMZQra3rlUJsCPoTW3Joxkp8Rih0Y/dV4aNAGB/ZI86c 8pPGSbBl+NDNSnXBkJY4X+vANtItU/MPuCDq3tEhEvnfRrYFZcV+DxuYiLi5IDQStlaC oj4g==
X-Gm-Message-State: AOAM530CKHP4T87KPjNiX3b0ZQ/yUHRrTp79sZUKFFnQRusftJQ9DVob cFj1bP+rKsvYdIsxRQ++88Yxndp2WSI3Ma8EfNGTMw==
X-Google-Smtp-Source: ABdhPJwJKsKnqwTHl2qX4lWGCAQZ/eKqYhd3cf4TC/nngZ+ZcsrTrpKbvdP7KfHjhSqwVKgRkYaZaiuKsSPvUi6P+ek=
X-Received: by 2002:a2e:9906:: with SMTP id v6mr16703480lji.361.1608200470352; Thu, 17 Dec 2020 02:21:10 -0800 (PST)
MIME-Version: 1.0
References: <CANJ8pZ_02njLOJxJPAW4vT3q0EPGB6WY1ZGemQpfiXNMhadb6A@mail.gmail.com>
In-Reply-To: <CANJ8pZ_02njLOJxJPAW4vT3q0EPGB6WY1ZGemQpfiXNMhadb6A@mail.gmail.com>
From: Robert Raszuk <robert@raszuk.net>
Date: Thu, 17 Dec 2020 11:20:59 +0100
Message-ID: <CAOj+MMHC_uGRDwEmJJO0QCRXahfinbWw5wLzSQJ=C9CYAma-mw@mail.gmail.com>
To: Enke Chen <enchen@paloaltonetworks.com>
Cc: Job Snijders <job@sobornost.net>, "idr@ietf. org" <idr@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000c362d605b6a659af"
Archived-At: <https://mailarchive.ietf.org/arch/msg/idr/cjTsyvYofv9hTrvxVvrkMn1oDbw>
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: Thu, 17 Dec 2020 10:21:15 -0000

Good catch Enke !

Also what if TCP rcv takes the BGP messages and passes it to BGP I/O InQ
which drops it for some reason right there ? Looks to me like we are not
going to detect any event like this here. But the problem we are trying to
address will persist. I think in this thread we are focusing too much on
transport vs application level detection.

And I will repeat the question already stated ... Why rcv would not close
the session in spite of missing KEEPALIVES or UPDATES ?

Tx,
R.

PS. Side note: BGP Operational Message addresses this type of
inconsistencies by periodically comparing BGP Adj_RIB_In and _Out counters.


On Thu, Dec 17, 2020 at 3:41 AM Enke Chen <enchen@paloaltonetworks.com>
wrote:

> Hi, Folks:
>
> Regarding the patch for openBGPD pointed out by Job, I do not think it
> would work. When the TCP rcv window from the remote is 0, the BGP keepalive
> can still be queued to the socket buffer. It can take a long time for the
> socket buffer to be filled up by BGP keepalives.
>
> It seems that the TCP_USER_TIMEOUT option can be used for the persistent
> zero-size window issue.  The timeout value could be multiples of the
> holdtimer (with min and max adjustments), perhaps somewhere around 5 or 6
> minutes.
>
> Thanks.   -- Enke
>
> ----------
>
> Job Snijders <job@sobornost.net> Tue, 15 December 2020 21:54 UTC
> <https://mailarchive.ietf.org/arch/browse/idr/#>
>
> [snip]
> How to solve this? Claudio Jeker took a look at what it would take in
> OpenBGPD and came up with the (tiny!) following patch, should be
> readable to most: https://marc.info/?l=openbsd-tech&m=160796802508185&w=2
>
> _______________________________________________
> Idr mailing list
> Idr@ietf.org
> https://www.ietf.org/mailman/listinfo/idr
>