Re: [Idr] Bug in RFC 7911 (add-paths) and tie-breaking

Claudio Jeker <cjeker@diehard.n-r-g.com> Fri, 25 June 2021 16:26 UTC

Return-Path: <cjeker@diehard.n-r-g.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 948493A090B for <idr@ietfa.amsl.com>; Fri, 25 Jun 2021 09:26:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.895
X-Spam-Level:
X-Spam-Status: No, score=-1.895 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=unavailable autolearn_force=no
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 xkh0tEURE5-9 for <idr@ietfa.amsl.com>; Fri, 25 Jun 2021 09:26:04 -0700 (PDT)
Received: from diehard.n-r-g.com (diehard.n-r-g.com [62.48.3.9]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C57A53A0906 for <idr@ietf.org>; Fri, 25 Jun 2021 09:26:02 -0700 (PDT)
Received: (qmail 4874 invoked by uid 1000); 25 Jun 2021 16:25:56 -0000
Date: Fri, 25 Jun 2021 18:25:55 +0200
From: Claudio Jeker <cjeker@diehard.n-r-g.com>
To: Robert Raszuk <robert@raszuk.net>
Cc: Bruno Decraene <bruno.decraene@orange.com>, John Scudder <jgs=40juniper.net@dmarc.ietf.org>, "idr@ietf. org" <idr@ietf.org>, "dwalton76@gmail.com" <dwalton76@gmail.com>
Message-ID: <20210625162555.GB18564@diehard.n-r-g.com>
References: <F689CF63-236D-401D-9C8E-AC1C39CDE772@juniper.net> <20976_1624607831_60D58C57_20976_28_1_53C29892C857584299CBF5D05346208A4CDF9BB2@OPEXCAUBM43.corporate.adroot.infra.ftgroup> <20210625083735.GB31038@diehard.n-r-g.com> <19431_1624612909_60D5A02D_19431_174_7_53C29892C857584299CBF5D05346208A4CDF9FB9@OPEXCAUBM43.corporate.adroot.infra.ftgroup> <CAOj+MMFnge_s=_RNt06h=2s19JoSptetRo7cE+XoVDBSxFvL2g@mail.gmail.com> <6424_1624619306_60D5B92A_6424_261_1_53C29892C857584299CBF5D05346208A4CDFA365@OPEXCAUBM43.corporate.adroot.infra.ftgroup> <CAOj+MMFjKdDdaJdMYb5i56Ha+D8At36PwL9dpxiLOxG_6DZVkw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAOj+MMFjKdDdaJdMYb5i56Ha+D8At36PwL9dpxiLOxG_6DZVkw@mail.gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/idr/koQP3-ww7gSnF0AjfmmTmhFsYag>
Subject: Re: [Idr] Bug in RFC 7911 (add-paths) and tie-breaking
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: Fri, 25 Jun 2021 16:26:08 -0000

On Fri, Jun 25, 2021 at 03:12:00PM +0200, Robert Raszuk wrote:
> Hi Bruno,
> 
> Your scenario would only require RR implementing RFC6774 to perform a
> > common tie-breaking. So the bug/fix would rather be on RFC 6774 ;-)  (rather
> > than on 7911)
> >
> 
> That is debatable.
> 
> 
> > More seriously/importantly Path-Id is not guaranteed to be the same on
> > both RR. Hence the output of the tie-breaking would not be common across
> > those RR.
> >
> 
> Don't agree. If a BGP speaker spends two paths with path_id they will be
> identical on both RRs. Path_IDs are not ad hoc random numbers generated on
> the fly when you advertise. They are attached to paths and do not change
> regardless where the paths are advertised with add-path.

RFC7911 has no such requirement. At least Section 2 allows to assign
different path-ids for the same path sent to different peers.
It would be perfectly fine to use random path ids as long as all
updates and the final withdraw of this path use the same id.
Once the path has been withdrawn a new path_id could actually be selected
again.  This is how I interpret Section 2 of RFC7911 especially this bit:

   The assignment of the Path Identifier for a path by a BGP speaker is
   purely a local matter.  However, the Path Identifier MUST be assigned
   in such a way that the BGP speaker is able to use the (Prefix, Path
   Identifier) to uniquely identify a path advertised to a neighbor.  A
   BGP speaker that re-advertises a route MUST generate its own Path
   Identifier to be associated with the re-advertised route.  A BGP
   speaker that receives a route should not assume that the identifier
   carries any particular semantics.

> So this will work fine for RFC6774.
> 
> 
> > For your use case, it seems it would be more effective to do the final
> > tie-break on whatever criteria you want to be diverse. E.g. the BGP
> > Next-Hop (which is both deterministic and diverse while Path-Id is not)
> >
> 
> For the described case path_id will work. But in general case, surely
> selecting path with different next hop as 2nd best will be a good option.
> In fact some implementations already do that already :)

In my opinon it would be great to have this documented somewhere so that
all implementations are able to behave the same.
Using the nexthop as a tie-breaker makes sense to me. I agree that path-id
is not the best criteria but it is the only one that can actually
distinguish two paths that are equal. RFC7911 does not specify that a
peer MUST NOT send paths with equivalent attributes over add-path.
So I guess one has to assume that a system may actually do that.

-- 
:wq Claudio