idnits 2.17.1 draft-ietf-6lo-routing-dispatch-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == It seems as if not all pages are separated by form feeds - found 30 form feeds but 34 pages Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (January 23, 2016) is 3010 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'RFCthis' is mentioned on line 1039, but not defined == Outdated reference: A later version (-05) exists of draft-ietf-6lo-paging-dispatch-01 -- Possible downref: Non-RFC (?) normative reference: ref. 'IEEE802154' ** Obsolete normative reference: RFC 2460 (Obsoleted by RFC 8200) ** Downref: Normative reference to an Informational RFC: RFC 7102 ** Downref: Normative reference to an Informational RFC: RFC 7228 == Outdated reference: A later version (-30) exists of draft-ietf-6tisch-architecture-09 == Outdated reference: A later version (-08) exists of draft-thubert-6lo-forwarding-fragments-02 Summary: 3 errors (**), 0 flaws (~~), 6 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 6lo P. Thubert, Ed. 3 Internet-Draft Cisco 4 Intended status: Standards Track C. Bormann 5 Expires: July 26, 2016 Uni Bremen TZI 6 L. Toutain 7 IMT-TELECOM Bretagne 8 R. Cragie 9 ARM 10 January 23, 2016 12 6LoWPAN Routing Header 13 draft-ietf-6lo-routing-dispatch-04 15 Abstract 17 This specification introduces a new 6LoWPAN dispatch type for use in 18 6LoWPAN Route-Over topologies, that initially covers the needs of RPL 19 (RFC6550) data packets compression. Using this dispatch type, this 20 specification defines a method to compress RPL Option (RFC6553) 21 information and Routing Header type 3 (RFC6554), an efficient IP-in- 22 IP technique and is extensible for more applications. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on July 26, 2016. 41 Copyright Notice 43 Copyright (c) 2016 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 59 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 6 60 3. Using the Page Dispatch . . . . . . . . . . . . . . . . . . . 6 61 3.1. New Routing Header Dispatch (6LoRH) . . . . . . . . . . . 6 62 3.2. Placement Of 6LoRH headers . . . . . . . . . . . . . . . 6 63 3.2.1. Relative To Non-6LoRH Headers . . . . . . . . . . . . 7 64 3.2.2. Relative To Other 6LoRH Headers . . . . . . . . . . . 7 65 4. 6LoWPAN Routing Header General Format . . . . . . . . . . . . 8 66 4.1. Elective Format . . . . . . . . . . . . . . . . . . . . . 8 67 4.2. Critical Format . . . . . . . . . . . . . . . . . . . . . 9 68 4.3. Compressing Addresses . . . . . . . . . . . . . . . . . . 9 69 4.3.1. Coalescence . . . . . . . . . . . . . . . . . . . . . 10 70 4.3.2. DODAG Root Address Determination . . . . . . . . . . 10 71 5. The Routing Header Type 3 (RH3) 6LoRH Header . . . . . . . . 11 72 5.1. RH3-6LoRH General Operation . . . . . . . . . . . . . . . 13 73 5.2. The Design Point of Popping Entries . . . . . . . . . . . 13 74 5.3. Compression Reference . . . . . . . . . . . . . . . . . . 14 75 5.4. Popping Headers . . . . . . . . . . . . . . . . . . . . . 15 76 5.5. Forwarding . . . . . . . . . . . . . . . . . . . . . . . 16 77 6. The RPL Packet Information 6LoRH . . . . . . . . . . . . . . 16 78 6.1. Compressing the RPLInstanceID . . . . . . . . . . . . . . 18 79 6.2. Compressing the SenderRank . . . . . . . . . . . . . . . 18 80 6.3. The Overall RPI-6LoRH encoding . . . . . . . . . . . . . 19 81 7. The IP-in-IP 6LoRH Header . . . . . . . . . . . . . . . . . . 21 82 8. Security Considerations . . . . . . . . . . . . . . . . . . . 22 83 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 84 9.1. Reserving Space in 6LoWPAN Dispatch Page 1 . . . . . . . 22 85 9.2. New 6LoWPAN Routing Header Type Registry . . . . . . . . 23 86 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 23 87 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 23 88 11.1. Normative References . . . . . . . . . . . . . . . . . . 23 89 11.2. Informative References . . . . . . . . . . . . . . . . . 24 90 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 25 91 A.1. Examples Compressing The RPI . . . . . . . . . . . . . . 25 92 A.2. Example Of Downward Packet In Non-Storing Mode . . . . . 27 93 A.3. Example of RH3-6LoRH life-cycle . . . . . . . . . . . . . 28 94 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 30 96 1. Introduction 98 The design of Low Power and Lossy Networks (LLNs) is generally 99 focused on saving energy, a very constrained resource in most cases. 100 The other constraints, such as the memory capacity and the duty 101 cycling of the LLN devices, derive from that primary concern. Energy 102 is often available from primary batteries that are expected to last 103 for years, or is scavenged from the environment in very limited 104 quantities. Any protocol that is intended for use in LLNs must be 105 designed with the primary concern of saving energy as a strict 106 requirement. 108 Controlling the amount of data transmission is one possible venue to 109 save energy. In a number of LLN standards, the frame size is limited 110 to much smaller values than the IPv6 maximum transmission unit (MTU) 111 of 1280 bytes. In particular, an LLN that relies on the classical 112 Physical Layer (PHY) of IEEE 802.15.4 [IEEE802154] is limited to 127 113 bytes per frame. The need to compress IPv6 packets over IEEE 114 802.15.4 led to the 6LoWPAN Header Compression [RFC6282] work 115 (6LoWPAN-HC). 117 Innovative Route-over techniques have been and are still being 118 developed for routing inside a LLN. In a general fashion, such 119 techniques require additional information in the packet to provide 120 loop prevention and to indicate information such as flow 121 identification, source routing information, etc. 123 For reasons such as security and the capability to send ICMP errors 124 back to the source, an original packet must not be tampered with, and 125 any information that must be inserted in or removed from an IPv6 126 packet must be placed in an extra IP-in-IP encapsulation. This is 127 the case when the additional routing information is inserted by a 128 router on the path of a packet, for instance a mesh root, as opposed 129 to the source node. This is also the case when some routing 130 information must be removed from a packet that flows outside the LLN. 131 When to use RFC 6553, 6554 and IPv6-in-IPv6 132 [I-D.robles-roll-useofrplinfo] details different cases where RFC 133 6553, RFC 6554 and IPv6-in-IPv6 encapsulation is required to set the 134 bases to help defining the compression of RPL routing information in 135 LLN environments. 137 When using [RFC6282] the outer IP header of an IP-in-IP encapsulation 138 may be compressed down to 2 octets in stateless compression and down 139 to 3 octets in stateful compression when context information must be 140 added. 142 0 1 143 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 144 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 145 | 0 | 1 | 1 | TF |NH | HLIM |CID|SAC| SAM | M |DAC| DAM | 146 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 148 Figure 1: LOWPAN_IPHC base Encoding (RFC6282). 150 The Stateless Compression of an IPv6 addresses can only happen if the 151 IPv6 address can de deduced from the MAC addresses, meaning that the 152 IP end point is also the MAC-layer endpoint. This is generally not 153 the case in a RPL network which is generally a multi-hop route-over 154 (i.e., operated at Layer-3) network. A better compression, which 155 does not involve variable compressions depending on the hop in the 156 mesh, can be achieved based on the fact that the outer encapsulation 157 is usually between the source (or destination) of the inner packet 158 and the root. Also, the inner IP header can only be compressed by 159 [RFC6282] if all the fields preceding it are also compressed. This 160 specification makes the inner IP header the first header to be 161 compressed by [RFC6282], and keeps the inner packet encoded the same 162 way whether it is encapsulated or not, thus preserving existing 163 implementations. 165 As an example, the Routing Protocol for Low Power and Lossy Networks 166 [RFC6550] (RPL) is designed to optimize the routing operations in 167 constrained LLNs. As part of this optimization, RPL requires the 168 addition of RPL Packet Information (RPI) in every packet, as defined 169 in Section 11.2 of [RFC6550]. 171 The RPL Option for Carrying RPL Information in Data-Plane Datagrams 172 [RFC6553] specification indicates how the RPI can be placed in a RPL 173 Option for use in an IPv6 Hop-by-Hop header. 175 This representation demands a total of 8 bytes, while in most cases 176 the actual RPI payload requires only 19 bits. Since the Hop-by-Hop 177 header must not flow outside of the RPL domain, it must be inserted 178 in packets entering the domain and be removed from packets that leave 179 the domain. In both cases, this operation implies an IP-in-IP 180 encapsulation. 182 ------+--------- ^ 183 | Internet | 184 | | Native IPv6 185 +-----+ | 186 | | Border Router (RPL Root) ^ | ^ 187 | | | | | 188 +-----+ | | | IPv6 in 189 | | | | IPv6 190 o o o o | | | + RPI 191 o o o o o o o o o | | | or RH3 192 o o o o o o o o o o | | | 193 o o o o o o o o o | | | 194 o o o o o o o o v v v 195 o o o o 196 LLN 198 Figure 2: IP-in-IP Encapsulation within the LLN. 200 Additionally, in the case of the Non-Storing Mode of Operation (MOP), 201 RPL requires a Routing Header type 3 (RH3) as defined in the IPv6 202 Routing Header for Source Routes with RPL [RFC6554] specification, 203 for all packets that are routed down a RPL graph. With Non-Storing 204 RPL, even if the source is a node in the same LLN, the packet must 205 first reach up the graph to the root so that the root can insert the 206 RH3 to go down the graph. In any fashion, whether the packet was 207 originated in a node in the LLN or outside the LLN, and regardless of 208 whether the packet stays within the LLN or not, as long as the source 209 of the packet is not the root itself, the source-routing operation 210 also implies an IP-in-IP encapsulation at the root in order to insert 211 the RH3. 213 6TiSCH [I-D.ietf-6tisch-architecture] specifies the operation of IPv6 214 over the TimeSlotted Channel Hopping [RFC7554] (TSCH) mode of 215 operation of IEEE 802.15.4. The architecture requires the use of 216 both RPL and the 6lo adaptation layer over IEEE 802.15.4. Because it 217 inherits the constraints on frame size from the MAC layer, 6TiSCH 218 cannot afford to allocate 8 bytes per packet on the RPI. Hence the 219 requirement for 6LoWPAN header compression of the RPI. 221 An extensible compression technique is required that simplifies IP- 222 in-IP encapsulation when it is needed, and optimally compresses 223 existing routing artifacts found in RPL LLNs. 225 This specification extends the 6lo adaptation layer framework 226 ([RFC4944],[RFC6282]) so as to carry routing information for route- 227 over networks based on RPL. The specification includes the formats 228 necessary for RPL and is extensible for additional formats. 230 2. Terminology 232 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 233 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 234 "OPTIONAL" in this document are to be interpreted as described in 235 [RFC2119]. 237 The Terminology used in this document is consistent with and 238 incorporates that described in `Terminology in Low power And Lossy 239 Networks' [RFC7102] and [RFC6550]. 241 The terms Route-over and Mesh-under are defined in [RFC6775]. 243 Other terms in use in LLNs are found in [RFC7228]. 245 The term "byte" is used in its now customary sense as a synonym for 246 "octet". 248 3. Using the Page Dispatch 250 The 6LoWPAN Paging Dispatch [I-D.ietf-6lo-paging-dispatch] 251 specification extends the 6lo adaptation layer framework ([RFC4944], 252 [RFC6282]) by introducing a concept of "context" in the 6LoWPAN 253 parser, a context being identified by a Page number. The 254 specification defines 16 Pages. 256 This draft operates within Page 1, which is indicated by a Dispatch 257 Value of binary 11110001. 259 3.1. New Routing Header Dispatch (6LoRH) 261 This specification introduces a new 6LoWPAN Routing Header (6LoRH) to 262 carry IPv6 routing information. The 6LoRH may contain source routing 263 information such as a compressed form of RH3, as well as other sorts 264 of routing information such as the RPI and IP-in-IP encapsulation. 266 The 6LoRH is expressed in a 6loWPAN packet as a Type-Length-Value 267 (TLV) field, which is extensible for future use. 269 This specification uses the bit pattern 10xxxxxx in Page 1 for the 270 new 6LoRH Dispatch. Section 4 describes how RPL artifacts in data 271 packets can be compressed as 6LoRH headers. 273 3.2. Placement Of 6LoRH headers 274 3.2.1. Relative To Non-6LoRH Headers 276 Paging Dispatch is parsed and no subsequent Paging Dispatch has been 277 parsed, the parsing of the packet MUST follow this specification if 278 the 6LoRH Bit Pattern Section 3.1 is found. 280 With this specification, the 6LoRH Dispatch is only defined in Page 281 context is active. 283 Because a 6LoRH header requires a Page 1 context, it MUST always be 284 placed after any Fragmentation Header and/or Mesh Header [RFC4944]. 286 A 6LoRH header MUST always be placed before the LOWPAN_IPHC as 287 defined in 6LoWPAN Header Compression [RFC6282]. It is designed in 288 such a fashion that placing or removing a header that is encoded with 289 6LoRH does not modify the part of the packet that is encoded with 290 LoWPAN_IPHC, whether there is an IP-in-IP encapsulation or not. For 291 instance, the final destination of the packet is always the one in 292 the LOWPAN_IPHC whether there is a Routing Header or not. 294 3.2.2. Relative To Other 6LoRH Headers 296 IPv6 [RFC2460] defines chains of headers that are introduced by an 297 IPv6 header and terminated by either another IPv6 header (IP-in-IP) 298 or an Upper Layer Protocol ULP) header. When an outer header is 299 stripped from the packet, the whole chain goes with it. When one or 300 more header(s) are inserted by an intermediate router, that router 301 normally chains the headers and encapsulates the result in IP-in-IP. 303 With this specification, the chains of headers MUST be compressed in 304 the same order as they appear in the uncompressed form of the packet. 305 This means that if there is more than one nested IP-in-IP 306 encapsulations, the first IP-in-IP encapsulation, with all its chain 307 of headers, is encoded first in the compressed form. 309 In the compressed form of a packet that has RH3 or HbH headers after 310 the inner IPv6 header (e.g. if there is no IP-in-IP encapsulation), 311 these headers are placed in the 6LoRH form before the 6LOWPAN-IPHC 312 that represents the IPv6 header Section 3.2.1. If this packet gets 313 encapsulated and some other RH3 or HbH headers are added as part of 314 the encapsulation, placing the 6LoRH headers next to one another may 315 present an ambiguity on which header belong to which chain in the 316 uncompressed form. 318 In order to disambiguate the headers that follow the inner IPv6 319 header in the uncompressed form from the headers that follow the 320 outer IP-in-IP header, it is REQUIRED that the compressed IP-in-IP 321 header is placed last in the encoded chain. This means that the 322 6LoRH headers that are found after the last compressed IP-in-IP 323 header are to be inserted after the IPv6 header that is encoded with 324 the 6LOWPAN-IPHC when decompressing the packet. 326 With regards to the relative placement of the RH3 and the RPI in the 327 compressed form, it is a design point for this specification that the 328 RH3 entries are consumed as the packet progresses down the LLN 329 Section 5.2. In order to make this operation simpler in the 330 compressed form, it is REQUIRED that the in the compressed form, the 331 addresses along the source route path are encoded in the order of the 332 path, and that the compressed RH3 are placed before the compressed 333 RPI. 335 4. 6LoWPAN Routing Header General Format 337 The 6LoRH usesthe Dispatch Value Bit Pattern of 10xxxxxx in Page 1. 339 The Dispatch Value Bit Pattern is split in two forms of 6LoRH: 341 Elective (6LoRHE) that may skipped if not understood 343 Critical (6LoRHC) that may not be ignored 345 4.1. Elective Format 347 The 6LoRHE uses the Dispatch Value Bit Pattern of 101xxxxx. A 6LoRHE 348 may be ignored and skipped in parsing. If it is ignored, the 6LoRHE 349 is forwarded with no change inside the LLN. 351 0 1 352 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 353 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- ... -+ 354 |1|0|1| Length | Type | | 355 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- ... -+ 356 <-- Length --> 358 Figure 3: Elective 6LoWPAN Routing Header. 360 Length: 361 Length of the 6LoRHE expressed in bytes, excluding the first 2 362 bytes. This enables a node to skip a 6LoRHE header that it does 363 not support and/or cannot parse, for instance if the Type is not 364 recognized. 366 Type: 367 Type of the 6LoRHE 369 4.2. Critical Format 371 The 6LoRHC uses the Dispatch Value Bit Pattern of 100xxxxx. 373 A node which does not support the 6LoRHC Type MUST silently discard 374 the packet. 376 Note: The situation where a node receives a message with a Critical 377 6LoWPAN Routing Header that it does not understand is a critical 378 administrative error whereby the wrong device is placed in a network. 379 It makes no sense to overburden the constrained device with code that 380 would send an ICMP error to the source. Rather, it is expected that 381 the device will raise some management alert indicating that it cannot 382 operate in this network for that reason. As a result, there is no 383 provision for the exchange of error messages for this situation, so 384 it should be avoided by judicious use of administrative control and/ 385 or capability indications by the device manufacturer. 387 0 1 388 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 389 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- ... -+ 390 |1|0|0| TSE | Type | | 391 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- ... -+ 392 <-- Length implied by Type/TSE --> 394 Figure 4: Critical 6LoWPAN Routing Header. 396 TSE: 397 Type Specific Extension. The meaning depends on the Type, which 398 must be known in all of the nodes. The interpretation of the TSE 399 depends on the Type field that follows. For instance, it may be 400 used to transport control bits, the number of elements in an 401 array, or the length of the remainder of the 6LoRHC expressed in a 402 unit other than bytes. 404 Type: 405 Type of the 6LoRHC 407 4.3. Compressing Addresses 409 The general technique used in this draft to compress an address is 410 first to determine a reference that as a long prefix match with this 411 address, and then elide that matching piece. In order to reconstruct 412 the compress address, the receiving node will perform the process of 413 coalescence described in section Section 4.3.1. 415 One possible reference is the root of the RPL DODAG that is being 416 traversed. It is used to compress an outer IP-in-IP header, and if 417 the root is the source of the packet, the technique allows to fully 418 elide the source address in the compressed form of the IP header. If 419 the root is not the encapsulator, then the encapsulator address may 420 still be compressed using the root as reference. How the address of 421 the root is determined is discussed in Section 4.3.2. 423 Once the address of the source of the packet is determined, it 424 becomes the reference for the compression of the addresses that are 425 located in compressed RH3 headers that are present inside the IP-in- 426 IP encapsulation in the uncompressed form. 428 4.3.1. Coalescence 430 An IPv6 compressed address is coalesced with a reference address by 431 overriding the N rightmost bytes of the reference address with the 432 compressed address, where N is the length of the compressed address, 433 as indicated by the Type of the RH3-6LoRH header in Figure 7. 435 The reference address MAY be a compressed address as well, in which 436 case it MUST be compressed in a form that is of an equal or greater 437 length than the address that is being coalesced. 439 A compressed address is expanded by coalescing it with a reference 440 address. In the particular case of a Type 4 RH3-6LoRH, the address 441 is expressed in full and the coalescence is a complete override as 442 illustrated in Figure 5. 444 RRRRRRRRRRRRRRRRRRRR reference address, may be compressed or not 446 CCCCCCC compressed address, shorter or same as reference 448 RRRRRRRRRRRRRCCCCCCC Coalesced address, same compression as reference 450 Figure 5: Coalescing addresses. 452 4.3.2. DODAG Root Address Determination 454 Stateful Address compression requires that some state is installed in 455 the devices to store the compression information that is elided from 456 the packet. That state is stored in an abstract context table and 457 some form of index is found in the packet to obtain the compression 458 information from the context table. 460 With [RFC6282], the state is provided to the stack by the 6LoWPAN 461 Neighbor Discovery Protocol (NDP) [RFC6775]. NDP exchanges the 462 context through 6LoWPAN Context Option in Router Advertisement (RA) 463 messages. In the compressed form of the packet, the context can be 464 signaled in a Context Identifier Extension. 466 With this specification, the compression information is provided to 467 the stack by RPL, and RPL exchanges it through the DODAGID field in 468 the DAG Information Object (DIO) messages, as described in more 469 details below. In the compressed form of the packet, the context can 470 be signaled in by the InstanceID in the RPI. 472 With RPL [RFC6550], the address of DODAG root is known from the 473 DODAGID field of the DIO messages. For a Global Instance, the 474 RPLInstanceID that is present in the RPI is enough information to 475 identify the DODAG that this node participates to and its associated 476 root. But for a Local Instance, the address of the root MUST be 477 explicit, either in some device configuration or signaled in the 478 packet, as the source or the destination address, respectively. 480 When implicit, the address of the DODAG root MUST be determined as 481 follows: 483 If the whole network is a single DODAG then the root can be well- 484 known and does not need to be signaled in the packets. But RPL does 485 not expose that property and it can only be known by a configuration 486 applied to all nodes. 488 Else, the router that encapsulates the packet and compresses it with 489 this specification MUST also place an RPI in the packet as prescribed 490 by [RFC6550] to enable the identification of the DODAG. The RPI must 491 be present even in the case when the router also places an RH3 header 492 in the packet. 494 It is expected that the RPL implementation provides an abstract 495 context table, indexed by Global RPLInstanceID, that provides the 496 address of the root of the DODAG that this nodes participates to for 497 that particular Instance. 499 5. The Routing Header Type 3 (RH3) 6LoRH Header 501 ## Encoding {#RH3-6LoRH-encoding} 503 The Routing Header type 3 (RH3) 6LoRH (RH3-6LoRH) header is a 504 Critical 6LoWPAN Routing Header that provides a compressed form for 505 the RH3, as defined in [RFC6554] for use by RPL routers. Routers 506 that need to forward a packet with a RH3-6LoRH are expected to be RPL 507 routers and are expected to support this specification. If a non-RPL 508 router receives a packet with a RH3-6LoRH, this means that there was 509 a routing error and the packet should be dropped so the Type cannot 510 be ignored. 512 0 1 513 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 514 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- -+- -+ ... +- -+ 515 |1|0|0| Size |6LoRH Type 0..4| Hop1 | Hop2 | | HopN | 516 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- -+- -+ ... +- -+ 518 Size indicates the number of compressed addresses 520 Figure 6: The RH3-6LoRH. 522 The 6LoRH Type indicates the compression level used in a given 523 RH3-6LoRH header. 525 One or more 6LoRH header(s) MAY be placed in a 6LoWPAN packet. 527 It results that all addresses in a given RH3-6LoRH header MUST be 528 compressed in an identical fashion, down to using the identical 529 number of bytes per address. In order to get different degrees of 530 compression, multiple consecutive RH3-6LoRH headers MUST be used. 532 Type 0 means that the address is compressed down to one byte, whereas 533 Type 4 means that the address is provided in full in the RH3-6LoRH 534 with no compression. The complete list of Types of RH3-6LoRH and the 535 corresponding compression level are provided in Figure 7: 537 +-----------+----------------------+ 538 | 6LoRH | Length of compressed | 539 | Type | IPv6 address (bytes) | 540 +-----------+----------------------+ 541 | 0 | 1 | 542 | 1 | 2 | 543 | 2 | 4 | 544 | 3 | 8 | 545 | 4 | 16 | 546 +-----------+----------------------+ 548 Figure 7: The RH3-6LoRH Types. 550 In the case of a RH3-6LoRH header, the TSE field is used as a Size, 551 which encodes the number of hops minus 1; so a Size of 0 means one 552 hop, and the maximum that can be encoded is 32 hops. (If more than 553 32 hops need to be expressed, a sequence of RH3-6LoRH elements can be 554 employed.) It results that the Length in bytes of a RH3-6LoRH header 555 is: 557 2 + Length_of_compressed_IPv6_address * (Size + 1) 559 5.1. RH3-6LoRH General Operation 561 In the non-compressed form, when the root generates or forwards a 562 packet in non-Storing Mode, it needs to include a Routing Header type 563 3 (RH3) [RFC6554] to signal a strict source-route path to a final 564 destination down the DODAG. All the hops along the path, but the 565 first one, are encoded in order in the RH3. The last entry in the 566 RH3 is the final destination and the destination in the IPv6 header 567 is the first hop along the source-route path. The intermediate hops 568 perform a swap and the Segment-Left field indicates the active entry 569 in the Routing Header [RFC2460]. The current destination of the 570 packet, which is the termination of the current segment, is indicated 571 at all times by the destination address of the IPv6 header. 573 The handling of the RH3-6LoRH is different: there is no swap, and a 574 forwarding router that corresponds to the first entry in the first 575 RH3-6LoRH upon reception of a packet effectively consumes that entry 576 when forwarding. This means that the size of a compressed source- 577 routed packet decreases as the packet progresses along its path and 578 that the routing information is lost along the way. This also means 579 that an RH3 encoded with 6LoRH is not recoverable and cannot be 580 protected. 582 When compressed with this specification, all the remaining hops MUST 583 be encoded in order in one or more consecutive RH3-6LoRH headers. 584 Whether or not there is a RH3-6LoRH header present, the address of 585 the final destination is indicated in the LoWPAN_IPHC at all times 586 along the path. Examples of this are provided in Appendix A. 588 The current destination (termination of the current segment) for a 589 compressed source-routed packet is indicated in the first entry of 590 the first RH3-6LoRH. In strict source-routing, that entry MUST match 591 an address of the router that receives the packet. 593 The last entry in the last RH3-6LoRH is the last router on the way to 594 the final destination in the LLN. It is typically a RPL parent of 595 the final destination, but it can also be a router acting at 6LR 596 [RFC6775] for the destination host. 598 5.2. The Design Point of Popping Entries 600 In order to save energy and to optimize the chances of transmission 601 success on lossy media, it is a design point for this specification 602 that the entries in the RH3 that have been used are removed from the 603 packet. This creates a discrepancy from the art of IPv6 where 604 Routing Header are mutable but recoverable. 606 With this specification, the packet can be expanded at any hop into a 607 valid IPv6 packet, including a RH3, and compressed back. But the 608 packet as decompressed along the way will not carry all the consumed 609 addresses that packet would have if it had been forwarded in the 610 uncompressed form. 612 It is noted that: 614 The value of keeping the whole RH in an IPv6 header is for the 615 receiver to reverse it to use the symmetrical path on the way 616 back. 618 It is generally not a good idea to reverse a routing header. The 619 RH may have been used to stay away from the shortest path for some 620 reason that is only valid on the way in (segment routing). 622 There is no use of reversing a RH in the present RPL 623 specifications. 625 P2P RPL reverses a path that was learned reactively, as a part of 626 the protocol operation, which is probably a cleaner way than a 627 reversed echo on the data path. 629 Reversing a header is discouraged by [RFC2460] for RH0 unless it 630 is authenticated, which requires an Authentication Header (AH). 631 There is no definition of an AH operation for RH3, and there is no 632 indication that the need exists in LLNs. 634 It is noted that AH does not protect the RH on the way. AH is a 635 validation at the receiver with the sole value of enabling the 636 receiver to reversing it. 638 A RPL domain is usually protected by L2 security and that secures 639 both RPL itself and the RH in the packets, at every hop. This is 640 a better security than that provided by AH. 642 In summary, the benefit of saving energy and lowering the chances of 643 loss by sending smaller frames over the LLN are seen as overwhelming 644 compared to the value of possibly reversing the header. 646 5.3. Compression Reference 648 In order to optimize the compression of IP addresses present in the 649 RH3 headers, this specification requires that the 6LoWPAN layer 650 identifies an address that is used as reference for the compression. 651 With this specification, the Compression Reference for addresses 652 found in an RH3 header is the source of the IPv6 packet. 654 With RPL [RFC6550], an RH3 header may only be present in Non-Storing 655 mode, and it may only be placed in the packet by the root of the 656 DODAG, which must be the source of the resulting IPv6 packet 657 [RFC2460]. In this case, the address used as Compression Reference 658 is that the address of the root, and it can be implicit when the 659 address of the root is. 661 The Compression Reference MUST be determined as follows: 663 The reference address may be obtained by configuration. The 664 configuration may indicate either the address in full, or the 665 identifier of a 6LoWPAN Context that carries the address [RFC6775], 666 for instance one of the 16 Context Identifiers used in LOWPAN-IPHC 667 [RFC6282]. 669 Else, and if there is no IP-in-IP encapsulation, the source address 670 in the IPv6 header that is compressed with LOWPAN-IPHC is the 671 reference for the compression. 673 Else, and if the IP-in-IP compression specified in this document is 674 used and the Encapsulator Address is provided, then the Encapsulator 675 Address is the reference. 677 5.4. Popping Headers 679 Upon reception, the router checks whether the address in the first 680 entry of the first RH3-6LoRH one of its own addresses. In that case, 681 router MUST consume that entry before forwarding, which is an action 682 of popping from a stack, where the stack is effectively the sequence 683 of entries in consecutive RH3-6LoRH headers. 685 Popping an entry of an RH3-6LoRH header is a recursive action 686 performed as follows: 688 If the Size of the RH3-6LoRH header is 1 or more, indicating that 689 there are at least 2 entries in the header, the router removes the 690 first entry and decrements the Size (by 1). 692 Else (meaning that this is the last entry in the RH3-6LoRH header), 693 and if there is no next RH3-6LoRH header after this then the 694 RH3-6LoRH is removed. 696 Else, if there is a next RH3-6LoRH of a Type with a larger or equal 697 value, meaning a same or lesser compression yielding same or larger 698 compressed forms, then the RH3-6LoRH is removed. 700 Else, the first entry of the next RH3-6LoRH is popped from the next 701 RH3-6LoRH and coalesced with the first entry of this RH3-6LoRH. 703 At the end of the process, if there is no more RH3-6LoRH in the 704 packet, then the processing node is the last router along the source 705 route path. 707 5.5. Forwarding 709 When receiving a packet with a RH3-6LoRH, a router determines the 710 IPv6 address of the current segment endpoint. 712 If strict source routing is enforced and thus router is not the 713 segment endpoint for the packet then this router MUST drop the 714 packet. 716 If this router is the current segment endpoint, then the router pops 717 its address as described in Section 5.4 and continues processing the 718 packet. 720 If there is still a RH3-6LoRH, then the router determines the new 721 segment endpoint and routes the packet towards that endpoint. 723 Otherwise the router uses the destination in the inner IP header to 724 forward or accept the packet. 726 The segment endpoint of a packet MUST be determined as follows: 728 The router first determines the Compression Reference as discussed in 729 Section 4.3.1. 731 The router then coalesces the Compression Reference with the first 732 entry of the first RH3-6LoRH header as discussed in Section 5.3. If 733 the type of the RH3-6LoRH header is type 4 then the coalescence is a 734 full override. 736 Since the Compression Reference is an uncompressed address, the 737 coalesced IPv6 address is also expressed in the full 128bits. 739 An example of this operation is provided in Appendix A.3. 741 6. The RPL Packet Information 6LoRH 743 [RFC6550], Section 11.2, specifies the RPL Packet Information (RPI) 744 as a set of fields that are placed by RPL routers in IP packets for 745 the purpose of Instance Identification, as well as Loop Avoidance and 746 Detection. 748 In particular, the SenderRank, which is the scalar metric computed by 749 a specialized Objective Function such as [RFC6552], indicates the 750 Rank of the sender and is modified at each hop. The SenderRank field 751 is used to validate that the packet progresses in the expected 752 direction, either upwards or downwards, along the DODAG. 754 RPL defines the RPL Option for Carrying RPL Information in Data-Plane 755 Datagrams [RFC6553] to transport the RPI, which is carried in an IPv6 756 Hop-by-Hop Options Header [RFC2460], typically consuming eight bytes 757 per packet. 759 With [RFC6553], the RPL option is encoded as six octets, which must 760 be placed in a Hop-by-Hop header that consumes two additional octets 761 for a total of eight octets. To limit the header's range to just the 762 RPL domain, the Hop-by-Hop header must be added to (or removed from) 763 packets that cross the border of the RPL domain. 765 The 8-byte overhead is detrimental to LLN operation, in particular 766 with regards to bandwidth and battery constraints. These bytes may 767 cause a containing frame to grow above maximum frame size, leading to 768 Layer 2 or 6LoWPAN [RFC4944] fragmentation, which in turn leads to 769 even more energy expenditure and issues discussed in LLN Fragment 770 Forwarding and Recovery [I-D.thubert-6lo-forwarding-fragments]. 772 An additional overhead comes from the need, in certain cases, to add 773 an IP-in-IP encapsulation to carry the Hop-by-Hop header. This is 774 needed when the router that inserts the Hop-by-Hop header is not the 775 source of the packet, so that an error can be returned to the router. 776 This is also the case when a packet originated by a RPL node must be 777 stripped from the Hop-by-Hop header to be routed outside the RPL 778 domain. 780 For that reason, this specification defines an IP-in-IP-6LoRH header 781 in Section 7, but it must be noted that removal of a 6LoRH header 782 does not require manipulation of the packet in the LOWPAN_IPHC, and 783 thus, if the source address in the LOWPAN_IPHC is the node that 784 inserted the IP-in-IP-6LoRH header then this situation alone does not 785 mandate an IP-in-IP-6LoRH header. 787 Note: A typical packet in RPL non-storing mode going down the RPL 788 graph requires an IP-in-IP encapsulation of the RH3, whereas the RPI 789 is usually (and quite illegally) omitted, unless it is important to 790 indicate the RPLInstanceID. To match this structure, an optimized 791 IP-in-IP 6LoRH header is defined in Section 7. 793 As a result, a RPL packet may bear only an RPI-6LoRH header and no 794 IP-in-IP-6LoRH header. In that case, the source and destination of 795 the packet are specified by the LOWPAN_IPHC. 797 As with [RFC6553], the fields in the RPI include an 'O', an 'R', and 798 an 'F' bit, an 8-bit RPLInstanceID (with some internal structure), 799 and a 16-bit SenderRank. 801 The remainder of this section defines the RPI-6LoRH header, which is 802 a Critical 6LoWPAN Routing Header that is designed to transport the 803 RPI in 6LoWPAN LLNs. 805 6.1. Compressing the RPLInstanceID 807 RPL Instances are discussed in [RFC6550], Section 5. A number of 808 simple use cases do not require more than one instance, and in such 809 cases, the instance is expected to be the global Instance 0. A 810 global RPLInstanceID is encoded in a RPLInstanceID field as follows: 812 0 1 2 3 4 5 6 7 813 +-+-+-+-+-+-+-+-+ 814 |0| ID | Global RPLInstanceID in 0..127 815 +-+-+-+-+-+-+-+-+ 817 Figure 8: RPLInstanceID Field Format for Global Instances. 819 For the particular case of the global Instance 0, the RPLInstanceID 820 field is all zeros. This specification allows to elide a 821 RPLInstanceID field that is all zeros, and defines a I flag that, 822 when set, signals that the field is elided. 824 6.2. Compressing the SenderRank 826 The SenderRank is the result of the DAGRank operation on the rank of 827 the sender; here the DAGRank operation is defined in [RFC6550], 828 Section 3.5.1, as: 830 DAGRank(rank) = floor(rank/MinHopRankIncrease) 832 If MinHopRankIncrease is set to a multiple of 256, the least 833 significant 8 bits of the SenderRank will be all zeroes; by eliding 834 those, the SenderRank can be compressed into a single byte. This 835 idea is used in [RFC6550] by defining DEFAULT_MIN_HOP_RANK_INCREASE 836 as 256 and in [RFC6552] that defaults MinHopRankIncrease to 837 DEFAULT_MIN_HOP_RANK_INCREASE. 839 This specification allows to encode the SenderRank as either one or 840 two bytes, and defines a K flag that, when set, signals that a single 841 byte is used. 843 6.3. The Overall RPI-6LoRH encoding 845 The RPI-6LoRH header provides a compressed form for the RPL RPI. 846 Routers that need to forward a packet with a RPI-6LoRH header are 847 expected to be RPL routers that support this specification. If a 848 non-RPL router receives a packet with a RPI-6LoRH header, there was a 849 routing error and the packet should be dropped. Thus the Type field 850 MUST NOT be ignored. 852 Since the I flag is not set, the TSE field does not need to be a 853 length expressed in bytes. In that case the field is fully reused 854 for control bits that encode the O, R and F flags from the RPI, as 855 well as the I and K flags that indicate the compression format. 857 The Type for the RPI-6LoRH is 5. 859 The RPI-6LoRH header is immediately followed by the RPLInstanceID 860 field, unless that field is fully elided, and then the SenderRank, 861 which is either compressed into one byte or fully in-lined as two 862 bytes. The I and K flags in the RPI-6LoRH header indicate whether 863 the RPLInstanceID is elided and/or the SenderRank is compressed. 864 Depending on these bits, the Length of the RPI-6LoRH may vary as 865 described hereafter. 867 0 1 2 868 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 869 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... -+-+-+ 870 |1|0|0|O|R|F|I|K| 6LoRH Type=5 | Compressed fields | 871 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... -+-+-+ 873 Figure 9: The Generic RPI-6LoRH Format. 875 O, R, and F bits: The O, R, and F bits are defined in [RFC6550], 876 section 11.2. 878 I bit: If it is set, the Instance ID is elided and the RPLInstanceID 879 is the Global RPLInstanceID 0. If it is not set, the octet 880 immediately following the type field contains the RPLInstanceID 881 as specified in [RFC6550], section 5.1. 883 K bit: If it is set, the SenderRank is compressed into one octet, 884 with the least significant octet elided. If it is not set, the 885 SenderRank, is fully inlined as two octets. 887 In Figure 10, the RPLInstanceID is the Global RPLInstanceID 0, and 888 the MinHopRankIncrease is a multiple of 256 so the least significant 889 byte is all zeros and can be elided: 891 0 1 2 892 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 893 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 894 |1|0|0|O|R|F|1|1| 6LoRH Type=5 | SenderRank | 895 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 896 I=1, K=1 898 Figure 10: The most compressed RPI-6LoRH. 900 In Figure 11, the RPLInstanceID is the Global RPLInstanceID 0, but 901 both bytes of the SenderRank are significant so it can not be 902 compressed: 904 0 1 2 3 905 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 906 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 907 |1|0|0|O|R|F|1|0| 6LoRH Type=5 | SenderRank | 908 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 909 I=1, K=0 911 Figure 11: Eliding the RPLInstanceID. 913 In Figure 12, the RPLInstanceID is not the Global RPLInstanceID 0, 914 and the MinHopRankIncrease is a multiple of 256: 916 0 1 2 3 917 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 918 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 919 |1|0|0|O|R|F|0|1| 6LoRH Type=5 | RPLInstanceID | SenderRank | 920 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 921 I=0, K=1 923 Figure 12: Compressing SenderRank. 925 In Figure 13, the RPLInstanceID is not the Global RPLInstanceID 0, 926 and both bytes of the SenderRank are significant: 928 0 1 2 3 929 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 930 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 931 |1|0|0|O|R|F|0|0| 6LoRH Type=5 | RPLInstanceID | Sender-... 932 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 933 ...-Rank | 934 +-+-+-+-+-+-+-+-+ 935 I=0, K=0 937 Figure 13: Least compressed form of RPI-6LoRH. 939 7. The IP-in-IP 6LoRH Header 941 The IP-in-IP 6LoRH (IP-in-IP-6LoRH) header is an Elective 6LoWPAN 942 Routing Header that provides a compressed form for the encapsulating 943 IPv6 Header in the case of an IP-in-IP encapsulation. 945 An IP-in-IP encapsulation is used to insert a field such as a Routing 946 Header or an RPI at a router that is not the source of the packet. 947 In order to send an error back regarding the inserted field, the 948 address of the router that performs the insertion must be provided. 950 The encapsulation can also enable the last router prior to 951 Destination to remove a field such as the RPI, but this can be done 952 in the compressed form by removing the RPI-6LoRH, so an IP-in-IP- 953 6LoRH encapsulation is not required for that sole purpose. 955 This field is not critical for routing so the Type can be ignored, 956 and the TSE field contains the Length in bytes. 958 0 1 2 959 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 960 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- ... -+ 961 |1|0|1| Length | 6LoRH Type 6 | Hop Limit | Encaps. Address | 962 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- ... -+ 964 Figure 14: The IP-in-IP-6LoRH. 966 The Length of an IP-in-IP-6LoRH header is expressed in bytes and MUST 967 be at least 1, to indicate a Hop Limit (HL), that is decremented at 968 each hop. When the HL reaches 0, the packet is dropped per 969 [RFC2460]. 971 If the Length of an IP-in-IP-6LoRH header is exactly 1, then the 972 Encapsulator Address is elided, which means that the Encapsulator is 973 a well-known router, for instance the root in a RPL graph. 975 With this specification, an optimal compression of IP-in-IP 976 encapsulation can be achieved if an endpoint of the packet is the 977 root of the RPL DODAG associated to the Instance that is used to 978 forward the packet, and the root address is known implicitly as 979 opposed to signaled explicitly in the data packets. 981 If the Length of an IP-in-IP-6LoRH header is greater than 1, then an 982 Encapsulator Address is placed in a compressed form after the Hop 983 Limit field. The value of the Length indicates which compression is 984 performed on the Encapsulator Address. For instance, a Size of 3 985 indicates that the Encapsulator Address is compressed to 2 bytes. 987 The reference for the compression is the address of the root of the 988 DODAG. The way the address of the root is determined is discussed in 989 Section 4.3.2. 991 When it cannot be elided, the destination IP address of the IP-in-IP 992 header is transported in a RH3-6LoRH header as the first address of 993 the list. 995 With RPL, the destination address in the IP-in-IP header is 996 implicitly the root in the RPL graph for packets going upwards, and 997 the destination address in the IPHC for packets going downwards. If 998 the implicit value is correct, the destination IP address of the IP- 999 in-IP encapsulation can be elided. 1001 If the final destination of the packet is a leaf that does not 1002 support this specification, then the chain of 6LoRH headers must be 1003 stripped by the RPL/6LR router to which the leaf is attached. In 1004 that example, the destination IP address of the IP-in-IP header 1005 cannot be elided. 1007 In the special case where a 6LoRH header is used to route 6LoWPAN 1008 fragments, the destination address is not accessible in the IPHC on 1009 all fragments and can be elided only for the first fragment and for 1010 packets going upwards. 1012 8. Security Considerations 1014 The security considerations of [RFC4944], [RFC6282], and [RFC6553] 1015 apply. 1017 Using a compressed format as opposed to the full in-line format is 1018 logically equivalent and is believed to not create an opening for a 1019 new threat when compared to [RFC6550], [RFC6553] and [RFC6554]. 1021 9. IANA Considerations 1023 This specification reserves Dispatch Value Bit Patterns within the 1024 6LoWPAN Dispatch Page 1 as follows: 1026 101xxxxx: for Elective 6LoWPAN Routing Headers 1028 100xxxxx: for Critical 6LoWPAN Routing Headers. 1030 9.2. New 6LoWPAN Routing Header Type Registry 1032 This document creates an IANA registry for the 6LoWPAN Routing Header 1033 Type, and assigns the following values: 1035 0..4: RH3-6LoRH [RFCthis] 1037 5: RPI-6LoRH [RFCthis] 1039 6: IP-in-IP-6LoRH [RFCthis] 1041 10. Acknowledgments 1043 The authors wish to thank Tom Phinney, Thomas Watteyne, Tengfei 1044 Chang, Martin Turon, James Woodyatt, Samita Chakrabarti, Jonathan 1045 Hui, Gabriel Montenegro and Ralph Droms for constructive reviews to 1046 the design in the 6lo Working Group. The overall discussion involved 1047 participants to the 6MAN, 6TiSCH and ROLL WGs, thank you all. 1048 Special thanks to the chairs of the ROLL WG, Michael Richardson and 1049 Ines Robles, and Brian Haberman, Internet Area A-D, and Adrian 1050 Farrel, Routing Area A-D, for driving this complex effort across 1051 Working Groups and Areas. 1053 11. References 1055 11.1. Normative References 1057 [I-D.ietf-6lo-paging-dispatch] 1058 Thubert, P., "6LoWPAN Paging Dispatch", draft-ietf-6lo- 1059 paging-dispatch-01 (work in progress), January 2016. 1061 [IEEE802154] 1062 IEEE standard for Information Technology, "IEEE std. 1063 802.15.4, Part. 15.4: Wireless Medium Access Control (MAC) 1064 and Physical Layer (PHY) Specifications for Low-Rate 1065 Wireless Personal Area Networks", 2015. 1067 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1068 Requirement Levels", BCP 14, RFC 2119, 1069 DOI 10.17487/RFC2119, March 1997, 1070 . 1072 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 1073 (IPv6) Specification", RFC 2460, DOI 10.17487/RFC2460, 1074 December 1998, . 1076 [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, 1077 "Transmission of IPv6 Packets over IEEE 802.15.4 1078 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, 1079 . 1081 [RFC6282] Hui, J., Ed. and P. Thubert, "Compression Format for IPv6 1082 Datagrams over IEEE 802.15.4-Based Networks", RFC 6282, 1083 DOI 10.17487/RFC6282, September 2011, 1084 . 1086 [RFC6550] Winter, T., Ed., Thubert, P., Ed., Brandt, A., Hui, J., 1087 Kelsey, R., Levis, P., Pister, K., Struik, R., Vasseur, 1088 JP., and R. Alexander, "RPL: IPv6 Routing Protocol for 1089 Low-Power and Lossy Networks", RFC 6550, 1090 DOI 10.17487/RFC6550, March 2012, 1091 . 1093 [RFC6552] Thubert, P., Ed., "Objective Function Zero for the Routing 1094 Protocol for Low-Power and Lossy Networks (RPL)", 1095 RFC 6552, DOI 10.17487/RFC6552, March 2012, 1096 . 1098 [RFC6553] Hui, J. and JP. Vasseur, "The Routing Protocol for Low- 1099 Power and Lossy Networks (RPL) Option for Carrying RPL 1100 Information in Data-Plane Datagrams", RFC 6553, 1101 DOI 10.17487/RFC6553, March 2012, 1102 . 1104 [RFC6554] Hui, J., Vasseur, JP., Culler, D., and V. Manral, "An IPv6 1105 Routing Header for Source Routes with the Routing Protocol 1106 for Low-Power and Lossy Networks (RPL)", RFC 6554, 1107 DOI 10.17487/RFC6554, March 2012, 1108 . 1110 [RFC7102] Vasseur, JP., "Terms Used in Routing for Low-Power and 1111 Lossy Networks", RFC 7102, DOI 10.17487/RFC7102, January 1112 2014, . 1114 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 1115 Constrained-Node Networks", RFC 7228, 1116 DOI 10.17487/RFC7228, May 2014, 1117 . 1119 11.2. Informative References 1121 [I-D.ietf-6tisch-architecture] 1122 Thubert, P., "An Architecture for IPv6 over the TSCH mode 1123 of IEEE 802.15.4", draft-ietf-6tisch-architecture-09 (work 1124 in progress), November 2015. 1126 [I-D.robles-roll-useofrplinfo] 1127 Robles, I., Richardson, M., and P. Thubert, "When to use 1128 RFC 6553, 6554 and IPv6-in-IPv6", draft-robles-roll- 1129 useofrplinfo-02 (work in progress), October 2015. 1131 [I-D.thubert-6lo-forwarding-fragments] 1132 Thubert, P. and J. Hui, "LLN Fragment Forwarding and 1133 Recovery", draft-thubert-6lo-forwarding-fragments-02 (work 1134 in progress), November 2014. 1136 [RFC6775] Shelby, Z., Ed., Chakrabarti, S., Nordmark, E., and C. 1137 Bormann, "Neighbor Discovery Optimization for IPv6 over 1138 Low-Power Wireless Personal Area Networks (6LoWPANs)", 1139 RFC 6775, DOI 10.17487/RFC6775, November 2012, 1140 . 1142 [RFC7554] Watteyne, T., Ed., Palattella, M., and L. Grieco, "Using 1143 IEEE 802.15.4e Time-Slotted Channel Hopping (TSCH) in the 1144 Internet of Things (IoT): Problem Statement", RFC 7554, 1145 DOI 10.17487/RFC7554, May 2015, 1146 . 1148 Appendix A. Examples 1150 A.1. Examples Compressing The RPI 1152 The example in Figure 15 illustrates the 6LoRH compression of a 1153 classical packet in Storing Mode in all directions, as well as in 1154 non-Storing mode for a packet going up the DODAG following the 1155 default route to the root. In this particular example, a 1156 fragmentation process takes place per [RFC4944], and the fragment 1157 headers must be placed in Page 0 before switching to Page 1: 1159 +- ... -+- ... -+-+ ... -+- ... +-+-+ ... -+-+-+-+-+-+-+-+-+-+... 1160 |Frag type|Frag hdr |11110001| RPI- |IP-in-IP| LOWPAN-IPHC | ... 1161 |RFC 4944 |RFC 4944 | Page 1 | 6LoRH | 6LoRH | | 1162 +- ... -+- ... -+-+ ... -+- ... +-+-+ ... -+-+-+-+-+-+-+-+-+-+... 1163 <- RFC 6282 -> 1164 No RPL artifact 1166 Figure 15: Example Compressed Packet with RPI. 1168 In Storing Mode, if the packet stays within the RPL domain, then it 1169 is possible to save the IP-in-IP encapsulation, in which case only 1170 the RPI is compressed with a 6LoRH, as illustrated in Figure 16 in 1171 the case of a non-fragmented ICMP packet: 1173 +- ... -+-+- ... -+-+-+-+ ... -+-+-+-+ ... -+-+-+-+-+-+-+-+-+-+-+... 1174 |11110001| RPI-6LoRH | NH = 0 | NH = 58 | ICMP message ... 1175 |Page 1 | type 5 | 6LOWPAN-IPHC | (ICMP) | (no compression) 1176 +- ... -+-+- ... -+-+-+-+ ... -+-+-+-+ ... -+-+-+-+-+-+-+-+-+-+-+... 1177 <- RFC 6282 -> 1178 No RPL artifact 1180 Figure 16: Example ICMP Packet with RPI in Storing Mode. 1182 The format in Figure 16 is logically equivalent to the non-compressed 1183 format illustrated in Figure 17: 1185 +-+-+-+- ... -+-+-+-+ ... -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+... 1186 | IPv6 Header | Hop-by-Hop | RPI in | ICMP message ... 1187 | NH = 58 | Header | RPL Option | 1188 +-+-+-+- ... -+-+-+-+ ... -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+... 1190 Figure 17: Uncompressed ICMP Packet with RPI. 1192 For a UDP packet, the transport header can be compressed with 6LoWPAN 1193 HC [RFC6282] as illustrated in Figure 18: 1195 +- ... -+- ... -+-+-+-+- ... +-+-+-+-+-+-+-+-+-+- ... +-+-+-+-+-+... 1196 |11110001| RPI-6LoRH | NH = 1 |11110|C| P | Compressed |UDP ... 1197 |Page 1 | type 5 | 6LOWPAN-IPHC | UDP | | | UDP header |Payload 1198 +- ... -+- ... -+-+-+-+- ... +-+-+-+-+-+-+-+-+-+- ... +-+-+-+-+-+... 1199 <- RFC 6282 -> 1200 No RPL artifact 1202 Figure 18: Uncompressed ICMP Packet with RPI. 1204 If the packet is received from the Internet in Storing Mode, then the 1205 root is supposed to encapsulate the packet to insert the RPI. The 1206 resulting format would be as represented in Figure 19: 1208 +-+-+-+-+-+-+- ... -+-+-- ... -+-+- ... -+-+-+-+-+-+-+ ... -+-+-+-+... 1209 |11110001 | RPI-6LoRH | IP-in-IP | NH=1 |11110CPP| Compressed | UDP 1210 |Page 1 | | 6LoRH | IPHC | UDP | UDP header | Payload 1211 +-+-+-+-+-+-+- ... -+-+-- ... -+-+- ... -+-+-+-+-+-+-+ ... -+-+-+-+... 1212 <- RFC 6282 -> 1213 No RPL artifact 1215 Figure 19: RPI inserted by the root in Storing Mode. 1217 A.2. Example Of Downward Packet In Non-Storing Mode 1219 The example illustrated in Figure 20 is a classical packet in non- 1220 Storing mode for a packet going down the DODAG following a source 1221 routed path from the root. Say that we have 4 forwarding hops to 1222 reach a destination. In the non-compressed form, when the root 1223 generates the packet, the last 3 hops are encoded in a Routing Header 1224 type 3 (RH3) and the first hop is the destination of the packet. The 1225 intermediate hops perform a swap and the hop count indicates the 1226 current active hop [RFC2460], [RFC6554]. 1228 When compressed with this specification, the 4 hops are encoded in 1229 RH3-6LoRH when the root generates the packet, and the final 1230 destination is left in the LOWPAN-IPHC. There is no swap, and the 1231 forwarding node that corresponds to the first entry effectively 1232 consumes it when forwarding, which means that the size of the encoded 1233 packet decreases and that the hop information is lost. 1235 If the last hop in a RH3-6LoRH is not the final destination then it 1236 removes the RH3-6LoRH before forwarding. 1238 In the particular example illustrated in Figure 20, all addresses in 1239 the DODAG are assigned from a same /112 prefix and the last 2 octets 1240 encoding an identifier such as a IEEE 802.15.4 short address. In 1241 that case, all addresses can be compressed to 2 octets, using the 1242 root address as reference. There will be one RH3_6LoRH header, with, 1243 in this example, 3 compressed addresses: 1245 +-+-+-+-+-+-+- ... +-+-+- ... -+-+-- ... -+-+- ... -+-+-+-+-+ ... +-... 1246 |11110001 |RH3-6LoRH | RPI-6LoRH | IP-in-IP | NH=1 |11110CPP| UDP | UDP 1247 |Page 1 |Type1 S=2 | | 6LoRH | IPHC | UDP | hdr |load 1248 +-+-+-+-+-+-+- ... +-+-+- ... -+-+-- ... -+-+- ... -+-+-+-+-+ ... +-... 1249 <-8bytes-> <- RFC 6282 -> 1250 No RPL artifact 1252 Figure 20: Example Compressed Packet with RH3. 1254 One may note that the RPI is provided. This is because the address 1255 of the root that is the source of the IP-in-IP header is elided and 1256 inferred from the InstanceID in the RPI. Once found from a local 1257 context, that address is used as Compression Reference to expand 1258 addresses in the RH3-6LoRH. 1260 With the RPL specifications available at the time of writing this 1261 draft, the root is the only node that may incorporate a RH3 in an IP 1262 packet. When the root forwards a packet that it did not generate, it 1263 has to encapsulate the packet with IP-in-IP. 1265 But if the root generates the packet towards a node in its DODAG, 1266 then it should avoid the extra IP-in-IP as illustrated in Figure 21: 1268 +- ... -+-+-+ ... +-+-+-+ ... -+-+-+-+-+-+-+-++-+- ... -+-+-+-+-+... 1269 |11110001| RH3-6LoRH | NH=1 | 11110CPP | Compressed | UDP 1270 |Page 1 | Type1 S=3 | LOWPAN-IPHC| LOWPAN-NHC| UDP header | Payload 1271 +- ... -+-+-+ ... +-+-+-+ ... -+-+-+-+-+-+-+-++-+- ... -+-+-+-+-+... 1272 <- RFC 6282 -> 1274 Figure 21: compressed RH3 4*2bytes entries sourced by root. 1276 Note: the RPI is not represented though RPL [RFC6550] generally 1277 expects it. In this particular case, since the Compression Reference 1278 for the RH3-6LoRH is the source address in the LOWPAN-IPHC, and the 1279 routing is strict along the source route path, the RPI does not 1280 appear to be absolutely necessary. 1282 In Figure 21, all the nodes along the source route path share a same 1283 /112 prefix. This is typical of IPv6 addresses derived from an 1284 IEEE802.15.4 short address, as long as all the nodes share a same 1285 PAN-ID. In that case, a type-1 RH3-6LoRH header can be used for 1286 encoding. The IPv6 address of the root is taken as reference, and 1287 only the last 2 octets of the address of the intermediate hops is 1288 encoded. The Size of 3 indicates 4 hops, resulting in a RH3-6LoRH of 1289 10 bytes. 1291 A.3. Example of RH3-6LoRH life-cycle 1293 This section illustrates the operation specified in Section 5.5 of 1294 forwarding a packet with a compressed RH3 along an A->B->C->D source 1295 route path. The operation of popping addresses is exemplified at 1296 each hop. 1298 Packet as received by node A 1299 ---------------------------- 1300 Type 3 RH3-6LoRH Size = 0 AAAA AAAA AAAA AAAA 1301 Type 1 RH3-6LoRH Size = 0 BBBB 1302 Type 2 RH3-6LoRH Size = 1 CCCC CCCC 1303 DDDD DDDD 1305 Step 1 popping BBBB the first entry of the next RH3-6LoRH 1306 Step 2 next is if larger value (2 vs. 1) the RH3-6LoRH is removed 1308 Type 3 RH3-6LoRH Size = 0 AAAA AAAA AAAA AAAA 1309 Type 2 RH3-6LoRH Size = 1 CCCC CCCC 1310 DDDD DDDD 1312 Step 3: recursion ended, coalescing BBBB with the first entry 1313 Type 3 RH3-6LoRH Size = 0 AAAA AAAA AAAA BBBB 1315 Step 4: routing based on next segment endpoint to B 1317 Figure 22: Processing at Node A. 1319 Packet as received by node B 1320 ---------------------------- 1321 Type 3 RH3-6LoRH Size = 0 AAAA AAAA AAAA BBBB 1322 Type 2 RH3-6LoRH Size = 1 CCCC CCCC 1323 DDDD DDDD 1325 Step 1 popping CCCC CCCC, the first entry of the next RH3-6LoRH 1326 Step 2 removing the first entry and decrementing the Size (by 1) 1328 Type 3 RH3-6LoRH Size = 0 AAAA AAAA AAAA BBBB 1329 Type 2 RH3-6LoRH Size = 0 DDDD DDDD 1331 Step 3: recursion ended, coalescing CCCC CCCC with the first entry 1332 Type 3 RH3-6LoRH Size = 0 AAAA AAAA CCCC CCCC 1334 Step 4: routing based on next segment endpoint to C 1336 Figure 23: Processing at Node B. 1338 Packet as received by node C 1339 ---------------------------- 1341 Type 3 RH3-6LoRH Size = 0 AAAA AAAA CCCC CCCC 1342 Type 2 RH3-6LoRH Size = 0 DDDD DDDD 1344 Step 1 popping DDDD DDDD, the first entry of the next RH3-6LoRH 1345 Step 2 the RH3-6LoRH is removed 1347 Type 3 RH3-6LoRH Size = 0 AAAA AAAA CCCC CCCC 1349 Step 3: recursion ended, coalescing DDDD DDDDD with the first entry 1350 Type 3 RH3-6LoRH Size = 0 AAAA AAAA DDDD DDDD 1352 Step 4: routing based on next segment endpoint to D 1354 Figure 24: Processing at Node C. 1356 Packet as received by node D 1357 ---------------------------- 1358 Type 3 RH3-6LoRH Size = 0 AAAA AAAA DDDD DDDD 1360 Step 1 the RH3-6LoRH is removed. 1361 Step 2 no more header, routing based on inner IP header. 1363 Figure 25: Processing at Node D. 1365 Authors' Addresses 1367 Pascal Thubert (editor) 1368 Cisco Systems 1369 Building D - Regus 1370 45 Allee des Ormes 1371 BP1200 1372 MOUGINS - Sophia Antipolis 06254 1373 FRANCE 1375 Phone: +33 4 97 23 26 34 1376 Email: pthubert@cisco.com 1377 Carsten Bormann 1378 Universitaet Bremen TZI 1379 Postfach 330440 1380 Bremen D-28359 1381 Germany 1383 Phone: +49-421-218-63921 1384 Email: cabo@tzi.org 1386 Laurent Toutain 1387 Institut MINES TELECOM; TELECOM Bretagne 1388 2 rue de la Chataigneraie 1389 CS 17607 1390 Cesson-Sevigne Cedex 35576 1391 France 1393 Email: Laurent.Toutain@telecom-bretagne.eu 1395 Robert Cragie 1396 ARM Ltd. 1397 110 Fulbourn Road 1398 Cambridge CB1 9NJ 1399 UK 1401 Email: robert.cragie@gridmerge.com