[Idr] draft-chen-bgp-redist - A Juniper Perspective

Jeffrey Haas <jhaas@pfrc.org> Fri, 20 August 2021 19:22 UTC

Return-Path: <jhaas@slice.pfrc.org>
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 2D8C63A24B8; Fri, 20 Aug 2021 12:22:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.793
X-Spam-Level:
X-Spam-Status: No, score=-0.793 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, LOCALPART_IN_SUBJECT=1.107, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no 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 qLvu2zrYpDqv; Fri, 20 Aug 2021 12:22:03 -0700 (PDT)
Received: from slice.pfrc.org (slice.pfrc.org [67.207.130.108]) by ietfa.amsl.com (Postfix) with ESMTP id 257323A24B7; Fri, 20 Aug 2021 12:22:03 -0700 (PDT)
Received: by slice.pfrc.org (Postfix, from userid 1001) id E74F51E27C; Fri, 20 Aug 2021 15:22:01 -0400 (EDT)
Date: Fri, 20 Aug 2021 15:22:01 -0400
From: Jeffrey Haas <jhaas@pfrc.org>
To: draft-chen-bgp-redist@ietf.org, idr@ietf.org
Message-ID: <20210820192201.GB19054@pfrc.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <https://mailarchive.ietf.org/arch/msg/idr/HXWPqY_pq1FLloyXLwVKPbH3BVE>
Subject: [Idr] draft-chen-bgp-redist - A Juniper Perspective
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, 20 Aug 2021 19:22:09 -0000

Enke & Jenny,

While I'm inclined to say that the matters described in
draft-chen-bgp-redist aren't a problem, it's probably more reasonable to say
"this isn't a problem for everyone".

I'm not going to debate what other implementations do.  Instead, I'll spend
the much of my message discussing what the implementation I work on does.
This does leave us in an interesting headache as a working group whether
there's more general work to do here that merits discussion as an RFC.

----

One thing I will contribute toward some possible need for discussion is the
sloppy ground that RFC 4271 had with regards to interactions with non-BGP
protocols.  We had quite a difficult time getting the text for this "right"
and there was multiple pushes to try to NOT discuss non-BGP protocols at
all.  Such discussions got very deep in the internal details of various
implementations.  What we did end up with in RFC 4271 was the following:

The BGP RIBs are a distinct entity from the "Routing Table".

Section 9.1.2 places the best BGP route in the Loc-RIB.
It also says, "Whether the new BGP route replaces an existing non-BGP route
in the Routing Table depends on the policy configured on the BGP speaker."

Section 9.1.3 for Route Dissemination then says the following:
 :    The Phase 3 decision function is invoked on completion of Phase 2, or
 :    when any of the following events occur:
 : [...]
 :       b) when locally generated routes learned by means outside of BGP
 :          have changed
 : [...]
 : 
 :    All routes in the Loc-RIB are processed into Adj-RIBs-Out according
 :    to configured policy. 

So... there's not a lot of normative text there.  The last sentence above,
"configured policy", is the wiggle room the RFC has to say "I'm originating
a route".  

The general call in the RFC to not advertise things you can't forward to
also provides some level of wiggle room that the best route in the Routing
Table is what should be redistributed:
 :    A route SHALL NOT
 :    be installed in the Adj-Rib-Out unless the destination, and NEXT_HOP
 :    described by this route, may be forwarded appropriately by the
 :    Routing Table.

Anyway, the text is sloppy and discussions about how redistribution is done
and whether that is shown in the Loc-Rib view or as an override to the
rib-out manifests in discussions in things like BMP or the Yang modules.
It's still not as cleanly settled as it should be.

Offering my opinion on this abstract model, I've tended to think about a
better route in the Routing Table (e.g. a static route with a better admin
distance/preference) as being selected into the Loc-Rib by considering it a
route injected via a virtual Adj-Rib-In.  But that's just my personal
justification.

----

Juniper's implementation roughly works like the following.  Since it's
derived from GateD heritage, many similar implementations will behave in a
similar fashion.

In a single routing table, there is a total ordering on all contributors to
a given destination.

The highest level of ordering is "preference", which roughly corresponds to
admin-distance.

When routes are BGP routes, the BGP routes are ordered based largely on
standard RFC rules.  The deviations from those rules are the usual vendor
deviations from standards based on when the later standards were published,
and the mix of features the operator wants.  Examples of deviations are
whether RFC 5004 is used for temporal vs. router-id based deterministic
tie-breaking.

BGP routes vs. non-BGP routes are not directly comparable, even when they
have the same preference, but we have criteria that permits them to be
selected deterministically.  

For non-BGP routes vs. non-BGP routes of two different protocols, we
similarly will select things deterministically, but may be willing to use
particular properties of the routes that may be comparable; e.g. metric.

Much of this process is documented here:
https://www.juniper.net/documentation/en_US/junos/topics/reference/general/routing-protocols-address-representation.html

For the described scenarios in draft-chen-bgp-redist, JUNOS doesn't have
determinism issues.

In our more recent multi-threaded BGP mode, we at one point in the design
had an issue somewhat related to the one described in the draft.  In our
implementation, we address the issue by always making the Routing Table and
the BGP thread always exchange the best route in the local total-ordering.

-- Jeff