<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
    which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
    There has to be one entity for each item to be referenced. 
    An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC4291 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4291.xml">
<!ENTITY RFC4861 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4861.xml">
<!ENTITY RFC4903 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4903.xml">
<!ENTITY RFC6282 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6282.xml">
<!ENTITY RFC4193 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4193.xml">
<!ENTITY RFC6775 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6775.xml">
<!ENTITY RFC7416 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7416.xml">
<!ENTITY RFC7668 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7668.xml">
<!ENTITY I-D.ietf-6man-default-iids SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-6man-default-iids.xml">



]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
    please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
    (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="no" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
    (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-ietf-6lo-blemesh-01" ipr="trust200902">
 <!-- category values: std, bcp, info, exp, and historic
    ipr values: trust200902, noModificationTrust200902, noDerivativesTrust200902,
       or pre5378Trust200902
    you can add the attributes updates="NNNN" and obsoletes="NNNN" 
    they will automatically be output with "(if approved)" -->

 <!-- ***** FRONT MATTER ***** -->

 <front>
   <!-- The abbreviated title is used in the page header - it is only necessary if the 
        full title is longer than 39 characters -->

  <title abbrev="IPv6 mesh over Bluetooth LE">IPv6 Mesh over BLUETOOTH(R) Low Energy using IPSP</title>

  <author initials='C.G.' surname="Gomez" fullname='Carles Gomez'>
    <organization abbrev="UPC/i2cat">Universitat Politecnica de Catalunya/Fundacio i2cat</organization>
    <address>
      <postal>
	<street>C/Esteve Terradas, 7</street>
        <code>08860</code>
	<city>Castelldefels</city>
	<country>Spain</country>
      </postal>
      <email>carlesgo@entel.upc.edu</email>
    </address>
  </author>

  <author initials='S.M.D.' surname="Darroudi" fullname='Seyed Mahdi Darroudi'>
    <organization abbrev="UPC/i2cat">Universitat Politecnica de Catalunya/Fundacio i2cat</organization>
    <address>
      <postal>
	<street>C/Esteve Terradas, 7</street>
        <code>08860</code>
	<city>Castelldefels</city>
	<country>Spain</country>
      </postal>
      <email>sm.darroudi@entel.upc.edu</email>
    </address>
  </author>

  <author initials='T.S' surname="Savolainen" fullname='Teemu Savolainen'>
   <organization abbrev="Nokia">Nokia Technologies</organization>
   <address>
     <postal>
       <street>Hatanpaan valtatie 30</street>
       <city>Tampere</city>
       <code>33100</code>
       <country>Finland</country>
     </postal>
     <email>teemu.savolainen@nokia.com</email>
   </address>
  </author>


   <date year="2017" />

   <area>Internet</area>

   <workgroup>6Lo Working Group</workgroup>

   <keyword>Bluetooth Low Energy</keyword>
   <keyword>mesh networks</keyword>
   <keyword>6lowpan</keyword>
   <keyword>IPv6</keyword>
   <keyword>Low power</keyword>

   <abstract>
      <t>
         RFC 7668 describes the adaptation of 6LoWPAN techniques to enable IPv6 over Bluetooth low energy networks that follow the star topology. However, recent Bluetooth specifications allow the formation of extended topologies as well. This document specifies the mechanisms needed to enable IPv6 over mesh networks composed of Bluetooth low energy links established by using the Bluetooth Internet Protocol Support Profile.
     </t>
   </abstract>
 </front>



<middle>
  <section title="Introduction">
     <t>
        Bluetooth low energy (hereinafter, Bluetooth LE) was first introduced
   in the Bluetooth 4.0 specification.  Bluetooth LE (which has been
   marketed as Bluetooth Smart) is a low-power wireless technology
   designed for short-range control and monitoring applications.
   Bluetooth LE is currently implemented in a wide range of consumer
   electronics devices, such as smartphones and wearable devices.  Given
   the high potential of this technology for the Internet of Things, the
   Bluetooth Special Interest Group (Bluetooth SIG) and the IETF have
   produced specifications in order to enable IPv6 over Bluetooth LE,
   such as the Internet Protocol Support Profile (IPSP) [IPSP], and RFC
   7668, respectively.  Bluetooth 4.0 only supports Bluetooth LE
   networks that follow the star topology.  In consequence, RFC 7668 was
   specifically developed and optimized for that type of network
   topology.  However, subsequent Bluetooth specifications allow the
   formation of extended topologies [BTCorev4.1], such as the mesh
   topology.  The functionality described in RFC 7668 is not sufficient
   and would fail to enable IPv6 over mesh networks composed of Bluetooth LE links.  This
   document specifies the mechanisms needed to enable IPv6 over mesh networks composed of Bluetooth LE links.  This specification also allows to run
   IPv6 over Bluetooth LE star topology networks, albeit without all the
   topology-specific optimizations contained in RFC 7668.
 
     </t>

     <section title="Terminology and Requirements Language">    
        <t>
           The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
           "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   	   document are to be interpreted as described 
	   in <xref target="RFC2119">RFC 2119</xref>.
        </t>

        <t>
	   The terms 6LoWPAN Node (6LN), 6LoWPAN Router (6LR) and 6LoWPAN Border Router (6LBR) are defined as in [RFC6775], with an addition that Bluetooth LE central and Bluetooth LE peripheral (see Section 2) can both be adopted by a 6LN, a 6LR or a 6LBR.
        </t>
     </section>
</section>     
<section title="Bluetooth LE Networks and the IPSP">
     <t>
        Bluetooth LE defines two Generic Access Profile (GAP) roles of relevance herein: the Bluetooth LE central role and the Bluetooth LE peripheral role. A device in the central role, which is called central from now on, has traditionally been able to manage multiple simultaneous connections with a number of devices in the peripheral role, called peripherals hereinafter. Bluetooth 4.1 introduced the possibility for a peripheral to be connected to more than one central simultaneously, therefore allowing extended topologies beyond the star topology for a Bluetooth LE network. In addition, a device may simultaneously be a central in a set of link layer connections, as well as a peripheral in others. On the other hand, the IPSP enables discovery of IP-enabled devices and the establishment of a link layer connection for transporting IPv6 packets. The IPSP defines the Node and Router roles for devices that consume/originate IPv6 packets and for devices that can route IPv6 packets, respectively. Consistently with Bluetooth 4.1, a device may implement both roles simultaneously.
     </t>

     <t>
        This document assumes a mesh network composed of Bluetooth LE links, where link layer
   connections have been established between neighboring IPv6-enabled
   devices.  The IPv6 forwarding devices of the mesh have to implement both Node and Router roles, while simpler leaf-only nodes can implement only the Node role. In an IPv6-enabled mesh of Bluetooth LE links, a node is a
   neighbor of another node, and vice versa, if a link layer connection
   has been established between both by using the IPSP functionality for
   discovery and link layer connection establishment for IPv6 packet
   transport.

     </t>
</section>   
     
<section title="Specification of IPv6 mesh over Bluetooth LE networks">
     <section title="Protocol stack">
        <t>
 	      <xref target="fig_BLEMeshStack"/> illustrates the protocol stack for IPv6 mesh over Bluetooth LE
   networks.  There are two main differences with the IPv6 over
   Bluetooth LE stack in RFC 7668: a) the adaptation layer below IPv6
   (labelled as "6Lo for IPv6 mesh of Bluetooth LE") is now adapted for
   mesh networks of Bluetooth LE links, and b) the protocol stack for IPv6 
   mesh networks of Bluetooth LE links includes IPv6 routing functionality.

        
     <figure title="Protocol stack for IPv6 mesh over Bluetooth LE."
                anchor="fig_BLEMeshStack">
        <artwork><![CDATA[    
        
                       +------------------------------------+
                       |             Application            |
          +---------+  +------------------------------------+
          |  IPSS   |  |            UDP/TCP/other           |
          +---------+  +------------------------------------+
          |  GATT   |  |             IPv6  |routing|        |
          +---------+  +------------------------------------+
          |  ATT    |  | 6Lo for IPv6 mesh over Bluetooh LE |
          +---------+--+------------------------------------+
          |                 Bluetooth LE L2CAP              |
     -  - +-------------------------------------------------+- - - HCI
          |               Bluetooth LE Link Layer           |
          +-------------------------------------------------+
          |                Bluetooth LE Physical            |
          +-------------------------------------------------+
        ]]></artwork></figure>
        </t> 

      </section>     

      <section title="Subnet model" anchor="llroles">
         <t>
            For IPv6 mesh over Bluetooth LE, a multilink model has been
   chosen, as further illustrated in Figure 2.  As IPv6 over Bluetooth
   LE is intended for constrained nodes, and for Internet of Things use
   cases and environments, the complexity of implementing a separate
   subnet on each peripheral-central link and routing between the
   subnets appears to be excessive.  In this specification, the benefits
   of treating the collection of point-to-point links between a central
   and its connected peripherals as a single multilink subnet rather
   than a multiplicity of separate subnets are considered to outweigh
   the multilink model's drawbacks as described in [RFC4903].

      
     <figure title="Example of an IPv6 mesh over a Bluetooth LE network connected to the Internet"
         anchor="fig_SubnetModel">
         <artwork><![CDATA[
                                                       /
    .--------------------------------.                /
   /     6LR           6LN        6LN \              /
  /         \             \          \ \            /
 |           \             \          \ |          /
 |  6LN ----- 6LR --------- 6LR ------ 6LBR ----- |  Internet
 |   <--Link--> <---Link--->/<--Link->/ |         |      
  \                        /         / /           \
   \           6LN ---- 6LR ----- 6LR /             \
    '--------------------------------'               \
                                                      \

  <------------ Subnet -----------------><---- IPv6 connection -->
                                               to the Internet

        ]]></artwork></figure>
        </t>


     <t>
        One or more 6LBRs are connected to the Internet. 6LNs are connected to the network through a 6LR or a 6LBR. A prefix is used on the whole subnet.
     </t>
     <t>
        IPv6 mesh networks over Bluetooth LE MUST follow a route-over
   approach.  This document does not specify the routing protocol to be
   used in an IPv6 mesh over Bluetooth LE.

     </t>

   </section>

   <section title="Link model" anchor="deviceaddressing">
     <section title="Stateless address autoconfiguration"> 
     <t>
        6LN, 6LR and 6LBR IPv6 addresses in an IPv6 mesh over Bluetooth LE are
   configured as per section 3.2.2 of RFC 7668.
 
     </t>
     <t>
        Multihop DAD functionality as defined in section 8.2 of RFC 6775, or some substitute mechanism (see section 3.3.2), MUST be supported. 
     </t>
     </section>

     <section title="Neighbor Discovery" anchor="btlemtu">
     <t>
        'Neighbor Discovery Optimization for IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs)' [RFC6775] describes the neighbor discovery approach as adapted for use in several 6LoWPAN topologies, including the mesh topology. The route-over functionality of RFC 6775 MUST be supported. 
     </t>
     <t>
        The following aspects of the Neighbor Discovery optimizations [RFC6775] are applicable to Bluetooth LE 6LNs: 
     </t>
     <t>
        1.  A Bluetooth LE 6LN MUST NOT register its link-local address.  A Bluetooth LE host MUST register its non-link-local addresses with its routers by sending a Neighbor Solicitation (NS) message with the Address Registration Option (ARO) and process the Neighbor Advertisement (NA) accordingly.  The NS with the ARO option MUST be sent irrespective of the method used to generate the IID. The ARO option requires use of an EUI-64 identifier [RFC6775].  In the case of Bluetooth LE, the field SHALL be filled with the 48-bit device address used by the Bluetooth LE node converted into 64-bit    Modified EUI-64 format [RFC4291]. 
     </t>
     <t>
     If the 6LN registers for a same compression context multiple addresses that are not based on Bluetooth device address, the header compression efficiency will decrease. 
     </t>
     <t>
     2.  For sending Router Solicitations and processing Router Advertisements the Bluetooth LE hosts MUST, respectively, follow Sections 5.3 and 5.4 of the [RFC6775]. 
     </t>
     <t>
     3.  The router behavior for 6LRs and 6LBRs is described in Section 6 of RFC 6775. However, as per this specification, routers SHALL NOT use multicast NSs to discover other routers' link layer addresses.

     </t>
     <t>
     4.  Border router behavior is described in Section 7 of RFC 6775.
     </t>
     <t>
     RFC 6775 defines substitutable mechanisms for distributing prefixes and context information (section 8.1 of RFC 6775), as well as for Duplicate Address Detection across a route-over 6LoWPAN (section 8.2 of RFC 6775). Implementations of this specification MUST support the features described in sections 8.1 and 8.2 of RFC 6775 unless some alternative ("substitute") from some other specification is supported. 
     </t>
     </section>
     <section title="Header compression" anchor="hc">
     <t>
        Header compression as defined in RFC 6282 [RFC6282], which specifies the compression format for IPv6 datagrams on top of IEEE 802.15.4, is REQUIRED as the basis for IPv6 header compression on top of Bluetooth LE. All headers MUST be compressed according to RFC 6282 [RFC6282] encoding formats. 
     </t>
     <t>
        To enable efficient header compression, when the 6LBR sends a Router    Advertisement it MUST include a 6LoWPAN Context Option (6CO) [RFC6775] matching each address prefix advertised via a Prefix Information Option (PIO) [RFC4861] for use in stateless address autoconfiguration. 
     </t>
     <t>
        The specific optimizations of RFC 7668 for header compression, which
   exploit the star topology and ARO, cannot be generalized in a mesh network composed of Bluetooth LE links.  Still, a subset of those
   optimizations can be applied in some cases in such a network.  In
   particular, the latter comprise link-local interactions, non-link-
   local packet transmissions originated and performed by a 6LN, and
   non-link-local packets transmitted (but not necessarily originated) by 
   the neighbor of a 6LN to that 6LN.  For the rest of packet 
   transmissions, context-based compression MAY be used.

 
     </t>
     <t>
        When a device transmits a packet to a neighbor, the sender MUST fully elide the source IID if the source IPv6 address is the link-local address based on the sender's Bluetooth device address (SAC=0, SAM=11). The sender also MUST fully elide the destination IPv6 address if it is the link-local-address based on the neighbor's Bluetooth device address (DAC=0, DAM=11). 
     </t>

     <t>
        When a 6LN transmits a packet, with a non-link-local source address that the 6LN has registered with ARO in the next-hop router for the indicated prefix, the source address MUST be fully elided if it is the latest address that the 6LN has registered for the indicated prefix (SAC=1, SAM=11).  If the source non-link-local address is not the latest registered by the 6LN, then the 64-bits of the IID SHALL be fully carried in-line (SAC=1, SAM=01) or if the first 48-bits of the IID match with the latest address registered by the 6LN, then the last 16-bits of the IID SHALL be carried in-line (SAC=1, SAM=10). 
     </t>
     <t>
        When a router transmits a packet to a neighboring 6LN, with a non-link-local destination address, the router MUST fully elide the destination IPv6 address if the destination address is the latest registered by the 6LN with ARO for the indicated context (DAC=1, DAM=11). If the destination address is a non-link-local address and not the latest registered, then the 6LN MUST either include the IID part fully in-line (DAM=01) or, if the first 48-bits of the IID match to the latest registered address, then elide those 48-bits (DAM=10).
     </t>
     </section>
     <section title="Unicast and multicast mapping">
     <t>
     The Bluetooth LE Link Layer does not support multicast.  Hence,
   traffic is always unicast between two Bluetooth LE neighboring nodes.  
   If a node needs to send a multicast packet to several neighbors, it has 
   to replicate the packet and unicast it on each link.  However, this may 
   not be energy efficient, and particular care must be taken if the node 
   is battery powered.  A router (i.e. a 6LR or a 6LBR) MUST keep track
   of neighboring multicast listeners, and it MUST NOT forward multicast 
   packets to neighbors that have not registered as listeners for 
   multicast groups the packets belong to.
     </t>
     </section>
   </section>
</section>

<section anchor="IANA" title="IANA Considerations">
   <t>
      There are no IANA considerations related to this document.
   </t>
</section>

<section anchor="Security" title="Security Considerations">
   <t>
      The security considerations in RFC 7668 apply.
  </t>
  
  <t>
     IPv6 mesh networks over Bluetooth LE require a routing protocol to
   find end-to-end paths.  Unfortunately, the routing protocol may
   generate additional opportunities for threats and attacks to the
   network.

  </t>

  <t>
     RFC 7416 [RFC 7416] provides a systematic overview of threats and
   attacks on the IPv6 Routing Protocol for Low-Power and Lossy Networks
   (RPL), as well as countermeasures. In that document, described threats and attacks comprise threats due to failures to authenticate, threats due to failure to keep routing information, threats and attacks on integrity, and threats and attacks on availability. Reported countermeasures comprise
confidentiality attack, integrity attack, and availability attack countermeasures.
  </t>
  <t>
     While this specification does not
   state the routing protocol to be used in IPv6 mesh over Bluetooth LE
   networks, the guidance of RFC 7416 is useful when RPL is used in
   such scenarios.  Furthermore, such guidance may partly apply for
   other routing protocols as well.
  </t>
</section>

<section anchor="Acknowledgements" title="Acknowledgements">
   <t>
      The Bluetooth, Bluetooth Smart and Bluetooth Smart Ready marks are registered trademarks owned by Bluetooth SIG, Inc.
   </t>

   <t>
      The authors of this document are grateful to all RFC 7668 authors, since this document borrows many concepts (albeit, with necessary extensions) from RFC 7668. 
   </t>

   <t>
      The authors also thank Alain Michaud, Mark Powell and Martin Turon for their comments, which helped improve the document.
   </t>

   <t>
      Carles Gomez has been supported in part by the Spanish Government Ministerio de Economia y Competitividad through project TEC2012-32531, and FEDER.
   </t> 
</section> 

   
</middle>

 <back>
   <!-- References split into informative and normative -->

   <!-- There are 2 ways to insert reference entries from the citation libraries:
    1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
    2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
       (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

    Both are cited textually in the same manner: by using xref elements.
    If you use the PI option, xml2rfc will, by default, try to find included files in the same
    directory as the including file. You can also define the XML_LIBRARY environment variable
    with a value containing a set of directories to search.  These can be either in the local
    filing system or remote ones accessed by http (http://domain/dir/... ).-->

   <references title="Normative References">
     <reference anchor="BTCorev4.1" target="https://www.bluetooth.org/en-us/specification/adopted-specifications">
        <front>
            <title>Bluetooth Core Specification Version 4.1</title>
            <author>
            <organization>Bluetooth Special Interest Group</organization>
            </author>
            <date year="2013" month="December" day="3"/>
        </front>
     </reference>

     <reference anchor="IPSP" target="https://www.bluetooth.org/en-us/specification/adopted-specifications">
        <front>
            <title>Bluetooth Internet Protocol Support Profile Specification Version 1.0.0</title>
            <author>
            <organization>Bluetooth Special Interest Group</organization>
            </author>
            <date year="2014" month="December" day="16"/>
        </front>
     </reference>
        
     <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
     &RFC2119;    
     &RFC4291;
     &RFC4861;
     &RFC6282;
     &RFC6775;
     &RFC7668;
   </references>

   <references title="Informative References">
   <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
     &RFC4903;
     &RFC7416;
     
   </references>

   <!-- Change Log
v00 2011-03-07  BPa  Initial version

     -->
 </back>
</rfc>