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> Wed, 16 December 2020 16:22 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 08A823A109C for <idr@ietfa.amsl.com>; Wed, 16 Dec 2020 08:22:01 -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=cT2HvKIB; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=QMwV4PRO
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 SnR6MNZwGOOl for <idr@ietfa.amsl.com>; Wed, 16 Dec 2020 08:21:58 -0800 (PST)
Received: from alln-iport-3.cisco.com (alln-iport-3.cisco.com [173.37.142.90]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 70C1C3A109D for <idr@ietf.org>; Wed, 16 Dec 2020 08:21:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=11480; q=dns/txt; s=iport; t=1608135718; x=1609345318; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=oh3PT82h4Rj6VDfOYy47DRYi5uD+0jb8XHP/5nusDRA=; b=cT2HvKIBqiy2FJR5hVrI205wZu0WqTDLD8Fy27wVK5yOzDi25afqyjAt oYi5qJqPoKBPM7HBzSKMMjn8p+/5HzURRU7v4onnscxJ61t4mSzyVgYsg MqosXTR8Z347jWUv/cUnS/TQag6+NYSyf6Pn9/AM5Ux3MQK18d7a19OTt w=;
X-IPAS-Result: A0CuAACSM9pf/40NJK1bBxkBAQEBAQEBAQEBAQEBAQEBAQESAQEBAQEBAQEBAQEBQIFPgVJRB3VbLy6EP4NIA41bA48LhQCEf4FCgREDVAsBAQENAQEYCwoCBAEBhEoCF4FZAiU4EwIDAQEBAwIDAQEBAQUBAQECAQYEcYU0ByYMhXIBAQEDAQEBEBERDAEBLAsBBAsCAQgOAwQBAQECAh8EAwICAiULFAEICAIEDgUbB4MEAYJVAw4gAQ6iDAKBPIhpdoEygwQBAQWFJBiCEAMGgQ4qgnWDeoY2JhuBQT+BESccglY+gUmBFAEBAheBEQESAQgEFReDADOCLIIFDy0UGwMESA4ZBQ0CBBMMDywWHzIHEgEFBCAOHAg3BI0pgWIYFYMhil2aMAqCdIkjhziKcAMfgyaDIpt1lgeJC5FfDIQwAgQCBAUCDgEBBYFtI2dwcBU7KgEvgg8TPRcCDViKL4J/GyMUgzqCWYI7hUMBdDcCBgEJAQEDCXyGfwckgTxfAQE
IronPort-PHdr: 9a23:MvmFwRA1cWw2BhXaSEauUyQJPHJ1sqjoPgMT9pssgq5PdaLm5Zn5IUjD/qw31g3SWo/c8fRDkPaQta38CiQM4peE5XYFdpEEFxoIkt4fkAFoBsmZQVb6I/jnY21ffoxCWVZp8mv9PR1TH8DzNEbVqHqo6zkJBlP5OBYmbujwE5TZ2sKw0e368pbPYgJO0Ty6Z746LBi/oQjL8McMho43IacqwRyPqXxNKOk=
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-AV: E=Sophos;i="5.78,424,1599523200"; d="scan'208";a="610635813"
Received: from alln-core-8.cisco.com ([173.36.13.141]) by alln-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 16 Dec 2020 16:21:57 +0000
Received: from XCH-ALN-003.cisco.com (xch-aln-003.cisco.com [173.36.7.13]) by alln-core-8.cisco.com (8.15.2/8.15.2) with ESMTPS id 0BGGLvbu012116 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 16 Dec 2020 16:21:57 GMT
Received: from xhs-rtp-001.cisco.com (64.101.210.228) by XCH-ALN-003.cisco.com (173.36.7.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Dec 2020 10:21:56 -0600
Received: from xhs-aln-002.cisco.com (173.37.135.119) by xhs-rtp-001.cisco.com (64.101.210.228) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Dec 2020 11:21:55 -0500
Received: from NAM10-MW2-obe.outbound.protection.outlook.com (173.37.151.57) by xhs-aln-002.cisco.com (173.37.135.119) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 16 Dec 2020 10:21:55 -0600
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=irM1fpozwoDCLpFT+kGY+PURg3IGYgO8vQDVEgV8Z566DrRq1ACZOZjz6RbgC2DYUM/VtOo6gXRjU8sO6Lv2fzxBeoKks5xjsVWD6dQVklECrRNh46p8YHLeFRZqP+BcPD1thAVNK7UgHVjaY75kw1kiJ1ofYnNsleL9pjZCfCsKZtPISbMfG+6WIZ2rs3kZ1gmfFsIm7sd0tkvX7murYV3pyWuRCzQcvMGaPhsClenw/euXpHyeCzfINO79In+YzgTueUuJuHfT9VB94dAuRgImzUHniBlBNx/GCmxl+XD6rwhnslyVx4GkH4u2VrsVmMinZ3gwrmTIZsE/IJZMUA==
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=oh3PT82h4Rj6VDfOYy47DRYi5uD+0jb8XHP/5nusDRA=; b=NXor5bC+ZK6lUrqcn44EXN6zUV9yL/P4zujfJCg1QLtdUJycCZea7zvea2kjXeIvhHJrnU6cMKn7F1zgZuSbC+XTV+f0iRoSoj7wM4OJYMK2fJwf+fnFstsiJ7LIARSegqieceUYuX/ZLht1Oz7r4FhGG2ec050rMW5FlCJAI+GJ6SY8Vd3wFeZUob2zK4B7vGkCIu//yaXWLwFeOomhVWNtdpaEphjdUIN0vSkan4CnLM2qZrqIyf55EdE51CFgWluce6UIS6BaZEaN/pjbC66esgpWcxN8dJrhEXGvPJJQLT7XRKxwcdUSE2nCwhU0jBewrCnPrBOrES6tlWgSXQ==
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=oh3PT82h4Rj6VDfOYy47DRYi5uD+0jb8XHP/5nusDRA=; b=QMwV4PROpaYoe974lpD/v7l0OhgOZ97VaXMV6R/wAvGMRrRRMMP6M//KE5LiJ10uReU5yaiikvisjKuAGKiv2wFQIbFsdOZMlzCc0gd70tboaWqhX3oP4Ybw1XrvUISfkPytdYgI/epBmpFu0GbozWDoolKLAkvkpAiK89BF4No=
Received: from BYAPR11MB3207.namprd11.prod.outlook.com (2603:10b6:a03:7c::14) by BY5PR11MB4053.namprd11.prod.outlook.com (2603:10b6:a03:183::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.14; Wed, 16 Dec 2020 16:21:53 +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; Wed, 16 Dec 2020 16:21:53 +0000
From: "Jakob Heitz (jheitz)" <jheitz@cisco.com>
To: Claudio Jeker <cjeker@diehard.n-r-g.com>
CC: Job Snijders <job@sobornost.net>, "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/nZ2Wy6ptUq1oN4xA4s39qnzMNSAgABM7oCAAAJ3QIAABHgAgAUVKwCAABAegIAAD7aAgAAXogCAAALoQIAAqagAgABxV5A=
Date: Wed, 16 Dec 2020 16:21:53 +0000
Message-ID: <4E9BEA12-998A-4AD1-B342-4F26AA6EBA69@cisco.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> <X9kweQ5EtTL7tOAM@bench.sobornost.net> <CAOj+MMFySPXpE8QxcO+7szKzQ78faQASYKnBUYg_h_aLd=P4Lg@mail.gmail.com> <BYAPR11MB3207412804697588E4AA3F03C0C60@BYAPR11MB3207.namprd11.prod.outlook.com>, <20201216093614.GI68083@diehard.n-r-g.com>
In-Reply-To: <20201216093614.GI68083@diehard.n-r-g.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: sobornost.net; dkim=none (message not signed) header.d=none;sobornost.net; dmarc=none action=none header.from=cisco.com;
x-originating-ip: [2601:647:5701:46e0:a8e9:ea6d:8723:6479]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: e56fd8da-d315-4228-660b-08d8a1deb37b
x-ms-traffictypediagnostic: BY5PR11MB4053:
x-microsoft-antispam-prvs: <BY5PR11MB4053EA26D1EA2F830DAEBC0EC0C50@BY5PR11MB4053.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:7691;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: UvI/QxV4N9KysfR8hKtbV0hEa3wOK3XppF1x+wotHpIg7yu7rSrjS8JZwsm1OJN8744p1LYWwejabCyb6o6nxFrKft2Z6NufTOx2slPjIcyZ/pWsQUyBqxzALZnXN6QyGM1QcRPnMnFxjSMYRTVGLN47JSjo7YqBY8bD7A8w/okm86d2egBKVNRRJFlhThcFQt7wRDNxt8QFQna/ofXqWQwflYvgJ8+BMxGstpHB821lf7LFhE2nqyOSKqkqd77U8BteyU6lgj9pZGgGxTOFW67M/0j28v6Bq501J1hs1GszmbVo2q6UctLE1OuBxybZ17LqGQ6JiKdLpJGWcGmMtz6dtRpGCJMqpbNIHHDk2+vGye+sUDzOLDMo7zEfzGEJ/sukznB8JlSXlqFuUuNdGECiNZkNHn4wampwDYjlBdJCreR9aueRvrDNUF1ecNu8r9sV4Fq4Jv8WTdqT+HAmhFhOXEjwvUlZTb+y1aunTGo=
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:(39860400002)(396003)(136003)(346002)(366004)(376002)(64756008)(6512007)(6916009)(6486002)(478600001)(2616005)(6506007)(8936002)(66946007)(66446008)(66574015)(53546011)(76116006)(5660300002)(83380400001)(316002)(36756003)(66556008)(186003)(33656002)(86362001)(66476007)(71200400001)(966005)(8676002)(2906002)(4326008)(54906003)(45980500001)(6606295002); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: 6zIH0yqGa6chR6bq4h9Es2y19z49v8kgbPSnuNNIBmfv4yrqTAC0Iz1P9Urnh2zEQBgwtzJnwLMZRbKIk1oizrdgBrzUp8YlPVHlBe958nmqKiD92i2MP09mYPiQBOeVFgKNVWJ2B0Xu6ekBS7tMhdDhlDMex8LT2606H/SVsHqp909LLolgZjBrwdy/jhUXagCAXMU2xexHPN1hseP7WxXWrSwWNZ6ujK4wNpVZqvNaA/AazPVuu7G/5qBkzp/BrJWNFFWOP/PNXq47rWihsB797IMpqbqr8hjAzC6lEm6zINQOQzVZO6/lmSJ+GzSxYOa/qg1upge2lQ6qCzxkW8omrMB5wvtSjRk5wUTw5/NiteMfhbrG0s/3/2hco6+ThUZiCSfmhNKi/Cow4DhBJyyacW2trw50MmnZNe7xnacvvbeh4wEHwd/ls6kF+BVMJZaeXoHJ3FjGsVfvoBBDJqmL0y/nGeWqXOB43RCoWBBp4f33D6LCKIEGDkRXUexmLs+bmvULI26ddaMCSfX/800byev+muJDBrh+XDn+oJRp1Cn1fvdbO6g2G3ecyTgmLPCHr0GU1FVIgMu2yizTOwexL4fKlOMkiuraoSoqtHP0n0H4u63yAKf9WIDKtVu/hazlVdrNuN03KS9ztdAdhXEXvgpFEqoms5DFcbWn3ozBoT1tENYGIjAc5XNCMUep2V8FW5Q+gt+hroK2Ebp/QmPzSM6H4eMwucUXibFYEuetQosF+4k7GJlUs24ZpW5GtE2vVwS5LJGIPGMVrMLDUoKoeydW3ra7+f+AkS7n80zv+11cOH7SCxL46/atiTvlaACIggENrr2mgTJKaikLIfINHXIeU9nUintiY/+sO9Y5YXhEUb5g2c+ftCMHxYhrJd1IGXXfp9+rqNYmLUQVgB71WZqiouSYxbX2l34aG/nqGgHq4llxsI/7sr/HtX9Bfozt2T7hauj1n9g001pHj+MQBZO7sEY7rHCd2Z2CewSKoanEMxU9/ooRVbMyupUO4fUyphKDYlkYZGVxnxFCJHrH6TgG8Q4BmlLfgBccwjeDlHT2JNCobTDEqLXRFyut
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: e56fd8da-d315-4228-660b-08d8a1deb37b
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2020 16:21:53.8215 (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: 4lCH4Yu7U8TpR/V1mzb2MNePyRMsQYWKK2FlHtV/3juAIrf22Jq8lt4AFIF6qD95GxSqjg76Nc3Z14OlHCs7hg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4053
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.36.7.13, xch-aln-003.cisco.com
X-Outbound-Node: alln-core-8.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/idr/rSHxJAeICBP-GEx7FCQYxjnK38I>
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: Wed, 16 Dec 2020 16:22:01 -0000

No. It's not closed with a NOTIFICATION. The send queue is frozen. No data, not even a NOTIFICATION is going to get to rtr-A. The only thing that will get there is a TCP RST and/or a new TCP SYN.

Regards,
Jakob.


> On Dec 16, 2020, at 1:36 AM, Claudio Jeker <cjeker@diehard.n-r-g.com> wrote:
> 
> On Tue, Dec 15, 2020 at 11:39:52PM +0000, Jakob Heitz (jheitz) wrote:
>> If you tell the socket to shutdown and then close, it will attempt to
>> send everything in the queue with the FIN at the end.
>> Then wait for the FIN ACK and all manner of nonsense to bore rtr-B to tears.
>> So, to get on with it, send the RST.
>> 
>> Next question is what to do if GR is in effect.
>> rtr-A will dutifully retain all the routes from rtr-B and Job's beloved WITHDRAW
>> will still not happen.
>> The new session will come up (maybe), rtr-B will send all its routes again and
>> (if it doesn't get stuck again) will send its EOR. Only now can Job breathe easy.
>> 
>> Might we need a new bit in the GR capability in the OPEN message?
>> "WITHDRAW ALL MY ROUTES NOW"
> 
> GR should not be an issue since the connection is closed with a
> NOTIFICATION. At least the system detecting the stuck session will flush
> and WITHDRAW all routes. In the next OPEN message this system will neither
> set the R flag nor the F flag and so the stuck system will WITHDRAW
> all routes as well.
> 
> The per AF "Forwarding State" bit already acts as a withdraw all my routes
> now indicator.
> 
> Cheers,
> -- 
> :wq Claudio
> 
>> Regards,
>> Jakob.
>> 
>> From: Idr <idr-bounces@ietf.org> On Behalf Of Robert Raszuk
>> Sent: Tuesday, December 15, 2020 3:19 PM
>> To: Job Snijders <job@sobornost.net>
>> Cc: idr@ietf.org
>> Subject: Re: [Idr] TCP & BGP: Some don't send terminate BGP when holdtimer expired, because TCP recv window is 0
>> 
>> Hi Job,
>> 
>> Putting all other concerns aside I have few questions ...
>> 
>> 1. Is this BGP which should trigger the session RST or FIN or TCP ?
>> 
>> 2. If this is BGP (TCP would not be aware of HOLD_SEND) how exactly do we know that peer's window is 0 for HOLD_SEND TIME ?
>> 
>> 3. Which TCP socket option will return BGP an error that for the duration of X sec window for a given peer was 0 ? I presumed even if it jumped for 100 ms above 0 the timer would be reset indicating peer is still alive ?
>> 
>> From your bgpd example you are not checking anything other then BGP's ability to write to out queue. So is this the suggestion now forgetting all about TCP layer ? Simply if I can not write anything to a peer for over X sec RST the session ?
>> 
>> Hi John,
>> 
>> I think the suggestion is to add a second HOLD_SEND TIME different from normal HOLD TIME.
>> 
>> Also there could be lost of different type of peers so unless HOLD_SEND would be say 5 x HOLD putting all peers under same time value may be suboptimal.
>> 
>> Thx,
>> R.
>> 
>> 
>> On Tue, Dec 15, 2020 at 10:54 PM Job Snijders <job@sobornost.net<mailto:job@sobornost.net>> wrote:
>>> On Tue, Dec 15, 2020 at 09:57:47PM +0100, Christoph Loibl wrote:
>>> 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<mailto: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.
>> 
>> Yeah, I'd expect that too. We've seen congested BGP implementations
>> continue to send KEEPALIVEs but not accept (or send!) other BGP
>> messages. And rtr-B's attempts at KEEPALIVE just be TCP ACked with zero
>> window.
>> 
>> I'd argue in the above scenario rtr-A is simply broken and rtr-B MUST
>> proceed to close down the session towards rtr-A, rtr-B must cleanup and
>> generate WITHDRAWs for any routes pointing to rtr-A. By doing the
>> clean-up rtr-B does both itself and rtr-A a favor. If the issue was
>> transcient rtr-A and rtr-B will re-establish a few minutes later
>> (IdleHoldTimer, right?) and things will normalize.
>> 
>> Arguably and measurably, rtr-A is operating its Loc-RIB (forwarding)
>> based on stale routing information (assuming rtr-A is working at all!):
>> rtr-A has not received any WITHDRAWs, UPDATEs (or somewhat less
>> importantly KEEPALIVEs) from rtr-B.
>> 
>> Rtr-B is fully aware of this stale situation, because rtr-B was not able
>> to write these BGP messages to the network: the messages are still in
>> OutQ. Rtr-A didn't accept any KEEPALIVE (or UPDATE/WITHDRAW) from
>> rtr-B.
>> 
>> 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
>> 
>> Ben Cox helped me create a 'EBGP peer from hell': a publicly accessible
>> EBGP multihop instance which can reliably produce the undesirable
>> TCP/BGP behavior we're discussing here. This 'peer from hell' will do
>> the OPEN exchange but then manipulates the TCP recvwindow towards zero.
>> 
>> All BGP implementations tested so far (5 famous ones) appear vulnerable
>> because they continue to consider the BGP session healthy & stable
>> (meanwhile OutQ keeps growing endlessly and zero BGP messages go across
>> the wire).
>> 
>> One network operator (with thousands of EBGP sessions in the DFZ)
>> reported to me the above stalled-TCP scenario is *not* a common case on
>> the Internet. On a normal day, a network operator will see no (zero)
>> sessions stuck this way, which leads me to believe 'recvwind=0' ...
>> *for the duration of the hold timer* is a very strong indicator for a
>> really broken situation which should be attempted to automatically
>> resolve.
>> 
>> I believe BGP implementations are not helping any known deployment
>> scenarios by *not* disconnecting a stuck peer, however on the other we
>> now know about various operational examples where honoring recvwind=0
>> for (hours, days) longer than $holdtimer led to global scale problems.
>> 
>> As the 'not-at-all progressing OutQ' situation seems somewhat rare in
>> the wild (yet continues to happen from time to time) I think it is worth
>> discussing & documenting how implementers can attempt to avoid this
>> state from happening. It might help make the Internet 1% more robust.
>> 
>> BGP implementers (or operators wanting to test their equipment) feel
>> free to contact me off-list if you'd like to set up an EBGP multihop
>> session towards the 'peer from hell' testbed. Testing potential
>> solutions this way is quite easy, the behavior can be triggered within a
>> few seconds.
>> 
>> Kind regards,
>> 
>> Job
>> 
>> ps. At this moment we have (1) an attempt at problem description, (2) a
>> demonstration BGP-4 implementation of a 'problem causer', and (3) a
>> different BGP-4 implementation with a 'solution'. This enables IDR to
>> test interopability & (potentially revised) protocol compliance,
>> hopefully moving the problem a bit from theoretical to practical
>> reality? :)
> 
>> _______________________________________________
>> Idr mailing list
>> Idr@ietf.org
>> https://www.ietf.org/mailman/listinfo/idr
>