Re: [6lo] #6 (routing-dispatch): Thomas Watteyne review December 14th

"6lo issue tracker" <trac+6lo@tools.ietf.org> Tue, 12 January 2016 07:45 UTC

Return-Path: <trac+6lo@tools.ietf.org>
X-Original-To: 6lo@ietfa.amsl.com
Delivered-To: 6lo@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 675331A0406 for <6lo@ietfa.amsl.com>; Mon, 11 Jan 2016 23:45:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.346
X-Spam-Level:
X-Spam-Status: No, score=-0.346 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FRT_LITTLE=1.555, RP_MATCHES_RCVD=-0.001] autolearn=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 bST46gHKmafm for <6lo@ietfa.amsl.com>; Mon, 11 Jan 2016 23:45:48 -0800 (PST)
Received: from zinfandel.tools.ietf.org (zinfandel.tools.ietf.org [IPv6:2001:1890:123a::1:2a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2F5A51A0404 for <6lo@ietf.org>; Mon, 11 Jan 2016 23:45:48 -0800 (PST)
Received: from localhost ([::1]:38943 helo=zinfandel.tools.ietf.org) by zinfandel.tools.ietf.org with esmtp (Exim 4.82_1-5b7a7c0-XX) (envelope-from <trac+6lo@tools.ietf.org>) id 1aIteG-0006MD-08; Mon, 11 Jan 2016 23:45:48 -0800
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
From: 6lo issue tracker <trac+6lo@tools.ietf.org>
X-Trac-Version: 0.12.5
Precedence: bulk
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12.5, by Edgewall Software
To: pthubert@cisco.com
X-Trac-Project: 6lo
Date: Tue, 12 Jan 2016 07:45:47 -0000
X-URL: https://tools.ietf.org/6lo/
X-Trac-Ticket-URL: https://trac.tools.ietf.org/wg/6lo/trac/ticket/6#comment:2
Message-ID: <072.5cd6cd3ae9cde317aeb50859b982db79@tools.ietf.org>
References: <057.712d1654e71d1873ef3a7f2873bfb5a3@tools.ietf.org>
X-Trac-Ticket-ID: 6
In-Reply-To: <057.712d1654e71d1873ef3a7f2873bfb5a3@tools.ietf.org>
X-SA-Exim-Connect-IP: ::1
X-SA-Exim-Rcpt-To: pthubert@cisco.com, 6lo@ietf.org
X-SA-Exim-Mail-From: trac+6lo@tools.ietf.org
X-SA-Exim-Scanned: No (on zinfandel.tools.ietf.org); SAEximRunCond expanded to false
Archived-At: <http://mailarchive.ietf.org/arch/msg/6lo/DiBKMWbp9q13Y2aq1RQxTaqgPaY>
Cc: 6lo@ietf.org
Subject: Re: [6lo] #6 (routing-dispatch): Thomas Watteyne review December 14th
X-BeenThere: 6lo@ietf.org
X-Mailman-Version: 2.1.15
List-Id: "Mailing list for the 6lo WG for Internet Area issues in IPv6 over constrained node networks." <6lo.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/6lo>, <mailto:6lo-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/6lo/>
List-Post: <mailto:6lo@ietf.org>
List-Help: <mailto:6lo-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/6lo>, <mailto:6lo-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Jan 2016 07:45:53 -0000

#6: Thomas Watteyne review December 14th


Comment (by pthubert@cisco.com):

 Hello Thomas:

 I created Ticket #6: “Thomas Watteyne review December 14th”  to address
 your review. Thanks a bunch for it!
 I stored the current result here: https://bitbucket.org/6lo/rpi/src/master
 /draft-ietf-6lo-routing-dispatch-01.txt

 Please see below (there are questions left for you):

 Following the adoption of draft-ietf-6lo-routing-dispatch-00, please find
 my detailed review of the draft below.
 On top of questions and suggestions which I prefixed with TW>, I made
 inline changes for tiny editorial nits. Authors, please use diff to see
 those.

        PT > ack, I’ll be working off a diff; when just picking your
 suggestion I’m not commenting

 Thomas

 ---

 TW> I've done some editing directly inline, so please use a diff tool to
 see what I did
 TW> for questions and suggestions, I used the TW> prefix

        PT > ack

    The RPL Option for Carrying RPL Information in Data-Plane Datagrams
    [RFC6553] specification indicates how the RPI can be placed in a RPL
    Option for use in an IPv6 Hop-by-Hop header.  This representation
    demands a total of 8 bytes when in most cases the actual RPI payload
    requires only 19 bits.  Since the Hop-by-Hop header must not flow
    outside of the RPL domain, it must be removed from packets that leave
    the domain, and be inserted in packets entering the domain.  In both
    cases, this operation implies an IP-in-IP encapsulation.
 TW> It would be good to indicate here what IP-in-IP encapsulation looks
 like when using 6LoWPAN.
 TW> This doc talks about 8 bytes later on, it would be good to see where
 this comes from (yes, I could take RFC6282, but I'm lazy)


        PT proposing to add:

 “

    When to use RFC 6553, 6554 and IPv6-in-IPv6
    [I-D.robles-roll-useofrplinfo] details different cases where RFC
    6553, RFC 6554 and IPv6-in-IPv6 encapsulation are required in RPL
    LLN environments.

    When using [RFC6282] the outter IP header of an IP-in-IP
    encapsulation may be compressed down to 2 octets in stateless
    compression and down to 3 octets in case of a stateful compression
    when a context information must be added.

          0                                       1
          0   1   2   3   4   5   6   7   8   9   0   1   2   3   4   5
        +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
        | 0 | 1 | 1 |  TF   |NH | HLIM  |CID|SAC|  SAM  | M |DAC|  DAM  |
        +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+



                Figure 1: LOWPAN_IPHC base Encoding (RFC6282)

    The Stateless Compression of an IPv6 addresses can only happen if the
    IPv6 address can de deduced from the MAC addresses, meaning that the
    IP end point is also the MAC-layer endpoint.  This is generally not
    the case in a RPL network which is generally a multi-hop route-over
    (operated at Layer-3) network.  A better compression, that does not
    involve variable compressions depending on the hop in the mesh, can
    be achieved based on the fact that the outter encapsulation is
    usually between the source (or destination) of the inner packet and
    the root.  Also, the inner IP header can only be compressed by
    [RFC6282] if all the fields up to it are also compressed.  This
    specification makes it so that the inner IP header is the first
    header that is compressed by [RFC6282], and conserves the inner
    packet encoded the same way whether it is encapsulated or not,
    conserving existing implementation.
 “



    This specification extends the 6lo adaptation layer framework
 TW> add references to 4944 and 6282?
    so as
    to carry routing information for Route-over


 TW> what casing is used in 6550 for route over?
    use cases.  The

        PT > Well RPL => Route Over . What about:
 “

    This specification extends the 6lo adaptation layer framework
    ([RFC4944],[RFC6282]) so as to carry routing information for route-
    over networks based on RPL.  The specification includes the formats
    necessary for RPL and is extensible for additional formats.
 “



    Note: This specification does not use the Escape Dispatch, which
    extends Page 0 to more values, but rather allocates another Dispatch
    Bit Pattern (1111xxxx) for a new Paging Dispatch, that is present in
    all Pages, including Page 0 and Pages defined in future
    specifications, to indicate the next parsing context represented by
    its Page number.
 TW> maybe add a sentence which indicates that using the Escape Dispath
 would add bytes?

        PT > what about:
 “
 The rationale for avoiding that approach is that there will be multiple
 occurrences of a new header indexed by this specification in a single
 frame and
 the overhead on an octet each time for the Escape Dispatch would be
 prohibitive.
 “




 3.1.  New Page 1 Paging Dispatch {#Page 1}

    This draft defines a new Page 1 Paging Dispatch (Dispatch Value
    of 11110001) which indicates a context switch in the 6LoWPAN parser to
    a Page 1.

    The Dispatch bits defined in Page 0 by [RFC4944] are free to be
    reused in the Pages 1 to 15.

    On the other hand, the Dispatch bits defined in Page 0 for the
    Compression Format for IPv6 Datagrams over IEEE 802.15.4-Based
    Networks [RFC6282] are defined with the same values in Page 1 so
    there is no need to switch context back from Page 1 to Page 0 to
    address LOWPAN_IPHC and LOWPAN_NHC.
 TW> this is unclear. What do you mean by "switch back"? Maybe a couple of
 examples would help here, or a reference to an Appendix containining such
 examples.

        PT: Unsure how I can reword it or what example you are after. What
 this says is that RFC 6282 applies in the page 1 context just like it does
 in the page 0 context. The “switch back “ thing is that there is no need
 to switch to page 0 when you are in page 1 if you are using formats
 defined in 6282. Any suggestion of improvement(s)?


 3.2.  New Routing Header Dispatch (6LoRH)

    This specification introduces a new 6LoWPAN Routing Header (6LoRH) to
    carry IPv6 routing information.  The 6LoRH may contain source routing
    information such as a compressed form of RH3, as well as other sorts
    of routing information such as the RPL Packet Information and IP-in-
    IP encapsulation.

    The 6LoRH is expressed in a 6loWPAN packet as a Type-Length-Value
    (TLV) field, which is extensible for future use.

    This specification uses the bit pattern 10xxxxxx in Page 1 for the
    new 6LoRH Dispatch.

 TW> I don't see the need for this paragraph.
        PT the one below I assume?
    The 6LoRH uses on a 1/4th of the Dispatch space in Page 1, and this
    specification only uses a limited portion of the TLV space in the
    6LoRH to encode RPL artifacts as detailed in Section 5.

    It is expected that in the future, other specification with extend
    the 6LoRH for other features related to packet routing and forwarding
    in 6LoWPAN networks.



 …

 4.2.  Placement Of The 6LoRH

    With this specification, the 6LoRH [Section 5] is only defined in
    Page 1, so it MUST be placed in the packet in a zone where the Page 1
    context is active.

    One or more 6LoRHs
 TW> 6LoRH is a not a noun. Please say something like "6LoRH headers"
 (maybe not the right term?)
    MAY be placed in a 6LoWPAN packet and MUST always
    be placed before the LOWPAN_IPHC [RFC6282].

 TW> words missing?
    A 6LoRH being placed in a Page 1 context, it MUST always be placed
    after any Fragmentation Header and/or Mesh Header [RFC4944], even if
    a sur-compression mechanism
 TW> what on Earth is sur-compression?
    is used that elides the Paging
    Dispatches.

        PT>  the sur-compression is Jonathan’s idea that I hope we
 reintroduce at some point. Here is what the section would notw look:
 “
 4.2.  Placement Of The 6LoRH

    With this specification, the 6LoRH header [Section 5] is only defined
    in Page 1, so it MUST be placed in the packet in a zone where the
    Page 1 context is active.

    One or more 6LoRH header(s) MAY be placed in a 6LoWPAN packet.  A
    6LoRH header MUST always be placed before the LOWPAN_IPHC as defined
    in 6LoWPAN Header Compression [RFC6282].

    A 6LoRH header being always placed in a Page 1 context, it MUST
    always be placed after any Fragmentation Header and/or Mesh Header
    [RFC4944].
 “


 5.  6LoWPAN Routing Header General Format

 TW> why link to Page 0 at all? Why not simply stay "6LoRH uses Dispatch
 Value Bit Pattern 10xxxxxx in Page 1"?
    In its canonical form, the 6LoRH reuses in Page 1 the Dispatch Value
    Bit Pattern of 10xxxxxx that is defined in Page 0 for the Mesh Header
    in [RFC4944].

        PT: This is already gone with draft ietf .. 00



 Thubert, et al.           Expires June 6, 2016                  [Page 7]
 Internet-Draft6LoWPAN Routing Header And Paging Dispatches December 2015


    The Dispatch Value Bit Pattern is split in two forms of 6LoRH:

       Elective (6LoRHE) that may skipped if not understood

       Critical (6LoRHC) that may not be ignored

 5.1.  Elective Format

 TW> "In its canonical form" doesn't mean anything. This is a spec, it's
 either a format or it's not.
        This has to do with Jonathan’s sur-compression. I can remove it
 for now.


    Note: there is no provision for the exchange of error messages; such
    a situation should be avoided by judicious use of administrative
    control and/or capability indications.
 TW> please add a sentence to indicate why using ICMPv6 here doesn't make
 sense


        Pt > what about
 “

    Note: The situation where a node receives a message with a Critical
    6LoWPAN Routing Header that it does not understand is a critical
    administrative error whereby the wrong device is placed in a network.
    It makes no sense to overburden the constrained device with code that
    would cause ICMP error to the source.  Rather, it is expected that
    the device will raise some management alert indicating that it cannot
    operate in this network for that reason.  It results that there is no
    provision for the exchange of error messages for this situation; it
    should be avoided by judicious use of administrative control and/or
    capability indications by the device manufacturer.
 “

 6.  The Routing Header Type 3 (RH3) 6LoRH

    The Routing Header type 3 (RH3) 6LoRH (RH3-6LoRH)
 TW> why not call it 6LoRH-RH3? It's first a 6LoRH, with subtype RH3

        PT > Let us place that to the vote. The convention used so far is
 adjective  firs like in ‘blue shirt’.
        But I do not mind either way.


    is a Critical
    6LoWPAN Routing Header that provides a compressed form for the RH3,
    as defined in [RFC6554] for use by RPL routers.  Routers that need to
    forward a packet with a RH3-6LoRH are expected to be RPL routers and
    are expected to support this specification.  If a non-RPL router
 receives
    a packet with a RPI-6LoRH, this means that there was a routing error
 TW> RPI-6LoRH is not defined at this point?

        PT > typo, meant RH3… Thanks for the catch!
 
    and the packet should be dropped so the Type cannot be ignored.

        0                   1
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-    -+-    -+ ... +-    -+
       |1|0|0|  Size   |6LoRH Type 0..4| Hop1 | Hop2 |     | HopN |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-    -+-    -+ ... +-    -+

             Size indicates the number of compressed addresses

                           Figure 5: The RH3-6LoRH.

    The values for the RH3-6LoRH Type are an enumeration, 0 to 4.  The
    form of compression is indicated by the Type as follows:
 TW> please reference the figures by their number.

        Pt done







 Thubert, et al.           Expires June 6, 2016                  [Page 9]
 Internet-Draft6LoWPAN Routing Header And Paging Dispatches December 2015


      +-----------+-----------+
      |   Type    | Size Unit |
      +-----------+-----------+
      |    0      |      1    |
      |    1      |      2    |
      |    2      |      4    |
      |    3      |      8    |
      |    4      |     16    |
      +-----------+-----------+

                        Figure 6: The RH3-6LoRH Types.

 TW> what does the size unit mean? Is there a paragraph missing here?

        PT
        That is the unit in which the size is expressed. I can make that
 clearer. Proposal:
 “

    The values for the RH3-6LoRH Type are an enumeration, 0 to 4.  The
    form of compression is indicated by the Type.  The unit (as a number
    of bytes) in which the Size is expressed depends on the Type as
    described in Figure 7:

      +-----------+-----------+
      |   Type    | Size Unit |
      +-----------+-----------+
      |    0      |      1    |
      |    1      |      2    |
      |    2      |      4    |
      |    3      |      8    |
      |    4      |     16    |
      +-----------+-----------+
 “

    In the case of a RH3-6LoRH, the TSE field is used as a Size, which
    encodes the number of hops minus 1; so a Size of 0 means one hop, and
    the maximum that can be encoded is 32 hops.  (If more than 32 hops
    need to be expressed, a sequence of RH3-6LoRH can be employed.)

    The next Hop
 TW> please use consistent casing. next hop? Next Hop?
    is indicated in the first entry of the first RH3-6LoRH.
    Upon reception, the entry is checked whether it refers to the
    processing router itself.
 TW> I don't understand "whether it refers to the processing router itself"


 What about “

    The Next Hop is indicated in the first entry of the first RH3-6LoRH.
    Upon reception, the router checks whether it owns the address
    indicated as Next Hop, which MUST be the case in a strict source
    routing environment.  If it is so, the entry is removed from the
    RH3-6LoRH and the Size is decremented.

 “


    If it so, the entry is removed from the
    RH3-6LoRH and the Size is decremented.  If the Size is now zero, the
    whole RH3-6LoRH is removed.  If there is no more RH3-6LoRH, the
    processing node is the last router on the way, which may or may not
    be collocated with the final destination.
 TW> I have a proposal: why not leave one more address in the source route?
 this would enable piecewise source routing. Please ping me if you want me
 to make this suggestion in the ML.

        PT >
        Please do. I think that there’s a lot to improve in the RH, like
 the use of context. We need to discuss that now if we want the next 6TiSCH
 plugtest to use it – maybe it’s too late for that round?



 TW> this paragraph contradicts the previous one, which states that the
 last address in the RH is not per-se the final destination

        PT>  it is the last router which may be the final destination. I
 see the text can be confusing. What about:
 “
    The last hop in the last RH3-6LoRH is the last router on the way to
    the destination in the LLN.  In a classical RPL network, all nodes
    are routers so the last hop is effectively the destination as well.
    But in the general case, even when there is a RH3-6LoRH header
    present, the address of the final destination is always indicated in
    the LoWPAN_IPHC [RFC6282].
 “
    The last hop in the last RH3-6LoRH is the last router prior to the
    destination in the LLN.  So even when there is a RH3-6LoRH in the
    frame,
 TW> what do you mean by frame?
        PT >removed

    the address of the final destination is in the LoWPAN_IPHC
    [RFC6282].

    If some bits of the first address in the RH3-6LoRH can be derived
    from the final destination
 is
 TW> remove "is"?

        PT >removed
    in the LoWPAN_IPHC, then that address
    may be compressed, otherwise is is expressed in full.
 TW> full IPv6 I assume?

        PT >now

 “otherwise it is expressed as a full IPv6 address of 128 bits
 “


    Next addresses
    only need to express the delta from the previous address.

    All addresses in a RH3-6LoRH are compressed in a same fashion, down
    to the same number of bytes per address.  In order to get different
    forms of compression, multiple consecutive RH3-6LoRH must be used.

 TW> a couple of example would be very welcome here, or a link to an
 appendix with examples




        PT > true, will do that next time

 7.  The RPL Packet Information 6LoRH

    [RFC6550], Section 11.2, specifies the RPL Packet Information (RPI)
    as a set of fields that are to be
 TW> is that a MUST in 6550? if yes, please write MUST
    added to the IP packets for the
    purpose of Instance Identification, as well as Loop Avoidance and
    Detection.

        PT RPL says
 “
    A RPL router that forwards a packet in the RPL network MUST check if
    the packet includes the RPL Packet Information.  If not, then the RPL
    router MUST insert the RPL Packet Information.

 “
 But then it is up to RPL to specify the MUST and RPL may change and that’s
 fine for the 6LoRH internet draft.
 This doc just says how to compress RPI if it is present. I would not place
 a MUST that does not belong here.

    In particular, the SenderRank, which is the scalar metric computed by
    an specialized Objective Function such as [RFC6552], indicates the



 Thubert, et al.           Expires June 6, 2016                 [Page 10]
 Internet-Draft6LoWPAN Routing Header And Paging Dispatches December 2015


    Rank of the sender and is modified at each hop.  The SenderRank
    field is used to validate that the packet progresses in the expected
    direction, either upwards or downwards, along the DODAG.

    RPL defines the RPL Option for Carrying RPL Information in Data-Plane
    Datagrams [RFC6553] to transport the RPI, which is carried in an IPv6
    Hop-by-Hop Options Header [RFC2460], typically consuming eight bytes
    per packet.

    With [RFC6553], the RPL option is encoded as six Octets; it must be
    placed in a Hop-by-Hop header that consumes two additional octets for
    a total of eight.
 TW> a couple of examples here might be beneficial, as I'm confused by the
 8, 2 and 6 numbers

        Well noted, though it is paraphrasing other specs. I’ll keep it as
 a todo with all the other formats you’re suggesting to add
 
    In order to limit its range to the inside the RPL
    domain, the Hop-by-Hop header must be added to (or removed from)
    packets that cross the border of the RPL domain.

    The 8-byte overhead is detrimental to the LLN operation, in
    particular with regards to bandwidth and battery constraints.  These
    bytes may cause a containing frame to grow above maximum frame size,
    leading to Layer 2 or 6LoWPAN [RFC4944] fragmentation, which in turn
    causes even more energy spending and issues discussed in the LLN
    Fragment Forwarding and Recovery
    [I-D.thubert-6lo-forwarding-fragments].

    An additional overhead comes from the need, in certain cases, to add
    an IP-in-IP encapsulation to carry the Hop-by-Hop header.  This is
    needed when the router that inserts the Hop-by-Hop header is not the
    source of the packet, so that an error can be returned to the router.
    This is also the case when a packet originated by a RPL node must be
    stripped from the Hop-by-Hop header to be routed outside the RPL
    domain.

    This specification defines an IPinIP-6LoRH in Section 8 for that
    purpose, but it must be noted that stripping a 6LoRH does not require
    a manipulation of the packet in the LOWPAN_IPHC, and thus, if the
    source address in the LOWPAN_IPHC is the node that inserted the
    IPinIP-6LoRH then this alone does not mandate an IPinIP-6LoRH.

    As a result, a RPL packet may bear only an RPI-6LoRH and no IPinIP-
    6LoRH.  In that case, the source and destination of the packet are
    located in the LOWPAN_IPHC.
 TW> examples examples!
        PT > well noted!

    As with [RFC6553], the fields in the RPI include an 'O', an 'R', and
    an 'F' bit, an 8-bit RPLInstanceID (with some internal structure),
    and a 16-bit SenderRank.

    The remainder of this section defines the RPI-6LoRH, a Critical
    6LoWPAN Routing Header that is designed to transport the RPI in
    6LoWPAN LLNs.



 Thubert, et al.           Expires June 6, 2016                 [Page 11]
 Internet-Draft6LoWPAN Routing Header And Paging Dispatches December 2015


 7.1.  Compressing the RPLInstanceID

    RPL Instances are discussed in [RFC6550], Section 5.  A number of
    simple use cases do not require more than one instance, and in such
    cases, the instance is expected to be the global Instance 0.
    A
    global RPLInstanceID is encoded in a RPLInstanceID field as follows:

        0 1 2 3 4 5 6 7
       +-+-+-+-+-+-+-+-+
       |0|     ID      |  Global RPLInstanceID in 0..127
       +-+-+-+-+-+-+-+-+

          Figure 7: RPLInstanceID Field Format for Global Instances.

    For the particular case of the global Instance 0, the RPLInstanceID
    field is all zeros.  This specification allows to elide a
    RPLInstanceID field that is all zeros, and defines a I flag that,
    when set, signals that the field is elided.

 7.2.  Compressing the SenderRank

    The SenderRank is the result of the DAGRank operation on the rank of
    the sender; here the DAGRank operation is defined in [RFC6550],
    Section 3.5.1, as:

       DAGRank(rank) = floor(rank/MinHopRankIncrease)

    If MinHopRankIncrease is set to a multiple of 256, the least
    significant 8 bits of the SenderRank will be all zeroes; by eliding
    those, the SenderRank can be compressed into a single byte.  This
    idea is used in [RFC6550] by defining DEFAULT_MIN_HOP_RANK_INCREASE
    as 256 and in [RFC6552] that defaults MinHopRankIncrease to
    DEFAULT_MIN_HOP_RANK_INCREASE.

    This specification allows to encode the SenderRank as either one or
    two bytes, and defines a K flag that, when set, signals that a single
    byte is used.

 7.3.  The Overall RPI-6LoRH encoding

    The RPI-6LoRH provides a compressed form for the RPL RPI.  Routers
    that need to forward a packet with a RPI-6LoRH are expected to be RPL
    routers and expected to support this specification.  If a non-RPL
    router receives a packet with a RPI-6LoRH, this means that there was
    a routing error and the packet should be dropped so the Type cannot
    be ignored.





 Thubert, et al.           Expires June 6, 2016                 [Page 12]
 Internet-Draft6LoWPAN Routing Header And Paging Dispatches December 2015


    Since the I flag is not set, the TSE field does not need to be a
    length expressed in bytes.  The field is fully reused for control
    bits so as to encode the O, R and F flags from the RPI, and the I and
    K flags that indicate the compression that is taking place.

    The Type for the RPI-6LoRH is 5.

    The RPI-6LoRH is immediately followed by the RPLInstanceID field,
    unless that field is fully elided, and then the SenderRank, which is
    either compressed into one byte or fully in-lined as the whole 2
    bytes.  The I and K flags in the RPI-6LoRH indicate whether the
    RPLInstanceID is elided and/or the SenderRank is compressed and
    depending on these bits, the Length of the RPI-6LoRH may vary as
    described hereafter.

        0                   1                   2
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ...  -+-+-+
       |1|0|0|O|R|F|I|K| 6LoRH Type=5  |   Compressed fields  |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ...  -+-+-+


                   Figure 8: The Generic RPI-6LoRH Format.

    O, R, and F bits:
          The O, R, and F bits as defined in [RFC6550], Section 11.2.

    I bit:
          If it is set, the Instance ID is elided and the RPLInstanceID
          is the Global RPLInstanceID 0.  If it is not set, the octet
          immediately following the type field contains the RPLInstanceID
          as specified in [RFC6550] section 5.1.

    K bit:
          If it is set, the SenderRank is be compressed into one octet,
          and the lowest significant octet is elided.  If it is not set,
          the SenderRank, is fully inlined as 2 octets.

    In Figure 9, the RPLInstanceID is the Global RPLInstanceID 0, and the
    MinHopRankIncrease is a multiple of 256 so the least significant byte
    is all zeros and can be elided:










 Thubert, et al.           Expires June 6, 2016                 [Page 13]
 Internet-Draft6LoWPAN Routing Header And Paging Dispatches December 2015


        0                   1                   2
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |1|0|0|O|R|F|1|1| 6LoRH Type=5  | SenderRank    |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                 I=1, K=1

                   Figure 9: The most compressed RPI-6LoRH.

    In Figure 10, the RPLInstanceID is the Global RPLInstanceID 0, but
    both bytes of the SenderRank are significant so it can not be
    compressed:

        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |1|0|0|O|R|F|1|0| 6LoRH Type=5  |        SenderRank             |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                 I=1, K=0

                    Figure 10: Eliding the RPLInstanceID.

    In Figure 11, the RPLInstanceID is not the Global RPLInstanceID 0,
    and the MinHopRankIncrease is a multiple of 256:

        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |1|0|0|O|R|F|0|1| 6LoRH Type=5  | RPLInstanceID |  SenderRank   |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                 I=0, K=1

                      Figure 11: Compressing SenderRank.

    In Figure 12, the RPLInstanceID is not the Global RPLInstanceID 0,
    and both bytes of the SenderRank are significant:

        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |1|0|0|O|R|F|0|0| 6LoRH Type=5  | RPLInstanceID |    Sender-...
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
         ...-Rank      |
       +-+-+-+-+-+-+-+-+
                 I=0, K=0

                Figure 12: Least compressed form of RPI-6LoRH.




 Thubert, et al.           Expires June 6, 2016                 [Page 14]
 Internet-Draft6LoWPAN Routing Header And Paging Dispatches December 2015

 TW> why not put this intro at the beginning of Section 8?
    A typical packet in RPL non-storing mode going down the RPL graph
    requires an IPinIP encapsulating the RH3, whereas the RPI is usually
    omitted, unless it is important to indicate the RPLInstanceID.  To
    match this structure, an optimized IPinIP 6LoRH is defined in
    Section 8.

        PT > moved

 TW> I don't understand what this table is...
        PT > Gone!
    And the types include the setting of I and K as follows:

      +-----------+-------+-------+
      |   Type    |   I   |   K   |
      +-----------+-------+-------+
      |     5     |   0   |   0   |
      |     6     |   0   |   1   |
      |     7     |   1   |   0   |
      |     8     |   1   |   1   |
      +-----------+-------+-------+


                       Figure 13: The RPI-6LoRH Types.

 8.  The IP-in-IP 6LoRH

    The IP-in-IP 6LoRH (IPinIP-6LoRH) is an Elective 6LoWPAN Routing
    Header that provides a compressed form for the encapsulating IPv6
    Header in the case of an IP-in-IP encapsulation.

    An IPinIP encapsulation is used to insert a field such as a Routing
    Header or an RPI at a router that is not the source of the packet.
    In order to send an error back regarding the inserted field, the
    address of the router that performs the insertion must be provided.

    The encapsulation can also enable a router down the path removing a
    field such as the RPI, but this can be done in the compressed form by
    removing the RPI-6LoRH, so an IPinIP-6LoRH encapsulation is not
    required for that sole purpose.
 TW> I thought I understood IP-in-IP was needed as well for RPL upstream
 traffic?

        PT > it is, yes. Why does it seem otherwise? Does this look
 better:
 “
 The encapsulation can also enable the last router prior to Destination to
 remove a field such as the RPI, but this can be done in the compressed
 form
 by removing the RPI-6LoRH, so an IP-in-IP-6LoRH encapsulation is not
 required for
 that sole purpose.
 “


    This field is not critical for routing so the Type can be ignored,
    and the TSE field contains the Length in bytes.

      0                   1                   2
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-       ...      -+
     |1|0|1| Length  | 6LoRH Type 6  |  Hop Limit    | Encaps. Address  |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-       ...      -+


                         Figure 14: The IPinIP-6LoRH.




 Thubert, et al.           Expires June 6, 2016                 [Page 15]
 Internet-Draft6LoWPAN Routing Header And Paging Dispatches December 2015


    The Length of an IPinIP-6LoRH is expressed in bytes and MUST be at
    least 1, to indicate a Hop Limit (HL), that is decremented at each
    hop.  When the HL reaches 0, the packet is dropped per [RFC2460]

    If the Length of an IPinIP-6LoRH is exactly 1, then the Encapsulator
    Address is elided, which means that the Encapsulator is a well-known
    router, for instance the root in a RPL graph.

    If the Length of an IPinIP-6LoRH is strictly more than 1, then an
    Encapsulator Address is placed in a compressed form after the Hop
    Limit field.  The value of the Length indicates which compression is
    performed on the Encapsulator Address.  For instance, a Size of 3
    indicates that the Encapsulator Address is compressed to 2 bytes.

    When it cannot be elided, the destination IP address of the IP-in-IP
    header is transported in a RH3-6LoRH as the first address of the
    list.

    With RPL, the destination address in the IP-in-IP header is
    implicitly the root in the RPL graph for packets going upwards, and
    the destination address in the IPHC for packets going downwards.  If
    the implicit value is correct, the destination IP address of the IP-
    in-IP encapsulation can be elided.

    If the final destination of the packet is a leaf that does not
    support this specification, then the chain of 6LoRH must be stripped
    by the RPL/6LR router to which the leaf is attached.  In that
    example, the destination IP address of the IP-in-IP header cannot be
    elided.

    In the special case where the 6LoRH is used to route 6LoWPAN
    fragments, the destination address is not accessible in the IPHC on
    all fragments and can be elided only for the first fragment and for
    packets going upwards.
 TW> I understand the discussion above, but I don't see from the IPinIP-
 6LoRH
 TW> format how you can carry both the Encapsulator address and the
 destination address

        Pt > you do not. The format implies that the root is one of the
 end points of the tunnel.
        If the source is the root then the destination is in the inner IP.
 Else the source is the encapsulator that must be signaled in which case
 the destination is the root.

 9.  Security Considerations

    The security considerations of [RFC4944], [RFC6282], and [RFC6553]
    apply.

    Using a compressed format as opposed to the full in-line format is
    logically equivalent and does not create an opening for a new threat
    when compared to [RFC6550], [RFC6553] and [RFC6554].








 Thubert, et al.           Expires June 6, 2016                 [Page 16]
 Internet-Draft6LoWPAN Routing Header And Paging Dispatches December 2015


 10.  IANA Considerations

    This document creates a IANA registry for the 6LoWPAN Routing Header
    Type, and assigns the following values:

       0..4 : RH3-6LoRH [RFCthis]

       5 : RPI-6LoRH [RFCthis]

       6 : IPinIP-6LoRH [RFCthis]

 11.  Acknowledgments

 TW> If you like my review, consider adding me to this list. It usual also
 to order people alphabetically

        You are certainly added! The alphabet order I usually do not do.
 List is plain random order. But if it’s important to you I can reorder..
 
    The authors wish to thank Martin Turon, James Woodyatt, Samita
    Chakrabarti, Jonathan Hui, Gabriel Montenegro and Ralph Droms for
    constructive reviews to the design in the 6lo Working Group.  The
    overall discussion involved participants to the 6MAN, 6TiSCH and ROLL
    WGs, thank you all.  Special thanks to the chairs of the ROLL WG,
    Michael Richardson and Ines Robles, and Brian Haberman, Internet Area
    A-D, and Adrian Farrel, Routing Area A-D, for driving this complex
    effort across Working Groups and Areas.

 12.  References

 12.1.  Normative References

    [IEEE802154]
               IEEE standard for Information Technology, "IEEE std.
               802.15.4, Part. 15.4: Wireless Medium Access Control (MAC)
               and Physical Layer (PHY) Specifications for Low-Rate
               Wireless Personal Area Networks", 2015.

    [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
               Requirement Levels", BCP 14, RFC 2119,
               DOI 10.17487/RFC2119, March 1997,
               <http://www.rfc-editor.org/info/rfc2119>.

    [RFC2460]  Deering, S. and R. Hinden, "Internet Protocol, Version 6
               (IPv6) Specification", RFC 2460, DOI 10.17487/RFC2460,
               December 1998, <http://www.rfc-editor.org/info/rfc2460>.

    [RFC4944]  Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler,
               "Transmission of IPv6 Packets over IEEE 802.15.4
               Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007,
               <http://www.rfc-editor.org/info/rfc4944>.






 Thubert, et al.           Expires June 6, 2016                 [Page 17]
 Internet-Draft6LoWPAN Routing Header And Paging Dispatches December 2015


    [RFC6282]  Hui, J., Ed. and P. Thubert, "Compression Format for IPv6
               Datagrams over IEEE 802.15.4-Based Networks", RFC 6282,
               DOI 10.17487/RFC6282, September 2011,
               <http://www.rfc-editor.org/info/rfc6282>.

    [RFC6550]  Winter, T., Ed., Thubert, P., Ed., Brandt, A., Hui, J.,
               Kelsey, R., Levis, P., Pister, K., Struik, R., Vasseur,
               JP., and R. Alexander, "RPL: IPv6 Routing Protocol for
               Low-Power and Lossy Networks", RFC 6550,
               DOI 10.17487/RFC6550, March 2012,
               <http://www.rfc-editor.org/info/rfc6550>.

    [RFC6552]  Thubert, P., Ed., "Objective Function Zero for the Routing
               Protocol for Low-Power and Lossy Networks (RPL)",
               RFC 6552, DOI 10.17487/RFC6552, March 2012,
               <http://www.rfc-editor.org/info/rfc6552>.

    [RFC6553]  Hui, J. and JP. Vasseur, "The Routing Protocol for Low-
               Power and Lossy Networks (RPL) Option for Carrying RPL
               Information in Data-Plane Datagrams", RFC 6553,
               DOI 10.17487/RFC6553, March 2012,
               <http://www.rfc-editor.org/info/rfc6553>.

    [RFC6554]  Hui, J., Vasseur, JP., Culler, D., and V. Manral, "An IPv6
               Routing Header for Source Routes with the Routing Protocol
               for Low-Power and Lossy Networks (RPL)", RFC 6554,
               DOI 10.17487/RFC6554, March 2012,
               <http://www.rfc-editor.org/info/rfc6554>.

    [RFC7102]  Vasseur, JP., "Terms Used in Routing for Low-Power and
               Lossy Networks", RFC 7102, DOI 10.17487/RFC7102, January
               2014, <http://www.rfc-editor.org/info/rfc7102>.

    [RFC7228]  Bormann, C., Ersue, M., and A. Keranen, "Terminology for
               Constrained-Node Networks", RFC 7228,
               DOI 10.17487/RFC7228, May 2014,
               <http://www.rfc-editor.org/info/rfc7228>.

 12.2.  Informative References

    [I-D.bergmann-bier-ccast]
               Bergmann, O., Bormann, C., and S. Gerdes, "Constrained-
               Cast: Source-Routed Multicast for RPL", draft-bergmann-
               bier-ccast-00 (work in progress), November 2014.







 Thubert, et al.           Expires June 6, 2016                 [Page 18]
 Internet-Draft6LoWPAN Routing Header And Paging Dispatches December 2015


    [I-D.ietf-6tisch-architecture]
               Thubert, P., "An Architecture for IPv6 over the TSCH mode
               of IEEE 802.15.4", draft-ietf-6tisch-architecture-08 (work
               in progress), May 2015.

    [I-D.ietf-6tisch-tsch]
               Watteyne, T., Palattella, M., and L. Grieco, "Using
               IEEE802.15.4e TSCH in an IoT context: Overview, Problem
               Statement and Goals", draft-ietf-6tisch-tsch-06 (work in
               progress), March 2015.

    [I-D.thubert-6lo-forwarding-fragments]
               Thubert, P. and J. Hui, "LLN Fragment Forwarding and
               Recovery", draft-thubert-6lo-forwarding-fragments-02 (work
               in progress), November 2014.

    [I-D.wijnands-bier-architecture]
               Wijnands, I., Rosen, E., Dolganow, A., Przygienda, T., and
               S. Aldrin, "Multicast using Bit Index Explicit
               Replication", draft-wijnands-bier-architecture-05 (work in
               progress), March 2015.

    [RFC6775]  Shelby, Z., Ed., Chakrabarti, S., Nordmark, E., and C.
               Bormann, "Neighbor Discovery Optimization for IPv6 over
               Low-Power Wireless Personal Area Networks (6LoWPANs)",
               RFC 6775, DOI 10.17487/RFC6775, November 2012,
               <http://www.rfc-editor.org/info/rfc6775>.

 Authors' Addresses

    Pascal Thubert (editor)
    Cisco Systems
    Village d'Entreprises Green Side
    400, Avenue de Roumanille
    Batiment T3
    Biot - Sophia Antipolis  06410
    FRANCE

    Phone: +33 4 97 23 26 34
    Email: pthubert@cisco.com











 Thubert, et al.           Expires June 6, 2016                 [Page 19]
 Internet-Draft6LoWPAN Routing Header And Paging Dispatches December 2015


    Carsten Bormann
    Universitaet Bremen TZI
    Postfach 330440
    Bremen  D-28359
    Germany

    Phone: +49-421-218-63921
    Email: cabo@tzi.org


    Laurent Toutain
    Institut MINES TELECOM; TELECOM Bretagne
    2 rue de la Chataigneraie
    CS 17607
    Cesson-Sevigne Cedex  35576
    France

    Email: Laurent.Toutain@telecom-bretagne.eu


    Robert Cragie
    ARM Ltd.
    110 Fulbourn Road
    Cambridge  CB1 9NJ
    UK

    Email: robert.cragie@gridmerge.com

-- 
--------------------------------+---------------------------------
 Reporter:  pthubert@cisco.com  |       Owner:  pthubert@cisco.com
     Type:  defect              |      Status:  new
 Priority:  major               |   Milestone:
Component:  routing-dispatch    |     Version:
 Severity:  Active WG Document  |  Resolution:
 Keywords:                      |
--------------------------------+---------------------------------

Ticket URL: <https://trac.tools.ietf.org/wg/6lo/trac/ticket/6#comment:2>
6lo <https://tools.ietf.org/6lo/>