idnits 2.17.1 draft-ietf-roll-routing-dispatch-00.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 32 form feeds but 36 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 (March 21, 2016) is 2958 days in the past. Is this intentional? 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 1093, 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 (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 roll P. Thubert, Ed. 3 Internet-Draft Cisco 4 Intended status: Standards Track C. Bormann 5 Expires: September 22, 2016 Uni Bremen TZI 6 L. Toutain 7 IMT-TELECOM Bretagne 8 R. Cragie 9 ARM 10 March 21, 2016 12 6LoWPAN Routing Header 13 draft-ietf-roll-routing-dispatch-00 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 September 22, 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 SRH 6LoRH Header . . . . . . . . . . . . . . . . . . . . 11 72 5.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . . 11 73 5.2. SRH-6LoRH General Operation . . . . . . . . . . . . . . . 13 74 5.2.1. Uncompressed SRH Operation . . . . . . . . . . . . . 13 75 5.2.2. 6LoRH-Compressed SRH Operation . . . . . . . . . . . 13 76 5.2.3. Inner LOWPAN_IPHC Compression . . . . . . . . . . . . 14 77 5.3. The Design Point of Popping Entries . . . . . . . . . . . 14 78 5.4. Compression Reference for SRH-6LoRH header entries . . . 15 79 5.5. Popping Headers . . . . . . . . . . . . . . . . . . . . . 16 80 5.6. Forwarding . . . . . . . . . . . . . . . . . . . . . . . 17 81 6. The RPL Packet Information 6LoRH . . . . . . . . . . . . . . 17 82 6.1. Compressing the RPLInstanceID . . . . . . . . . . . . . . 19 83 6.2. Compressing the SenderRank . . . . . . . . . . . . . . . 19 84 6.3. The Overall RPI-6LoRH encoding . . . . . . . . . . . . . 19 85 7. The IP-in-IP 6LoRH Header . . . . . . . . . . . . . . . . . . 22 86 8. Security Considerations . . . . . . . . . . . . . . . . . . . 23 87 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 88 9.1. Reserving Space in 6LoWPAN Dispatch Page 1 . . . . . . . 23 89 9.2. New 6LoWPAN Routing Header Type Registry . . . . . . . . 24 90 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 24 91 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 24 92 11.1. Normative References . . . . . . . . . . . . . . . . . . 24 93 11.2. Informative References . . . . . . . . . . . . . . . . . 25 94 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 26 95 A.1. Examples Compressing The RPI . . . . . . . . . . . . . . 26 96 A.2. Example Of Downward Packet In Non-Storing Mode . . . . . 28 97 A.3. Example of SRH-6LoRH life-cycle . . . . . . . . . . . . . 30 98 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32 100 1. Introduction 102 The design of Low Power and Lossy Networks (LLNs) is generally 103 focused on saving energy, a very constrained resource in most cases. 104 The other constraints, such as the memory capacity and the duty 105 cycling of the LLN devices, derive from that primary concern. Energy 106 is often available from primary batteries that are expected to last 107 for years, or is scavenged from the environment in very limited 108 quantities. Any protocol that is intended for use in LLNs must be 109 designed with the primary concern of saving energy as a strict 110 requirement. 112 Controlling the amount of data transmission is one possible venue to 113 save energy. In a number of LLN standards, the frame size is limited 114 to much smaller values than the IPv6 maximum transmission unit (MTU) 115 of 1280 bytes. In particular, an LLN that relies on the classical 116 Physical Layer (PHY) of IEEE 802.15.4 [IEEE802154] is limited to 127 117 bytes per frame. The need to compress IPv6 packets over IEEE 118 802.15.4 led to the 6LoWPAN Header Compression [RFC6282] work 119 (6LoWPAN-HC). 121 Innovative Route-over techniques have been and are still being 122 developed for routing inside a LLN. In a general fashion, such 123 techniques require additional information in the packet to provide 124 loop prevention and to indicate information such as flow 125 identification, source routing information, etc. 127 For reasons such as security and the capability to send ICMP errors 128 back to the source, an original packet must not be tampered with, and 129 any information that must be inserted in or removed from an IPv6 130 packet must be placed in an extra IP-in-IP encapsulation. This is 131 the case when the additional routing information is inserted by a 132 router on the path of a packet, for instance a mesh root, as opposed 133 to the source node. This is also the case when some routing 134 information must be removed from a packet that flows outside the LLN. 135 When to use RFC 6553, 6554 and IPv6-in-IPv6 136 [I-D.robles-roll-useofrplinfo] details different cases where RFC 137 6553, RFC 6554 and IPv6-in-IPv6 encapsulation is required to set the 138 bases to help defining the compression of RPL routing information in 139 LLN environments. 141 When using [RFC6282] the outer IP header of an IP-in-IP encapsulation 142 may be compressed down to 2 octets in stateless compression and down 143 to 3 octets in stateful compression when context information must be 144 added. 146 0 1 147 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 148 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 149 | 0 | 1 | 1 | TF |NH | HLIM |CID|SAC| SAM | M |DAC| DAM | 150 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 152 Figure 1: LOWPAN_IPHC base Encoding (RFC6282). 154 The Stateless Compression of an IPv6 addresses can only happen if the 155 IPv6 address can de deduced from the MAC addresses, meaning that the 156 IP end point is also the MAC-layer endpoint. This is generally not 157 the case in a RPL network which is generally a multi-hop route-over 158 (i.e., operated at Layer-3) network. A better compression, which 159 does not involve variable compressions depending on the hop in the 160 mesh, can be achieved based on the fact that the outer encapsulation 161 is usually between the source (or destination) of the inner packet 162 and the root. Also, the inner IP header can only be compressed by 163 [RFC6282] if all the fields preceding it are also compressed. This 164 specification makes the inner IP header the first header to be 165 compressed by [RFC6282], and keeps the inner packet encoded the same 166 way whether it is encapsulated or not, thus preserving existing 167 implementations. 169 As an example, the Routing Protocol for Low Power and Lossy Networks 170 [RFC6550] (RPL) is designed to optimize the routing operations in 171 constrained LLNs. As part of this optimization, RPL requires the 172 addition of RPL Packet Information (RPI) in every packet, as defined 173 in Section 11.2 of [RFC6550]. 175 The RPL Option for Carrying RPL Information in Data-Plane Datagrams 176 [RFC6553] specification indicates how the RPI can be placed in a RPL 177 Option (RPL-OPT) that is placed in an IPv6 Hop-by-Hop header. 179 This representation demands a total of 8 bytes, while in most cases 180 the actual RPI payload requires only 19 bits. Since the Hop-by-Hop 181 header must not flow outside of the RPL domain, it must be inserted 182 in packets entering the domain and be removed from packets that leave 183 the domain. In both cases, this operation implies an IP-in-IP 184 encapsulation. 186 Additionally, in the case of the Non-Storing Mode of Operation (MOP), 187 RPL requires a Source Routing Header (SRH) in all packets that are 188 routed down a RPL graph. for that purpose, the [IPv6 Routing Header 189 for Source Routes with RPL] (#RFC6554) specification defines the type 190 3 Routing Header for IPv6 (RH3). 192 ------+--------- ^ 193 | Internet | 194 | | Native IPv6 195 +-----+ | 196 | | Border Router (RPL Root) ^ | ^ 197 | | | | | 198 +-----+ | | | IPv6 in 199 | | | | IPv6 200 o o o o | | | plus 201 o o o o o o o o o | | | 202 o o o o o o o o o o | | | RPL SRH 203 o o o o o o o o o | | | 204 o o o o o o o o v v v 205 o o o o 206 LLN 208 Figure 2: IP-in-IP Encapsulation within the LLN. 210 With Non-Storing RPL, even if the source is a node in the same LLN, 211 the packet must first reach up the graph to the root so that the root 212 can insert the SRH to go down the graph. In any fashion, whether the 213 packet was originated in a node in the LLN or outside the LLN, and 214 regardless of whether the packet stays within the LLN or not, as long 215 as the source of the packet is not the root itself, the source- 216 routing operation also implies an IP-in-IP encapsulation at the root 217 in order to insert the SRH. 219 6TiSCH [I-D.ietf-6tisch-architecture] specifies the operation of IPv6 220 over the TimeSlotted Channel Hopping [RFC7554] (TSCH) mode of 221 operation of IEEE 802.15.4. The architecture requires the use of 222 both RPL and the 6lo adaptation layer over IEEE 802.15.4. Because it 223 inherits the constraints on frame size from the MAC layer, 6TiSCH 224 cannot afford to allocate 8 bytes per packet on the RPI. Hence the 225 requirement for 6LoWPAN header compression of the RPI. 227 An extensible compression technique is required that simplifies IP- 228 in-IP encapsulation when it is needed, and optimally compresses 229 existing routing artifacts found in RPL LLNs. 231 This specification extends the 6lo adaptation layer framework 232 ([RFC4944],[RFC6282]) so as to carry routing information for route- 233 over networks based on RPL. The specification includes the formats 234 necessary for RPL and is extensible for additional formats. 236 2. Terminology 238 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 239 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 240 "OPTIONAL" in this document are to be interpreted as described in 241 [RFC2119]. 243 The Terminology used in this document is consistent with and 244 incorporates that described in `Terminology in Low power And Lossy 245 Networks' [RFC7102] and [RFC6550]. 247 The terms Route-over and Mesh-under are defined in [RFC6775]. 249 Other terms in use in LLNs are found in [RFC7228]. 251 The term "byte" is used in its now customary sense as a synonym for 252 "octet". 254 3. Using the Page Dispatch 256 The 6LoWPAN Paging Dispatch [I-D.ietf-6lo-paging-dispatch] 257 specification extends the 6lo adaptation layer framework ([RFC4944], 258 [RFC6282]) by introducing a concept of "context" in the 6LoWPAN 259 parser, a context being identified by a Page number. The 260 specification defines 16 Pages. 262 This draft operates within Page 1, which is indicated by a Dispatch 263 Value of binary 11110001. 265 3.1. New Routing Header Dispatch (6LoRH) 267 This specification introduces a new 6LoWPAN Routing Header (6LoRH) to 268 carry IPv6 routing information. The 6LoRH may contain source routing 269 information such as a compressed form of SRH, as well as other sorts 270 of routing information such as the RPI and IP-in-IP encapsulation. 272 The 6LoRH is expressed in a 6loWPAN packet as a Type-Length-Value 273 (TLV) field, which is extensible for future use. 275 This specification uses the bit pattern 10xxxxxx in Page 1 for the 276 new 6LoRH Dispatch. Section 4 describes how RPL artifacts in data 277 packets can be compressed as 6LoRH headers. 279 3.2. Placement Of 6LoRH headers 280 3.2.1. Relative To Non-6LoRH Headers 282 Paging Dispatch is parsed and no subsequent Paging Dispatch has been 283 parsed, the parsing of the packet MUST follow this specification if 284 the 6LoRH Bit Pattern Section 3.1 is found. 286 With this specification, the 6LoRH Dispatch is only defined in Page 287 context is active. 289 Because a 6LoRH header requires a Page 1 context, it MUST always be 290 placed after any Fragmentation Header and/or Mesh Header [RFC4944]. 292 A 6LoRH header MUST always be placed before the LOWPAN_IPHC as 293 defined in 6LoWPAN Header Compression [RFC6282]. It is designed in 294 such a fashion that placing or removing a header that is encoded with 295 6LoRH does not modify the part of the packet that is encoded with 296 LoWPAN_IPHC, whether there is an IP-in-IP encapsulation or not. For 297 instance, the final destination of the packet is always the one in 298 the LOWPAN_IPHC whether there is a Routing Header or not. 300 3.2.2. Relative To Other 6LoRH Headers 302 IPv6 [RFC2460] defines chains of headers that are introduced by an 303 IPv6 header and terminated by either another IPv6 header (IP-in-IP) 304 or an Upper Layer Protocol ULP) header. When an outer header is 305 stripped from the packet, the whole chain goes with it. When one or 306 more header(s) are inserted by an intermediate router, that router 307 normally chains the headers and encapsulates the result in IP-in-IP. 309 With this specification, the chains of headers MUST be compressed in 310 the same order as they appear in the uncompressed form of the packet. 311 This means that if there is more than one nested IP-in-IP 312 encapsulations, the first IP-in-IP encapsulation, with all its chain 313 of headers, is encoded first in the compressed form. 315 In the compressed form of a packet that has SRH or HbH headers after 316 the inner IPv6 header (e.g. if there is no IP-in-IP encapsulation), 317 these headers are placed in the 6LoRH form before the 6LOWPAN-IPHC 318 that represents the IPv6 header Section 3.2.1. If this packet gets 319 encapsulated and some other SRH or HbH headers are added as part of 320 the encapsulation, placing the 6LoRH headers next to one another may 321 present an ambiguity on which header belong to which chain in the 322 uncompressed form. 324 In order to disambiguate the headers that follow the inner IPv6 325 header in the uncompressed form from the headers that follow the 326 outer IP-in-IP header, it is REQUIRED that the compressed IP-in-IP 327 header is placed last in the encoded chain. This means that the 328 6LoRH headers that are found after the last compressed IP-in-IP 329 header are to be inserted after the IPv6 header that is encoded with 330 the 6LOWPAN-IPHC when decompressing the packet. 332 With regards to the relative placement of the SRH and the RPI in the 333 compressed form, it is a design point for this specification that the 334 SRH entries are consumed as the packet progresses down the LLN 335 Section 5.3. In order to make this operation simpler in the 336 compressed form, it is REQUIRED that the in the compressed form, the 337 addresses along the source route path are encoded in the order of the 338 path, and that the compressed SRH are placed before the compressed 339 RPI. 341 4. 6LoWPAN Routing Header General Format 343 The 6LoRH usesthe Dispatch Value Bit Pattern of 10xxxxxx in Page 1. 345 The Dispatch Value Bit Pattern is split in two forms of 6LoRH: 347 Elective (6LoRHE) that may skipped if not understood 349 Critical (6LoRHC) that may not be ignored 351 4.1. Elective Format 353 The 6LoRHE uses the Dispatch Value Bit Pattern of 101xxxxx. A 6LoRHE 354 may be ignored and skipped in parsing. If it is ignored, the 6LoRHE 355 is forwarded with no change inside the LLN. 357 0 1 358 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 359 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- ... -+ 360 |1|0|1| Length | Type | | 361 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- ... -+ 362 <-- Length --> 364 Figure 3: Elective 6LoWPAN Routing Header. 366 Length: 367 Length of the 6LoRHE expressed in bytes, excluding the first 2 368 bytes. This enables a node to skip a 6LoRHE header that it 369 does not support and/or cannot parse, for instance if the Type 370 is not recognized. 372 Type: 373 Type of the 6LoRHE 375 4.2. Critical Format 377 The 6LoRHC uses the Dispatch Value Bit Pattern of 100xxxxx. 379 A node which does not support the 6LoRHC Type MUST silently discard 380 the packet. 382 Note: The situation where a node receives a message with a Critical 383 6LoWPAN Routing Header that it does not understand is a critical 384 administrative error whereby the wrong device is placed in a network. 385 It makes no sense to overburden the constrained device with code that 386 would send an ICMP error to the source. Rather, it is expected that 387 the device will raise some management alert indicating that it cannot 388 operate in this network for that reason. As a result, there is no 389 provision for the exchange of error messages for this situation, so 390 it should be avoided by judicious use of administrative control and/ 391 or capability indications by the device manufacturer. 393 0 1 394 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 395 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- ... -+ 396 |1|0|0| TSE | Type | | 397 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- ... -+ 398 <-- Length implied by Type/TSE --> 400 Figure 4: Critical 6LoWPAN Routing Header. 402 TSE: 403 Type Specific Extension. The meaning depends on the Type, 404 which must be known in all of the nodes. The interpretation of 405 the TSE depends on the Type field that follows. For instance, 406 it may be used to transport control bits, the number of 407 elements in an array, or the length of the remainder of the 408 6LoRHC expressed in a unit other than bytes. 410 Type: 411 Type of the 6LoRHC 413 4.3. Compressing Addresses 415 The general technique used in this draft to compress an address is 416 first to determine a reference that as a long prefix match with this 417 address, and then elide that matching piece. In order to reconstruct 418 the compress address, the receiving node will perform the process of 419 coalescence described in section Section 4.3.1. 421 One possible reference is the root of the RPL DODAG that is being 422 traversed. It is used by 6LoRH as the reference to compress an outer 423 IP header, in case of an IP-in-IP encapsulation. If the root is the 424 source of the packet, this technique allows to fully elide the source 425 address in the compressed form of the IP header. If the root is not 426 the encapsulator, then the encapsulator address may still be 427 compressed using the root as reference. How the address of the root 428 is determined is discussed in Section 4.3.2. 430 Once the address of the source of the packet is determined, it 431 becomes the reference for the compression of the addresses that are 432 located in compressed SRH headers that are present inside the IP-in- 433 IP encapsulation in the uncompressed form. 435 4.3.1. Coalescence 437 An IPv6 compressed address is coalesced with a reference address by 438 overriding the N rightmost bytes of the reference address with the 439 compressed address, where N is the length of the compressed address, 440 as indicated by the Type of the SRH-6LoRH header in Figure 7. 442 The reference address MAY be a compressed address as well, in which 443 case it MUST be compressed in a form that is of an equal or greater 444 length than the address that is being coalesced. 446 A compressed address is expanded by coalescing it with a reference 447 address. In the particular case of a Type 4 SRH-6LoRH, the address 448 is expressed in full and the coalescence is a complete override as 449 illustrated in Figure 5. 451 RRRRRRRRRRRRRRRRRRRR reference address, may be compressed or not 453 CCCCCCC compressed address, shorter or same as reference 455 RRRRRRRRRRRRRCCCCCCC Coalesced address, same compression as reference 457 Figure 5: Coalescing addresses. 459 4.3.2. DODAG Root Address Determination 461 Stateful Address compression requires that some state is installed in 462 the devices to store the compression information that is elided from 463 the packet. That state is stored in an abstract context table and 464 some form of index is found in the packet to obtain the compression 465 information from the context table. 467 With [RFC6282], the state is provided to the stack by the 6LoWPAN 468 Neighbor Discovery Protocol (NDP) [RFC6775]. NDP exchanges the 469 context through 6LoWPAN Context Option in Router Advertisement (RA) 470 messages. In the compressed form of the packet, the context can be 471 signaled in a Context Identifier Extension. 473 With this specification, the compression information is provided to 474 the stack by RPL, and RPL exchanges it through the DODAGID field in 475 the DAG Information Object (DIO) messages, as described in more 476 details below. In the compressed form of the packet, the context can 477 be signaled in by the RPLInstanceID in the RPI. 479 With RPL [RFC6550], the address of the DODAG root is known from the 480 DODAGID field of the DIO messages. For a Global Instance, the 481 RPLInstanceID that is present in the RPI is enough information to 482 identify the DODAG that this node participates to and its associated 483 root. But for a Local Instance, the address of the root MUST be 484 explicit, either in some device configuration or signaled in the 485 packet, as the source or the destination address, respectively. 487 When implicit, the address of the DODAG root MUST be determined as 488 follows: 490 If the whole network is a single DODAG then the root can be well- 491 known and does not need to be signaled in the packets. But since RPL 492 does not expose that property, it can only be known by a 493 configuration applied to all nodes. 495 Else, the router that encapsulates the packet and compresses it with 496 this specification MUST also place an RPI in the packet as prescribed 497 by [RFC6550] to enable the identification of the DODAG. The RPI must 498 be present even in the case when the router also places an SRH header 499 in the packet. 501 It is expected that the RPL implementation maintains an abstract 502 context table, indexed by Global RPLInstanceID, that provides the 503 address of the root of the DODAG that this nodes participates to for 504 that particular RPL Instance. 506 5. The SRH 6LoRH Header 508 5.1. Encoding 510 The Source Routing Header 6LoRH (SRH-6LoRH) header is a Critical 511 6LoWPAN Routing Header that provides a compressed form for the SRH, 512 as defined in [RFC6554] for use by RPL routers. Routers that need to 513 forward a packet with a SRH-6LoRH are expected to be RPL routers and 514 are expected to support this specification. If a non-RPL router 515 receives a packet with a SRH-6LoRH, this means that there was a 516 routing error and the packet should be dropped so the Type cannot be 517 ignored. 519 0 1 520 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 521 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- -+- -+ ... +- -+ 522 |1|0|0| Size |6LoRH Type 0..4| Hop1 | Hop2 | | HopN | 523 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- -+- -+ ... +- -+ 525 Size indicates the number of compressed addresses 527 Figure 6: The SRH-6LoRH. 529 The 6LoRH Type indicates the compression level used in a given SRH- 530 6LoRH header. 532 One or more 6LoRH header(s) MAY be placed in a 6LoWPAN packet. 534 It results that all addresses in a given SRH-6LoRH header MUST be 535 compressed in an identical fashion, down to using the identical 536 number of bytes per address. In order to get different degrees of 537 compression, multiple consecutive SRH-6LoRH headers MUST be used. 539 Type 0 means that the address is compressed down to one byte, whereas 540 Type 4 means that the address is provided in full in the SRH-6LoRH 541 with no compression. The complete list of Types of SRH-6LoRH and the 542 corresponding compression level are provided in Figure 7: 544 +-----------+----------------------+ 545 | 6LoRH | Length of compressed | 546 | Type | IPv6 address (bytes) | 547 +-----------+----------------------+ 548 | 0 | 1 | 549 | 1 | 2 | 550 | 2 | 4 | 551 | 3 | 8 | 552 | 4 | 16 | 553 +-----------+----------------------+ 555 Figure 7: The SRH-6LoRH Types. 557 In the case of a SRH-6LoRH header, the TSE field is used as a Size, 558 which encodes the number of hops minus 1; so a Size of 0 means one 559 hop, and the maximum that can be encoded is 32 hops. (If more than 560 32 hops need to be expressed, a sequence of SRH-6LoRH elements can be 561 employed.) It results that the Length in bytes of a SRH-6LoRH header 562 is: 564 2 + Length_of_compressed_IPv6_address * (Size + 1) 566 5.2. SRH-6LoRH General Operation 568 5.2.1. Uncompressed SRH Operation 570 In the non-compressed form, when the root generates or forwards a 571 packet in non-Storing Mode, it needs to include a Source Routing 572 Header [RFC6554] to signal a strict source-route path to a final 573 destination down the DODAG. 575 All the hops along the path, but the first one, are encoded in order 576 in the SRH. The last entry in the SRH is the final destination and 577 the destination in the IPv6 header is the first hop along the source- 578 route path. The intermediate hops perform a swap and the Segment- 579 Left field indicates the active entry in the Routing Header 580 [RFC2460]. 582 The current destination of the packet, which is the termination of 583 the current segment, is indicated at all times by the destination 584 address of the IPv6 header. 586 5.2.2. 6LoRH-Compressed SRH Operation 588 The handling of the SRH-6LoRH is different: there is no swap, and a 589 forwarding router that corresponds to the first entry in the first 590 SRH-6LoRH upon reception of a packet effectively consumes that entry 591 when forwarding. This means that the size of a compressed source- 592 routed packet decreases as the packet progresses along its path and 593 that the routing information is lost along the way. This also means 594 that an SRH encoded with 6LoRH is not recoverable and cannot be 595 protected. 597 When compressed with this specification, all the remaining hops MUST 598 be encoded in order in one or more consecutive SRH-6LoRH headers. 599 Whether or not there is a SRH-6LoRH header present, the address of 600 the final destination is indicated in the LoWPAN_IPHC at all times 601 along the path. Examples of this are provided in Appendix A. 603 The current destination (termination of the current segment) for a 604 compressed source-routed packet is indicated in the first entry of 605 the first SRH-6LoRH. In strict source-routing, that entry MUST match 606 an address of the router that receives the packet. 608 The last entry in the last SRH-6LoRH is the last router on the way to 609 the final destination in the LLN. This router can be the final 610 destination if it is found desirable to carry a whole IP-in-IP 611 encapsulation all the way. Else, it is the RPL parent of the final 612 destination, or a router acting at 6LR [RFC6775] for the destination 613 host, and advertising the host as an external route to RPL. 615 If the SRH-6LoRH header is contained in an IP-in-IP encapsulation, 616 the last router removes the whole chain of headers. Otherwise, it 617 removes the SRH-6LoRH header only. 619 5.2.3. Inner LOWPAN_IPHC Compression 621 6LoWPAN ND [RFC6282] is designed to support more than one IPv6 622 address per node and per Interface Identifier (IID), an IID being 623 typically derived from a MAC address to optimize the LOWPAN-IPHC 624 compression. 626 Link local addresses are compressed with stateless address 627 compression (S/DAC=0). The other addresses are derived from 628 different prefixes and they can be compressed with stateful address 629 compression based on a context (S/DAC=1). 631 But stateless compression is only defined for the specific link-local 632 prefix as opposed to the prefix in an encapsulating header. And with 633 stateful compression, the compression reference is found in a 634 context, as opposed to an encapsulating header. 636 It results that in the case of an IP-in-IP encapsulation, it is 637 possible to compress an inner source (respectively destination) IP 638 address in a LOWPAN_IPHC based on the encapsulating IP header only if 639 stateful (context-based) compression is used. The compression will 640 operate only if the IID in the source (respectively the destination) 641 IP address in the outer and inner headers match, which usually means 642 that they refer to the same node . This is encoded as S/DAC = 1 and 643 S/AM=11. It must be noted that the outer destination address that is 644 used to compress the inner destination address is the last entry in 645 the last SRH-6LoRH header. 647 5.3. The Design Point of Popping Entries 649 In order to save energy and to optimize the chances of transmission 650 success on lossy media, it is a design point for this specification 651 that the entries in the SRH that have been used are removed from the 652 packet. This creates a discrepancy from the art of IPv6 where 653 Routing Header are mutable but recoverable. 655 With this specification, the packet can be expanded at any hop into a 656 valid IPv6 packet, including a SRH, and compressed back. But the 657 packet as decompressed along the way will not carry all the consumed 658 addresses that packet would have if it had been forwarded in the 659 uncompressed form. 661 It is noted that: 663 The value of keeping the whole RH in an IPv6 header is for the 664 receiver to reverse it to use the symmetrical path on the way 665 back. 667 It is generally not a good idea to reverse a routing header. The 668 RH may have been used to stay away from the shortest path for some 669 reason that is only valid on the way in (segment routing). 671 There is no use of reversing a RH in the present RPL 672 specifications. 674 P2P RPL reverses a path that was learned reactively, as a part of 675 the protocol operation, which is probably a cleaner way than a 676 reversed echo on the data path. 678 Reversing a header is discouraged by [RFC2460] for RH0 unless it 679 is authenticated, which requires an Authentication Header (AH). 680 There is no definition of an AH operation for SRH, and there is no 681 indication that the need exists in LLNs. 683 It is noted that AH does not protect the RH on the way. AH is a 684 validation at the receiver with the sole value of enabling the 685 receiver to reversing it. 687 A RPL domain is usually protected by L2 security and that secures 688 both RPL itself and the RH in the packets, at every hop. This is 689 a better security than that provided by AH. 691 In summary, the benefit of saving energy and lowering the chances of 692 loss by sending smaller frames over the LLN are seen as overwhelming 693 compared to the value of possibly reversing the header. 695 5.4. Compression Reference for SRH-6LoRH header entries 697 In order to optimize the compression of IP addresses present in the 698 SRH headers, this specification requires that the 6LoWPAN layer 699 identifies an address that is used as reference for the compression. 701 With this specification, the Compression Reference for the first 702 address found in an SRH header is the source of the IPv6 packet, and 703 then the reference for each subsequent entry is the address of its 704 predecessor once it is uncompressed. 706 With RPL [RFC6550], an SRH header may only be present in Non-Storing 707 mode, and it may only be placed in the packet by the root of the 708 DODAG, which must be the source of the resulting IPv6 packet 709 [RFC2460]. In this case, the address used as Compression Reference 710 is that the address of the root, and it can be implicit when the 711 address of the root is. 713 The Compression Reference MUST be determined as follows: 715 The reference address may be obtained by configuration. The 716 configuration may indicate either the address in full, or the 717 identifier of a 6LoWPAN Context that carries the address [RFC6775], 718 for instance one of the 16 Context Identifiers used in LOWPAN-IPHC 719 [RFC6282]. 721 Else, and if there is no IP-in-IP encapsulation, the source address 722 in the IPv6 header that is compressed with LOWPAN-IPHC is the 723 reference for the compression. 725 Else, and if the IP-in-IP compression specified in this document is 726 used and the Encapsulator Address is provided, then the Encapsulator 727 Address is the reference. 729 5.5. Popping Headers 731 Upon reception, the router checks whether the address in the first 732 entry of the first SRH-6LoRH one of its own addresses. In that case, 733 router MUST consume that entry before forwarding, which is an action 734 of popping from a stack, where the stack is effectively the sequence 735 of entries in consecutive SRH-6LoRH headers. 737 Popping an entry of an SRH-6LoRH header is a recursive action 738 performed as follows: 740 If the Size of the SRH-6LoRH header is 1 or more, indicating that 741 there are at least 2 entries in the header, the router removes the 742 first entry and decrements the Size (by 1). 744 Else (meaning that this is the last entry in the SRH-6LoRH header), 745 and if there is no next SRH-6LoRH header after this then the SRH- 746 6LoRH is removed. 748 Else, if there is a next SRH-6LoRH of a Type with a larger or equal 749 value, meaning a same or lesser compression yielding same or larger 750 compressed forms, then the SRH-6LoRH is removed. 752 Else, the first entry of the next SRH-6LoRH is popped from the next 753 SRH-6LoRH and coalesced with the first entry of this SRH-6LoRH. 755 At the end of the process, if there is no more SRH-6LoRH in the 756 packet, then the processing node is the last router along the source 757 route path. 759 5.6. Forwarding 761 When receiving a packet with a SRH-6LoRH, a router determines the 762 IPv6 address of the current segment endpoint. 764 If strict source routing is enforced and thus router is not the 765 segment endpoint for the packet then this router MUST drop the 766 packet. 768 If this router is the current segment endpoint, then the router pops 769 its address as described in Section 5.5 and continues processing the 770 packet. 772 If there is still a SRH-6LoRH, then the router determines the new 773 segment endpoint and routes the packet towards that endpoint. 775 Otherwise the router uses the destination in the inner IP header to 776 forward or accept the packet. 778 The segment endpoint of a packet MUST be determined as follows: 780 The router first determines the Compression Reference as discussed in 781 Section 4.3.1. 783 The router then coalesces the Compression Reference with the first 784 entry of the first SRH-6LoRH header as discussed in Section 5.4. If 785 the type of the SRH-6LoRH header is type 4 then the coalescence is a 786 full override. 788 Since the Compression Reference is an uncompressed address, the 789 coalesced IPv6 address is also expressed in the full 128bits. 791 An example of this operation is provided in Appendix A.3. 793 6. The RPL Packet Information 6LoRH 795 [RFC6550], Section 11.2, specifies the RPL Packet Information (RPI) 796 as a set of fields that are placed by RPL routers in IP packets to 797 identify the RPL Instance, detect anomalies and trigger corrective 798 actions. 800 In particular, the SenderRank, which is the scalar metric computed by 801 a specialized Objective Function such as [RFC6552], indicates the 802 Rank of the sender and is modified at each hop. The SenderRank field 803 is used to validate that the packet progresses in the expected 804 direction, either upwards or downwards, along the DODAG. 806 RPL defines the RPL Option for Carrying RPL Information in Data-Plane 807 Datagrams [RFC6553] to transport the RPI, which is carried in an IPv6 808 Hop-by-Hop Options Header [RFC2460], typically consuming eight bytes 809 per packet. 811 With [RFC6553], the RPL option is encoded as six octets, which must 812 be placed in a Hop-by-Hop header that consumes two additional octets 813 for a total of eight octets. To limit the header's range to just the 814 RPL domain, the Hop-by-Hop header must be added to (or removed from) 815 packets that cross the border of the RPL domain. 817 The 8-byte overhead is detrimental to LLN operation, in particular 818 with regards to bandwidth and battery constraints. These bytes may 819 cause a containing frame to grow above maximum frame size, leading to 820 Layer 2 or 6LoWPAN [RFC4944] fragmentation, which in turn leads to 821 even more energy expenditure and issues discussed in LLN Fragment 822 Forwarding and Recovery [I-D.thubert-6lo-forwarding-fragments]. 824 An additional overhead comes from the need, in certain cases, to add 825 an IP-in-IP encapsulation to carry the Hop-by-Hop header. This is 826 needed when the router that inserts the Hop-by-Hop header is not the 827 source of the packet, so that an error can be returned to the router. 828 This is also the case when a packet originated by a RPL node must be 829 stripped from the Hop-by-Hop header to be routed outside the RPL 830 domain. 832 For that reason, this specification defines an IP-in-IP-6LoRH header 833 in Section 7, but it must be noted that removal of a 6LoRH header 834 does not require manipulation of the packet in the LOWPAN_IPHC, and 835 thus, if the source address in the LOWPAN_IPHC is the node that 836 inserted the IP-in-IP-6LoRH header then this situation alone does not 837 mandate an IP-in-IP-6LoRH header. 839 Note: A typical packet in RPL non-storing mode going down the RPL 840 graph requires an IP-in-IP encapsulation of the SRH, whereas the RPI 841 is usually (and quite illegally) omitted, unless it is important to 842 indicate the RPLInstanceID. To match this structure, an optimized 843 IP-in-IP 6LoRH header is defined in Section 7. 845 As a result, a RPL packet may bear only an RPI-6LoRH header and no 846 IP-in-IP-6LoRH header. In that case, the source and destination of 847 the packet are specified by the LOWPAN_IPHC. 849 As with [RFC6553], the fields in the RPI include an 'O', an 'R', and 850 an 'F' bit, an 8-bit RPLInstanceID (with some internal structure), 851 and a 16-bit SenderRank. 853 The remainder of this section defines the RPI-6LoRH header, which is 854 a Critical 6LoWPAN Routing Header that is designed to transport the 855 RPI in 6LoWPAN LLNs. 857 6.1. Compressing the RPLInstanceID 859 RPL Instances are discussed in [RFC6550], Section 5. A number of 860 simple use cases do not require more than one RPL Instance, and in 861 such cases, the RPL Instance is expected to be the Global Instance 0. 862 A global RPLInstanceID is encoded in a RPLInstanceID field as 863 follows: 865 0 1 2 3 4 5 6 7 866 +-+-+-+-+-+-+-+-+ 867 |0| ID | Global RPLInstanceID in 0..127 868 +-+-+-+-+-+-+-+-+ 870 Figure 8: RPLInstanceID Field Format for Global Instances. 872 For the particular case of the Global Instance 0, the RPLInstanceID 873 field is all zeros. This specification allows to elide a 874 RPLInstanceID field that is all zeros, and defines a I flag that, 875 when set, signals that the field is elided. 877 6.2. Compressing the SenderRank 879 The SenderRank is the result of the DAGRank operation on the rank of 880 the sender; here the DAGRank operation is defined in [RFC6550], 881 Section 3.5.1, as: 883 DAGRank(rank) = floor(rank/MinHopRankIncrease) 885 If MinHopRankIncrease is set to a multiple of 256, the least 886 significant 8 bits of the SenderRank will be all zeroes; by eliding 887 those, the SenderRank can be compressed into a single byte. This 888 idea is used in [RFC6550] by defining DEFAULT_MIN_HOP_RANK_INCREASE 889 as 256 and in [RFC6552] that defaults MinHopRankIncrease to 890 DEFAULT_MIN_HOP_RANK_INCREASE. 892 This specification allows to encode the SenderRank as either one or 893 two bytes, and defines a K flag that, when set, signals that a single 894 byte is used. 896 6.3. The Overall RPI-6LoRH encoding 898 The RPI-6LoRH header provides a compressed form for the RPL RPI. 899 Routers that need to forward a packet with a RPI-6LoRH header are 900 expected to be RPL routers that support this specification. If a 901 non-RPL router receives a packet with a RPI-6LoRH header, there was a 902 routing error and the packet should be dropped. Thus the Type field 903 MUST NOT be ignored. 905 Since the I flag is not set, the TSE field does not need to be a 906 length expressed in bytes. In that case the field is fully reused 907 for control bits that encode the O, R and F flags from the RPI, as 908 well as the I and K flags that indicate the compression format. 910 The Type for the RPI-6LoRH is 5. 912 The RPI-6LoRH header is immediately followed by the RPLInstanceID 913 field, unless that field is fully elided, and then the SenderRank, 914 which is either compressed into one byte or fully in-lined as two 915 bytes. The I and K flags in the RPI-6LoRH header indicate whether 916 the RPLInstanceID is elided and/or the SenderRank is compressed. 917 Depending on these bits, the Length of the RPI-6LoRH may vary as 918 described hereafter. 920 0 1 2 921 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 922 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... -+-+-+ 923 |1|0|0|O|R|F|I|K| 6LoRH Type=5 | Compressed fields | 924 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... -+-+-+ 926 Figure 9: The Generic RPI-6LoRH Format. 928 O, R, and F bits: The O, R, and F bits are defined in [RFC6550], 929 section 11.2. 931 I bit: If it is set, the RPLInstanceID is elided and the 932 RPLInstanceID is the Global RPLInstanceID 0. If it is not set, 933 the octet immediately following the type field contains the 934 RPLInstanceID as specified in [RFC6550], section 5.1. 936 K bit: If it is set, the SenderRank is compressed into one octet, 937 with the least significant octet elided. If it is not set, the 938 SenderRank, is fully inlined as two octets. 940 In Figure 10, the RPLInstanceID is the Global RPLInstanceID 0, and 941 the MinHopRankIncrease is a multiple of 256 so the least significant 942 byte is all zeros and can be elided: 944 0 1 2 945 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 946 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 947 |1|0|0|O|R|F|1|1| 6LoRH Type=5 | SenderRank | 948 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 949 I=1, K=1 951 Figure 10: The most compressed RPI-6LoRH. 953 In Figure 11, the RPLInstanceID is the Global RPLInstanceID 0, but 954 both bytes of the SenderRank are significant so it can not be 955 compressed: 957 0 1 2 3 958 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 959 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 960 |1|0|0|O|R|F|1|0| 6LoRH Type=5 | SenderRank | 961 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 962 I=1, K=0 964 Figure 11: Eliding the RPLInstanceID. 966 In Figure 12, the RPLInstanceID is not the Global RPLInstanceID 0, 967 and the MinHopRankIncrease is a multiple of 256: 969 0 1 2 3 970 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 971 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 972 |1|0|0|O|R|F|0|1| 6LoRH Type=5 | RPLInstanceID | SenderRank | 973 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 974 I=0, K=1 976 Figure 12: Compressing SenderRank. 978 In Figure 13, the RPLInstanceID is not the Global RPLInstanceID 0, 979 and both bytes of the SenderRank are significant: 981 0 1 2 3 982 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 983 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 984 |1|0|0|O|R|F|0|0| 6LoRH Type=5 | RPLInstanceID | Sender-... 985 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 986 ...-Rank | 987 +-+-+-+-+-+-+-+-+ 988 I=0, K=0 990 Figure 13: Least compressed form of RPI-6LoRH. 992 7. The IP-in-IP 6LoRH Header 994 The IP-in-IP 6LoRH (IP-in-IP-6LoRH) header is an Elective 6LoWPAN 995 Routing Header that provides a compressed form for the encapsulating 996 IPv6 Header in the case of an IP-in-IP encapsulation. 998 An IP-in-IP encapsulation is used to insert a field such as a Routing 999 Header or an RPI at a router that is not the source of the packet. 1000 In order to send an error back regarding the inserted field, the 1001 address of the router that performs the insertion must be provided. 1003 The encapsulation can also enable the last router prior to 1004 Destination to remove a field such as the RPI, but this can be done 1005 in the compressed form by removing the RPI-6LoRH, so an IP-in-IP- 1006 6LoRH encapsulation is not required for that sole purpose. 1008 This field is not critical for routing so the Type can be ignored, 1009 and the TSE field contains the Length in bytes. 1011 0 1 2 1012 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 1013 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- ... -+ 1014 |1|0|1| Length | 6LoRH Type 6 | Hop Limit | Encaps. Address | 1015 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- ... -+ 1017 Figure 14: The IP-in-IP-6LoRH. 1019 The Length of an IP-in-IP-6LoRH header is expressed in bytes and MUST 1020 be at least 1, to indicate a Hop Limit (HL), that is decremented at 1021 each hop. When the HL reaches 0, the packet is dropped per 1022 [RFC2460]. 1024 If the Length of an IP-in-IP-6LoRH header is exactly 1, then the 1025 Encapsulator Address is elided, which means that the Encapsulator is 1026 a well-known router, for instance the root in a RPL graph. 1028 The most efficient compression of an IP-in-IP encapsulation that can 1029 be achieved with this specification is obtained when an endpoint of 1030 the packet is the root of the RPL DODAG associated to the RPL 1031 Instance that is used to forward the packet, and the root address is 1032 known implicitly as opposed to signaled explicitly in the data 1033 packets. 1035 If the Length of an IP-in-IP-6LoRH header is greater than 1, then an 1036 Encapsulator Address is placed in a compressed form after the Hop 1037 Limit field. The value of the Length indicates which compression is 1038 performed on the Encapsulator Address. For instance, a Size of 3 1039 indicates that the Encapsulator Address is compressed to 2 bytes. 1040 The reference for the compression is the address of the root of the 1041 DODAG. The way the address of the root is determined is discussed in 1042 Section 4.3.2. 1044 With RPL, the destination address in the IP-in-IP header is 1045 implicitly the root in the RPL graph for packets going upwards, and, 1046 in storing mode, it is the destination address in the IPHC for 1047 packets going downwards. In non-storing mode, there is no implicit 1048 value for packets going downwards. 1050 If the implicit value is correct, the destination IP address of the 1051 IP-in-IP encapsulation can be elided. Else, the destination IP 1052 address of the IP-in-IP header is transported in a SRH-6LoRH header 1053 as the first entry of the first of these headers. 1055 If the final destination of the packet is a leaf that does not 1056 support this specification, then the chain of 6LoRH headers must be 1057 stripped by the RPL/6LR router to which the leaf is attached. In 1058 that example, the destination IP address of the IP-in-IP header 1059 cannot be elided. 1061 In the special case where a 6LoRH header is used to route 6LoWPAN 1062 fragments, the destination address is not accessible in the IPHC on 1063 all fragments and can be elided only for the first fragment and for 1064 packets going upwards. 1066 8. Security Considerations 1068 The security considerations of [RFC4944], [RFC6282], and [RFC6553] 1069 apply. 1071 Using a compressed format as opposed to the full in-line format is 1072 logically equivalent and is believed to not create an opening for a 1073 new threat when compared to [RFC6550], [RFC6553] and [RFC6554]. 1075 9. IANA Considerations 1077 This specification reserves Dispatch Value Bit Patterns within the 1078 6LoWPAN Dispatch Page 1 as follows: 1080 101xxxxx: for Elective 6LoWPAN Routing Headers 1082 100xxxxx: for Critical 6LoWPAN Routing Headers. 1084 9.2. New 6LoWPAN Routing Header Type Registry 1086 This document creates an IANA registry for the 6LoWPAN Routing Header 1087 Type, and assigns the following values: 1089 0..4: SRH-6LoRH [RFCthis] 1091 5: RPI-6LoRH [RFCthis] 1093 6: IP-in-IP-6LoRH [RFCthis] 1095 10. Acknowledgments 1097 The authors wish to thank Tom Phinney, Thomas Watteyne, Tengfei 1098 Chang, Martin Turon, James Woodyatt, Samita Chakrabarti, Jonathan 1099 Hui, Gabriel Montenegro and Ralph Droms for constructive reviews to 1100 the design in the 6lo Working Group. The overall discussion involved 1101 participants to the 6MAN, 6TiSCH and ROLL WGs, thank you all. 1102 Special thanks to the chairs of the ROLL WG, Michael Richardson and 1103 Ines Robles, and Brian Haberman, Internet Area A-D, and Adrian 1104 Farrel, Routing Area A-D, for driving this complex effort across 1105 Working Groups and Areas. 1107 11. References 1109 11.1. Normative References 1111 [I-D.ietf-6lo-paging-dispatch] 1112 Thubert, P., "6LoWPAN Paging Dispatch", draft-ietf-6lo- 1113 paging-dispatch-01 (work in progress), January 2016. 1115 [IEEE802154] 1116 IEEE standard for Information Technology, "IEEE std. 1117 802.15.4, Part. 15.4: Wireless Medium Access Control (MAC) 1118 and Physical Layer (PHY) Specifications for Low-Rate 1119 Wireless Personal Area Networks", 2015. 1121 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1122 Requirement Levels", BCP 14, RFC 2119, 1123 DOI 10.17487/RFC2119, March 1997, 1124 . 1126 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 1127 (IPv6) Specification", RFC 2460, DOI 10.17487/RFC2460, 1128 December 1998, . 1130 [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, 1131 "Transmission of IPv6 Packets over IEEE 802.15.4 1132 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, 1133 . 1135 [RFC6282] Hui, J., Ed. and P. Thubert, "Compression Format for IPv6 1136 Datagrams over IEEE 802.15.4-Based Networks", RFC 6282, 1137 DOI 10.17487/RFC6282, September 2011, 1138 . 1140 [RFC6550] Winter, T., Ed., Thubert, P., Ed., Brandt, A., Hui, J., 1141 Kelsey, R., Levis, P., Pister, K., Struik, R., Vasseur, 1142 JP., and R. Alexander, "RPL: IPv6 Routing Protocol for 1143 Low-Power and Lossy Networks", RFC 6550, 1144 DOI 10.17487/RFC6550, March 2012, 1145 . 1147 [RFC6552] Thubert, P., Ed., "Objective Function Zero for the Routing 1148 Protocol for Low-Power and Lossy Networks (RPL)", 1149 RFC 6552, DOI 10.17487/RFC6552, March 2012, 1150 . 1152 [RFC6553] Hui, J. and JP. Vasseur, "The Routing Protocol for Low- 1153 Power and Lossy Networks (RPL) Option for Carrying RPL 1154 Information in Data-Plane Datagrams", RFC 6553, 1155 DOI 10.17487/RFC6553, March 2012, 1156 . 1158 [RFC6554] Hui, J., Vasseur, JP., Culler, D., and V. Manral, "An IPv6 1159 Routing Header for Source Routes with the Routing Protocol 1160 for Low-Power and Lossy Networks (RPL)", RFC 6554, 1161 DOI 10.17487/RFC6554, March 2012, 1162 . 1164 [RFC7102] Vasseur, JP., "Terms Used in Routing for Low-Power and 1165 Lossy Networks", RFC 7102, DOI 10.17487/RFC7102, January 1166 2014, . 1168 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 1169 Constrained-Node Networks", RFC 7228, 1170 DOI 10.17487/RFC7228, May 2014, 1171 . 1173 11.2. Informative References 1175 [I-D.ietf-6tisch-architecture] 1176 Thubert, P., "An Architecture for IPv6 over the TSCH mode 1177 of IEEE 802.15.4", draft-ietf-6tisch-architecture-09 (work 1178 in progress), November 2015. 1180 [I-D.robles-roll-useofrplinfo] 1181 Robles, I., Richardson, M., and P. Thubert, "When to use 1182 RFC 6553, 6554 and IPv6-in-IPv6", draft-robles-roll- 1183 useofrplinfo-02 (work in progress), October 2015. 1185 [I-D.thubert-6lo-forwarding-fragments] 1186 Thubert, P. and J. Hui, "LLN Fragment Forwarding and 1187 Recovery", draft-thubert-6lo-forwarding-fragments-02 (work 1188 in progress), November 2014. 1190 [RFC6775] Shelby, Z., Ed., Chakrabarti, S., Nordmark, E., and C. 1191 Bormann, "Neighbor Discovery Optimization for IPv6 over 1192 Low-Power Wireless Personal Area Networks (6LoWPANs)", 1193 RFC 6775, DOI 10.17487/RFC6775, November 2012, 1194 . 1196 [RFC7554] Watteyne, T., Ed., Palattella, M., and L. Grieco, "Using 1197 IEEE 802.15.4e Time-Slotted Channel Hopping (TSCH) in the 1198 Internet of Things (IoT): Problem Statement", RFC 7554, 1199 DOI 10.17487/RFC7554, May 2015, 1200 . 1202 Appendix A. Examples 1204 A.1. Examples Compressing The RPI 1206 The example in Figure 15 illustrates the 6LoRH compression of a 1207 classical packet in Storing Mode in all directions, as well as in 1208 non-Storing mode for a packet going up the DODAG following the 1209 default route to the root. In this particular example, a 1210 fragmentation process takes place per [RFC4944], and the fragment 1211 headers must be placed in Page 0 before switching to Page 1: 1213 +- ... -+- ... -+-+ ... -+- ... +-+-+ ... -+-+-+-+-+-+-+-+-+-+... 1214 |Frag type|Frag hdr |11110001| RPI- |IP-in-IP| LOWPAN-IPHC | ... 1215 |RFC 4944 |RFC 4944 | Page 1 | 6LoRH | 6LoRH | | 1216 +- ... -+- ... -+-+ ... -+- ... +-+-+ ... -+-+-+-+-+-+-+-+-+-+... 1217 <- RFC 6282 -> 1218 No RPL artifact 1220 +- ... -+- ... -+-+ ... -+-+ ... -+- ... +-+-+-+-+-+-+-+-+-+-+... 1221 |Frag type|Frag hdr | 1222 |RFC 4944 |RFC 4944 | Payload (cont) 1223 +- ... -+- ... -+-+ ... -+-+ ... -+- ... +-+-+-+-+-+-+-+-+-+-+... 1225 +- ... -+- ... -+-+ ... -+-+ ... -+- ... +-+-+-+-+-+-+-+-+-+-+... 1226 |Frag type|Frag hdr | 1227 |RFC 4944 |RFC 4944 | Payload (cont) 1228 +- ... -+- ... -+-+ ... -+-+ ... -+- ... +-+-+-+-+-+-+-+-+-+-+... 1230 Figure 15: Example Compressed Packet with RPI. 1232 In Storing Mode, if the packet stays within the RPL domain, then it 1233 is possible to save the IP-in-IP encapsulation, in which case only 1234 the RPI is compressed with a 6LoRH, as illustrated in Figure 16 in 1235 the case of a non-fragmented ICMP packet: 1237 +- ... -+-+- ... -+-+-+-+ ... -+-+-+-+ ... -+-+-+-+-+-+-+-+-+-+-+... 1238 |11110001| RPI-6LoRH | NH = 0 | NH = 58 | ICMP message ... 1239 |Page 1 | type 5 | 6LOWPAN-IPHC | (ICMP) | (no compression) 1240 +- ... -+-+- ... -+-+-+-+ ... -+-+-+-+ ... -+-+-+-+-+-+-+-+-+-+-+... 1241 <- RFC 6282 -> 1242 No RPL artifact 1244 Figure 16: Example ICMP Packet with RPI in Storing Mode. 1246 The format in Figure 16 is logically equivalent to the non-compressed 1247 format illustrated in Figure 17: 1249 +-+-+-+- ... -+-+-+-+ ... -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+... 1250 | IPv6 Header | Hop-by-Hop | RPI in | ICMP message ... 1251 | NH = 58 | Header | RPL Option | 1252 +-+-+-+- ... -+-+-+-+ ... -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+... 1254 Figure 17: Uncompressed ICMP Packet with RPI. 1256 For a UDP packet, the transport header can be compressed with 6LoWPAN 1257 HC [RFC6282] as illustrated in Figure 18: 1259 +- ... -+- ... -+-+-+-+- ... +-+-+-+-+-+-+-+-+-+- ... +-+-+-+-+-+... 1260 |11110001| RPI-6LoRH | NH = 1 |11110|C| P | Compressed |UDP ... 1261 |Page 1 | type 5 | 6LOWPAN-IPHC | UDP | | | UDP header |Payload 1262 +- ... -+- ... -+-+-+-+- ... +-+-+-+-+-+-+-+-+-+- ... +-+-+-+-+-+... 1263 <- RFC 6282 -> 1264 No RPL artifact 1266 Figure 18: Uncompressed ICMP Packet with RPI. 1268 If the packet is received from the Internet in Storing Mode, then the 1269 root is supposed to encapsulate the packet to insert the RPI. The 1270 resulting format would be as represented in Figure 19: 1272 +-+-+-+-+-+-+- ... -+-+-- ... -+-+- ... -+-+-+-+-+-+-+ ... -+-+-+-+... 1273 |11110001 | RPI-6LoRH | IP-in-IP | NH=1 |11110CPP| Compressed | UDP 1274 |Page 1 | | 6LoRH | IPHC | UDP | UDP header | Payload 1275 +-+-+-+-+-+-+- ... -+-+-- ... -+-+- ... -+-+-+-+-+-+-+ ... -+-+-+-+... 1276 <- RFC 6282 -> 1277 No RPL artifact 1279 Figure 19: RPI inserted by the root in Storing Mode. 1281 A.2. Example Of Downward Packet In Non-Storing Mode 1283 The example illustrated in Figure 20 is a classical packet in non- 1284 Storing mode for a packet going down the DODAG following a source 1285 routed path from the root. Say that we have 4 forwarding hops to 1286 reach a destination. In the non-compressed form, when the root 1287 generates the packet, the last 3 hops are encoded in a Routing Header 1288 type 3 (SRH) and the first hop is the destination of the packet. The 1289 intermediate hops perform a swap and the hop count indicates the 1290 current active hop [RFC2460], [RFC6554]. 1292 When compressed with this specification, the 4 hops are encoded in 1293 SRH-6LoRH when the root generates the packet, and the final 1294 destination is left in the LOWPAN-IPHC. There is no swap, and the 1295 forwarding node that corresponds to the first entry effectively 1296 consumes it when forwarding, which means that the size of the encoded 1297 packet decreases and that the hop information is lost. 1299 If the last hop in a SRH-6LoRH is not the final destination then it 1300 removes the SRH-6LoRH before forwarding. 1302 In the particular example illustrated in Figure 20, all addresses in 1303 the DODAG are assigned from a same /112 prefix and the last 2 octets 1304 encoding an identifier such as a IEEE 802.15.4 short address. In 1305 that case, all addresses can be compressed to 2 octets, using the 1306 root address as reference. There will be one SRH_6LoRH header, with, 1307 in this example, 3 compressed addresses: 1309 +-+-+-+-+-+-+- ... +-+-+- ... -+-+-- ... -+-+- ... -+-+-+-+-+ ... +-... 1310 |11110001 |SRH-6LoRH | RPI-6LoRH | IP-in-IP | NH=1 |11110CPP| UDP | UDP 1311 |Page 1 |Type1 S=2 | | 6LoRH | IPHC | UDP | hdr |load 1312 +-+-+-+-+-+-+- ... +-+-+- ... -+-+-- ... -+-+- ... -+-+-+-+-+ ... +-... 1313 <-8bytes-> <- RFC 6282 -> 1314 No RPL artifact 1316 Figure 20: Example Compressed Packet with SRH. 1318 One may note that the RPI is provided. This is because the address 1319 of the root that is the source of the IP-in-IP header is elided and 1320 inferred from the RPLInstanceID in the RPI. Once found from a local 1321 context, that address is used as Compression Reference to expand 1322 addresses in the SRH-6LoRH. 1324 With the RPL specifications available at the time of writing this 1325 draft, the root is the only node that may incorporate a SRH in an IP 1326 packet. When the root forwards a packet that it did not generate, it 1327 has to encapsulate the packet with IP-in-IP. 1329 But if the root generates the packet towards a node in its DODAG, 1330 then it should avoid the extra IP-in-IP as illustrated in Figure 21: 1332 +- ... -+-+-+ ... +-+-+-+ ... -+-+-+-+-+-+-+-++-+- ... -+-+-+-+-+... 1333 |11110001| SRH-6LoRH | NH=1 | 11110CPP | Compressed | UDP 1334 |Page 1 | Type1 S=3 | LOWPAN-IPHC| LOWPAN-NHC| UDP header | Payload 1335 +- ... -+-+-+ ... +-+-+-+ ... -+-+-+-+-+-+-+-++-+- ... -+-+-+-+-+... 1336 <- RFC 6282 -> 1338 Figure 21: compressed SRH 4*2bytes entries sourced by root. 1340 Note: the RPI is not represented though RPL [RFC6550] generally 1341 expects it. In this particular case, since the Compression Reference 1342 for the SRH-6LoRH is the source address in the LOWPAN-IPHC, and the 1343 routing is strict along the source route path, the RPI does not 1344 appear to be absolutely necessary. 1346 In Figure 21, all the nodes along the source route path share a same 1347 /112 prefix. This is typical of IPv6 addresses derived from an 1348 IEEE802.15.4 short address, as long as all the nodes share a same 1349 PAN-ID. In that case, a type-1 SRH-6LoRH header can be used for 1350 encoding. The IPv6 address of the root is taken as reference, and 1351 only the last 2 octets of the address of the intermediate hops is 1352 encoded. The Size of 3 indicates 4 hops, resulting in a SRH-6LoRH of 1353 10 bytes. 1355 A.3. Example of SRH-6LoRH life-cycle 1357 This section illustrates the operation specified in Section 5.6 of 1358 forwarding a packet with a compressed SRH along an A->B->C->D source 1359 route path. The operation of popping addresses is exemplified at 1360 each hop. 1362 Packet as received by node A 1363 ---------------------------- 1364 Type 3 SRH-6LoRH Size = 0 AAAA AAAA AAAA AAAA 1365 Type 1 SRH-6LoRH Size = 0 BBBB 1366 Type 2 SRH-6LoRH Size = 1 CCCC CCCC 1367 DDDD DDDD 1369 Step 1 popping BBBB the first entry of the next SRH-6LoRH 1370 Step 2 next is if larger value (2 vs. 1) the SRH-6LoRH is removed 1372 Type 3 SRH-6LoRH Size = 0 AAAA AAAA AAAA AAAA 1373 Type 2 SRH-6LoRH Size = 1 CCCC CCCC 1374 DDDD DDDD 1376 Step 3: recursion ended, coalescing BBBB with the first entry 1377 Type 3 SRH-6LoRH Size = 0 AAAA AAAA AAAA BBBB 1379 Step 4: routing based on next segment endpoint to B 1381 Figure 22: Processing at Node A. 1383 Packet as received by node B 1384 ---------------------------- 1385 Type 3 SRH-6LoRH Size = 0 AAAA AAAA AAAA BBBB 1386 Type 2 SRH-6LoRH Size = 1 CCCC CCCC 1387 DDDD DDDD 1389 Step 1 popping CCCC CCCC, the first entry of the next SRH-6LoRH 1390 Step 2 removing the first entry and decrementing the Size (by 1) 1392 Type 3 SRH-6LoRH Size = 0 AAAA AAAA AAAA BBBB 1393 Type 2 SRH-6LoRH Size = 0 DDDD DDDD 1395 Step 3: recursion ended, coalescing CCCC CCCC with the first entry 1396 Type 3 SRH-6LoRH Size = 0 AAAA AAAA CCCC CCCC 1398 Step 4: routing based on next segment endpoint to C 1400 Figure 23: Processing at Node B. 1402 Packet as received by node C 1403 ---------------------------- 1405 Type 3 SRH-6LoRH Size = 0 AAAA AAAA CCCC CCCC 1406 Type 2 SRH-6LoRH Size = 0 DDDD DDDD 1408 Step 1 popping DDDD DDDD, the first entry of the next SRH-6LoRH 1409 Step 2 the SRH-6LoRH is removed 1411 Type 3 SRH-6LoRH Size = 0 AAAA AAAA CCCC CCCC 1413 Step 3: recursion ended, coalescing DDDD DDDDD with the first entry 1414 Type 3 SRH-6LoRH Size = 0 AAAA AAAA DDDD DDDD 1416 Step 4: routing based on next segment endpoint to D 1418 Figure 24: Processing at Node C. 1420 Packet as received by node D 1421 ---------------------------- 1422 Type 3 SRH-6LoRH Size = 0 AAAA AAAA DDDD DDDD 1424 Step 1 the SRH-6LoRH is removed. 1425 Step 2 no more header, routing based on inner IP header. 1427 Figure 25: Processing at Node D. 1429 Authors' Addresses 1431 Pascal Thubert (editor) 1432 Cisco Systems 1433 Building D - Regus 1434 45 Allee des Ormes 1435 BP1200 1436 MOUGINS - Sophia Antipolis 06254 1437 FRANCE 1439 Phone: +33 4 97 23 26 34 1440 Email: pthubert@cisco.com 1442 Carsten Bormann 1443 Universitaet Bremen TZI 1444 Postfach 330440 1445 Bremen D-28359 1446 Germany 1448 Phone: +49-421-218-63921 1449 Email: cabo@tzi.org 1451 Laurent Toutain 1452 Institut MINES TELECOM; TELECOM Bretagne 1453 2 rue de la Chataigneraie 1454 CS 17607 1455 Cesson-Sevigne Cedex 35576 1456 France 1458 Email: Laurent.Toutain@telecom-bretagne.eu 1459 Robert Cragie 1460 ARM Ltd. 1461 110 Fulbourn Road 1462 Cambridge CB1 9NJ 1463 UK 1465 Email: robert.cragie@gridmerge.com