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

From: Qin Wu <[email-masked]>
Date: Thu, 12 Sep 2013 10:36:55 +0000

Hi,Robert:
I have read draft-ietf-ide-flow-spec-v6. A few questions for clarification below:
In section 2, it said:
“
Validation tables
   will now be performed according to the following rules.

      Flow specification received over AFI/SAFI=1/133 will be validated
      against routing reachability received over AFI/SAFI=1/1

      Flow specification received over AFI/SAFI=1/134 will be validated
      against routing reachability received over AFI/SAFI=1/128

      Flow specification received over AFI/SAFI=2/133 will be validated
      against routing reachability received over AFI/SAFI=2/1

      Flow specification received over AFI/SAFI=2/134 will be validated
      against routing reachability received over AFI/SAFI=2/128

”
I didn’t really understand the rationale behind this since I missed the history discussion happened on the list.
Would you like to clarify a little bit on why this validation is needed?

In section 3, it said:
“
The following component types are redefined or added for the purpose
   of accommodating new IPv6 header encoding.
”
I am wondering to accommodate new IPv6 header extension, why override or reuse existing type allocated for IPv4?
Why not allocate new type to support IPv6 flow? How do I distinguish IPv6 flow from IPv4 flow?
Please correct me if I am wrong．

Regards!
-Qin

From: [email-masked] [mailto:[email-masked]] On Behalf Of Robert Raszuk
Sent: Tuesday, August 27, 2013 9:27 AM
To: Thomas Mangin
Cc: [email-masked]; idr wg
Subject: Re: [Idr] draft-raszuk-idr-flow-spec-v6-03

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]<mailto:[email-masked]>> wrote:
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