Subject: Re: [Idr] clarification required in draft-ietf-idr-flow-spec-v6

From: "Andy Karch (akarch)" <[email-masked]>
Date: Thu, 21 Aug 2014 22:05:13 +0000

Hi Ravi,

You're correct in pointing out the error. This was already found, but the update hasn't been posted yet.  The intention is to have 80-104 as there is 24 bits (6 bytes) of payload in the prefix, so the hex changes to 0x50 for the offset.

Please note the prefix offset and length have been swapped back to length before offset.  There is some history around this where a request was made to have offset before length (for readability and coding), before any known implantation existed.   Later an implementation was revealed to be shipping, so it was reverted.

In the example, the intention is to demonstrate that the offset "don't care" bits are not included in the prefix encoding.  They would just be 0's anyway.  This is consistent with unicast prefixes where only enough bytes for *length* bits are encoded and the trailing bits are irrelevant.  Similarly, we only need "length minus offset bits" (as worded in draft) to encode FlowSpec's prefix, with the added prefix offset dimension.  This does not require octet boundaries.  For example, the prefix with offset 5 and length 11 would require 6 bits (1 byte -- b 11111100), but if you enforced octet boundaries, it would require 2 bytes (b 00000111 11100000).

I'll include a more verbose example to demonstrate this point.

Thanks,
-Andy

   Type 2 - Source IPv6 Prefix

      Encoding: <type (1 octet), prefix offset (1 octet), prefix length
      (1 octet), prefix>

      Defines the source prefix to match.  Prefix offset has been
      defined to allow for flexible matching on part of the IPv6 address
      where we want to skip (don't care) of N first bits of the address.
      This can be especially useful where part of the IPv6 address
      consists of an embedded IPv4 address and matching needs to happen
      only on the embedded IPv4 address.  The encoded prefix contains
      enough octets for the bits used in matching (length minus offset
      bits).

-----Original Message-----
From: Ravi M R [mailto:[email-masked]] 
Sent: Thursday, August 21, 2014 4:43 AM
To: [email-masked]; Burjiz Pithawala (bpithaw); [email-masked]; Andy Karch (akarch); [email-masked]
Subject: clarification required in draft-ietf-idr-flow-spec-v6

Hi Authors,

In the example given in section-3 of draft, "80-" represents  the prefix offset of 80 bits".
This seems to be wrong and should be 64 instead of 80.

--Extract from draft begin---
   The following example demonstrates the new prefix encoding for: "all
   packets to ::1234:5678:9A00:0/80-104 from 192::/8 and port {range
   [137, 139] or 8080}".  In the destination prefix, "80-" represents
   the prefix offset of 80 bits.  In this exmaple, the 0 offset is
   omitted from the printed source prefix.

    +---------------------------+-------------+-------------------------+
    | destination               | source      | port                    |
    +---------------------------+-------------+-------------------------+
    | 0x01 40 68 12 34 56 78 9A | 02 00 08 c0 | 04 03 89 45 8b 91 1f 90 |
    +---------------------------+-------------+-------------------------+
--Extract from draft end---

Also is it required that prefix-offset should be at byte boundry (i.e. multiples of 8)? 
If not, then providing an example in draft will be helpful as encoding/decoding can involve tedious bit level operations in such cases.
Ex: offset is 13 bits and prefix length is 110 bits for a IPv6 address. In this case, 97 bits from 13th to 110 bit should be encoded in NLRI.

Thanks & Regards,
Ravi

---

From: Ravi M R <[email-masked]>
Date: Thu, 21 Aug 2014 11:42:48 +0000

Hi Authors,

Thanks & Regards,
Ravi

---

From: "Andy Karch (akarch)" <[email-masked]>
Date: Tue, 26 Aug 2014 04:24:09 +0000

Hi Ravi,

My apologies on the previous reply...

The text should read "all packets to ::1234:5678:9A00:0/64-104".  The payload is 5 bytes (40 bits). 

The encoding below remains the same.

-Andy

-----Original Message-----
From: Andy Karch (akarch) 
Sent: Thursday, August 21, 2014 3:05 PM
To: 'Ravi M R'; [email-masked]; Burjiz Pithawala (bpithaw); [email-masked]; [email-masked]
Subject: RE: clarification required in draft-ietf-idr-flow-spec-v6

Hi Ravi,

Thanks,
-Andy

-----Original Message-----
From: Ravi M R [mailto:[email-masked]] 
Sent: Thursday, August 21, 2014 4:43 AM
To: [email-masked]; Burjiz Pithawala (bpithaw); [email-masked]; Andy Karch (akarch); [email-masked]
Subject: clarification required in draft-ietf-idr-flow-spec-v6

Hi Authors,

Thanks & Regards,
Ravi

---

From: Ravi M R <[email-masked]>
Date: Wed, 27 Aug 2014 04:36:05 +0000

Hi Andy,
Thanks for clarification.

I feel validation procedure should be explained in draft for NLRI which have with prefix-offset in destination. Validation procedure mentioned in RFC-5575 is based on longest-prefix-match/subnet-matching and this does not make sense for destination with prefix-offset.

---Extract from from RFC-5575 section-6 begin ---
   a) The originator of the flow specification matches the originator of
      the best-match unicast route for the destination prefix embedded
      in the flow specification.

   b) There are no more specific unicast routes, when compared with the
      flow destination prefix, that have been received from a different
      neighboring AS than the best-match unicast route, which has been
      determined in step a).
---Extract from from RFC-5575 section-6 end ---

For example, 'best-match unicast route', mentioned in point a) above, does not make sense for destination with prefix-offset. Similarly how 'more specific unicast routes' in point b) applies to destinations with prefix-offset should be explained in draft.

Thanks & Regards,
Ravi
-----Original Message-----
From: Andy Karch (akarch) [mailto:[email-masked]] 
Sent: Tuesday, August 26, 2014 9:54 AM
To: Ravi M R; [email-masked]; Burjiz Pithawala (bpithaw); [email-masked]; [email-masked]
Subject: RE: clarification required in draft-ietf-idr-flow-spec-v6

Hi Ravi,

-Andy

-----Original Message-----
From: Andy Karch (akarch) 
Sent: Thursday, August 21, 2014 3:05 PM
To: 'Ravi M R'; [email-masked]; Burjiz Pithawala (bpithaw); [email-masked]; [email-masked]
Subject: RE: clarification required in draft-ietf-idr-flow-spec-v6

Hi Ravi,

Thanks,
-Andy

-----Original Message-----
From: Ravi M R [mailto:[email-masked]] 
Sent: Thursday, August 21, 2014 4:43 AM
To: [email-masked]; Burjiz Pithawala (bpithaw); [email-masked]; Andy Karch (akarch); [email-masked]
Subject: clarification required in draft-ietf-idr-flow-spec-v6

Hi Authors,

Thanks & Regards,
Ravi