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

"Jakob Heitz (jheitz)" <jheitz@cisco.com> Tue, 15 December 2020 21:10 UTC

Return-Path: <jheitz@cisco.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 5A7863A1748 for <idr@ietfa.amsl.com>; Tue, 15 Dec 2020 13:10:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.598
X-Spam-Level:
X-Spam-Status: No, score=-9.598 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com header.b=axEGKg+/; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=GtAPrTwF
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 jGy3kpv7zbMm for <idr@ietfa.amsl.com>; Tue, 15 Dec 2020 13:10:14 -0800 (PST)
Received: from alln-iport-4.cisco.com (alln-iport-4.cisco.com [173.37.142.91]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A61F03A1744 for <idr@ietf.org>; Tue, 15 Dec 2020 13:10:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3354; q=dns/txt; s=iport; t=1608066614; x=1609276214; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Zk/sQyeeqFIw0vTdCx50o1F4+7nQEYMlVbYLLXQXZb4=; b=axEGKg+/OOAmeoUgPy1uHpVSOIRGQWyRRfwf+Irae4+2SspJgEnoNpN1 7VD4+KdaszQ+w6C30vC07Rgf7s5BfA6L/XnQ3oXZg3c5ckmcDuAkDnhgh H8c5I1sL/XiQBRs7YKDwRr2fch3uc27q7Wzbq3YqlhtPiBdYOK/MO8zcq s=;
X-IPAS-Result: =?us-ascii?q?A0AMAAAtJNlfkIkNJK1bBxsBAQEBAQEBAQUBAQESAQEBA?= =?us-ascii?q?wMBAQFAgTsGAQEBCwGBUVF8Wy8uhD+DSAOEWYkCA48LiX+BLhSBEQNUCwEBA?= =?us-ascii?q?Q0BAR8OAgQBAYRKAheBWQIlNAkOAgMBAQEDAgMBAQEBBQEBAQIBBgQUAQEBA?= =?us-ascii?q?QEBhjgMhXIBAQEBAgESEREMAQE3AQQHBAIBCA4DBAEBAQICHwcCAgIwFQgIA?= =?us-ascii?q?gQOBQgagwQBglUDDiABoXgCgTyIaXaBMoMEAQEFhSoYghAJgQ4qAYJ0g3mGN?= =?us-ascii?q?iYbgUE/gRFDglY+gX+CCgESAQwXFYMAM4IsgkEILoEBBYEXKxkGBEoIN48ng?= =?us-ascii?q?zaKXZowCoJ0m22DJp8XlgeaVwQPhDwCBAIEBQIOAQEFgVY4aXBwFYEVgg8JR?= =?us-ascii?q?xcCDY4hGh2BcYFJilh0NwIGAQkBAQMJfIcOK4E8XwEB?=
IronPort-PHdr: =?us-ascii?q?9a23=3AMG38ER0OYT7qgAnEsmDT+zVfbzU7u7jyIg8e44?= =?us-ascii?q?YmjLQLaKm44pD+JxWHtadxjU+PVJmIo/5Hiu+DtafmVCRA5Juaq3kNfdRKUA?= =?us-ascii?q?NNksQZmQEsQavnQU32JfLndWo2ScJFUlI243Crd0FJS47yYlTIqSi06jgfUh?= =?us-ascii?q?z0KQtyILHzHYjfx8S63uy/4dvdeQJN0TG8erh1ah6xqFbc?=
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-AV: E=Sophos;i="5.78,422,1599523200"; d="scan'208";a="615147249"
Received: from alln-core-4.cisco.com ([173.36.13.137]) by alln-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 15 Dec 2020 21:10:11 +0000
Received: from XCH-ALN-003.cisco.com (xch-aln-003.cisco.com [173.36.7.13]) by alln-core-4.cisco.com (8.15.2/8.15.2) with ESMTPS id 0BFLABB6023434 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 15 Dec 2020 21:10:11 GMT
Received: from xhs-rtp-003.cisco.com (64.101.210.230) by XCH-ALN-003.cisco.com (173.36.7.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 15 Dec 2020 15:10:10 -0600
Received: from xhs-rcd-002.cisco.com (173.37.227.247) by xhs-rtp-003.cisco.com (64.101.210.230) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 15 Dec 2020 16:10:10 -0500
Received: from NAM10-MW2-obe.outbound.protection.outlook.com (72.163.14.9) by xhs-rcd-002.cisco.com (173.37.227.247) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 15 Dec 2020 15:10:09 -0600
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UCoa3hvps4IGvgYxVl1f39YWrVoHkhIsSVkWn30Rkee3Y/3dI0iO9k+vEbkvoey2mtdLPGHudvQMModtle5NJw9nJewac6qGnLIWUiMD5AVERwFe2gMmgNpoiLAdSEoZH1LCXMdM/6h0SqqELceBHxqJPNXZLXgNyu4aCbUULjmom1K3AB4q7f0mCJ6vlgD21yMirg14nTdqogEWA42JlFBth2kbpYPc17ztK6ywBepgtonxChTsUFTaRPmj54mNTpnZYUquTBzsXMPIu7tAR/dARY9TQutTsLCKdbP0MYO74ISLSbEDaqqNU9pknqstxdE5fz79iICafWjExR8gEA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Zk/sQyeeqFIw0vTdCx50o1F4+7nQEYMlVbYLLXQXZb4=; b=k6P8n48c++b49Kw1jhdzIU3qEPzgLy2GTJOiQ29MN9C/nTJaCoT0+awK5s+ZIocVpR90e7BiXz3Jp1ukA7mhMFsaCE0Nr8pfS/o/HQOP0TAo09joL+2Y2YcI0tyu4DJ28PWmy6wUeI/n/Zp5u8mJXg5J1ogZKnZ8nAl40yeNzNmMNt9fubKCYDnTBWYw9wK1HDtYlGYIVdIAmu32CVXfuaUtHi4pnQxnmGOn+DdPLFEjNWwiUdL9e0CuAcKmBJs84OsuqkvDLuRKeE3zO4gswSTR9UhzZ7l+3TEqhmAGPEP4D4cIM+3o55lo+I44a8mOEdVuPdM1mLP50rL/hUQiQw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Zk/sQyeeqFIw0vTdCx50o1F4+7nQEYMlVbYLLXQXZb4=; b=GtAPrTwFmF3AsdSPXjmria1f3X7UNzc/ZwREvZGg5czty5uCYEvEUB5q3N/vpRxQ8fdj35BjU8s19KKVwrzpsjbAxsTBa2JhInF1WAbS4R017z/yNFv8WEdJq8PWumGOtlEEpuksF2MQzHgZxkwZjfrKr5/RQt86DpGZOc9IDuo=
Received: from BYAPR11MB3207.namprd11.prod.outlook.com (2603:10b6:a03:7c::14) by SJ0PR11MB4957.namprd11.prod.outlook.com (2603:10b6:a03:2df::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.13; Tue, 15 Dec 2020 21:08:55 +0000
Received: from BYAPR11MB3207.namprd11.prod.outlook.com ([fe80::2581:444d:50af:1701]) by BYAPR11MB3207.namprd11.prod.outlook.com ([fe80::2581:444d:50af:1701%4]) with mapi id 15.20.3654.025; Tue, 15 Dec 2020 21:08:55 +0000
From: "Jakob Heitz (jheitz)" <jheitz@cisco.com>
To: Christoph Loibl <c@tix.at>
CC: "idr@ietf.org" <idr@ietf.org>
Thread-Topic: [Idr] TCP & BGP: Some don't send terminate BGP when holdtimer expired, because TCP recv window is 0
Thread-Index: AQHWz/PZ/nZ2Wy6ptUq1oN4xA4s39qnzMNSAgABM7oCAAAJ3QIAABHgAgAUVKwCAABAegIAAAPFA
Date: Tue, 15 Dec 2020 21:08:54 +0000
Message-ID: <BYAPR11MB32079720AAC087E08F8F730BC0C60@BYAPR11MB3207.namprd11.prod.outlook.com>
References: <X9PHRuGndvsFzQrG@bench.sobornost.net> <CAOj+MME4OHmoqJfzNQ4Tj6+wCd1kJVHPfJsDbk_+Xh8fh5G8Dg@mail.gmail.com> <6F7C5906-51A8-43C2-8AEC-3DB74CB9941F@tix.at> <1B4E7C9D-BBFE-4865-87F9-133ACE55D122@cisco.com> <22C381D0-2174-4828-A724-FD97B2FE0BCB@tix.at> <9D6268BD-C555-4B9A-A883-9B55EEB5D5DA@juniper.net> <91D9B9F7-0DBE-45E6-84D5-2E3D9F8C44A1@tix.at>
In-Reply-To: <91D9B9F7-0DBE-45E6-84D5-2E3D9F8C44A1@tix.at>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: tix.at; dkim=none (message not signed) header.d=none;tix.at; dmarc=none action=none header.from=cisco.com;
x-originating-ip: [2601:647:5701:46e0:45ca:9d3c:5636:a4db]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: d5067985-2fa1-4ae4-2326-08d8a13da1ce
x-ms-traffictypediagnostic: SJ0PR11MB4957:
x-microsoft-antispam-prvs: <SJ0PR11MB49575C4CF4D23AB8E01D69AFC0C60@SJ0PR11MB4957.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 1vSCI1gD4dJXB5ptYmQwXsJAoce45+tnvtFv/0D3g1JucKLxpQ8tUL3WLpwryWK76acIk7y4LLuqo1Z4qEyYJNeEJ3HMcLxuDrzBFGt3AgPHudxi0IinwrZiMgc55J5BCPsOh+bEjrpcJf6RU1oekxn97vCACnznVlZrA6sMLY0vRiMWd9sV/dZzUYA7hbsFSaW7lXU0xLnHhz5twuft5Bnjg5q7RWJqQcp8ukvi10TZV7zUFUgN+yC2MYscsFo5rpbh17sOC6/gWByvMt2YuWTFYgdMpNapfStZFYKATfghpETKcLyA633/4EaC89ID6y5RFuF2yxoJoJgJVrqG+RgbxG3iqzcB/XyQEhb2Dah+CEQTVX1JpVJTjEjoWVODfCMN++ZuAR1Tgh/FqNUSnPWLvTVEEjJa+ivNkScOemD9h/Muv1txcBQn5yZ0epkPYTV6u0qYhEyowzjcTHUn2cQ4plV9VAxmeByGUt7/5f4PPerCk6Xe0fWPhweAJdWt
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3207.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(366004)(136003)(346002)(52536014)(66476007)(8936002)(76116006)(8676002)(53546011)(6506007)(71200400001)(9686003)(4326008)(7696005)(6916009)(66946007)(186003)(64756008)(33656002)(66446008)(55016002)(5660300002)(966005)(83380400001)(508600001)(2906002)(66556008)(83080400002)(86362001)(781001)(18886065003); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: =?utf-8?B?djlxdjVQY3JXeVhPaGtTS3R4RXlKa2hQbnprK3VucE92dFBVOTNHNmpnREpl?= =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ZmROZUkwVHNC?= =?utf-8?B?dHV1WmdVTWdlTnp0NlFFb3p4T1R3YWZETlduVzdQTXYvcWswV0hEbER6NXI2?= =?utf-8?B?L1UwR2J1cnI0UHFmTXpxYWFUQ3kxOHkvaEM4ZEh5L0NkYVFKdndSTDRtM2l5?= =?utf-8?B?cUFMQndreXplZlZLTlFQTy9WdG5kZkljbmRvYmJlQ3luclZxN3h4cWQrcGhD?= =?utf-8?B?SmIyZmx5K2ZPMHh0VXhGQXFIT0RjTXA5cUJVZmlaTDFKN21McWJPTVpJNmxk?= =?utf-8?B?YVZQL09MZW0vcEJrTjVmWitCME84dkJ1SnNLYWU5ZzIyK3pmMCtRVWtpblJ1?= =?utf-8?B?V1c1NktBc0FYSWR4bFRvN3JjN1FpVEoxMGk5eW0xLzdaWVUwbDRlLzJaZ1Uv?= =?utf-8?B?cWE1dGJTS2xmcTlLYkg3K0lxeDcwZDFPNW5OUEIrQWEvYU9EMVUwVkY0a01J?= =?utf-8?Q?8UJb1s9p6eGyNnGME1+Gd3ef41G+I/CI=3D?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3207.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: d5067985-2fa1-4ae4-2326-08d8a13da1ce
X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2020 21:08:55.2053 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: DCbp8VhvFUni2p+5uOWkUYRN0YrBfG4o2gbITzuOIy8iaGm8IM+mNxZzqcS+f7kdBgldO68OtFQdy2pu91olTQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4957
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.36.7.13, xch-aln-003.cisco.com
X-Outbound-Node: alln-core-4.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/idr/sj6BBJQa2RjPLWOjlEz-P4ws9GA>
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: Tue, 15 Dec 2020 21:10:16 -0000

There is a queue from rtr-B BGP to rtr-A BGP. This queue stretches through the TCP implementations on both routers. That means it consists of the TCP send buffer in rtr-B and the TCP receive buffer in rtr-A, whatever might be in the forwarding buffers on both routers and maybe some IPC queues and whatever else. rtr-A BGP only knows what it is pulling from its receive socket. BGP does not know or care what wnd=0 means. As long as it can keep pulling from its receive socket, it cannot expire its hold timer. An important check that a BGP implementation must do before expiring its hold timer is: "is my TCP receive socket empty?".

Regards,
Jakob.

-----Original Message-----
From: Christoph Loibl <c@tix.at> 
Sent: Tuesday, December 15, 2020 12:58 PM
To: John Scudder <jgs@juniper.net>
Cc: Jakob Heitz (jheitz) <jheitz@cisco.com>om>; idr@ietf.org; Robert Raszuk <robert@raszuk.net>
Subject: Re: [Idr] TCP & BGP: Some don't send terminate BGP when holdtimer expired, because TCP recv window is 0

John,

Thanks for answering my question in more detail. Maybe I was unclear (but reading your email I think we are talking about the same).

> On 15.12.2020, at 21:00, John Scudder <jgs@juniper.net> wrote:
> 
> I think you are talking about this scenario. I’ll copy the example from Rob’s message cited above:
> 
>   rtr-A                   rtr-B
>   (congested c-p)         (uncongested c-p)
>   send window: >0         send window: 0
>   recv window: 0          recv window: >0	
> 
> In this case we expect:
>  a) rtr-B does not send any BGP packet (KEEPALIVE/UPDATE/NOTIFICATION)
> to rtr-A in normal operating circumstances.
>  b) rtr-A does not expect any KEEPALIVE/UPDATE packets from rtr-B. The
> session remains established even if no packet is received in the
> holdtime.
>  c) rtr-A continues to send KEEPALIVE packets to rtr-B.
> 

The part I have a problem to understand is b). It is clear that rtr-A will not receive any packets from rtr-B because rtr-B cannot send them (send window: 0). But does "rtr-A does not expect any KEEPALIVE/UPDATE packets from rtr-B” mean that rtr-A has essentially suspended its hold-timer until it is ready to receive new messages and opens up its recv window? If yes, why? I would expect timers to run independently of the transport protocol.

Cheers Christoph

-- 
Christoph Loibl
c@tix.at | CL8-RIPE | PGP-Key-ID: 0x4B2C0055 | http://www.nextlayer.at