Re: [Idr] 2 week WG LC for draft-ietf-idr-shutdown-02 (1/17 to 1/31/2017)

"Peter van Dijk" <peter.van.dijk@powerdns.com> Wed, 18 January 2017 21:54 UTC

Return-Path: <peter.van.dijk@powerdns.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 5B1211294E6; Wed, 18 Jan 2017 13:54:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham 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 R4nZ203Tmz5m; Wed, 18 Jan 2017 13:54:15 -0800 (PST)
Received: from shannon.7bits.nl (shannon.7bits.nl [89.188.0.40]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 57A0D129437; Wed, 18 Jan 2017 13:54:15 -0800 (PST)
Received: from [192.168.137.1] (unknown [92.110.143.62]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: peter) by shannon.7bits.nl (Postfix) with ESMTPSA id 19848C1B96; Wed, 18 Jan 2017 22:54:12 +0100 (CET)
From: "Peter van Dijk" <peter.van.dijk@powerdns.com>
To: "Susan Hares" <shares@ndzh.com>
Date: Wed, 18 Jan 2017 22:54:19 +0100
Message-ID: <98933514-362A-42A0-A803-236033B5131A@powerdns.com>
In-Reply-To: <01b801d27105$45702bc0$d0508340$@ndzh.com>
References: <01b801d27105$45702bc0$d0508340$@ndzh.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Mailer: MailMate (1.9.6r5319)
Archived-At: <https://mailarchive.ietf.org/arch/msg/idr/NyKGbLmB7Vi-HBrVTX6ceSQnV1s>
Cc: idr@ietf.org, draft-ietf-idr-shutdown@ietf.org
Subject: Re: [Idr] 2 week WG LC for draft-ietf-idr-shutdown-02 (1/17 to 1/31/2017)
X-BeenThere: idr@ietf.org
X-Mailman-Version: 2.1.17
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: Wed, 18 Jan 2017 21:54:17 -0000

Hello,

On 17 Jan 2017, at 22:04, Susan Hares wrote:

> This begins a 2 week WG Last Call for draft-ietf-idr-shutdown-02.txt
> (1/17/2017 to 1/31/2017).  Section 7 of this document lists the
> implementations that have been created for this BGP functionality.   
> These
> include: ExaBGP, pmacct, OpenBGPD, Wireshark (packet analyzer), and 
> tcpdump
>    o  OpenBGPD [3

I did the openbgpd implementation of draft-ietf-idr-shutdown. Please 
find my
implementation report below.

A functional description of the implementation can be found at
http://marc.info/?l=openbsd-tech&m=148390348126153&w=2 . Note that the 
final
version of the patch is a few mails down in that thread (and phessler@ 
did some
last whitespace fixes before committing it to OpenBSD CVS). In short, 
the
openbgpd implementation is complete; it can send shutdown communications 
from
the config file and from the command line; it logs received 
communications to
syslog and exposes them in various forms of 'bgpctl .. show'.

During implementation, I have found the draft very clear to read, and 
there were
no ambiguities in how an implementation was supposed to work. In every 
one of
the few situations I had doubts arising from interoperability testing 
with other
fresh implementations, it turned out there was a bug in the other 
implementation
and each time this was quickly corrected on the other side after a 
closer
reading of the draft or the involved code.

Implementation took a few evenings, spread out over weeks, showing that 
the
cognitive load involved with understanding this draft is quite low.

Development was done on OpenBSD 6.0 (as openbgpd has not been ported to 
other
platforms). The work was divided in logical pieces (log incoming 
messages;
remember them for bgpctl show; send them from bgpctl neighbor X down 
REASON;
send them from the configuration file on a reload+refresh).

Interoperability was continuously tested against the then-current
implementations of -shutdown in exabgp and pmacct pmbgpd, running on a 
nearby
Linux VM, as at that time pmacct only had support for sending a shutdown
message, and exabgp was only able to receive shutdown messages. Various 
minor
bugs in the exabgp and pmacct implementations surfaced and were fixed 
during
this process.

Unprintable characters (both of the 'control' and the 'UTF-8' nature) 
were
easily dealt with via the vis(3) (http://man.openbsd.org/vis.3) facility
available on all BSDs, in octal mode as is also used in C string 
constants.
Incidentally Debian has a 'libbsd' that provides it. A standalone 
implementation
would not be hard to do either. vis-encoded strings can be decoded by 
'unvis' on
the commandline, or by simply pasting them into a Python interpreter. 
This way
full Unicode support is achieved without having to worry about 'what 
encoding is
syslog actually in'.

As an example, the Unicode unicorn (U+1F984), encoded on the wire in 
UTF-8 (as
the draft specifies), yields a syslog message such as

     neighbor 165.254.255.26: received shutdown reason: 
"\360\237\246\204"

Running

     echo "\360\237\246\204" | unvis

on an UTF-8 capable terminal, or typing

     print("\360\237\246\204".decode('utf-8'))

into a Python2 prompt, will recover said unicorn. 🦄

Kind regards,
-- 
Peter van Dijk
PowerDNS.COM BV - https://www.powerdns.com/