Re: Can a BFD session change its source port to facilitate auto recovery

Jeff Tantsura <jefftant.ietf@gmail.com> Thu, 23 March 2023 06:27 UTC

Return-Path: <jefftant.ietf@gmail.com>
X-Original-To: rtg-bfd@ietfa.amsl.com
Delivered-To: rtg-bfd@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 75484C14CEF9 for <rtg-bfd@ietfa.amsl.com>; Wed, 22 Mar 2023 23:27:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.205
X-Spam-Level:
X-Spam-Status: No, score=-6.205 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, MIME_HTML_ONLY=0.1, MIME_HTML_ONLY_MULTI=0.001, MIME_QP_LONG_LINE=0.001, MPART_ALT_DIFF=0.79, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zrA2ZLZa932y for <rtg-bfd@ietfa.amsl.com>; Wed, 22 Mar 2023 23:27:15 -0700 (PDT)
Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EE223C14F75F for <rtg-bfd@ietf.org>; Wed, 22 Mar 2023 23:27:14 -0700 (PDT)
Received: by mail-wr1-x432.google.com with SMTP id j24so10388779wrd.0 for <rtg-bfd@ietf.org>; Wed, 22 Mar 2023 23:27:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679552833; x=1682144833; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=BhP5zowltnrYSweNlrVnnWppQzofUICEtyp+6P3RIzo=; b=GKJ47e8d1GzfSM85XA3By3yUcsXmcw6oN7tGayWN+lLb6XiUym0xnyUaRDTOErnoyI gafTd7T9YxZBR1nS2EmKIMfFFWAebjGt4jnVK36BaCh2ezBXErABucq7MQQlS1x1H6Vo ZP5oR3r89c3/ESoZWBJ1pvBI8wrtNwghB2Vrphzcy7/6A/V4C0bqomoyeW/RCbNXCd9o XENeVAAHreyPiZTuBqYFnHWcBL7Nl/byL/I3uPy68385KnYqoBKpDShQ+dAiKXyNG4+6 yZCDXv9+rREEKX7VQx0/wLRKl7me3llYbZwkX8XCtHI2Sztp+VuxNgP2BBxgvdh8KJxI s5xw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679552833; x=1682144833; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BhP5zowltnrYSweNlrVnnWppQzofUICEtyp+6P3RIzo=; b=MSyIWKcXYFNRALAm7wxZgOuJAUL10V/ye7tca0/7tDC3SZJ03lF9f/JDp1Ycnhid02 oYUxgui4pBGMrfiUv9th7XIa8DhXdWJZcp/mUw0f2ukn5ZkuZPSixMe8B/jNsm2UQE0C mMQEHJ6GqhUixTd+kDWxKz+u3ZByKnQY+BAOpkhMEjZjvFKu1xL7XZ0ReKfAZ07Xy5Mo TcXLjIYXhY/CHh6vLxgy+mAn+ZH2OEEaEZl1T0ctcwPRsP5SDOjGIrkKeBunho+w5+qT cKtHAKc1+LfppgZdL4/+AKuCFr9WIYyE+p6o6axOQ4TIVubSgkM5PPqrhxOEzBULxlnE a4DA==
X-Gm-Message-State: AAQBX9fpiKjXjVmzxbpddX7DqZZJxwSsB47hxuyBa/zQ1jgKp5xkKgTl /BRJL7rxMhyJRLqcOU6AO6JwwdixzQopA1R2
X-Google-Smtp-Source: AKy350YEuYGPpgySmlaTq1qK7Ksf5V6b+7kkl9jrY9Fyxr0mXz76oSncU0Tq3KeNJh8harD2c6W2wQ==
X-Received: by 2002:a5d:4cca:0:b0:2d2:39d3:ce7c with SMTP id c10-20020a5d4cca000000b002d239d3ce7cmr1475121wrt.70.1679552832735; Wed, 22 Mar 2023 23:27:12 -0700 (PDT)
Received: from smtpclient.apple ([2a0d:6fc2:4171:2000:e4af:1400:e279:c784]) by smtp.gmail.com with ESMTPSA id p19-20020a05600c419300b003ee581f37a9sm877342wmh.10.2023.03.22.23.27.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Mar 2023 23:27:12 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail-E306074B-6BEF-473E-9BFB-F1D4B1CE0A26"
Content-Transfer-Encoding: 7bit
From: Jeff Tantsura <jefftant.ietf@gmail.com>
Mime-Version: 1.0 (1.0)
Subject: Re: Can a BFD session change its source port to facilitate auto recovery
Date: Thu, 23 Mar 2023 08:27:01 +0200
Message-Id: <6DE166F3-5E02-446B-A105-0C6E2CC4E448@gmail.com>
References: <CAL9v8R2iYMGjxF-A9SuDMcu2EF6h0isquTxjuAtNdqFwv_6etg@mail.gmail.com>
Cc: Greg Mirsky <gregimirsky@gmail.com>, rtg-bfd@ietf.org
In-Reply-To: <CAL9v8R2iYMGjxF-A9SuDMcu2EF6h0isquTxjuAtNdqFwv_6etg@mail.gmail.com>
To: Abhinav Srivastava <absrivas@gmail.com>
X-Mailer: iPhone Mail (20D67)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtg-bfd/_jSAx4k8mEIGaaru9AtmGab3ywc>
X-BeenThere: rtg-bfd@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "RTG Area: Bidirectional Forwarding Detection DT" <rtg-bfd.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtg-bfd>, <mailto:rtg-bfd-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rtg-bfd/>
List-Post: <mailto:rtg-bfd@ietf.org>
List-Help: <mailto:rtg-bfd-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtg-bfd>, <mailto:rtg-bfd-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Mar 2023 06:27:15 -0000

Abhinav,

Let’s clarify a couple of points.
What you are trying to do is to change entropy to change local hashing outcome, however for hashing to even be relevant there has to he either ECMP or LAG in the path to the destination otherwise shortest path will be he used regardless, so statistically, some of the flows between a given pair of end points (5 tuple) will be traversing the (partially)broken link, would you really like BFD to “pretend“ that everything is just fine?
Moreover, by far, in case of congestion  - most applications won’t change their ports but have their TX rate reduced.
There’s work done by Tom Herbert for IPv6/TCP (kernel patch upstreamed a few years ago)  - had beeb presented in RTGWG pre-Covid, that on RTO changes flow label value (that some might or might not include in hashing), which is strongly not recommended to be used outside of a tightly controlled homogenous  environment (think within DC).
Outside of what BFD spec tells us (don’t), the above should provide enough motivation not to do this.

Cheers,
Jeff

On Mar 23, 2023, at 05:44, Abhinav Srivastava <absrivas@gmail.com> wrote:


Multi-hop BFD would be the mechanism that detects the failure on the path it happens to be using for the session. I wasn't thinking of another mechanism.  Detection timer expiry would be the trigger for recovery which could be augmented with few other possible criteria like how long session hasn't been able to come back up or prolonged flapping. 

Thanks
Abhinav

On Wed, 22 Mar, 2023, 3:05 pm Greg Mirsky, <gregimirsky@gmail.com> wrote:
Hi Abhinav,
thank you for presenting an interesting scenario for a discussion. I have several questions to better understand it:
  • How the network failure that triggers the recovery process is detected?
  • If the failure detection mechanism is not multi-hop BFD, what is the relationship between the detection intervals of heat mechanism and the multi-hop BFD session?
Regards,
Greg

On Wed, Mar 22, 2023 at 4:36 PM Abhinav Srivastava <absrivas@gmail.com> wrote:

Hi all,

 

I needed clarification around whether source port can be changed for a BFD session in case of multi hop BFD.   The ability to change BFD source port when BFD session goes down helps BFD session to recover if its stuck on a network path where there is some intermittent but significant packet loss.

 

In such cases, normally without BFD, end to end application traffic would eventually settle down on a good path as applications typically change source port after experiencing disconnection or failures.  But if BFD is being used to monitor some part of a path which is experiencing significant but not 100% packet loss, it will start causing next hop list of associated static route or the associated BGP sessions to start flapping forever, as BFD packets would be stuck to that partial lossy path forever (until BFD session is deleted and recreated by admin action).  This may also hinder the typical application recovery strategy of changing source port on failure.

 

Ability to dynamically change BFD source port can help BFD recover in such cases.  Is this something that is allowed as per RFC?  The RFC5881, section 4 (for single hop) case states that –

“The source port MUST be in the range 49152 through 65535. The same UDP source port number MUST be used for all BFD Control packets associated with a particular session”

 

Thanks

Abhinav