Re: [Idr] WGLC for draft-ietf-idr-rfc5575bis-04

Christoph Loibl <> Mon, 16 October 2017 13:00 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id F1EF4133347; Mon, 16 Oct 2017 06:00:36 -0700 (PDT)
X-Quarantine-ID: <RhFAGgeCd6YH>
X-Virus-Scanned: amavisd-new at
X-Amavis-Alert: BAD HEADER SECTION, Non-encoded 8-bit data (char E2 hex): X-Spam-Report: ...s: >> >> 1)\n\tcompare the \342\200\234common\342\200\235 pre[...]
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id RhFAGgeCd6YH; Mon, 16 Oct 2017 06:00:30 -0700 (PDT)
Received: from ( [IPv6:2001:858:2:8::235]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id B903813214D; Mon, 16 Oct 2017 06:00:30 -0700 (PDT)
Received: from [2a01:190:1702:0:2813:ab60:d8d9:4caa] by with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from <>) id 1e44kU-0002tb-Fh; Mon, 16 Oct 2017 14:44:02 +0200
From: Christoph Loibl <>
Message-Id: <>
Content-Type: multipart/signed; boundary="Apple-Mail=_F6F73D6C-EA6C-47BB-A6CF-9A4E5391BC6D"; protocol="application/pgp-signature"; micalg=pgp-sha1
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Date: Mon, 16 Oct 2017 15:00:26 +0200
In-Reply-To: <20171016120520.GM19142@Vurt.local>
To: Job Snijders <>
References: <> <20171014153402.GY19142@Vurt.local> <> <20171016120520.GM19142@Vurt.local>
X-Mailer: Apple Mail (2.3273)
Archived-At: <>
Subject: Re: [Idr] WGLC for draft-ietf-idr-rfc5575bis-04
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Inter-Domain Routing <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 16 Oct 2017 13:00:37 -0000

Hi Job,

>> No. What actually should happen is:
>> 1) compare the “common” prefix (in this case the common prefix length = 8)
>> == -> the common prefix is equal.
> Why would you ever see - that looks like an incorrect CIDR
> notation to me?

Yes - - no “correct” cidr notation. I just wanted to express that we look at the first 8 bits of the - and compare it to the first 8 bit of - both times this is 10 => they match.

>> 2) if the common prefix is equal (which is the case) the prefix with
>> the longest match takes precedence:
>> <- 8 bit
>> <- 24 bit <- this one wins!
>> Another example: vs
>> 1) compare the “common” prefix (in this case the common prefix length = 8)
>> == -> the common prefix is _not_ equal
>> 2) lower value takes precedence:
>> <
>> wins!
> I'm sorry, but I still don't understand. and don't
> overlap, shouldn't they both be installed as ACLs? Maybe I don't
> understand when this algorithm is used?

Both are actually installed (but the order is determined). This algorithm is used for sorting the ACL terms. In our case will get sorted “above” (In case of overlapping prefix the match behaviour is changed to longest prefix-length “first").

Since the arrival-time of the BGP updates is non predictable some sorting is needed to have a consistent order of ACL-terms in the network.

When programming a “sorting” algorithm you usually need a compare function that allows to compare items. In python I think you need to implement __lt__ for classes that you want the built-in sort() to work. The code that I put on github can be easily adopted to be used for sorting “flowspec_nlri” objects.

>>>   Another question, and I realise this is a big ask: Is it possible to
>>>   replace the pseudocode with an actual code example? Pseudo languages
>>>   tend to not follow any specific set of rules and therefor oftentimes
>> IF the group thinks we shall use this - please carefully analyse the
>> behaviour. I am sure I have hidden some bugs in there and I am sure it
>> is possible to beautify what I came up with (I am not the programmer).
> I think this is a very good direction and I hope the WG sees this as
> path forward too.
> In the I-D I'd leave out the unittest part for the sake of brevity. I'd
> also specify what version of python this code was tested against. And
> of course you can include a link to that github repository in the I-D.
> For other drafts we've taken a similar approach.

Can you point me to some I-Ds that use a similar approach - maybe one can learn from that.

Cheers Christoph