A Routing Header Dispatch for 6LoWPAN
draft-thubert-6lo-routing-dispatch-00

The information below is for an old version of the document
Document Type Active Internet-Draft (individual)
Authors Pascal Thubert  , Carsten Bormann  , Laurent Toutain 
Last updated 2014-11-27
Replaced by draft-ietf-6lo-routing-dispatch
Stream (None)
Formats plain text xml pdf htmlized bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
6lo                                                      P. Thubert, Ed.
Internet-Draft                                                     Cisco
Updates: 4944 (if approved)                                   C. Bormann
Intended status: Standards Track                          Uni Bremen TZI
Expires: May 29, 2015                                         L. Toutain
                                                    IMT-TELECOM Bretagne
                                                       November 25, 2014

                 A Routing Header Dispatch for 6LoWPAN
                 draft-thubert-6lo-routing-dispatch-00

Abstract

   This specification provides a new 6LoWPAN dispatch type for use in
   Route-over and mixed Mesh-under and Route-over topologies, that
   reuses the encoding of the mesh type defined in RFC 4944 for pure
   Mesh-under topologies.  This specification also defines a method to
   compress RPL Option (RFC6553) information and Routing Header type 3
   (RFC6554), an efficient IP-in-IP technique and opens the way for
   further routing techniques.  This extends 6LoWPAN Transmission of
   IPv6 Packets (RFC4944), and is applicable to new link-layer types
   where 6LoWPAN is being defined.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on May 29, 2015.

Copyright Notice

   Copyright (c) 2014 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents

Thubert, et al.           Expires May 29, 2015                  [Page 1]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   5
   3.  Updating RFC 4944 . . . . . . . . . . . . . . . . . . . . . .   5
   4.  General Format  . . . . . . . . . . . . . . . . . . . . . . .   5
   5.  The Routing Header type 3 (RH3) 6LoRH . . . . . . . . . . . .   7
   6.  The RPL Packet Information 6LoRH  . . . . . . . . . . . . . .   8
     6.1.  Compressing the RPLInstanceID . . . . . . . . . . . . . .  10
     6.2.  Compressing the SenderRank  . . . . . . . . . . . . . . .  10
     6.3.  The Overall RPI-6LoRH encoding  . . . . . . . . . . . . .  10
   7.  The IP-in-IP 6LoRH  . . . . . . . . . . . . . . . . . . . . .  13
   8.  The Mesh Header 6LoRH . . . . . . . . . . . . . . . . . . . .  14
   9.  The BIER 6LoRH  . . . . . . . . . . . . . . . . . . . . . . .  14
   10. Security Considerations . . . . . . . . . . . . . . . . . . .  16
   11. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  16
   12. Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  17
   13. References  . . . . . . . . . . . . . . . . . . . . . . . . .  17
     13.1.  Normative References . . . . . . . . . . . . . . . . . .  17
     13.2.  Informative References . . . . . . . . . . . . . . . . .  18
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  19

1.  Introduction

   The design of Low Power and Lossy Networks (LLNs) is generally
   focused on saving energy, which is the most constrained resource of
   all.  The other constraints, such as the memory capacity and the duty
   cycling of the LLN devices, derive from that primary concern.  Energy
   is often available from primary batteries that are expected to last
   for years, or is scavenged from the environment in very limited
   quantities.  Any protocol that is intended for use in LLNs must be
   designed with the primary concern of saving energy as a strict
   requirement.

   Controlling the amount of data transmission is one possible venue to
   save energy.  In a number of LLN standards, the frame size is limited
   to much smaller values than the IPv6 maximum transmission unit (MTU)
   of 1280 bytes.  In particular, an LLN that relies on the classical
   Physical Layer (PHY) of IEEE 802.14.5 [IEEE802154] is limited to 127
   bytes per frame.  The need to compress IPv6 packets over IEEE

Thubert, et al.           Expires May 29, 2015                  [Page 2]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

   802.14.5 led to the 6LoWPAN Header Compression [RFC6282] work
   (6LoWPAN-HC).

   Innovative Route-over techniques have been and are still being
   developed for routing inside a LLN.  In a general fashion, such
   techniques require additional information in the packet to provide
   loop prevention and to indicate information such as flow
   identification, source routing information, etc.

   For reasons such as security and the capability to send ICMP errors
   back to the source, an original packet must not be tampered with, and
   any information that must be inserted in or removed from an IPv6
   packet must be placed in an extra IP-in-IP encapsulation.  This is
   the case when the additional routing information is inserted by a
   router on the path of a packet, for instance a mesh root, as opposed
   to the source node.  This is also the case when some routing
   information must be removed from a packet that will flow outside the
   LLN.

   As an example, the Routing Protocol for Low Power and Lossy Networks
   [RFC6550] (RPL) is designed to optimize the routing operations in
   constrained LLNs.  As part of this optimization, RPL requires the
   addition of RPL Packet Information (RPI) in every packet, as defined
   in Section 11.2 of [RFC6550].

   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.

Thubert, et al.           Expires May 29, 2015                  [Page 3]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

             ------+---------                            ^
                   |          Internet                   |
                   |                                     | Native IPv6
                +-----+                                  |
                |     | Border Router (RPL Root)    ^    |    ^
                |     |                             |    |    |
                +-----+                             |    |    | IPv6 in
                   |                                |    |    | IPv6
             o    o   o    o                        |    |    | + RPI
         o o   o  o   o  o  o o   o                 |    |    |   or RH3
        o  o o  o o    o   o   o  o  o              |    |    |
        o   o    o  o     o  o    o  o  o           |    |    |
       o  o   o  o   o         o   o o              v    v    v
       o          o             o     o
                         LLN

              Figure 1: IP-in-IP Encapsulation within the LLN

   Additionally, in the case of the Non-Storing Mode of Operation (MOP),
   RPL requires a Routing Header type 3 (RH3) as defined in the IPv6
   Routing Header for Source Routes with RPL [RFC6554] specification,
   for all packets that are routed down a RPL graph.  With Non-Storing
   RPL, even if the source is a node in the same LLN, the packet must
   first reach up the graph to the root so that the root can insert the
   RH3 to go down the graph.  In any fashion, whether the packet was
   originated in a node in the LLN or outside the LLN, and regardless of
   whether the packet stays within the LLN or not, as long as the source
   of the packet is not the root itself, the source-routing operation
   also implies an IP-in-IP encapsulation at the root to insert the RH3.

   6TiSCH [I-D.ietf-6tisch-architecture] specifies the operation of IPv6
   over the TimeSlotted Channel Hopping [I-D.ietf-6tisch-tsch] (TSCH)
   mode of operation of IEEE 802.14.5.  The architecture requires the
   use of both RPL and the 6lo adaptation layer framework ([RFC4944],
   [RFC6282]) over IEEE 802.14.5.  Because it inherits the constraints
   on the frame size from the MAC layer, 6TiSCH cannot afford to spend 8
   bytes per packet on the RPI.  Hence the requirement for a 6LoWPAN
   header compression of the RPI.

   The type of information that needs to be present in a packet inside
   the LLN but not outside of the LLN varies with the routing operation,
   but there is overall a need for an extensible compression technique
   that would simplify the IP-in-IP encapsulation, when needed, and
   optimally compress existing routing artifacts found in LLNs.

   This specification extends 6LoWPAN [RFC4944] and in particular reuses
   the Mesh Header formats that are defined for the Mesh-under use cases
   so as to carry routing information for Route-over use cases.  The

Thubert, et al.           Expires May 29, 2015                  [Page 4]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

   specification includes the formats necessary for RPL and is
   extensible for additional formats.

2.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   [RFC2119].

   The Terminology used in this document is consistent with and
   incorporates that described in `Terminology in Low power And Lossy
   Networks' [RFC7102] and [RFC6550].

   The terms Route-over and Mesh-under are defined in [RFC6775].

   Other terms in use in LLNs are found in [RFC7228].

   The term "byte" is used in its now customary sense as a synonym for
   "octet".

3.  Updating RFC 4944

   Section 5.1 of the IPv6 over IEEE 802.15.4 [RFC4944] specification
   defines various Dispatch Types and Headers, and in particular a Mesh
   Header that corresponds to a pattern 10xxxxxx and effectively
   consumes one third of the whole 6LoWPAN dispatch space for Mesh-under
   specific applications.

   This specification reuses the Dispatch space for Route-over and mixed
   operations.  This means that a device that use the Mesh Header as
   specified in [RFC4944] should not be placed in a same network as a
   device which operates per this update.  This is generally not a
   problem since a network is classically either Mesh-under OR Route-
   over.

   A new implementation of Mesh-under MAY support both types of
   encoding, and if so, it SHOULD provide a management toggle to enable
   either mode and it SHOULD use this specification as the default mode.

4.  General Format

   The 6LoWPAN Routing Header (6LoRH) reuses the bit patterns that are
   defined in [RFC4944] for the Mesh Header, specifically the Dispatch
   Value Bit Pattern of 10xxxxxx.  It may contain source routing
   information such as a compressed form of RH3, or other sorts of
   routing information such as the RPL RPI, source and/or destination

Thubert, et al.           Expires May 29, 2015                  [Page 5]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

   address, and is extensible for future uses, with the given example of
   BIER bitmap encoding in Section 9.

       0                   1
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    ....    +-+
      |1|0|I| Size/Fmt|    Type       |                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    ....    +-+
                                       <--  Length  -->

                     Figure 2: 6LoWPAN Routing Header

   I Flag:
         The I flag is set to indicate that a 6LoWPAN Routing Header may
         be ignored and skipped in parsing.  If it is ignored, the 6LoRH
         is forwarded with no change inside the LLN.

   A 6LoWPAN Routing Header is shaped as a TLV.  The first byte contains
   an I flag that is set if the 6LoRH can safely be ignored, and a Size/
   Format field that is used to compute the Length of the remainder of
   the Header and eventually carry additional information.

   If the I Flag is set, the Size / Format field contains the Length of
   the 6LoRH expressed in bytes.  This is done to enable a node to skip
   a 6LoRH that it does not support and cannot parse, for instance if
   the Type is unknown.

   If the I flag is not set, then a node that does not support the Type
   MUST drop the packet.  Because further parsing of the packet implies
   that the Type is supported, it is possible to optimize the encoding
   of the Size / Format field in a fashion that depends on the Type.  In
   some cases, the left side of the field may be used for control bits,
   and the length may be expressed in units that are not necessarily
   bytes but must be specified for a given Type as an integer number of
   bytes.

   The second byte contains the Type and eventually some flags which
   depend on the Type.

   If the Type is not understood and the I flag is not set, then the
   packet MUST be dropped.  (Note that 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.)

   One or more 6LoWPAN Routing Headers MAY be placed in a 6LoWPAN
   packet.

Thubert, et al.           Expires May 29, 2015                  [Page 6]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

   Any 6LoWPAN Routing Headers MUST always be placed before the
   LOWPAN_IPHC [RFC6282].

   A Fragmentation Type and Header [RFC4944] MAY be placed in any
   position before, after or in between 6LoWPAN Routing Headers.  [XXX:
   Now what does that mean?]  [YYY: I mean to say that we can have 0..n
   6LoRH before a frag header, and 0..n 6LoRH after.  If the frag header
   is preceded by 1..n RH then the RH(s) may be used to route the
   fragment]

   Headers are processed in order so if 6LoWPAN Routing Headers located
   before the Fragmentation Type and Header and / or the LOWPAN_IPHC are
   sufficient to route a packet or a 6LoWPAN fragment over the LLN, then
   there is no need to parse the LOWPAN_IPHC or to recompose the
   fragmented packet at every LLN hop.

5.  The Routing Header type 3 (RH3) 6LoRH

   The Routing Header type 3 (RH3) 6LoRH (RH3-6LoRH) provides a
   compressed form for the Routing Header 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 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.

       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 3: 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:

Thubert, et al.           Expires May 29, 2015                  [Page 7]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

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

                       Figure 4: The RH3-6LoRH Types

   The Size field 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 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.  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.  [XXX: This doesn't work
   with hosts.]  [YYY: which pleads towards saying that the final dest
   is in the IP header and only the intermediate hops are in the 6loRH.]
   [YYY2: I changed the sentence above and the below.  But then, there
   might be an issue with routing fragments.]

   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, the address of the final destination is in the LOWPAN_IPHC.

   Each address in the list is decompressed by replacing the last size-
   unit bytes of the destination address derived from the LoWPAN_IPHC
   [RFC6282] decompression by the bytes given in the RH3-6LoRH.

   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.

6.  The RPL Packet Information 6LoRH

   [RFC6550], Section 11.2, specifies the RPL Packet Information (RPI)
   as a set of fields that are to be added to the IP packets for the
   purpose of Instance Identification, as well as Loop Avoidance and
   Detection.

Thubert, et al.           Expires May 29, 2015                  [Page 8]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

   In particular, the SenderRank, which is the scalar metric computed by
   an specialized Objective Function such as [RFC6552], indicates the
   Rank of the sender and is modified at each hop.  The SenderRank
   allows 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.  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-bytes 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
   cause 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 7 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, an RPL packet may bear only a RPI-6LoRH and no IPinIP-
   6LoRH.  In that case, the source and destination of the packet are
   located in the LOWPAN_IPHC.

   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.

Thubert, et al.           Expires May 29, 2015                  [Page 9]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

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

6.1.  Compressing the RPLInstanceID

   RPL Instances are discussed in [RFC6550], Section 5.  A number of
   simple use cases will not require more than one instance, and in such
   a case, 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 5: 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.

6.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.

6.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

Thubert, et al.           Expires May 29, 2015                 [Page 10]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

   a routing error and the packet should be dropped so the Type cannot
   be ignored.

   Since the I flag is not set, the Size / Format 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 6: 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 7, 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 May 29, 2015                 [Page 11]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

       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 7: The most compressed RPI-6LoRH

   In Figure 8, 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 8: Eliding the RPLInstanceID

   In Figure 9, 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 9: Compressing SenderRank

   In Figure 10, 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 10: Least compressed form of RPI-6LoRH

Thubert, et al.           Expires May 29, 2015                 [Page 12]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

   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 7.

7.  The IP-in-IP 6LoRH

   The IP-in-IP 6LoRH IPinIP-6LoRH 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.

   This field is not critical for routing so the Type can be ignored,
   and the Size / Format 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 11: The IPinIP-6LoRH

   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.

Thubert, et al.           Expires May 29, 2015                 [Page 13]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

8.  The Mesh Header 6LoRH

   The Mesh Header 6LoRH (MH-6LoRH) provides an alternate form for the
   Mesh Addressing Type and Header defined in [RFC4944].  The MH-6LoRH
   is introduced as replacement for use in potentially mixed Route_Over
   and Mesh-under environments.  LLN nodes that need to forward a packet
   with a MH-6LoRH are expected to support this specification.  If a
   router that supports only Route-over receives a packet with a MH-
   6LoRH, this means that there was a routing error and the packet
   should be dropped, so the Type cannot be ignored.

   The HopsLft field defined in [RFC4944] is encoded in the MH-6LoRH
   Size, so this specification doubles the potential number of hops vs.
   [RFC4944].

    0                   1
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-          ...                   -+
   |1|0|0|  Size   |6LoRHType 8..11| originator address, final address
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-          ...                   -+

            Size indicates the number of compressed addresses

                          Figure 12: The MH-6LoRH

   The V and F flags defined in [RFC4944] are encoded in the MH-6LoRH
   Type as follows:

     +-----------+-------+-------+
     |   Type    |   V   |   F   |
     +-----------+-------+-------+
     |     8     |   0   |   0   |
     |     9     |   0   |   1   |
     |    10     |   1   |   0   |
     |    11     |   1   |   1   |
     +-----------+-------+-------+

                       Figure 13: The MH-6LoRH Types

9.  The BIER 6LoRH

   (Note that the current contents of this section is a proof of concept
   only; the details for this encoding need to be developed in paralell
   with defining the semantics of a constrained version of BIER.)

   The Bit Index Explicit Replication (BIER) 6LoRH (BIER-6LoRH) provides
   a variable-size container for a BIER Bitmap that is used to route

Thubert, et al.           Expires May 29, 2015                 [Page 14]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

   towards one or more LLN node, as discussed in the BIER Architecture
   [I-D.wijnands-bier-architecture] specification.  The capability to
   parse the BIER Bitmap is necessary to forward the packet so the Type
   cannot be ignored.

       0                   1
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... -+-+-+-    ...      -+
      |1|0|0|  Size   |6LoRHType12..19| Control Fields |    bitmap     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... -+-+-+-    ...      -+

                         Figure 14: The BIER-6LoRH

   The Type for a BIER-6LoRH indicates the size of words used to build
   the bitmap and whether the bitmap is operated as an uncompressed bit-
   by-bit mapping, or as a Bloom filter.

   In the bit-by-bit case, each bit is mapped in an unequivocal fashion
   with a single addressable resource in the network.  This may rapidly
   lead to large bitmaps, and BIER allows to divide a network into
   groups that partition the network so that a given bitmap is locally
   significant to one group only.  This specification allows to encode a
   1-byte Group ID in the BIER-6LoRH Control Fields.

   A Bloom Filter can be seen as a compression technique for the bitmap.
   A Bloom Filter may generate false positives, which, in the case of
   BIER, result in undue forwarding of a packet down a path where no
   listener exists.

   As an example, the Constrained-Cast [I-D.bergmann-bier-ccast]
   specification employs Bloom Filters as a compact representation of a
   match or non-match for elements in a large set.

   In the case of a Bloom Filter, a number of Hash functions must be run
   to obtain a multi-bit signature of an encoded element.  This
   specification allows to signal an Identifier of the Hash functions
   being used to generate a certain bitmap, so as to enable a migration
   scenario where Hash functions are renewed.  A Hash ID is signaled as
   a 1-byte value, and, depending on the Type, there may be up to 2 or
   up to 8 Hash IDs passed in the BIER-6LoRH Control Fields associated
   with a Bloom Filter bitmap, as follows:

Thubert, et al.           Expires May 29, 2015                 [Page 15]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

     +-----------+--------------+------------------+-----------+
     |   Type    |   encoding   |  Control Fields  | Word Size |
     +-----------+--------------+------------------+-----------+
     |    12     | bit-by-bit   |      none        |  32 bits  |
     |    13     | Bloom filter | 2* 1-byte HashID |  32 bits  |
     |    14     | bit-by-bit   |      none        |  128 bits |
     |    15     | Bloom filter | 8* 1-byte HashID |  128 bits |
     |    16     | bit-by-bit   |  1-byte GroupID  |  128 bits |
     +-----------+--------------+------------------+-----------+

                      Figure 15: The BIER-6LoRH Types

   In order to address a potentially large number of devices, the bitmap
   may grow very large.  Yet, the maximum frame size for a given MAC
   layer may limit the number of bits that can be dedicated to routing.
   The Size indicates the number of words in the bitmap minus one, so a
   size of 0 means one word, a Size of 1 means 64 2 words, up to a size
   of 31 which means 32 words.

10.  Security Considerations

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

   Using a compressed format as opposed to the full inline RPL option is
   logically equivalent and does not create an opening for a new threat
   when compared to [RFC6553].

11.  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]

      8..11 : MH-6LoRH [RFCthis]

      12..16 : BIER-6LoRH [RFCthis]

Thubert, et al.           Expires May 29, 2015                 [Page 16]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

12.  Acknowledgements

   The author wishes to thank Thomas Watteyne, Samita Chakrabarti,
   Martin Turon and Robert Cragie for their constructive contributions.
   The discussion in the 6man and roll working groups also was helpful.

13.  References

13.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.

   [ISA100.11a]
              ISA/ANSI, "Wireless Systems for Industrial Automation:
              Process Control and Related Applications - ISA100.11a-2011
              - IEC 62734", 2011, <http://www.isa.org/Community/
              SP100WirelessSystemsforAutomation>.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC2460]  Deering, S. and R. Hinden, "Internet Protocol, Version 6
              (IPv6) Specification", RFC 2460, December 1998.

   [RFC6282]  Hui, J. and P. Thubert, "Compression Format for IPv6
              Datagrams over IEEE 802.15.4-Based Networks", RFC 6282,
              September 2011.

   [RFC6550]  Winter, T., Thubert, P., 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, March 2012.

   [RFC6552]  Thubert, P., "Objective Function Zero for the Routing
              Protocol for Low-Power and Lossy Networks (RPL)", RFC
              6552, March 2012.

   [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, March
              2012.

Thubert, et al.           Expires May 29, 2015                 [Page 17]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

   [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, March
              2012.

   [RFC6775]  Shelby, Z., Chakrabarti, S., Nordmark, E., and C. Bormann,
              "Neighbor Discovery Optimization for IPv6 over Low-Power
              Wireless Personal Area Networks (6LoWPANs)", RFC 6775,
              November 2012.

   [RFC7102]  Vasseur, JP., "Terms Used in Routing for Low-Power and
              Lossy Networks", RFC 7102, January 2014.

   [RFC7228]  Bormann, C., Ersue, M., and A. Keranen, "Terminology for
              Constrained-Node Networks", RFC 7228, May 2014.

13.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.

   [I-D.bormann-6lo-rpl-mesh]
              Bormann, C., "NHC compression for RPL Packet Information",
              draft-bormann-6lo-rpl-mesh-02 (work in progress), October
              2014.

   [I-D.ietf-6tisch-architecture]
              Thubert, P., Watteyne, T., and R. Assimiti, "An
              Architecture for IPv6 over the TSCH mode of IEEE
              802.15.4e", draft-ietf-6tisch-architecture-04 (work in
              progress), October 2014.

   [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-03 (work in
              progress), October 2014.

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

Thubert, et al.           Expires May 29, 2015                 [Page 18]
Internet-Draft    A Routing Header Dispatch for 6LoWPAN    November 2014

   [I-D.thubert-6lo-rpl-nhc]
              Thubert, P. and C. Bormann, "A compression mechanism for
              the RPL option", draft-thubert-6lo-rpl-nhc-02 (work in
              progress), October 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-01 (work in
              progress), October 2014.

   [RFC4944]  Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler,
              "Transmission of IPv6 Packets over IEEE 802.15.4
              Networks", RFC 4944, September 2007.

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

   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

Thubert, et al.           Expires May 29, 2015                 [Page 19]