6LoWPAN Working Group J. Nieminen, Ed. Internet-Draft B. Patil Intended status: Standards Track T. Savolainen Expires: February 27, 2012 M. Isomaki Nokia Z. Shelby Sensinode C. Gomez Universitat Politecnica de Catalunya/i2CAT August 26, 2011 Transmission of IPv6 Packets over Bluetooth Low Energy draft-ietf-6lowpan-btle-02 Abstract Bluetooth Low Energy is a low power air interface technology defined by the Bluetooth Special Interest Group (BT SIG). The standard Bluetooth radio has been widely implemented and available in mobile phones, notebook computers, audio headsets and many other devices. The low power version of Bluetooth is a new specification and enables the use of this air interface with devices such as sensors, smart meters, appliances, etc. The low power variant of Bluetooth is commonly specified in revision 4.0 of the Bluetooth specifications and commonly refered to as Bluetooth 4.0. This document describes how IPv6 is transported over Bluetooth Low Energy using 6LoWPAN techniques. 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 February 27, 2012. Copyright Notice Nieminen, et al. Expires February 27, 2012 [Page 1] Internet-Draft IPv6 over BT-LE August 2011 Copyright (c) 2011 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 (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 . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 2. Bluetooth Low Energy . . . . . . . . . . . . . . . . . . . . . 4 2.1. Protocol stack . . . . . . . . . . . . . . . . . . . . . . 4 2.2. Link layer roles and topology . . . . . . . . . . . . . . 5 2.3. LE device addressing . . . . . . . . . . . . . . . . . . . 5 2.4. LE packets sizes and MTU . . . . . . . . . . . . . . . . . 5 3. Specification of IPv6 over Bluetooth Low Energy . . . . . . . 6 3.1. Protocol stack . . . . . . . . . . . . . . . . . . . . . . 6 3.2. Link model . . . . . . . . . . . . . . . . . . . . . . . . 7 3.2.1. IPv6 Address configuration . . . . . . . . . . . . . . 7 3.2.2. Header compression . . . . . . . . . . . . . . . . . . 8 3.2.3. Unicast and Multicast address mapping . . . . . . . . 9 3.3. Internet connectivity scenarios . . . . . . . . . . . . . 9 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 5. Security Considerations . . . . . . . . . . . . . . . . . . . 10 6. Additional contributors . . . . . . . . . . . . . . . . . . . 10 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 10 8. Normative References . . . . . . . . . . . . . . . . . . . . . 10 Appendix A. Bluetooth Low Energy basics . . . . . . . . . . . . . 11 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 11 Nieminen, et al. Expires February 27, 2012 [Page 2] Internet-Draft IPv6 over BT-LE August 2011 1. Introduction Bluetooth Low Energy (BT-LE) is a radio technology targeted for devices that operate with coin cell batteries or minimalistic power sources, which means that low power consumption is essential. BT-LE is an especially attractive technology for the Internet of Things applications, such as health monitors, environmental sensing, proximity applications and many others. Considering the expected explosion in the number of sensors and Internet connected devices and things, IPv6 is an ideal protocol due to the large address space it provides. In addition, IPv6 provides tools for autoconfiguration,which is particularly suitable for sensor network applications and nodes which have very limited processing power or a full-fledged operating system. [RFC4944] specifies the transmission of IPv6 over IEEE 802.15.4. The Bluetooth Low Energy link in many respects has similar characteristics to that of IEEE 802.15.4. Many of the mechanisms defined in [RFC4944] can be applied to the transmission of IPv6 on Bluetooth Low Energy links. This document specifies the details of IPv6 transmission over Bluetooth Low Energy links. 1.1. Requirements Language 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 RFC 2119 [RFC2119]. 1.2. Terminology Bluetooth Low Energy Bluetooth Low Energy is a low power air interface technology specified by the Bluetooth Special Interest Group (SIG). BT-LE is specified in Revision 4.0 of the Bluetooth specifications (BT 4.0). Gateway Network element connecting the BT-LE sensors to the Internet. Can be e.g a home gateway or a mobile device. 6LR and 6LBR These terms correspond to those defined in [I-D.ietf-6lowpan-nd] Nieminen, et al. Expires February 27, 2012 [Page 3] Internet-Draft IPv6 over BT-LE August 2011 2. Bluetooth Low Energy BT-LE is designed for transferring small amounts of data (in most cases less than 10 bytes) infrequently (e.g. every 500 ms) at modest data rates (e.g. 300 kbps) at a very low cost per bit. BT-LE is an integral part of the BT 4.0 specification. Devices such as mobile phones, notebooks, tablets and other handheld computing devices which will include BT 4.0 chipsets in the near future will have the low-energy functionality of Bluetooth. BT-LE will also be included in many different types of accessories that collaborate with mobile devices such as phones, tablets and notebook computers. An example of a use case for a BT-LE accessory is a heart rate monitor that sends data via the mobile phone to a server on the Internet. 2.1. Protocol stack The lower layer of the BT-LE stack consists of the Physical (PHY) and the Link Layer (LL). The Physical Layer transmits and receives the actual packets. The Link Layer is responsible for providing medium access, connection establishment, error control and flow control. The upper layer consists of the Logical Link Control and Adaptation Protocol (L2CAP), Generic Attribute protocol (GATT) and Generic Access Profile (GAP) as shown in Figure 1. GATT and BT-LE profiles together enable the creation of applications in a standardized way without using IP. L2CAP provides multiplexing capability by multiplexing the data channels from the above layers. L2CAP also provides fragmentation and reassembly for large data packets. +----------------------------------------+ | Applications | +----------------------------------------+ | Generic Access Profile | +----------------------------------------+ | Generic Attribute Profile | +----------------------------------------+ | Attribute Protocol |Security Manager | +--------------------+-------------------+ | Logical Link Control and Adaptation | +--------------------+-------------------+ | Host Controller Interface | +--------------------+-------------------+ | Link Layer | Direct Test Mode | +--------------------+-------------------+ | Physical Layer | +--------------------+-------------------+ Nieminen, et al. Expires February 27, 2012 [Page 4] Internet-Draft IPv6 over BT-LE August 2011 Figure 1: BT-LE Protocol Stack 2.2. Link layer roles and topology BT-LE defines two Link Layer roles: the Master Role and the Slave Role. A device in the Master Role, which is called master, can manage multiple simultaneous connections with a number of devices in the Slave Role, called slaves. A slave can only be connected to a single master. Hence, a BT-LE network (i.e. a BT-LE piconet) follows a star topology. [BTLE-Slave]-----\ /-----[BTLE-Slave] \ / [BTLE-Slave]-----/[BTLE-Master]/-----[BTLE-Slave] / \ [BTLE-Slave]-----/ \-----[BTLE-Slave] Figure 2: BT-LE Star Topology A master is assumed to be less constrained than a slave. Hence, master and slave can correspond with 6LoWPAN Border Router (6LBR) and host, respectively. In BT-LE, communication only takes place between a master and a slave. Hence, in a BT-LE network using IP, a radio hop is equivalent to an IP link and vice versa. 2.3. LE device addressing Every LE device is identified by a unique 48 bit Bluetooth Device Address (BD_ADDR). An LE-only device such as a sensor may use a public (obtained from IEEE Registration Authority) or a random device address (generated internally). When LE devices are in a connection they are addressed by an Access Address, a 32 bit address generated at the time of the connection set up. The access address identifies a connection between a slave and a master. 2.4. LE packets sizes and MTU Maximum size of the payload in an LE packet at the baseband is 31 bytes which means that at the L2CAP layer this equals to 23 octets MTU. For power efficient communication between a sensor and a client the sensor data and its header should fit in 23 octet payload. MTU longer than 23 octets can be supported by the LE specification. Nieminen, et al. Expires February 27, 2012 [Page 5] Internet-Draft IPv6 over BT-LE August 2011 3. Specification of IPv6 over Bluetooth Low Energy BT-LE technology sets strict requirements for low power consumption and thus limits the allowed protocol overhead. 6LoWPAN standard [RFC4944], [I-D.ietf-6lowpan-nd] and [I-D.ietf-6lowpan-hc] provides useful generic functionality like header compression, link-local IPv6 addresses, Neighbor Discovery and stateless IP-address autoconfiguration for reducing the overhead in 802.15.4 networks. This functionality can be partly applied to BT-LE. A significant difference between IEEE 802.15.4 and BT-LE is that the former supports the mesh topology (and requires a routing protocol), whereas BT-LE does not currently support the formation of multihop networks. In consequence, the mesh header defined in [RFC4944] for mesh under routing MUST NOT be used in BT-LE networks. On the other hand, a BT-LE device MUST NOT play the role of a 6LoWPAN Router (6LR). When BT-LE is applied in sensors, generated data may fit into one Link Layer packet (23 bytes, maximum L2CAP payload size) that is transferred to the collector device periodically. However, IP data packets may be much larger and hence MTU size should be the size of the IP data packet. Segmentation and reassembly (SAR) functionality is an inherent function of the BT-LE link layer. Larger L2CAP packets can be transferred with the assistance of the SAR functionality provided by the link layer. This specification requires that SAR functionality MUST be provided in the link layer up to the IPv6 minimum MTU of 1280 bytes. Since SAR functionality in BT-LE is a function of the link layer, fragmentation functionality as defined in [RFC4944] SHOULD NOT be used in BT-LE neworks. 3.1. Protocol stack In order to enable transmission of IPv6 packets over BT-LE, a new fixed L2CAP channel ID MUST be reserved for IPv6 traffic by the BT- SIG. A request for allocation of a new fixed channel ID for IPv6 traffic by the BT-SIG should be submitted through the liaison process or formal communique from the 6lowpan chairs and respective area directors. This specification defines the use of channel ID 0x07 for this purpose. Figure 3 illustrates IPv6 over BT-LE stack. Nieminen, et al. Expires February 27, 2012 [Page 6] Internet-Draft IPv6 over BT-LE August 2011 +-------------------+ | UDP/TCP | +-------------------+ | IPv6 over BT-LE | +-------------------+ | BT-LE L2CAP | +-------------------+ | BT-LE Link Layer | +-------------------+ | BT-LE Physical | +-------------------+ Figure 3: IPv6 over BT-LE Stack 3.2. Link model The concept of IP link (layer 3) and the physical link (combination of PHY and MAC) needs to be clear and the relation well understood in order to specify the addressing scheme for transmitting IPv6 packets over the BT-LE link. [RFC4861] defines a link as "a communication facility or medium over which nodes can communicate at the link layer, i.e., the layer immediately below IP." In the case of BT-LE, L2CAP is an adaptation layer that supports the transmission of IPv6 packets. L2CAP also provides multiplexing capability in addition to SAR functionality. The BT-LE link between two communicating nodes can be considered to be a point-to-point or point-to-multipoint link. When one of the communicating nodes is in the role of a master, then the link can be viewed as a point-to-multipoint link. When a host connects to another BT-LE device the link is up and IP address configuration and transmission can occur. 3.2.1. IPv6 Address configuration The Interface Identifier (IID) for a BT-LE interface MUST be formed from the 48-bit public device Bluetooth address as per the "IPv6 over Ethernet" specification [RFC2464]. An IPv6 prefix used for stateless autoconfiguration [RFC4862] of a BT-LE interface MUST have a length of 64 bits. The IPv6 link-local address [RFC4291] for a BT-LE interface is formed by appending the IID, as defined above, to the prefix FE80::/64, as depicted in Figure 4. Nieminen, et al. Expires February 27, 2012 [Page 7] Internet-Draft IPv6 over BT-LE August 2011 10 bits 54 bits 64 bits +----------+-----------------+----------------------+ |1111111010| zeros | Interface Identifier | +----------+-----------------+----------------------+ Figure 4: IPv6 link-local address in BT-LE 3.2.2. Header compression This document assumes [I-D.ietf-6lowpan-hc], which specifies the compression format for IPv6 datagrams on top of IEEE 802.15.4, as the basis for IPv6 header compression on top of BT-LE. However, whereas IEEE 802.15.4 frames contain source and destination MAC layer addresses, BT-LE data channel PDUs contain the Access Address, which identifies the connection between a master and a slave. The following text describes the principles of IPv6 address compression on top of BT-LE. In a link-local communication, both the IPv6 source and destination addresses can be elided. In fact, the node that receives a data channel PDU through a Link Layer connection MAY infer that the IPv6 destination address of the packet is its own IPv6 address. If a node knows the IID of the other endpoint of the Link Layer connection, the IPv6 source address MAY also be elided. A device MAY learn the IID of the other endpoint of a Link Layer connection e.g. from the RS/RA/ NS/NA Neighbor Discovery (ND) message exchange. The device MAY maintain a Neighbor Cache, in which the entries include both the IID of the neighbor and the Access Address that identifies the Link Layer connection with the neighbor. A device MAY also derive the IID of the other endpoint of a Link Layer connection from the Link Layer connection establishment messages. The device MAY maintain a Neighbor Cache, in which the entries include both the IID of the neighbor and the Access Address that identifies the Link Layer connection with the neighbor. When a BT-LE slave transmits an IPv6 packet to a remote destination using global IPv6 addresses, the slave MAY elide the IPv6 source address. This is possible since 1) the master/6LBR has previously assigned the prefix to the slaves; and 2) the master/6LBR maintains a Neighbor Cache that relates the Access Address of each Link Layer connection and the IID of the corresponding slave. The slave MAY also elide the prefix of the destination IPv6 address if a context is defined for the IPv6 destination address. When a master/6LBR receives an IPv6 packet sent by a remote node outside the BT-LE network, and the destination of the packet is a Nieminen, et al. Expires February 27, 2012 [Page 8] Internet-Draft IPv6 over BT-LE August 2011 slave, the master/6LBR MAY elide the IID of the IPv6 destination address by exploiting the information contained in the table mentioned above. The prefixes of the IPv6 destination and source addresses MAY also be elided if a context is defined for them. 3.2.3. Unicast and Multicast address mapping In BT-LE, address resolution should be used for finding the Access Address of the Link Layer connection with the target node. The BT-LE link layer does not support multicast. Hence traffic is always unicast between two BT-LE devices. Even in the case where a master is attached to multiple slave BT-LE devices, the master device cannot do a multicast to all the connected slave devices. If the master device needs to send a multicast packet to all its slave devices, 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 master is battery-powered. In the opposite direction, a slave can only transmit data to a single destination (i.e. the master). Hence, if a slave transmits an IPv6 multicast packet, the slave can unicast the corresponding BT-LE packet to the master. There should be a table for mapping different types of multicast addresses to the access address in the master. 3.3. Internet connectivity scenarios In a typical scenario, BT-LE network is connected to the Internet. h ____________ \ / \ h ---- 6LBR --- | Internet | / \____________/ h h: host <-- BT-LE --> 6LBR: 6LoWPAN Border Router Figure 5: BT-LE network connected to the Internet In some scenarios, the BT-LE network may transiently or permanently be an isolated network. h h h: host \ / 6LBR: 6LoWPAN Border Router h --- 6LBR -- h / \ h h Nieminen, et al. Expires February 27, 2012 [Page 9] Internet-Draft IPv6 over BT-LE August 2011 Figure 6: Isolated BT-LE network 4. IANA Considerations While there are no actions for IANA, we do expect BT SIG to allocate an L2CAP channel ID. 5. Security Considerations The transmission of IPv6 over BT-LE links has similar requirements and concerns for security as for IEEE 802.15.4. IPv6 over BT-LE SHOULD be protected by using BT-LE Link Layer security. BT-LE Link Layer supports encryption and authentication by using the Counter with CBC-MAC (CCM) mechanism [RFC3610] and a 128-bit AES block cipher. Upper layer security mechanisms may exploit this functionality when it is available. (Note: CCM does not consume bytes from the maximum per-packet L2CAP data size, since the link layer data unit has a specific field for them when they are used.) Key management in BT-LE is provided by the Security Manager Protocol (SMP). 6. Additional contributors Kanji Kerai, Jari Mutikainen, David Canfeng-Chen and Minjun Xi from Nokia have contributed significantly to this document. 7. Acknowledgements Erik Nordmark has provided valuable feedback for this draft. 8. Normative References [I-D.ietf-6lowpan-hc] Hui, J. and P. Thubert, "Compression Format for IPv6 Datagrams in Low Power and Lossy Networks (6LoWPAN)", draft-ietf-6lowpan-hc-15 (work in progress), February 2011. [I-D.ietf-6lowpan-nd] Shelby, Z., Chakrabarti, S., and E. Nordmark, "Neighbor Discovery Optimization for Low Power and Lossy Networks Nieminen, et al. Expires February 27, 2012 [Page 10] Internet-Draft IPv6 over BT-LE August 2011 (6LoWPAN)", draft-ietf-6lowpan-nd-17 (work in progress), June 2011. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2464] Crawford, M., "Transmission of IPv6 Packets over Ethernet Networks", RFC 2464, December 1998. [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 4291, February 2006. [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless Address Autoconfiguration", RFC 4862, September 2007. [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, "Transmission of IPv6 Packets over IEEE 802.15.4 Networks", RFC 4944, September 2007. [RFC4994] Zeng, S., Volz, B., Kinnear, K., and J. Brzozowski, "DHCPv6 Relay Agent Echo Request Option", RFC 4994, September 2007. Appendix A. Bluetooth Low Energy basics This section will provide background material on the basics of bluetooth low energy. Authors' Addresses Johanna Nieminen (editor) Nokia Itaemerenkatu 11-13 FI-00180 Helsinki Finland Email: johanna.1.nieminen@nokia.com Nieminen, et al. Expires February 27, 2012 [Page 11] Internet-Draft IPv6 over BT-LE August 2011 Basavaraj Patil Nokia 6021 Connection drive Irving, TX 75039 USA Email: basavaraj.patil@nokia.com Teemu Savolainen Nokia Hermiankatu 12 D FI-33720 Tampere Finland Email: teemu.savolainen@nokia.com Markus Isomaki Nokia Keilalahdentie 2-4 FI-02150 Espoo Finland Email: markus.isomaki@nokia.com Zach Shelby Sensinode Hallituskatu 13-17D FI-90100 Oulu Finland Email: zach.shelby@sensinode.com Carles Gomez Universitat Politecnica de Catalunya/i2CAT C/Esteve Terradas, 7 Castelldefels 08860 Spain Email: carlesgo@entel.upc.edu Nieminen, et al. Expires February 27, 2012 [Page 12]