Subject: [Idr] draft-raszuk-idr-flow-spec-v6-03

From: Thomas Mangin <[email-masked]>
Date: Mon, 26 Aug 2013 18:09:49 +0100

Hello,

I never posted to any IETF list of contributed to it, so please excuse me if I do anything out of order.

I would like to comment and propose a change to draft-raszuk-idr-flow-spec-v6-03.
I have implemented the draft in the head/trunk version of ExaBGP which can be found at http://code.google.com/p/exabgp/

Implementing it I noticed the following :

The IPv6 flows are encoded as :
<type (1 octet), prefix length (1 octet), prefix offset (1 octet), prefix>

When the IPv4 flows are encoded :
<type (1 octet), prefix length (1 octet), prefix>

IMHO the draft should be changed to read :
<type (1 octet), prefix offset (1 octet), prefix length (1 octet), prefix>

prefix length, prefix offset is the "classical BGP encoding", so every IPv4/IPv6 address is stored as NLRI and encoded this way, extending the encoding by prepending the offset is clean and easy, having to redefine the encoding is not as nice.

It is obvious as well when you look at some decoding code, in my case in python:

IPv4:
_,rd,mask,size,prefix,left = _nlrifactory(afi,safi,bgp)

IPv6:
byte,bgp = bgp[1],bgp[0]+bgp[2:]
offset = ord(byte)
_,rd,mask,size,prefix,left = _nlrifactory(afi,safi,bgp)

It would have been cleaner to write:
offset = ord(bgp[0])
_,rd,mask,size,prefix,left = _nlrifactory(afi,safi,bgp[1:])

Thank you for reading,

Thomas Mangin

---

From: Robert Raszuk <[email-masked]>
Date: Tue, 27 Aug 2013 03:26:53 +0200

Hi Thomas,

Thank you very much for both the comment as well as implementation of the
draft in ExaBGP.

I agree with your suggestion and there was no particular reason why the
order in the draft of the offset field was placed after the length field.

As we are actually updating the draft now we will use your suggestion.

Many thx for the contribution,
R.

On Mon, Aug 26, 2013 at 7:09 PM, Thomas Mangin <
[email-masked]> wrote:

> I have implemented the draft in the head/trunk version of ExaBGP which can
> be found at http://code.google.com/p/exabgp/
>
> prefix length, prefix offset is the "classical BGP encoding", so every
> IPv4/IPv6 address is stored as NLRI and encoded this way, extending the
> encoding by prepending the offset is clean and easy, having to redefine the
> encoding is not as nice.
>

---

From: Thomas Mangin <[email-masked]>
Date: Tue, 27 Aug 2013 09:06:21 +0100

Hello Robert,

I am very pleased to hear that you agree and that you are still working on the draft.
I will keep an eye on your work and I will update ExaBGP as soon as the next version is out.

Sincerely,

Thomas

On 27 Aug 2013, at 02:26, Robert Raszuk <[email-masked]> wrote:

> Hi Thomas,
> 
> Thank you very much for both the comment as well as implementation of the draft in ExaBGP.
> 
> I agree with your suggestion and there was no particular reason why the order in the draft of the offset field was placed after the length field.
> 
> On Mon, Aug 26, 2013 at 7:09 PM, Thomas Mangin <[email-masked]> wrote:
> Hello,
>