Re: [Sidrops] rfc8210bis further review - question 1

Claudio Jeker <cjeker@diehard.n-r-g.com> Wed, 13 March 2024 12:38 UTC

Return-Path: <cjeker@diehard.n-r-g.com>
X-Original-To: sidrops@ietfa.amsl.com
Delivered-To: sidrops@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F2C41C14F693 for <sidrops@ietfa.amsl.com>; Wed, 13 Mar 2024 05:38:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.908
X-Spam-Level:
X-Spam-Status: No, score=-1.908 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=unavailable autolearn_force=no
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 WRzbGRD4uFxU for <sidrops@ietfa.amsl.com>; Wed, 13 Mar 2024 05:38:01 -0700 (PDT)
Received: from diehard.n-r-g.com (diehard.n-r-g.com [62.48.3.9]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA512) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 61CDEC14F5FD for <sidrops@ietf.org>; Wed, 13 Mar 2024 05:37:59 -0700 (PDT)
Received: (qmail 44656 invoked by uid 1000); 13 Mar 2024 12:37:57 -0000
Date: Wed, 13 Mar 2024 13:37:56 +0100
From: Claudio Jeker <cjeker@diehard.n-r-g.com>
To: Job Snijders <job=40fastly.com@dmarc.ietf.org>
Cc: sidrops@ietf.org
Message-ID: <ZfGeJGxDPYjmx9X+@diehard.n-r-g.com>
References: <ZexJxZYsgNGth_Q7@snel> <ZeyPxXlKwdlqupBq@diehard.n-r-g.com> <CAMFGGcAQb1Ax8dL64cFZFcNnBjR8XXp9-WoF4FrKc7-cbatMqw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAMFGGcAQb1Ax8dL64cFZFcNnBjR8XXp9-WoF4FrKc7-cbatMqw@mail.gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/sidrops/t2zrecqPxxgw5Eq4O76MYAwN1KQ>
Subject: Re: [Sidrops] rfc8210bis further review - question 1
X-BeenThere: sidrops@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: A list for the SIDR Operations WG <sidrops.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sidrops>, <mailto:sidrops-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/sidrops/>
List-Post: <mailto:sidrops@ietf.org>
List-Help: <mailto:sidrops-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sidrops>, <mailto:sidrops-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 13 Mar 2024 12:38:04 -0000

On Sat, Mar 09, 2024 at 05:40:29PM +0100, Job Snijders wrote:
> On Sat, 9 Mar 2024 at 17:35, Claudio Jeker <cjeker@diehard.n-r-g.com> wrote:
> 
> > On Sat, Mar 09, 2024 at 12:36:37PM +0100, Job Snijders wrote:
> > > Dear all,
> > >
> > > I have some questions about rfc8210bis
> > >
> > > Question #1
> > > ===========
> > >
> > > In Section 8.2:
> > >
> > >     Cache                         Router
> > >       ~                             ~
> > >       | -------- Notify ----------> |  (optional)
> > >       |                             |
> > >       | <----- Serial Query ------- | R requests data
> > >       |                             |
> > >       | ----- Cache Response -----> | C confirms request
> > >       | ------- Payload PDU ------> | C sends zero or more
> > >       | ------- Payload PDU ------> |   IPv4 Prefix, IPv6 Prefix,
> > >       | ------- Payload PDU ------> |   ASPA. or Router Key PDUs
> > >       | ------- End of Data ------> | C sends End of Data
> > >       |                             |   and sends new serial
> > >
> > > and section 5.6 "IPv4 Prefix" states
> > >
> > >     """
> > >     The cache server MUST ensure that it has told the router client to
> > have one
> > >     and only one IPvX PDU for a unique {Prefix, Len, Max-Len, ASN} at
> > any one
> > >     point in time.  Should the router client receive an IPvX PDU with a
> > >     {Prefix, Len, Max-Len, ASN} identical to one it already has active,
> > it
> > >     SHOULD raise a Duplicate Announcement Received error.
> > >     """
> > >
> > > Imagine the cache emits the following sequence of PDUs:
> > >
> > >    Cache                                   Router
> > >    ~                                       ~
> > >      <-- Serial Query
> > >    Cache response                      -->
> > >    Announce 2001:db8::/32 Origin 65535 -->
> > >    Withdraw 2001:db8::/32 Origin 65535 -->
> > >    Announce 2001:db8::/32 Origin 65535 -->
> > >    End of Data w/ new serial           -->
> > >
> > > A VRP for 2001:db8::/32 is announced, withdrawn, and announced again.
> > >
> > > Should the above sequence of PDUs trigger the 'Duplicate Announcement
> > > Received' error?
> > >
> > > I'd take "only and only at any one point in time" where 'point in time'
> > > is the window between the last serial and the next serial? To what
> > > extend can routers expect caches to provide a consistent view within a
> > > single Cache Response?
> >
> > This is covered in section 5.3 Serial Query:
> >
> >    When replying to a Serial Query, the cache MUST return the minimum
> >    set of changes needed to bring the router into sync with the cache.
> >    That is, if a particular prefix or router key underwent multiple
> >    changes between the Serial Number specified by the router and the
> >    cache's current Serial Number, the cache MUST merge those changes to
> >    present the simplest possible view of those changes to the router.
> >    In general, this means that, for any particular prefix or router key,
> >    the data stream will include at most one withdrawal followed by at
> >    most one announcement, and if all of the changes cancel out, the data
> >    stream will not mention the prefix or router key at all.
> 
> 
> 
> The friction here can be resolved if the cache imposes total ordering, and
> the router checks for the order (doable in a single pass). Imposing total
> ordering also helps with potential for some race conditions.

If you enforce total ordering then the router can check if the previous
object is strictly smaller than the current one. Right now the standard
does not enforce any ordering of objects so this can not be enforced for
version 0 and 1. So the enforcement can only happen in a newer version.
 
> So the above violates the MUST in the first sentence.
> >
> > Now OpenBGPD as a RTR client does not try to track down such issues. It
> > requires a to complex data structure and in the end as long as the per-RTR
> > state is consisten we do not care. As mentioned in an other mail the
> > per-RTR state is atomically applied to the global config once the End of
> > Data PDU is received.
> 
> 
> 
> So if the MUST is violated, what’s the appropriate error code?

I can't answer this question, I guess you can pick one at random since the
RFC does not specify it.

-- 
:wq Claudio